Advertisement
Guest User

Untitled

a guest
Jun 10th, 2017
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 143.13 KB | None | 0 0
  1. package com.rs.game.player;
  2.  
  3. import java.io.BufferedWriter;
  4. import java.io.FileWriter;
  5. import java.io.IOException;
  6. import java.net.InetAddress;
  7. import java.net.UnknownHostException;
  8. import java.text.DateFormat;
  9. import java.text.DecimalFormat;
  10. import java.text.NumberFormat;
  11. import java.text.SimpleDateFormat;
  12. import java.util.Calendar;
  13. import java.util.Date;
  14. import java.util.LinkedList;
  15. import java.util.List;
  16. import java.util.Locale;
  17. import java.util.TimerTask;
  18. import java.util.concurrent.ConcurrentLinkedQueue;
  19. import java.util.concurrent.CopyOnWriteArrayList;
  20. import java.util.concurrent.TimeUnit;
  21.  
  22. import com.rs.Settings;
  23. import com.rs.cache.loaders.ConfigDefinitions;
  24. import com.rs.cores.CoresManager;
  25. import com.rs.game.Animation;
  26. import com.rs.game.Entity;
  27. import com.rs.game.ForceTalk;
  28. import com.rs.game.Graphics;
  29. import com.rs.game.Hit;
  30. import com.rs.game.Hit.HitLook;
  31. import com.rs.game.World;
  32. import com.rs.game.WorldObject;
  33. import com.rs.game.WorldTile;
  34. import com.rs.game.item.FloorItem;
  35. import com.rs.game.item.Item;
  36. import com.rs.game.minigames.GameController;
  37. import com.rs.game.minigames.LobbyController;
  38. import com.rs.game.minigames.clanwars.FfaZone;
  39. import com.rs.game.minigames.clanwars.WarControler;
  40. import com.rs.game.minigames.duel.DuelArena;
  41. import com.rs.game.minigames.duel.DuelRules;
  42. import com.rs.game.npc.NPC;
  43. import com.rs.game.npc.familiar.Familiar;
  44. import com.rs.game.npc.godwars.zaros.Nex;
  45. import com.rs.game.npc.pet.Pet;
  46. import com.rs.game.player.actions.PlayerCombat;
  47. import com.rs.game.player.content.BountyHunter;
  48. import com.rs.game.player.content.DropLog;
  49. import com.rs.game.player.content.FriendChatsManager;
  50. import com.rs.game.player.content.ItemConstants;
  51. import com.rs.game.player.content.Magic;
  52. import com.rs.game.player.content.MoneyPouch;
  53. import com.rs.game.player.content.Notes;
  54. import com.rs.game.player.content.Pots;
  55. import com.rs.game.player.content.PuzzleBox;
  56. import com.rs.game.player.content.ReaperAssignment;
  57. import com.rs.game.player.content.SkillCapeCustomizer;
  58. import com.rs.game.player.content.clans.ClansManager;
  59. import com.rs.game.player.content.pet.PetManager;
  60. import com.rs.game.player.content.slayer.SlayerManager;
  61. import com.rs.game.player.controlers.BarrelchestControler;
  62. import com.rs.game.player.controlers.CorpBeastControler;
  63. import com.rs.game.player.controlers.CrucibleControler;
  64. import com.rs.game.player.controlers.DTControler;
  65. import com.rs.game.player.controlers.DungeoneeringControler;
  66. import com.rs.game.player.controlers.FightCaves;
  67. import com.rs.game.player.controlers.FightKiln;
  68. import com.rs.game.player.controlers.GodWars;
  69. import com.rs.game.player.controlers.ImpossibleJad;
  70. import com.rs.game.player.controlers.JailControler;
  71. import com.rs.game.player.controlers.NomadsRequiem;
  72. import com.rs.game.player.controlers.QueenBlackDragonController;
  73. import com.rs.game.player.controlers.StartTutorial;
  74. import com.rs.game.player.controlers.Wilderness;
  75. import com.rs.game.player.controlers.ZGDControler;
  76. import com.rs.game.player.controlers.battleterrace.battleTerraceGame;
  77. import com.rs.game.player.controlers.castlewars.CastleWarsPlaying;
  78. import com.rs.game.player.controlers.castlewars.CastleWarsWaiting;
  79. import com.rs.game.player.controlers.events.DeathEvent;
  80. import com.rs.game.player.controlers.fightpits.FightPitsArena;
  81. import com.rs.game.player.controlers.pestcontrol.PestControlGame;
  82. import com.rs.game.player.controlers.pestcontrol.PestControlLobby;
  83. import com.rs.game.player.dialogues.Dialogue;
  84. import com.rs.game.tasks.WorldTask;
  85. import com.rs.game.tasks.WorldTasksManager;
  86. import com.rs.net.Session;
  87. import com.rs.net.decoders.WorldPacketsDecoder;
  88. import com.rs.net.decoders.handlers.ButtonHandler;
  89. import com.rs.net.encoders.WorldPacketsEncoder;
  90. import com.rs.utils.DbLogs;
  91. import com.rs.utils.IsaacKeyPair;
  92. import com.rs.utils.Lend;
  93. import com.rs.utils.Logger;
  94. import com.rs.utils.LoggingSystem;
  95. import com.rs.utils.PkRank;
  96. import com.rs.utils.SerializableFilesManager;
  97. import com.rs.utils.Utils;
  98. import com.rs.utils.economy.Prices;
  99.  
  100. public class Player extends Entity {
  101.  
  102.     public int start = 0;
  103.  
  104.     public DropLog dropLogs;
  105.  
  106.     public int dropTestingAmount = 1;
  107.     public boolean dropTesting;
  108.  
  109.     public DropLog getDropLogs() {
  110.         return dropLogs;
  111.     }
  112.  
  113.     public boolean smallLamp, medLamp, largeLamp;
  114.     private boolean macBanned;
  115.     private String registeredMac;
  116.     public String currentMac;
  117.     public int usedMacs;
  118.  
  119.     public String getCurrentMac() {
  120.         return currentMac;
  121.     }
  122.  
  123.     public String getRegisteredMac() {
  124.         return registeredMac;
  125.     }
  126.  
  127.     public boolean isMacBanned() {
  128.         return macBanned;
  129.     }
  130.  
  131.     public String getFormattedMac() {
  132.         return formatMAC(getCurrentMac());
  133.     }
  134.  
  135.     private String formatMAC(String ip) {
  136.         byte[] macIP = ip.getBytes();
  137.         StringBuilder sb = new StringBuilder();
  138.         for (int i = 0; i < macIP.length; i++)
  139.             sb.append(String.format("%02X%s", macIP[i], (i < macIP.length - 1) ? "-" : ""));
  140.         return sb.toString();
  141.     }
  142.  
  143.     public void setCurrentMac(String currentMac) {
  144.         this.currentMac = currentMac;
  145.     }
  146.  
  147.     public void setMacBanned(boolean macBanned) {
  148.         this.macBanned = macBanned;
  149.     }
  150.  
  151.     public void setRegisteredMac(String registeredMac) {
  152.         this.registeredMac = registeredMac;
  153.     }
  154.  
  155.     public long WorldXp;// its
  156.  
  157.     public long cooldown;
  158.  
  159.     private static final long serialVersionUID = 2011932556974180375L;
  160.  
  161.     public static final int TELE_MOVE_TYPE = 127, WALK_MOVE_TYPE = 1, RUN_MOVE_TYPE = 2;
  162.     private static final DecimalFormat dFormatter = new DecimalFormat("#,###,###,###");
  163.  
  164.     public long lastDailyGiven;
  165.  
  166.     public static String getFormattedNumber(int amount) {
  167.         return dFormatter.format(amount);
  168.     }
  169.  
  170.     public String getTitleColor() {
  171.         return titleColor;
  172.     }
  173.  
  174.     public LoyaltyManager getLoyaltyManager() {
  175.         return loyaltyManager;
  176.     }
  177.  
  178.     private transient PuzzleBox puzzleBox;
  179.  
  180.     public PuzzleBox getPuzzleBox() {
  181.         return puzzleBox;
  182.     }
  183.  
  184.     public void setPuzzleBox(int puzzleId) {
  185.         this.puzzleBox = new PuzzleBox(this, puzzleId);
  186.     }
  187.  
  188.     public double gainedXP;
  189.  
  190.     public String getRankPrefix() {
  191.         if (isOwner())
  192.             return "<shad=0008F5><col=B51BE0>[Owner]</col></shad> <img=12> <shad=C42BE3>";
  193.         if (isHeadAdmin())
  194.             return "[<col=0000FF><shad=0000ff>Head Administrator</col>] <img=5> ";
  195.         if (getRights() == 2)
  196.             return "[<col=00FFFF><shad=00FFFF>Administrator</col>] <img=1> ";
  197.         if (isForumModerator())
  198.             return "[<col=238500><shad=238500>Forum Moderator</col>] <img=9> ";
  199.         if (getRights() == 1)
  200.             return "[<col=FF8800><shad=FF0000>Moderator</col>] <img=0> ";
  201.         if (isSupporter())
  202.             return "[<col=FF66CC><shad=FF66CC>Server Supporter</col>] <img=9> ";
  203.         return "";
  204.     }
  205.  
  206.     public String getRankMessage() {
  207.         if (isOwner())
  208.             return "</shad>: <shad=B50424><col=051FE6>Remember to vote daily for rewards and to help the server grow!</col></shad>";
  209.         if (isHeadAdmin())
  210.             return ": <col=0000FF><shad=0000ff>Remember to vote daily for rewards and to help the server grow!</col></shad>";
  211.         if (getRights() == 2)
  212.             return ": <col=00FFFF><shad=00FFFF>Remember to vote daily for rewards and to help the server grow!</col></shad>";
  213.         if (isForumModerator())
  214.             return ": <col=238500><shad=238500>Remember to vote daily for rewards and to help the server grow!</col></shad>";
  215.         if (getRights() == 1)
  216.             return ": <col=FF8800><shad=FF0000>Remember to vote daily for rewards and to help the server grow!</col></shad>";
  217.         if (isSupporter())
  218.             return ": <col=FF66CC><shad=FF66CC>Remember to vote daily for rewards and to help the server grow!</col></shad>";
  219.         return "";
  220.     }
  221.  
  222.     // Xp Modes
  223.     public boolean easy, medium, hard, expert;// = false, medium = false, hard =
  224.                                                 // false, insane = false;
  225.  
  226.     public void setEasy(boolean easy) {
  227.         this.easy = easy;
  228.     }
  229.  
  230.     public void setMedium(boolean medium) {
  231.         this.medium = medium;
  232.     }
  233.  
  234.     public void setHard(boolean hard) {
  235.         this.hard = hard;
  236.     }
  237.  
  238.     public void setExpert(boolean expert) {
  239.         this.expert = expert;
  240.     }
  241.  
  242.     public boolean isEasy() {
  243.         return easy;
  244.     }
  245.  
  246.     public boolean isMedium() {
  247.         return medium;
  248.     }
  249.  
  250.     public boolean isHard() {
  251.         return hard;
  252.     }
  253.  
  254.     public boolean isExpert() {
  255.         return expert;
  256.     }
  257.  
  258.     public int getXpRate() {
  259.         return isIronman() ? 35 : isExpert() ? 10 : isHard() ? 35 : isEasy() ? 150 : 75;
  260.     }
  261.  
  262.     public String getXPMode() {
  263.         if (isIronman())
  264.             return "Ironman";
  265.         else if (isExpert())
  266.             return "Expert";
  267.         else if (isHard())
  268.             return "Hard";
  269.         else if (isMedium())
  270.             return "Medium";
  271.         else
  272.             return "Easy";
  273.     }
  274.  
  275.     public int reaperPoints;
  276.     public int rerolls;
  277.     public int taskPoints;
  278.     public boolean bossTaskCompleted;
  279.     public boolean hasLearnedDeath;
  280.     private ReaperAssignment reaperAssignment;
  281.  
  282.     public boolean hasLearnedBossPets;
  283.  
  284.     public boolean HasBoughtBandos, HasBoughtArmadyl, HasBoughtZamorak, HasBoughtSaradomin, HasBoughtNex, HasBoughtCorp,
  285.             HasBoughtGlacor, HasBoughtKBD, HasBoughtHope, HasBoughtAOD, HasBoughtBork, HasBoughtBlink, HasBoughtTD,
  286.             HasBoughtPD, HasBoughtGulega, HasBoughtDaggKing, HasBoughtBarrelChest, HasBoughtWW;
  287.  
  288.     /*
  289.      * public boolean rerollTask() { if (rerolls <= 0) {
  290.      * sendMessage("You are out of task rerolls. Continue with the current one, or wait till tomorrow."
  291.      * ); return false; } rerolls--; reaperAssignment =
  292.      * ReaperAssignment.create(); sendMessage(reaperAssignment.getMessage());
  293.      * return true; }
  294.      */
  295.  
  296.     public boolean changeTask() {
  297.         reaperAssignment = ReaperAssignment.create();
  298.         sendMessage(reaperAssignment.getMessage());
  299.         return true;
  300.     }
  301.  
  302.     public boolean hasBossTask() {
  303.         return reaperAssignment != null;
  304.     }
  305.  
  306.     public ReaperAssignment getBossTask() {
  307.         return reaperAssignment;
  308.     }
  309.  
  310.     public void setBossTask(ReaperAssignment bossTask) {
  311.         this.reaperAssignment = bossTask;
  312.     }
  313.  
  314.     public void setTaskPoints(int taskPoints) {
  315.         this.taskPoints = taskPoints;
  316.     }
  317.  
  318.     public boolean setHasLearnedDeath(boolean b) {
  319.         return hasLearnedDeath = b;
  320.     }
  321.  
  322.     public boolean hasLearnedDeath() {
  323.         return hasLearnedDeath;
  324.     }
  325.  
  326.     public boolean setHasLearnedBossPets(boolean b) {
  327.         return hasLearnedBossPets = b;
  328.     }
  329.  
  330.     public boolean hasLearnedBossPets() {
  331.         return hasLearnedBossPets;
  332.     }
  333.  
  334.     public int BossPoints;
  335.  
  336.     public int getBossPoints() {
  337.         return BossPoints;
  338.     }
  339.  
  340.     /**
  341.      * Start
  342.      */
  343.     public boolean setBoughtBandos(boolean b) {
  344.         return HasBoughtBandos = b;
  345.     }
  346.  
  347.     public boolean hasBoughtBandos() {
  348.         return HasBoughtBandos;
  349.     }
  350.  
  351.     public boolean setBoughtArmadyl(boolean b) {
  352.         return HasBoughtArmadyl = b;
  353.     }
  354.  
  355.     public boolean hasBoughtArmadyl() {
  356.         return HasBoughtArmadyl;
  357.     }
  358.  
  359.     public boolean setBoughtSaradomin(boolean b) {
  360.         return HasBoughtSaradomin = b;
  361.     }
  362.  
  363.     public boolean hasBoughtSaradomin() {
  364.         return HasBoughtSaradomin;
  365.     }
  366.  
  367.     public boolean setBoughtZamorak(boolean b) {
  368.         return HasBoughtZamorak = b;
  369.     }
  370.  
  371.     public boolean hasBoughtZamorak() {
  372.         return HasBoughtZamorak;
  373.     }
  374.  
  375.     public boolean setBoughtNex(boolean b) {
  376.         return HasBoughtNex = b;
  377.     }
  378.  
  379.     public boolean hasBoughtNex() {
  380.         return HasBoughtNex;
  381.     }
  382.  
  383.     public boolean setBoughtCorp(boolean b) {
  384.         return HasBoughtCorp = b;
  385.     }
  386.  
  387.     public boolean hasBoughtCorp() {
  388.         return HasBoughtCorp;
  389.     }
  390.  
  391.     public boolean setBoughtBork(boolean b) {
  392.         return HasBoughtBork = b;
  393.     }
  394.  
  395.     public boolean hasBoughtBork() {
  396.         return HasBoughtBork;
  397.     }
  398.  
  399.     public boolean setBoughtBlink(boolean b) {
  400.         return HasBoughtBlink = b;
  401.     }
  402.  
  403.     public boolean hasBoughtBlink() {
  404.         return HasBoughtBlink;
  405.     }
  406.  
  407.     public boolean setBoughtPD(boolean b) {
  408.         return HasBoughtPD = b;
  409.     }
  410.  
  411.     public boolean hasBoughtPD() {
  412.         return HasBoughtPD;
  413.     }
  414.  
  415.     public boolean setBoughtGulega(boolean b) {
  416.         return HasBoughtGulega = b;
  417.     }
  418.  
  419.     public boolean hasBoughtGulega() {
  420.         return HasBoughtGulega;
  421.     }
  422.  
  423.     public boolean setBoughtDaggKing(boolean b) {
  424.         return HasBoughtDaggKing = b;
  425.     }
  426.  
  427.     public boolean hasBoughtDaggKing() {
  428.         return HasBoughtDaggKing;
  429.     }
  430.  
  431.     public boolean setBoughtBarrelChest(boolean b) {
  432.         return HasBoughtBarrelChest = b;
  433.     }
  434.  
  435.     public boolean hasBoughtBarrelChest() {
  436.         return HasBoughtBarrelChest;
  437.     }
  438.  
  439.     public boolean setBoughtWW(boolean b) {
  440.         return HasBoughtWW = b;
  441.     }
  442.  
  443.     public boolean hasBoughtWW() {
  444.         return HasBoughtWW;
  445.     }
  446.  
  447.     public boolean setBoughtKBD(boolean b) {
  448.         return HasBoughtKBD = b;
  449.     }
  450.  
  451.     public boolean hasBoughtKBD() {
  452.         return HasBoughtKBD;
  453.     }
  454.  
  455.     public boolean setBoughtGlacor(boolean b) {
  456.         return HasBoughtGlacor = b;
  457.     }
  458.  
  459.     public boolean hasBoughtGlacor() {
  460.         return HasBoughtGlacor;
  461.     }
  462.  
  463.     public boolean setBoughtTD(boolean b) {
  464.         return HasBoughtTD = b;
  465.     }
  466.  
  467.     public boolean hasBoughtTD() {
  468.         return HasBoughtTD;
  469.     }
  470.  
  471.     public boolean setBoughtHope(boolean b) {
  472.         return HasBoughtHope = b;
  473.     }
  474.  
  475.     public boolean hasBoughtHope() {
  476.         return HasBoughtHope;
  477.     }
  478.  
  479.     public boolean setBoughtAOD(boolean b) {
  480.         return HasBoughtAOD = b;
  481.     }
  482.  
  483.     public boolean hasBoughtAOD() {
  484.         return HasBoughtAOD;
  485.     }
  486.  
  487.     /**
  488.      * End
  489.      */
  490.     public int WGuildPotential;
  491.  
  492.     transient LoyaltyManager loyaltyManager;
  493.  
  494.     public String getTitle() {
  495.         return Title;
  496.     }
  497.  
  498.     public void settitlecolor(String titleColor) {
  499.         this.titleColor = titleColor;
  500.     }
  501.  
  502.     public void setTitle(String Title) {
  503.         this.Title = Title;
  504.     }
  505.  
  506.     private String titleColor = "FF0000";
  507.  
  508.     private String Title = "Extreme Donator";
  509.  
  510.     public static String getFormattedNumber(double amount, char seperator) {
  511.         String str = new DecimalFormat("#,###,###").format(amount);
  512.         char[] rebuff = new char[str.length()];
  513.         for (int i = 0; i < str.length(); i++) {
  514.             char c = str.charAt(i);
  515.             if (c >= '0' && c <= '9')
  516.                 rebuff[i] = c;
  517.             else
  518.                 rebuff[i] = seperator;
  519.         }
  520.         return new String(rebuff);
  521.     }
  522.  
  523.     public static String formatNumber(int number) {
  524.         return NumberFormat.getNumberInstance(Locale.UK).format(number);
  525.     }
  526.  
  527.     public int TRiviapoints;
  528.  
  529.     public int getTriviaPoints() {
  530.         return TRiviapoints;
  531.     }
  532.  
  533.     public long getLastCorrectTrivia() {
  534.         return lastAnswered;
  535.     }
  536.  
  537.     public void setLastAnswer(long time) {
  538.         this.lastAnswered = time;
  539.     }
  540.  
  541.     public int getCorrectAnswers() {
  542.         return correctAnswers;
  543.     }
  544.  
  545.     public void setCorrectAnswers(int amount) {
  546.         this.correctAnswers = amount;
  547.     }
  548.  
  549.     public void setDisableTrivia(boolean value) {
  550.         this.disabledTrivia = value;
  551.     }
  552.  
  553.     public boolean hasDisabledTrivia() {
  554.         return disabledTrivia;
  555.     }
  556.  
  557.     private boolean disabledTrivia;
  558.     private long lastAnswered;
  559.     public int correctAnswers;
  560.     private boolean untillLogout;
  561.  
  562.     public transient ActionManager actionManager;
  563.  
  564.     public boolean unlimitedRunPerk;
  565.  
  566.     public void setUnlimitedRunPerk(boolean unlimitedRunPerk) {
  567.         this.unlimitedRunPerk = unlimitedRunPerk;
  568.     }
  569.  
  570.     public boolean addedWeedstoCompost;
  571.     private boolean agrithNaNa;
  572.     private boolean allowChatEffects;
  573.     private Appearence appearence;
  574.     private int assistStatus;
  575.     public AuraManager auraManager;
  576.     private Bank bank;
  577.     private KcTab kcTab;
  578.     public int bandosKc, armadylKc, zamorakKc, saradominKc, thunderousKc, pdemonKc, dkKc, blinkKc, corpKc, kbdKc, qbdKc,
  579.             hatiKc, glacorKc, nomadKc, avatarKc, tdKc, kqKc, nexKc, bcKc, borkKc, gulegaKc, dagSKc, dagPKc, dagRKc,
  580.             wwKc, barrelChestKc;
  581.     private long banned;
  582.     private int barbarianAdvancedLaps;
  583.     private int barrowsKillCount;
  584.     private int barsDone;
  585.     public int battlePoints;
  586.     public Player battleTarget;
  587.     private Item prize;
  588.     private transient long boneDelay;
  589.     public transient BountyHunter bountyHunter;
  590.     private transient boolean canPvp;
  591.     private transient boolean cantTrade;
  592.     private int customNpcId = -1;
  593.  
  594.     public boolean hasPin;
  595.  
  596.     public int pinTries;
  597.  
  598.     public int securityPin;
  599.  
  600.     public int getSecurityPin() {
  601.         return securityPin;
  602.     }
  603.  
  604.     public void setSecurityPin(int pin) {
  605.         this.securityPin = pin;
  606.     }
  607.  
  608.     public void setCustomNpcId(int customNpcId) {
  609.         this.customNpcId = customNpcId;
  610.     }
  611.  
  612.     private transient boolean castedVeng;
  613.  
  614.     private ChargesManager charges;
  615.  
  616.     private int clanStatus;
  617.  
  618.     public transient boolean clientLoadedMapRegion;
  619.  
  620.     // Triviapoints}
  621.     public void setHsUpdate(long time) {
  622.         this.lastHsUpdate = time;
  623.     }
  624.  
  625.     private long donationtimer;
  626.  
  627.     public void setDonationTimer(long time) {
  628.         this.donationtimer = time;
  629.     }
  630.  
  631.     public long getDonationTimer() {
  632.         return donationtimer;
  633.     }
  634.  
  635.     public void addBlueCharm(int amount) {
  636.         this.blueCharms += amount;
  637.     }
  638.  
  639.     public void addGreenCharm(int amount) {
  640.         this.greenCharms += amount;
  641.     }
  642.  
  643.     public void addCrimCharm(int amount) {
  644.         this.crimCharms += amount;
  645.     }
  646.  
  647.     public void addGoldCharm(int amount) {
  648.         this.goldCharms += amount;
  649.     }
  650.  
  651.     public int goldCharms;
  652.     public int crimCharms;
  653.     public int blueCharms;
  654.     public int greenCharms;
  655.  
  656.     public int checkGolds() {
  657.         return goldCharms;
  658.     }
  659.  
  660.     public int checkBlues() {
  661.         return blueCharms;
  662.     }
  663.  
  664.     public int checkGreens() {
  665.         return greenCharms;
  666.     }
  667.  
  668.     public int checkCrims() {
  669.         return crimCharms;
  670.     }
  671.  
  672.     public void removeGoldCharms(int amount) {
  673.         this.goldCharms -= amount;
  674.     }
  675.  
  676.     public void removeCrimCharms(int amount) {
  677.         this.crimCharms -= amount;
  678.     }
  679.  
  680.     public void removeBlueCharms(int amount) {
  681.         this.blueCharms -= amount;
  682.     }
  683.  
  684.     public void removeGreenCharms(int amount) {
  685.         this.greenCharms -= amount;
  686.     }
  687.  
  688.     private transient Runnable closeInterfacesEvent;
  689.     private int clueReward;
  690.     public int cluenoreward;
  691.     private CombatDefinitions combatDefinitions;
  692.     // completionistcape reqs
  693.     private boolean completedFightCaves;
  694.     private boolean completedFightKiln;
  695.     private boolean completedRfd;
  696.     private int[] completionistCapeCustomized;
  697.     public ControlerManager controlerManager;
  698.     public transient CoordsEvent coordsEvent;
  699.     /* count partyhats obtained from mystery box */
  700.     public int countPartyHat;
  701.     private long creationDate;
  702.     private int crucibleHighScore;
  703.     private boolean culinaromancer;
  704.     public transient FriendChatsManager currentFriendChat;
  705.     private String currentFriendChatOwner;
  706.     // lobby
  707.     private int currentWorldLobby;
  708.     private String customTitle;
  709.     public transient CutscenesManager cutscenesManager;
  710.     private boolean dessourt;
  711.     // Hide Tanning
  712.     public boolean tanning;
  713.     // public void setDungPoints(int i) {
  714.  
  715.     // private boolean DungShop;
  716.  
  717.     public int DungPoints;
  718.  
  719.     public int DungeoneeringTokens;
  720.  
  721.     public int getDungeoneeringTokens() {
  722.         return DungeoneeringTokens;
  723.     }
  724.  
  725.     public void setDungeoneeringTokens(int DungeoneeringTokens) {
  726.         this.DungeoneeringTokens = DungeoneeringTokens;
  727.     }
  728.  
  729.     public void setTriviaPoints(int TRiviapoints) {
  730.         this.TRiviapoints = TRiviapoints;
  731.     }
  732.  
  733.     public void addDungPoints(int DungPoints) {
  734.         this.DungPoints += DungPoints;
  735.     }
  736.  
  737.     public void takeDungPoints(int DungPoints) {
  738.         this.DungPoints -= DungPoints;
  739.     }
  740.  
  741.     public int getDungPoints() {
  742.         return DungPoints;
  743.     }
  744.  
  745.     public void setDungPoints(int DungPoints) {
  746.         this.DungPoints = DungPoints;
  747.     }
  748.  
  749.     public void addDungeoneeringTokens(int DungeoneeringTokens) {
  750.         this.DungeoneeringTokens += DungeoneeringTokens;
  751.     }
  752.  
  753.     public void takeDungeoneeringTokens(int DungeoneeringTokens) {
  754.         this.DungeoneeringTokens -= DungeoneeringTokens;
  755.     }
  756.  
  757.     // public int setDungPoints() {
  758.     // return dungpoints;
  759.     // }
  760.     /**
  761.      * Farming
  762.      */
  763.  
  764.     // Falador
  765.     private int faladorHerbPatch;
  766.     private int faladorNorthAllotmentPatch;
  767.     private int faladorSouthAllotmentPatch;
  768.     private int faladorFlowerPatch;
  769.     private boolean faladorHerbPatchRaked;
  770.     private boolean faladorNorthAllotmentPatchRaked;
  771.     private boolean faladorSouthAllotmentPatchRaked;
  772.     private boolean faladorFlowerPatchRaked;
  773.  
  774.     // Catherby
  775.     private int catherbyHerbPatch;
  776.     private int catherbyNorthAllotmentPatch;
  777.     private int catherbySouthAllotmentPatch;
  778.     private int catherbyFlowerPatch;
  779.     private boolean catherbyHerbPatchRaked;
  780.     private boolean catherbyNorthAllotmentPatchRaked;
  781.     private boolean catherbySouthAllotmentPatchRaked;
  782.     private boolean catherbyFlowerPatchRaked;
  783.  
  784.     // Ardougne
  785.     private int ardougneHerbPatch;
  786.     private int ardougneNorthAllotmentPatch;
  787.     private int ardougneSouthAllotmentPatch;
  788.     private int ardougneFlowerPatch;
  789.     private boolean ardougneHerbPatchRaked;
  790.     private boolean ardougneNorthAllotmentPatchRaked;
  791.     private boolean ardougneSouthAllotmentPatchRaked;
  792.     private boolean ardougneFlowerPatchRaked;
  793.  
  794.     // Canifis
  795.     private int canifisHerbPatch;
  796.     private int canifisNorthAllotmentPatch;
  797.     private int canifisSouthAllotmentPatch;
  798.     private int canifisFlowerPatch;
  799.     private boolean canifisHerbPatchRaked;
  800.     private boolean canifisNorthAllotmentPatchRaked;
  801.     private boolean canifisSouthAllotmentPatchRaked;
  802.     private boolean canifisFlowerPatchRaked;
  803.  
  804.     // Lumbridge
  805.     private int lummyTreePatch;
  806.     private boolean lummyTreePatchRaked;
  807.  
  808.     // Varrock
  809.     private int varrockTreePatch;
  810.     private boolean varrockTreePatchRaked;
  811.  
  812.     // Falador
  813.     private int faladorTreePatch;
  814.     private boolean faladorTreePatchRaked;
  815.  
  816.     // Taverly
  817.     private int taverlyTreePatch;
  818.     private boolean taverlyTreePatchRaked;
  819.  
  820.     //
  821.     // END FARMING
  822.     //
  823.  
  824.     /**
  825.      * Farming Methods
  826.      */
  827.  
  828.     // Falador
  829.     public int getFaladorHerbPatch() {
  830.         return faladorHerbPatch;
  831.     }
  832.  
  833.     public void setFaladorHerbPatch(int seed) {
  834.         this.faladorHerbPatch = seed;
  835.     }
  836.  
  837.     public int getFaladorNorthAllotmentPatch() {
  838.         return faladorNorthAllotmentPatch;
  839.     }
  840.  
  841.     public void setFaladorNorthAllotmentPatch(int seed) {
  842.         this.faladorNorthAllotmentPatch = seed;
  843.     }
  844.  
  845.     public int getFaladorSouthAllotmentPatch() {
  846.         return faladorSouthAllotmentPatch;
  847.     }
  848.  
  849.     public void setFaladorSouthAllotmentPatch(int seed) {
  850.         this.faladorSouthAllotmentPatch = seed;
  851.     }
  852.  
  853.     public int getFaladorFlowerPatch() {
  854.         return faladorFlowerPatch;
  855.     }
  856.  
  857.     public void setFaladorFlowerPatch(int seed) {
  858.         this.faladorFlowerPatch = seed;
  859.     }
  860.  
  861.     public boolean getFaladorHerbPatchRaked() {
  862.         return faladorHerbPatchRaked;
  863.     }
  864.  
  865.     public void setFaladorHerbPatchRaked(boolean raked) {
  866.         this.faladorHerbPatchRaked = raked;
  867.     }
  868.  
  869.     public boolean getFaladorNorthAllotmentPatchRaked() {
  870.         return faladorNorthAllotmentPatchRaked;
  871.     }
  872.  
  873.     public void setFaladorNorthAllotmentPatchRaked(boolean raked) {
  874.         this.faladorNorthAllotmentPatchRaked = raked;
  875.     }
  876.  
  877.     public boolean getFaladorSouthAllotmentPatchRaked() {
  878.         return faladorSouthAllotmentPatchRaked;
  879.     }
  880.  
  881.     public void setFaladorSouthAllotmentPatchRaked(boolean raked) {
  882.         this.faladorSouthAllotmentPatchRaked = raked;
  883.     }
  884.  
  885.     public boolean getFaladorFlowerPatchRaked() {
  886.         return faladorFlowerPatchRaked;
  887.     }
  888.  
  889.     public void setFaladorFlowerPatchRaked(boolean raked) {
  890.         this.faladorFlowerPatchRaked = raked;
  891.     }
  892.  
  893.     // Ardougne
  894.     public int getArdougneHerbPatch() {
  895.         return ardougneHerbPatch;
  896.     }
  897.  
  898.     public void setArdougneHerbPatch(int seed) {
  899.         this.ardougneHerbPatch = seed;
  900.     }
  901.  
  902.     public int getArdougneNorthAllotmentPatch() {
  903.         return ardougneNorthAllotmentPatch;
  904.     }
  905.  
  906.     public void setArdougneNorthAllotmentPatch(int seed) {
  907.         this.ardougneNorthAllotmentPatch = seed;
  908.     }
  909.  
  910.     public int getArdougneSouthAllotmentPatch() {
  911.         return ardougneSouthAllotmentPatch;
  912.     }
  913.  
  914.     public void setArdougneSouthAllotmentPatch(int seed) {
  915.         this.ardougneSouthAllotmentPatch = seed;
  916.     }
  917.  
  918.     public int getArdougneFlowerPatch() {
  919.         return ardougneFlowerPatch;
  920.     }
  921.  
  922.     public void setArdougneFlowerPatch(int seed) {
  923.         this.ardougneFlowerPatch = seed;
  924.     }
  925.  
  926.     public boolean getArdougneHerbPatchRaked() {
  927.         return ardougneHerbPatchRaked;
  928.     }
  929.  
  930.     public void setArdougneHerbPatchRaked(boolean raked) {
  931.         this.ardougneHerbPatchRaked = raked;
  932.     }
  933.  
  934.     public boolean getArdougneNorthAllotmentPatchRaked() {
  935.         return ardougneNorthAllotmentPatchRaked;
  936.     }
  937.  
  938.     public void setArdougneNorthAllotmentPatchRaked(boolean raked) {
  939.         this.ardougneNorthAllotmentPatchRaked = raked;
  940.     }
  941.  
  942.     public boolean getArdougneSouthAllotmentPatchRaked() {
  943.         return ardougneSouthAllotmentPatchRaked;
  944.     }
  945.  
  946.     public void setArdougneSouthAllotmentPatchRaked(boolean raked) {
  947.         this.ardougneSouthAllotmentPatchRaked = raked;
  948.     }
  949.  
  950.     public boolean getArdougneFlowerPatchRaked() {
  951.         return ardougneFlowerPatchRaked;
  952.     }
  953.  
  954.     public void setArdougneFlowerPatchRaked(boolean raked) {
  955.         this.ardougneFlowerPatchRaked = raked;
  956.     }
  957.  
  958.     // Catherby
  959.     public int getCatherbyHerbPatch() {
  960.         return catherbyHerbPatch;
  961.     }
  962.  
  963.     public void setCatherbyHerbPatch(int seed) {
  964.         this.catherbyHerbPatch = seed;
  965.     }
  966.  
  967.     public int getCatherbyNorthAllotmentPatch() {
  968.         return catherbyNorthAllotmentPatch;
  969.     }
  970.  
  971.     public void setCatherbyNorthAllotmentPatch(int seed) {
  972.         this.catherbyNorthAllotmentPatch = seed;
  973.     }
  974.  
  975.     public int getCatherbySouthAllotmentPatch() {
  976.         return catherbySouthAllotmentPatch;
  977.     }
  978.  
  979.     public void setCatherbySouthAllotmentPatch(int seed) {
  980.         this.catherbySouthAllotmentPatch = seed;
  981.     }
  982.  
  983.     public int getCatherbyFlowerPatch() {
  984.         return catherbyFlowerPatch;
  985.     }
  986.  
  987.     public void setCatherbyFlowerPatch(int seed) {
  988.         this.catherbyFlowerPatch = seed;
  989.     }
  990.  
  991.     public boolean getCatherbyHerbPatchRaked() {
  992.         return catherbyHerbPatchRaked;
  993.     }
  994.  
  995.     public void setCatherbyHerbPatchRaked(boolean raked) {
  996.         this.catherbyHerbPatchRaked = raked;
  997.     }
  998.  
  999.     public boolean getCatherbyNorthAllotmentPatchRaked() {
  1000.         return catherbyNorthAllotmentPatchRaked;
  1001.     }
  1002.  
  1003.     public void setCatherbyNorthAllotmentPatchRaked(boolean raked) {
  1004.         this.catherbyNorthAllotmentPatchRaked = raked;
  1005.     }
  1006.  
  1007.     public boolean getCatherbySouthAllotmentPatchRaked() {
  1008.         return catherbySouthAllotmentPatchRaked;
  1009.     }
  1010.  
  1011.     public void setCatherbySouthAllotmentPatchRaked(boolean raked) {
  1012.         this.catherbySouthAllotmentPatchRaked = raked;
  1013.     }
  1014.  
  1015.     public boolean getCatherbyFlowerPatchRaked() {
  1016.         return catherbyFlowerPatchRaked;
  1017.     }
  1018.  
  1019.     public void setCatherbyFlowerPatchRaked(boolean raked) {
  1020.         this.catherbyFlowerPatchRaked = raked;
  1021.     }
  1022.  
  1023.     // Canifis
  1024.     public int getCanifisHerbPatch() {
  1025.         return canifisHerbPatch;
  1026.     }
  1027.  
  1028.     public void setCanifisHerbPatch(int seed) {
  1029.         this.canifisHerbPatch = seed;
  1030.     }
  1031.  
  1032.     public int getCanifisNorthAllotmentPatch() {
  1033.         return canifisNorthAllotmentPatch;
  1034.     }
  1035.  
  1036.     public void setCanifisNorthAllotmentPatch(int seed) {
  1037.         this.canifisNorthAllotmentPatch = seed;
  1038.     }
  1039.  
  1040.     public int getCanifisSouthAllotmentPatch() {
  1041.         return canifisSouthAllotmentPatch;
  1042.     }
  1043.  
  1044.     public void setCanifisSouthAllotmentPatch(int seed) {
  1045.         this.canifisSouthAllotmentPatch = seed;
  1046.     }
  1047.  
  1048.     public int getCanifisFlowerPatch() {
  1049.         return canifisFlowerPatch;
  1050.     }
  1051.  
  1052.     public void setCanifisFlowerPatch(int seed) {
  1053.         this.canifisFlowerPatch = seed;
  1054.     }
  1055.  
  1056.     public boolean getCanifisHerbPatchRaked() {
  1057.         return canifisHerbPatchRaked;
  1058.     }
  1059.  
  1060.     public void setCanifisHerbPatchRaked(boolean raked) {
  1061.         this.canifisHerbPatchRaked = raked;
  1062.     }
  1063.  
  1064.     public boolean getCanifisNorthAllotmentPatchRaked() {
  1065.         return canifisNorthAllotmentPatchRaked;
  1066.     }
  1067.  
  1068.     public void setCanifisNorthAllotmentPatchRaked(boolean raked) {
  1069.         this.canifisNorthAllotmentPatchRaked = raked;
  1070.     }
  1071.  
  1072.     public boolean getCanifisSouthAllotmentPatchRaked() {
  1073.         return canifisSouthAllotmentPatchRaked;
  1074.     }
  1075.  
  1076.     public void setCanifisSouthAllotmentPatchRaked(boolean raked) {
  1077.         this.canifisSouthAllotmentPatchRaked = raked;
  1078.     }
  1079.  
  1080.     public boolean getCanifisFlowerPatchRaked() {
  1081.         return canifisFlowerPatchRaked;
  1082.     }
  1083.  
  1084.     public void setCanifisFlowerPatchRaked(boolean raked) {
  1085.         this.canifisFlowerPatchRaked = raked;
  1086.     }
  1087.  
  1088.     // Lumbridge
  1089.     public int getLummyTreePatch() {
  1090.         return lummyTreePatch;
  1091.     }
  1092.  
  1093.     public void setLummyTreePatch(int sapling) {
  1094.         this.lummyTreePatch = sapling;
  1095.     }
  1096.  
  1097.     public boolean getLummyTreePatchRaked() {
  1098.         return lummyTreePatchRaked;
  1099.     }
  1100.  
  1101.     public void setLummyTreePatchRaked(boolean raked) {
  1102.         this.lummyTreePatchRaked = raked;
  1103.     }
  1104.  
  1105.     // Varrock
  1106.     public int getVarrockTreePatch() {
  1107.         return varrockTreePatch;
  1108.     }
  1109.  
  1110.     public void setVarrockTreePatch(int sapling) {
  1111.         this.varrockTreePatch = sapling;
  1112.     }
  1113.  
  1114.     public boolean getVarrockTreePatchRaked() {
  1115.         return varrockTreePatchRaked;
  1116.     }
  1117.  
  1118.     public void setVarrockTreePatchRaked(boolean raked) {
  1119.         this.varrockTreePatchRaked = raked;
  1120.     }
  1121.  
  1122.     // Falador
  1123.     public int getFaladorTreePatch() {
  1124.         return faladorTreePatch;
  1125.     }
  1126.  
  1127.     public void setFaladorTreePatch(int sapling) {
  1128.         this.faladorTreePatch = sapling;
  1129.     }
  1130.  
  1131.     public boolean getFaladorTreePatchRaked() {
  1132.         return faladorTreePatchRaked;
  1133.     }
  1134.  
  1135.     public void setFaladorTreePatchRaked(boolean raked) {
  1136.         this.faladorTreePatchRaked = raked;
  1137.     }
  1138.  
  1139.     // Taverly
  1140.     public int getTaverlyTreePatch() {
  1141.         return taverlyTreePatch;
  1142.     }
  1143.  
  1144.     public void setTaverlyTreePatch(int sapling) {
  1145.         this.taverlyTreePatch = sapling;
  1146.     }
  1147.  
  1148.     public boolean getTaverlyTreePatchRaked() {
  1149.         return taverlyTreePatchRaked;
  1150.     }
  1151.  
  1152.     public void setTaverlyTreePatchRaked(boolean raked) {
  1153.         this.taverlyTreePatchRaked = raked;
  1154.     }
  1155.  
  1156.     //
  1157.     // END FARMING
  1158.     //
  1159.  
  1160.     // lend
  1161.     public int lendMessage;
  1162.  
  1163.     // toolbelt brah
  1164.  
  1165.     public Toolbelt toolbelt;
  1166.  
  1167.     public Toolbelt getToolbelt() {
  1168.         return toolbelt;
  1169.     }
  1170.  
  1171.     // cannon
  1172.     public DwarfCannon dwarfCannon;
  1173.  
  1174.     public DwarfCannon getDwarfCannon() {
  1175.         // TODO Auto-generated method stub
  1176.         return dwarfCannon;
  1177.     }
  1178.  
  1179.     // interface
  1180.  
  1181.     // zeals /sw
  1182.  
  1183.     private int zeals;
  1184.  
  1185.     public void increaseZeals(int zeals) {
  1186.         this.zeals += zeals;
  1187.     }
  1188.  
  1189.     public int getZeals() {
  1190.         return zeals;
  1191.     }
  1192.  
  1193.     public void setZeals(int zeals) {
  1194.         this.zeals = zeals;
  1195.     }
  1196.  
  1197.     // Money Well
  1198.  
  1199.     private double dropBoost;
  1200.     private long totalDonated;
  1201.     private long boostTime;
  1202.  
  1203.     public long getBoostTime() {
  1204.         return boostTime;
  1205.     }
  1206.  
  1207.     public void setBoostTime(long time) {
  1208.         this.boostTime = time;
  1209.     }
  1210.  
  1211.     public double getDropBoost() {
  1212.         return dropBoost;
  1213.     }
  1214.  
  1215.     public long getTotalDonatedToWell() {
  1216.         return totalDonated;
  1217.     }
  1218.  
  1219.     public void setDropBoost(double amount) {
  1220.         this.dropBoost = amount;
  1221.     }
  1222.  
  1223.     public void setTotalDonatedToWell(long amount) {
  1224.         this.totalDonated = amount;
  1225.     }
  1226.  
  1227.     // colored chats
  1228.  
  1229.     private int ColorID;
  1230.  
  1231.     public void setColorID(int ColorID) {
  1232.         this.ColorID = ColorID;
  1233.     }
  1234.  
  1235.     public int getColorID() {
  1236.         return ColorID;
  1237.     }
  1238.  
  1239.     // sof
  1240.     public SquealOfFortuneL squealOfFortuneL;
  1241.  
  1242.     public void setSquealOfFortuneL(SquealOfFortuneL squealOfFortuneL) {
  1243.         this.squealOfFortuneL = squealOfFortuneL;
  1244.     }
  1245.  
  1246.     // Yell Stuff
  1247.  
  1248.     public int YellTokens = 0;
  1249.  
  1250.     public String getPrefix() {
  1251.         return yellPrefix;
  1252.     }
  1253.  
  1254.     public void setPrefix(String yellPrefix) {
  1255.         this.yellPrefix = yellPrefix;
  1256.     }
  1257.  
  1258.     private String yellPrefix = "Donator";
  1259.  
  1260.     public String getYellColor() {
  1261.         return yellColor;
  1262.     }
  1263.  
  1264.     public void setYellColor(String yellColor) {
  1265.         this.yellColor = yellColor;
  1266.     }
  1267.  
  1268.     private String yellColor = "ff0000";
  1269.  
  1270.     public String getShadColor() {
  1271.         return yellShade;
  1272.     }
  1273.  
  1274.     public void setYellShade(String yellShade) {
  1275.         this.yellShade = yellShade;
  1276.     }
  1277.  
  1278.     private String yellShade = "";
  1279.  
  1280.     private SlayerManager slayerManager;
  1281.  
  1282.     public void setSlayerManager(SlayerManager manager) {
  1283.         this.slayerManager = manager;
  1284.     }
  1285.  
  1286.     public SlayerManager getSlayerManager() {
  1287.         return slayerManager;
  1288.     }
  1289.  
  1290.     // XpModeCommand
  1291.     /*
  1292.      * private int gameMode; //0 = easy, 1 = medium, 2 = hard, 3 = insane
  1293.      *
  1294.      * public String getMode() { if(gameMode == 0) return "easy"; else
  1295.      * if(gameMode == 1) return "medium"; else if(gameMode == 2) return "hard";
  1296.      * else if (gameMode == 3) return "insane"; return "error"; } public void
  1297.      * setMode(int modeID) { gameMode = modeID; }
  1298.      */
  1299.     // Dfs
  1300.     private boolean dfsActivated;
  1301.     private int dfscoolDown;
  1302.     public transient DialogueManager dialogueManager;
  1303.     public transient Dialogue dialogue;
  1304.     private transient boolean disableEquip;
  1305.     public transient int displayMode;
  1306.     private String displayName;
  1307.     private long displayTime;
  1308.     private int dominionFactor;
  1309.     public DominionTower dominionTower;
  1310.     private boolean donator;
  1311.     private boolean dicer;
  1312.     private boolean isIronman;
  1313.  
  1314.     public boolean isOwner() {
  1315.         return getRights() == 7;
  1316.     }
  1317.  
  1318.     public boolean isHeadAdmin() {
  1319.         return getRights() == 6;
  1320.     }
  1321.  
  1322.     public void setHeadAdmin(boolean isHeadAdmin) {
  1323.         if (isHeadAdmin == true) {
  1324.             this.setRights(6);
  1325.             return;
  1326.         } else if (isHeadAdmin == false) {
  1327.             this.setRights(0);
  1328.             return;
  1329.         }
  1330.     }
  1331.  
  1332.     public boolean isAdmin() {
  1333.         return getRights() == 2;
  1334.     }
  1335.  
  1336.     public void setMod(boolean isMod) {
  1337.         if (isMod == true) {
  1338.             this.setRights(1);
  1339.             return;
  1340.         } else if (isMod == false) {
  1341.             this.setRights(0);
  1342.             return;
  1343.         }
  1344.     }
  1345.  
  1346.     public void setAdmin(boolean isAdmin) {
  1347.         if (isAdmin == true) {
  1348.             this.setRights(2);
  1349.             return;
  1350.         } else if (isAdmin == false) {
  1351.             this.setRights(0);
  1352.             return;
  1353.         }
  1354.     }
  1355.  
  1356.     public boolean isIronman() {
  1357.         return isIronman;
  1358.     }
  1359.  
  1360.     public void setIronman(boolean isIronman) {
  1361.         this.isIronman = isIronman;
  1362.     }
  1363.  
  1364.     private long donatorTill;
  1365.     private DuelArena duelarena;
  1366.     public int dungeoneeringTokens;
  1367.     private int easterPoints;
  1368.     private String email;
  1369.     private EmotesManager emotesManager;
  1370.     private String enteredPinString = null;
  1371.     private Equipment equipment;
  1372.     private boolean extremeDonator;
  1373.     private long extremeDonatorTill;
  1374.     public int[] fairyRingCombination = new int[3];
  1375.     public Familiar familiar;
  1376.     private boolean filterGame;
  1377.     private transient boolean finishing;
  1378.     private long fireImmune;
  1379.     private boolean flamBeed;
  1380.     private transient long foodDelay;
  1381.     private boolean forceNextMapLoadRefresh;
  1382.     private int friendChatSetup;
  1383.     private FriendsIgnores friendsIgnores;
  1384.     private int gnomeAdvancedLaps;
  1385.     private boolean gotInfernoAdze;
  1386.     private boolean hasCutEnoughLogs;
  1387.     private boolean hasFinishedBarrows;
  1388.     private boolean hasCutMoreEnoughLogs;
  1389.     // Battle Terrace
  1390.     public boolean hasTut;
  1391.     private int hiddenBrother;
  1392.  
  1393.     private boolean hideSofInterface;
  1394.     private boolean hideWorldAnnouncements;
  1395.  
  1396.     public transient HintIconsManager hintIconsManager;
  1397.     private transient double hpBoostMultiplier;
  1398.     private boolean inAnimationRoom;
  1399.     public transient InterfaceManager interfaceManager;
  1400.     private Inventory inventory;
  1401.     private transient boolean invulnerable;
  1402.     public transient IsaacKeyPair isaacKeyPair;
  1403.     public boolean isBurying = false;
  1404.     private boolean isForumModerator;
  1405.     private boolean isGraphicDesigner;
  1406.     private boolean isYoutuber;
  1407.     private boolean isInDefenderRoom;
  1408.     private boolean isInLobby;
  1409.     // supportteam
  1410.     private boolean isSupporter;
  1411.     private boolean isHelper;
  1412.     private long jailed;
  1413.     private boolean karamel;
  1414.     // objects
  1415.     private boolean khalphiteLairEntranceSetted;
  1416.  
  1417.     private boolean khalphiteLairSetted;
  1418.     // honor
  1419.     private int killCount, deathCount;
  1420.     // barrows
  1421.     private boolean[] killedBarrowBrothers;
  1422.     private boolean killedBork;
  1423.     private boolean killedQueenBlackDragon;
  1424.     private transient boolean largeSceneView;
  1425.     private int lastBonfire;
  1426.  
  1427.     public transient DuelRules lastDuelRules;
  1428.     private String lastIP;
  1429.     private String lastKilled;
  1430.     private long lastLoggedIn;
  1431.     private String lastMsg;
  1432.     private transient long lastPublicMessage;
  1433.     private long lastRequestSQL;
  1434.     public long lastWalkedMillis;
  1435.     private int loadedLogs;
  1436.  
  1437.     public transient LocalNPCUpdate localNPCUpdate;
  1438.     // used for update
  1439.     public transient LocalPlayerUpdate localPlayerUpdate;
  1440.     private transient long lockDelay; // used for doors and stuff like that
  1441.     private int loggedWorld;
  1442.     // used for packets logic
  1443.     public transient ConcurrentLinkedQueue<LogicPacket> logicPackets;
  1444.     private int logsCut;
  1445.     private boolean lootshareEnabled;
  1446.     public int Loyaltypoints;
  1447.  
  1448.     // comp req stuff
  1449.     private int magicLogsBurned;
  1450.  
  1451.     // skill capes customizing
  1452.     private int[] maxedCapeCustomized;
  1453.     private int money;
  1454.     private boolean mouseButtons;
  1455.     private MusicsManager musicsManager;
  1456.  
  1457.     private long muted;
  1458.     public Notes notes;
  1459.  
  1460.     // voting
  1461.     private boolean oldItemsLook;
  1462.  
  1463.     public int ordinanceTimer;
  1464.  
  1465.     private int overloadDelay;
  1466.     private int arcPotDelay;
  1467.     private List<String> ownedObjectsManagerKeys;
  1468.     private String Owner = "";
  1469.     private transient long packetsDecoderPing;
  1470.     // saving stuff
  1471.     private String password;
  1472.     private boolean permBanned;
  1473.  
  1474.     private boolean permMuted;
  1475.     private int pestControlGames;
  1476.  
  1477.     private int pestPoints;
  1478.     public transient Pet pet;
  1479.     public PetManager petManager;
  1480.     private int pkPoints;
  1481.  
  1482.     private long poisonImmune;
  1483.     private transient long polDelay;
  1484.  
  1485.     private transient long potDelay;
  1486.     public MoneyPouch pouch;
  1487.  
  1488.     private int[] pouches;
  1489.     public Prayer prayer;
  1490.     private int prayerRenewalDelay;
  1491.  
  1492.     private int prestige;
  1493.     public transient PriceCheckManager priceCheckManager;
  1494.  
  1495.     private int privateChatSetup;
  1496.  
  1497.     // game bar status
  1498.     private int publicStatus;
  1499.  
  1500.     public int pvmPoints;
  1501.  
  1502.     public QuestManager questManager;
  1503.  
  1504.     private String recovAnswer;
  1505.  
  1506.     // Recovery ques. & ans.
  1507.     private String recovQuestion;
  1508.     private boolean reportOption;
  1509.     private transient boolean resting;
  1510.     private int rights;
  1511.     private int rocktailsCooked;
  1512.     private byte runEnergy;
  1513.     private int runeSpanPoints;
  1514.     private transient boolean running;
  1515.     public transient int screenHeight;
  1516.  
  1517.     public transient int screenWidth;
  1518.  
  1519.     public String selectedClass;
  1520.  
  1521.     public transient Session session;
  1522.  
  1523.     public String setMutedBy, mutedReason;
  1524.  
  1525.     private boolean setStarter;
  1526.  
  1527.     private Skills skills;
  1528.  
  1529.     private int skullDelay;
  1530.  
  1531.     private int skullId;
  1532.  
  1533.     public int slayerPoints;
  1534.  
  1535.     private transient boolean spawnsMode;
  1536.  
  1537.     private int specRestoreTimer;
  1538.  
  1539.     // player stages
  1540.     private transient boolean started;
  1541.  
  1542.     private int summoningLeftClickOption;
  1543.  
  1544.     private transient List<Integer> switchItemCache;
  1545.  
  1546.     private boolean talkedtoCook;
  1547.  
  1548.     // crucible
  1549.     private boolean talkedWithMarv;
  1550.  
  1551.     // Vannaka
  1552.     private boolean talkedWithVannaka;
  1553.  
  1554.     // Slayer
  1555.     // private SlayerTask task;
  1556.  
  1557.     private int temporaryMovementType;
  1558.  
  1559.     public transient Trade trade;
  1560.  
  1561.     private int tradeStatus;
  1562.  
  1563.     private int uniquePlayerId;
  1564.  
  1565.     private boolean updateMovementType;
  1566.  
  1567.     // transient stuff
  1568.     public transient String username;
  1569.  
  1570.     private int vecnaTimer;
  1571.  
  1572.     private boolean Legend;
  1573.  
  1574.     public int votePoints;
  1575.  
  1576.     public int warriorKills, archerKills, mageKills;
  1577.  
  1578.     public int warriorLevel, archerLevel, mageLevel;
  1579.  
  1580.     private boolean wonFightPits;
  1581.  
  1582.     private boolean xpLocked;
  1583.  
  1584.     private boolean yellDisabled;
  1585.  
  1586.     private boolean yellOff;
  1587.  
  1588.     private boolean zenRest;
  1589.  
  1590.     // creates Player and saved classes
  1591.     public Player(String password) {
  1592.         super(Settings.START_PLAYER_LOCATION);
  1593.         setHitpoints(Settings.START_PLAYER_HITPOINTS);
  1594.         squealOfFortuneL = new SquealOfFortuneL();
  1595.         this.password = password;
  1596.         appearence = new Appearence();
  1597.         loyaltyManager = new LoyaltyManager(this);
  1598.         inventory = new Inventory();
  1599.         equipment = new Equipment();
  1600.         gearPresets = new GearPresets();
  1601.         skills = new Skills();
  1602.         toolbelt = new Toolbelt();
  1603.         combatDefinitions = new CombatDefinitions();
  1604.         prayer = new Prayer();
  1605.         bank = new Bank(this);
  1606.         keyBinds = new int[8];
  1607.         notes = new Notes();
  1608.         controlerManager = new ControlerManager();
  1609.         musicsManager = new MusicsManager();
  1610.         emotesManager = new EmotesManager();
  1611.         friendsIgnores = new FriendsIgnores();
  1612.         dominionTower = new DominionTower();
  1613.         charges = new ChargesManager();
  1614.         auraManager = new AuraManager();
  1615.         questManager = new QuestManager();
  1616.         petManager = new PetManager();
  1617.         slayerManager = new SlayerManager(this);
  1618.         runEnergy = 100;
  1619.         allowChatEffects = true;
  1620.         mouseButtons = true;
  1621.         pouches = new int[4];
  1622.         fairyRingCombination = new int[3];
  1623.         resetBarrows();
  1624.         SkillCapeCustomizer.resetSkillCapes(this);
  1625.         ownedObjectsManagerKeys = new LinkedList<String>();
  1626.         setCreationDate(Utils.currentTimeMillis());
  1627.         currentFriendChatOwner = Settings.MAIN_ACESSS[0];
  1628.     }
  1629.  
  1630.     public void giveDailies() {
  1631.         if ((Utils.currentTimeMillis() - lastDailyGiven) < (12 * 60 * 60 * 1000)) // 12
  1632.                                                                                     // hours
  1633.             return;
  1634.         lastDailyGiven = Utils.currentTimeMillis();
  1635.         rerolls = 3;
  1636.     }
  1637.  
  1638.     public void resetfl() {
  1639.         friendsIgnores = new FriendsIgnores();
  1640.         FriendChatsManager.refreshChat(this);
  1641.     }
  1642.  
  1643.     public void addBoneDelay(long time) {
  1644.         boneDelay = time + Utils.currentTimeMillis();
  1645.     }
  1646.  
  1647.     public void addDisplayTime(long i) {
  1648.         this.displayTime = i + Utils.currentTimeMillis();
  1649.     }
  1650.  
  1651.     public void addFireImmune(long time) {
  1652.         fireImmune = time + Utils.currentTimeMillis();
  1653.     }
  1654.  
  1655.     public void addFoodDelay(long time) {
  1656.         foodDelay = time + Utils.currentTimeMillis();
  1657.     }
  1658.  
  1659.     public static String now(String dateFormat) {
  1660.         Calendar cal = Calendar.getInstance();
  1661.         SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
  1662.         return sdf.format(cal.getTime());
  1663.     }
  1664.  
  1665.     public void addLogicPacketToQueue(LogicPacket packet) {
  1666.         for (LogicPacket p : logicPackets) {
  1667.             if (p.getId() == packet.getId()) {
  1668.                 logicPackets.remove(p);
  1669.                 break;
  1670.             }
  1671.         }
  1672.         logicPackets.add(packet);
  1673.     }
  1674.  
  1675.     public void addPoisonImmune(long time) {
  1676.         poisonImmune = time + Utils.currentTimeMillis();
  1677.         getPoison().reset();
  1678.     }
  1679.  
  1680.     public void addPolDelay(long delay) {
  1681.         polDelay = delay + Utils.currentTimeMillis();
  1682.     }
  1683.  
  1684.     public void addPotDelay(long time) {
  1685.         potDelay = time + Utils.currentTimeMillis();
  1686.     }
  1687.  
  1688.     /**
  1689.      * Adds points
  1690.      *
  1691.      * @param points
  1692.      */
  1693.     public void addRunespanPoints(int points) {
  1694.         this.runeSpanPoints += points;
  1695.     }
  1696.  
  1697.     public static final int MAX_STARTER_COUNT = 2;
  1698.  
  1699.     public int newplayer = 0;
  1700.  
  1701.     public boolean hasStarterDone;
  1702.  
  1703.     public boolean hasStarterDone() {
  1704.         return hasStarterDone;
  1705.     }
  1706.  
  1707.     public void setHasStarterDone(boolean starterDone) {
  1708.         this.hasStarterDone = starterDone;
  1709.     }
  1710.  
  1711.     /*
  1712.      * public void addStarterPackage(boolean extraCoins) { String ip =
  1713.      * getSession().getIP(); int count = StarterMap.getSingleton().getCount(ip);
  1714.      * if (count >= MAX_STARTER_COUNT) { setStarter(true);
  1715.      * sendMessage("You have already claimed the maximum amount of starter sets."
  1716.      * ); return; } }
  1717.      */
  1718.  
  1719.     public boolean canSpawn() {
  1720.         if (Wilderness.isAtWild(this) || getControlerManager().getControler() instanceof FightPitsArena
  1721.                 || getControlerManager().getControler() instanceof CorpBeastControler
  1722.                 || getControlerManager().getControler() instanceof PestControlLobby
  1723.                 || getControlerManager().getControler() instanceof PestControlGame
  1724.                 || getControlerManager().getControler() instanceof DungeoneeringControler
  1725.                 || getControlerManager().getControler() instanceof ZGDControler
  1726.                 || getControlerManager().getControler() instanceof GodWars
  1727.                 || getControlerManager().getControler() instanceof StartTutorial
  1728.                 || getControlerManager().getControler() instanceof JailControler
  1729.                 || getControlerManager().getControler() instanceof DTControler
  1730.                 || getControlerManager().getControler() instanceof WarControler
  1731.                 || getControlerManager().getControler() instanceof DeathEvent
  1732.                 || getControlerManager().getControler() instanceof BarrelchestControler
  1733.                 || getControlerManager().getControler() instanceof DuelArena
  1734.                 || getControlerManager().getControler() instanceof CastleWarsPlaying
  1735.                 || getControlerManager().getControler() instanceof CastleWarsWaiting
  1736.                 || getControlerManager().getControler() instanceof LobbyController
  1737.                 || getControlerManager().getControler() instanceof GameController
  1738.                 || getControlerManager().getControler() instanceof FightCaves
  1739.                 || getControlerManager().getControler() instanceof FightKiln
  1740.                 || getControlerManager().getControler() instanceof ImpossibleJad
  1741.                 || getControlerManager().getControler() instanceof BarrelchestControler
  1742.                 || getControlerManager().getControler() instanceof battleTerraceGame || FfaZone.inPvpArea(this)
  1743.                 || getControlerManager().getControler() instanceof NomadsRequiem
  1744.                 || getControlerManager().getControler() instanceof QueenBlackDragonController) {
  1745.             return false;
  1746.         }
  1747.         if (getControlerManager().getControler() instanceof CrucibleControler) {
  1748.             CrucibleControler controler = (CrucibleControler) getControlerManager().getControler();
  1749.             return !controler.isInside();
  1750.         }
  1751.         return true;
  1752.     }
  1753.  
  1754.     public void checkMovement(int x, int y, int plane) {
  1755.         Magic.teleControlersCheck(this, new WorldTile(x, y, plane));
  1756.     }
  1757.  
  1758.     @Override
  1759.     public void checkMultiArea() {
  1760.         if (!started)
  1761.             return;
  1762.         boolean isAtMultiArea = isForceMultiArea() ? true : World.isMultiArea(this);
  1763.         if (isAtMultiArea && !isAtMultiArea()) {
  1764.             setAtMultiArea(isAtMultiArea);
  1765.             getPackets().sendGlobalConfig(616, 1);
  1766.         } else if (!isAtMultiArea && isAtMultiArea()) {
  1767.             setAtMultiArea(isAtMultiArea);
  1768.             getPackets().sendGlobalConfig(616, 0);
  1769.         }
  1770.     }
  1771.  
  1772.     public int checkTotalLevel(int checktotal) {
  1773.         checktotal = 0;
  1774.         for (int i = 0; i < 25; i++) {
  1775.             checktotal += getSkills().getLevel(i);
  1776.         }
  1777.         return checktotal;
  1778.     }
  1779.  
  1780.     public boolean clientHasLoadedMapRegion() {
  1781.         return clientLoadedMapRegion;
  1782.     }
  1783.  
  1784.     public void closeInterfaces() {
  1785.         // System.out.println("Its using closeInterfaces.");
  1786.         if (interfaceManager.containsScreenInter())
  1787.             interfaceManager.closeScreenInterface();
  1788.         if (interfaceManager.containsInventoryInter())
  1789.             interfaceManager.closeInventoryInterface();
  1790.         dialogueManager.finishDialogue();
  1791.         if (closeInterfacesEvent != null) {
  1792.             closeInterfacesEvent.run();
  1793.             closeInterfacesEvent = null;
  1794.         }
  1795.     }
  1796.  
  1797.     public void drainRunEnergy() {
  1798.         if (isExtremeDonator() || isLegendary()) {
  1799.             setRunEnergy(runEnergy - 0);
  1800.         } else
  1801.             setRunEnergy(runEnergy - 1);
  1802.     }
  1803.  
  1804.     @Override
  1805.     public void finish() {
  1806.         finish(0);
  1807.     }
  1808.  
  1809.     public void finish(final int tryCount) {
  1810.         if (finishing || hasFinished()) {
  1811.             if (World.containsPlayer(username)) {
  1812.                 World.removePlayer(this);
  1813.             }
  1814.             if (World.containsLobbyPlayer(username)) {
  1815.                 World.removeLobbyPlayer(this);
  1816.             }
  1817.             return;
  1818.         }
  1819.         finishing = true;
  1820.         // if combating doesnt stop when xlog this way ends combat
  1821.         if (!World.containsLobbyPlayer(username)) {
  1822.             stopAll(false, true, !(actionManager.getAction() instanceof PlayerCombat));
  1823.         }
  1824.         long currentTime = Utils.currentTimeMillis();
  1825.         if ((getAttackedByDelay() + 10000 > currentTime && tryCount < 6)
  1826.                 || getEmotesManager().getNextEmoteEnd() >= currentTime || lockDelay >= currentTime || isDead()) {
  1827.             CoresManager.slowExecutor.schedule(new Runnable() {
  1828.                 @Override
  1829.                 public void run() {
  1830.                     try {
  1831.                         packetsDecoderPing = Utils.currentTimeMillis();
  1832.                         finishing = false;
  1833.                         finish(tryCount + 1);
  1834.                     } catch (Throwable e) {
  1835.                         Logger.handle(e);
  1836.                     }
  1837.                 }
  1838.             }, 10, TimeUnit.SECONDS);
  1839.             return;
  1840.         }
  1841.         realFinish();
  1842.     }
  1843.  
  1844.     /**
  1845.      * Logs the player out.
  1846.      *
  1847.      * @param lobby
  1848.      *            If we're logging out to the lobby.
  1849.      */
  1850.     public void logout(boolean lobby) {
  1851.         if (!isRunning())
  1852.             return;
  1853.         long currentTime = Utils.currentTimeMillis();
  1854.         if (getAttackedByDelay() + 10000 > currentTime) {
  1855.             getPackets().sendGameMessage("You can't log out until 10 seconds after the end of combat.");
  1856.             return;
  1857.         }
  1858.         if (getEmotesManager().getNextEmoteEnd() >= currentTime || getEmotesManager().isDoingEmote()) {
  1859.             sendMessage("You can't log out while performing an emote.");
  1860.             return;
  1861.         }
  1862.         if (lockDelay >= currentTime || getActionManager().getAction() != null) {
  1863.             sendMessage("You can't log out while performing an action.");
  1864.             return;
  1865.         }
  1866.         // GrinderList.remove(this);
  1867.         getPackets().sendLogout(lobby && Settings.MANAGMENT_SERVER_ENABLED);
  1868.         setRunning(false);
  1869.     }
  1870.  
  1871.     public void forceLogout() {
  1872.         getPackets().sendLogout(false);
  1873.         setRunning(false);
  1874.         realFinish();
  1875.     }
  1876.  
  1877.     public void forceSession() {
  1878.         setRunning(false);
  1879.         realFinish();
  1880.     }
  1881.  
  1882.     public ActionManager getActionManager() {
  1883.         return actionManager;
  1884.     }
  1885.  
  1886.     public Appearence getAppearence() {
  1887.         return appearence;
  1888.     }
  1889.  
  1890.     public int getAssistStatus() {
  1891.         return assistStatus;
  1892.     }
  1893.  
  1894.     public AuraManager getAuraManager() {
  1895.         return auraManager;
  1896.     }
  1897.  
  1898.     public Bank getBank() {
  1899.         return bank;
  1900.     }
  1901.  
  1902.     public KcTab getKcTab() {// not here, loginmanager
  1903.         return kcTab;
  1904.     }
  1905.  
  1906.     /*
  1907.      * public String getBankPin() { return bankPinString; }
  1908.      */
  1909.  
  1910.     public long getBanned() {
  1911.         return banned;
  1912.     }
  1913.  
  1914.     public int getBarbarianAdvancedLaps() {
  1915.         return barbarianAdvancedLaps;
  1916.     }
  1917.  
  1918.     public int getBarrowsKillCount() {
  1919.         return barrowsKillCount;
  1920.     }
  1921.  
  1922.     public int getBarsDone() {
  1923.         return barsDone;
  1924.     }
  1925.  
  1926.     public long getBoneDelay() {
  1927.         return boneDelay;
  1928.     }
  1929.  
  1930.     public BountyHunter getBountyHunter() {
  1931.         return bountyHunter;
  1932.     }
  1933.  
  1934.     public ChargesManager getCharges() {
  1935.         return charges;
  1936.     }
  1937.  
  1938.     public SquealOfFortuneL getSquealOfFortune() {
  1939.         return squealOfFortuneL;
  1940.     }
  1941.  
  1942.     public int getClanStatus() {
  1943.         return clanStatus;
  1944.     }
  1945.  
  1946.     public int getClueReward() {
  1947.         return clueReward;
  1948.     }
  1949.  
  1950.     public CombatDefinitions getCombatDefinitions() {
  1951.         return combatDefinitions;
  1952.     }
  1953.  
  1954.     public int[] getCompletionistCapeCustomized() {
  1955.         return completionistCapeCustomized;
  1956.     }
  1957.  
  1958.     public ControlerManager getControlerManager() {
  1959.         return controlerManager;
  1960.     }
  1961.  
  1962.     public long getCreationDate() {
  1963.         return creationDate;
  1964.     }
  1965.  
  1966.     public int getCrucibleHighScore() {
  1967.         return crucibleHighScore;
  1968.     }
  1969.  
  1970.     public FriendChatsManager getCurrentFriendChat() {
  1971.         return currentFriendChat;
  1972.     }
  1973.  
  1974.     public String getCurrentFriendChatOwner() {
  1975.         return currentFriendChatOwner;
  1976.     }
  1977.  
  1978.     public int getCurrentWorldLobby() {
  1979.         return currentWorldLobby;
  1980.     }
  1981.  
  1982.     public String getCustomTitle() {
  1983.         return customTitle;
  1984.     }
  1985.  
  1986.     public CutscenesManager getCutscenesManager() {
  1987.         return cutscenesManager;
  1988.     }
  1989.  
  1990.     public int getDeathCount() {
  1991.         return deathCount;
  1992.     }
  1993.  
  1994.     public int getdfscoolDown() {
  1995.         return dfscoolDown;
  1996.     }
  1997.  
  1998.     public Dialogue getDialogue() {
  1999.         return dialogue;
  2000.     }
  2001.  
  2002.     public DialogueManager getDialogueManager() {
  2003.         return dialogueManager;
  2004.     }
  2005.  
  2006.     public boolean hasLoginPin;
  2007.     public int pin;
  2008.  
  2009.     public int getLoginPin() {
  2010.         return pin;
  2011.     }
  2012.  
  2013.     public void setLoginPin(int pin) {
  2014.         this.pin = pin;
  2015.     }
  2016.  
  2017.     public int keysOpened;
  2018.  
  2019.     public String getKeysOpened() {
  2020.         return keysOpened + " Crystal Chests!";
  2021.     }
  2022.  
  2023.     public int totaldonated;
  2024.  
  2025.     public int getTotalDonated() {
  2026.         return totaldonated;
  2027.     }
  2028.  
  2029.     public int getDisplayMode() {
  2030.         return displayMode;
  2031.     }
  2032.  
  2033.     public String getDisplayName() {
  2034.         if (displayName != null)
  2035.             return displayName;
  2036.         return Utils.formatPlayerNameForDisplay(username);
  2037.     }
  2038.  
  2039.     public long getDisplayTime() {
  2040.         return displayTime;
  2041.     }
  2042.  
  2043.     public int getDominionFactor() {
  2044.         return dominionFactor;
  2045.     }
  2046.  
  2047.     public DominionTower getDominionTower() {
  2048.         return dominionTower;
  2049.     }
  2050.  
  2051.     @SuppressWarnings("deprecation")
  2052.     public String getDonatorTill() {
  2053.         return (donator ? "never" : new Date(donatorTill).toGMTString()) + ".";
  2054.     }
  2055.  
  2056.     public DuelArena getDuelArena() {
  2057.         return duelarena;
  2058.     }
  2059.  
  2060.     public int getEasterPoints() {
  2061.         return easterPoints;
  2062.     }
  2063.  
  2064.     public String getEmailAttached() {
  2065.         return email;
  2066.     }
  2067.  
  2068.     public EmotesManager getEmotesManager() {
  2069.         return emotesManager;
  2070.     }
  2071.  
  2072.     public String getEnteredBankPin() {
  2073.         return enteredPinString;
  2074.     }
  2075.  
  2076.     public Equipment getEquipment() {
  2077.         return equipment;
  2078.     }
  2079.  
  2080.     @SuppressWarnings("deprecation")
  2081.     public String getExtremeDonatorTill() {
  2082.         return (extremeDonator ? "never" : new Date(extremeDonatorTill).toGMTString()) + ".";
  2083.     }
  2084.  
  2085.     public int[] getFairyRingCombination() {
  2086.         return fairyRingCombination;
  2087.     }
  2088.  
  2089.     public Familiar getFamiliar() {
  2090.         return familiar;
  2091.     }
  2092.  
  2093.     public long getFireImmune() {
  2094.         return fireImmune;
  2095.     }
  2096.  
  2097.     public long getFoodDelay() {
  2098.         return foodDelay;
  2099.     }
  2100.  
  2101.     public FriendsIgnores getFriendsIgnores() {
  2102.         return friendsIgnores;
  2103.     }
  2104.  
  2105.     public int getGnomeAdvancedLaps() {
  2106.         return gnomeAdvancedLaps;
  2107.     }
  2108.  
  2109.     public int getHiddenBrother() {
  2110.         return hiddenBrother;
  2111.     }
  2112.  
  2113.     public HintIconsManager getHintIconsManager() {
  2114.         return hintIconsManager;
  2115.     }
  2116.  
  2117.     public double getHpBoostMultiplier() {
  2118.         return hpBoostMultiplier;
  2119.     }
  2120.  
  2121.     public InterfaceManager getInterfaceManager() {
  2122.         return interfaceManager;
  2123.     }
  2124.  
  2125.     public final boolean isAtWild() {
  2126.         return (getX() >= 3011 && getX() <= 3132 && getY() >= 10052 && getY() <= 10175)
  2127.                 || (getX() >= 2940 && getX() <= 3395 && getY() >= 3525 && getY() <= 4000)
  2128.                 || (getX() >= 3264 && getX() <= 3279 && getY() >= 3279 && getY() <= 3672)
  2129.                 || (getX() >= 3158 && getX() <= 3181 && getY() >= 3679 && getY() <= 3697)
  2130.                 || (getX() >= 3280 && getX() <= 3183 && getY() >= 3885 && getY() <= 3888)
  2131.                 || (getX() >= 3012 && getX() <= 3059 && getY() >= 10303 && getY() <= 10351)
  2132.                 || (getX() >= 3060 && getX() <= 3072 && getY() >= 10251 && getY() <= 10263);
  2133.     }
  2134.  
  2135.     public final boolean isInClanwars() {
  2136.         return (getX() >= 2981 && getX() <= 3006 && getY() >= 9664 && getY() <= 9694)
  2137.                 || (getX() >= 2947 && getX() <= 3070 && getY() >= 5506 && getY() <= 5630)
  2138.                 || (getX() >= 2755 && getX() <= 2876 && getY() >= 5506 && getY() <= 5630);
  2139.     }
  2140.  
  2141.     public final boolean isInRedPortal() {
  2142.         return (getX() >= 2948 && getX() <= 3069 && getY() >= 5507 && getY() <= 5629);
  2143.     }
  2144.  
  2145.     public final boolean isInClanwarsLobby() {
  2146.         return (getX() >= 2981 && getX() <= 3006 && getY() >= 9664 && getY() <= 9694);
  2147.     }
  2148.  
  2149.     public final boolean atJail() {
  2150.         return (getX() >= 1385 && getX() <= 3198 && getY() >= 9816 && getY() <= 9837);
  2151.     }
  2152.  
  2153.     public final boolean isAtTourny() {
  2154.         return (getX() >= 4441 && getX() <= 4474 && getY() >= 4121 && getY() <= 4158);
  2155.     }
  2156.  
  2157.     public final boolean isAtNonprod() {
  2158.         return (getX() >= 1859 && getX() <= 1915 && getY() >= 3215 && getY() <= 3249);
  2159.     }
  2160.  
  2161.     public Inventory getInventory() {
  2162.         return inventory;
  2163.     }
  2164.  
  2165.     public IsaacKeyPair getIsaacKeyPair() {
  2166.         return isaacKeyPair;
  2167.     }
  2168.  
  2169.     public boolean getIsInLobby() {
  2170.         return isInLobby;
  2171.     }
  2172.  
  2173.     public long getJailed() {
  2174.         return jailed;
  2175.     }
  2176.  
  2177.     public long getWorldXp() {
  2178.         return WorldXp;
  2179.     }
  2180.  
  2181.     public int getKillCount() {
  2182.         return killCount;
  2183.     }
  2184.  
  2185.     public boolean[] getKilledBarrowBrothers() {
  2186.         return killedBarrowBrothers;
  2187.     }
  2188.  
  2189.     public int getLastBonfire() {
  2190.         return lastBonfire;
  2191.     }
  2192.  
  2193.     /**
  2194.      * END RFD
  2195.      */
  2196.  
  2197.     public DuelRules getLastDuelRules() {
  2198.         return lastDuelRules;
  2199.     }
  2200.  
  2201.     public String getLastHostname() {
  2202.         InetAddress addr;
  2203.         try {
  2204.             addr = InetAddress.getByName(getLastIP());
  2205.             String hostname = addr.getHostName();
  2206.             return hostname;
  2207.         } catch (UnknownHostException e) {
  2208.             e.printStackTrace();
  2209.         }
  2210.         return null;
  2211.     }
  2212.  
  2213.     public String getLastIP() {
  2214.         return lastIP;
  2215.     }
  2216.  
  2217.     public long getLastLoggedIn() {
  2218.         // TODO Auto-generated method stub
  2219.         return lastLoggedIn;
  2220.     }
  2221.  
  2222.     public String getLastMsg() {
  2223.         return lastMsg;
  2224.     }
  2225.  
  2226.     public long getLastPublicMessage() {
  2227.         return lastPublicMessage;
  2228.     }
  2229.  
  2230.     public long getLastRequestSQL() {
  2231.         // TODO Auto-generated method stub
  2232.         return lastRequestSQL;
  2233.     }
  2234.  
  2235.     public long getLastWalked() {
  2236.         return lastWalkedMillis;
  2237.     }
  2238.  
  2239.     public boolean warned;
  2240.  
  2241.     public boolean isWarned() {
  2242.         return warned;
  2243.     }
  2244.  
  2245.     public void setWarned(boolean warned) {
  2246.         this.warned = warned;
  2247.     }
  2248.  
  2249.     public int getLoadedLogs() {
  2250.         return loadedLogs;
  2251.     }
  2252.  
  2253.     public LocalNPCUpdate getLocalNPCUpdate() {
  2254.         return localNPCUpdate;
  2255.     }
  2256.  
  2257.     public LocalPlayerUpdate getLocalPlayerUpdate() {
  2258.         return localPlayerUpdate;
  2259.     }
  2260.  
  2261.     public long getLockDelay() {
  2262.         return lockDelay;
  2263.     }
  2264.  
  2265.     public int getLoggedInWorld() {
  2266.         // TODO Auto-generated method stub
  2267.         return loggedWorld;
  2268.     }
  2269.  
  2270.     public int getLogsCut() {
  2271.         return logsCut;
  2272.     }
  2273.  
  2274.     public int getLoyaltyPoints() {
  2275.         return Loyaltypoints;
  2276.     }
  2277.  
  2278.     @Override
  2279.     public double getMagePrayerMultiplier() {
  2280.         return 0.6;
  2281.     }
  2282.  
  2283.     public int getMagicLogsBurned() {
  2284.         return magicLogsBurned;
  2285.     }
  2286.  
  2287.     public boolean hasKilledEveryBoss() {
  2288.         if (bandosKc >= 1 && armadylKc >= 1 && saradominKc >= 1 && zamorakKc >= 1 && nexKc >= 1 && corpKc >= 1
  2289.                 && blinkKc >= 1 && pdemonKc >= 1 && kbdKc >= 1 && qbdKc >= 1 && glacorKc >= 1 && tdKc >= 1
  2290.                 && borkKc >= 1 && aodKc >= 1 && hopeKc >= 1 && gulegaKc >= 1 && dagSKc >= 1 && dagPKc >= 1
  2291.                 && dagRKc >= 1)
  2292.             return true;
  2293.         return false;
  2294.     }
  2295.  
  2296.     public boolean hasKilledEveryBoss100() {
  2297.         if (bandosKc >= 100 && armadylKc >= 100 && saradominKc >= 100 && zamorakKc >= 100 && corpKc >= 100
  2298.                 && blinkKc >= 100 && pdemonKc >= 100 && kbdKc >= 100 && glacorKc >= 100 && tdKc >= 100 && borkKc >= 100
  2299.                 && aodKc >= 100 && hopeKc >= 100 && gulegaKc >= 100 && dagSKc >= 100 && dagPKc >= 100 && dagRKc >= 100)
  2300.             return true;
  2301.         return false;
  2302.     }
  2303.  
  2304.     // LOL, bad way to do it, dont complain
  2305.  
  2306.     public int[] getMaxedCapeCustomized() {
  2307.         return maxedCapeCustomized;
  2308.     }
  2309.  
  2310.     @Override
  2311.     public int getMaxHitpoints() {
  2312.         return skills.getLevel(Skills.HITPOINTS) * 10 + equipment.getEquipmentHpIncrease();
  2313.     }
  2314.  
  2315.     @Override
  2316.     public double getMeleePrayerMultiplier() {
  2317.         return 0.6;
  2318.     }
  2319.  
  2320.     public int getMessageIcon() {
  2321.         if (isOwner())
  2322.             return 12;
  2323.         if (isHeadAdmin())
  2324.             return 5;
  2325.         if (getRights() == 2)
  2326.             return 2;
  2327.         if (isForumModerator())
  2328.             return 9;
  2329.         if (getRights() == 1)
  2330.             return 1;
  2331.         if (isSupporter())
  2332.             return 10;
  2333.         if (isHelper())
  2334.             return 16;
  2335.         if (isGraphicDesigner())
  2336.             return 18;
  2337.         if (isYoutuber())
  2338.             return 17;
  2339.         if (isGold())
  2340.             return 13;
  2341.         if (isSilver())
  2342.             return 15;
  2343.         if (isDicer())
  2344.             return 14;
  2345.         if (isLegendary())
  2346.             return 11;
  2347.         if (isExtremeDonator())
  2348.             return 8;
  2349.         if (isDonator())
  2350.             return 7;
  2351.         if (isIronman())
  2352.             return 4;
  2353.         return getRights();
  2354.     }
  2355.  
  2356.     public MoneyPouch getMoneyPouch() {
  2357.         return pouch;
  2358.     }
  2359.  
  2360.     public int getMoneyPouchValue() {
  2361.         return money;
  2362.     }
  2363.  
  2364.     public int getMovementType() {
  2365.         if (getTemporaryMoveType() != -1)
  2366.             return getTemporaryMoveType();
  2367.         return getRun() ? RUN_MOVE_TYPE : WALK_MOVE_TYPE;
  2368.     }
  2369.  
  2370.     public MusicsManager getMusicsManager() {
  2371.         return musicsManager;
  2372.     }
  2373.  
  2374.     public long getMuted() {
  2375.         return muted;
  2376.     }
  2377.  
  2378.     public Notes getNotes() {
  2379.         return notes;
  2380.     }
  2381.  
  2382.     public int getOverloadDelay() {
  2383.         return overloadDelay;
  2384.     }
  2385.  
  2386.     public int getArcPotDelay() {
  2387.         return arcPotDelay;
  2388.     }
  2389.  
  2390.     public List<String> getOwnedObjectManagerKeys() {
  2391.         if (ownedObjectsManagerKeys == null) // temporary
  2392.             ownedObjectsManagerKeys = new LinkedList<String>();
  2393.         return ownedObjectsManagerKeys;
  2394.     }
  2395.  
  2396.     public String getOwner() {
  2397.         return Owner;
  2398.     }
  2399.  
  2400.     public WorldPacketsEncoder getPackets() {
  2401.         return session.getWorldPackets();
  2402.     }
  2403.  
  2404.     public long getPacketsDecoderPing() {
  2405.         return packetsDecoderPing;
  2406.     }
  2407.  
  2408.     public String getPassword() {
  2409.         return password;
  2410.     }
  2411.  
  2412.     public int getPestControlGames() {
  2413.         return pestControlGames;
  2414.     }
  2415.  
  2416.     public int getPestPoints() {
  2417.         return pestPoints;
  2418.     }
  2419.  
  2420.     /**
  2421.      * Gets the pet.
  2422.      *
  2423.      * @return The pet.
  2424.      */
  2425.     public Pet getPet() {
  2426.         return pet;
  2427.     }
  2428.  
  2429.     /**
  2430.      * Gets the petManager.
  2431.      *
  2432.      * @return The petManager.
  2433.      */
  2434.     public PetManager getPetManager() {
  2435.         return petManager;
  2436.     }
  2437.  
  2438.     public int getPkPoints() {
  2439.         return pkPoints;
  2440.     }
  2441.  
  2442.     public long getPoisonImmune() {
  2443.         return poisonImmune;
  2444.     }
  2445.  
  2446.     public long getPolDelay() {
  2447.         return polDelay;
  2448.     }
  2449.  
  2450.     public long getPotDelay() {
  2451.         return potDelay;
  2452.     }
  2453.  
  2454.     public int[] getPouches() {
  2455.         return pouches;
  2456.     }
  2457.  
  2458.     public Prayer getPrayer() {
  2459.         return prayer;
  2460.     }
  2461.  
  2462.     public long getPrayerDelay() {
  2463.         Long teleblock = (Long) getTemporaryAttributtes().get("PrayerBlocked");
  2464.         if (teleblock == null)
  2465.             return 0;
  2466.         return teleblock;
  2467.     }
  2468.  
  2469.     public int getPrestige() {
  2470.         return prestige;
  2471.     }
  2472.  
  2473.     public PriceCheckManager getPriceCheckManager() {
  2474.         return priceCheckManager;
  2475.     }
  2476.  
  2477.     public int getPrivateChatSetup() {
  2478.         return privateChatSetup;
  2479.     }
  2480.  
  2481.     public int getPublicStatus() {
  2482.         return publicStatus;
  2483.     }
  2484.  
  2485.     public int getPvmPoints() {
  2486.         return pvmPoints;
  2487.     }
  2488.  
  2489.     public QuestManager getQuestManager() {
  2490.         return questManager;
  2491.     }
  2492.  
  2493.     @Override
  2494.     public double getRangePrayerMultiplier() {
  2495.         return 0.6;
  2496.     }
  2497.  
  2498.     public String getRecovAnswer() {
  2499.         return recovAnswer;
  2500.     }
  2501.  
  2502.     public String getRecovQuestion() {
  2503.         return recovQuestion;
  2504.     }
  2505.  
  2506.     public int getRights() {
  2507.         return rights;
  2508.     }
  2509.  
  2510.     public int getRocktailsCooked() {
  2511.         return rocktailsCooked;
  2512.     }
  2513.  
  2514.     public byte getRunEnergy() {
  2515.         return runEnergy;
  2516.     }
  2517.  
  2518.     /**
  2519.      * @return the runeSpanPoint
  2520.      */
  2521.     public int getRuneSpanPoints() {
  2522.         return runeSpanPoints;
  2523.     }
  2524.  
  2525.     public int getScreenHeight() {
  2526.         return screenHeight;
  2527.     }
  2528.  
  2529.     public int getScreenWidth() {
  2530.         return screenWidth;
  2531.     }
  2532.  
  2533.     public Session getSession() {
  2534.         return session;
  2535.     }
  2536.  
  2537.     @Override
  2538.     public int getSize() {
  2539.         return appearence.getSize();
  2540.     }
  2541.  
  2542.     public Skills getSkills() {
  2543.         return skills;
  2544.     }
  2545.  
  2546.     public int getSkullId() {
  2547.         return skullId;
  2548.     }
  2549.  
  2550.     public int getSlayerPoints() {
  2551.         return slayerPoints;
  2552.     }
  2553.  
  2554.     public int getSpecRestoreTimer() {
  2555.         return specRestoreTimer;
  2556.     }
  2557.  
  2558.     public int getSummoningLeftClickOption() {
  2559.         return summoningLeftClickOption;
  2560.  
  2561.     }
  2562.  
  2563.     public int getTotalKc() {
  2564.         return bandosKc + armadylKc + saradominKc + corpKc + nexKc + blinkKc + pdemonKc + kbdKc + qbdKc + glacorKc
  2565.                 + tdKc + borkKc + hopeKc + aodKc + gulegaKc + dagSKc + dagPKc + dagRKc + wwKc + barrelChestKc;
  2566.     }
  2567.  
  2568.     public List<Integer> getSwitchItemCache() {
  2569.         return switchItemCache;
  2570.     }
  2571.  
  2572.     /**
  2573.      * @return the task
  2574.      */
  2575.     // public SlayerTask getTask() {
  2576.     // return task;
  2577.     // }
  2578.  
  2579.     public long getTeleBlockDelay() {
  2580.         Long teleblock = (Long) getTemporaryAttributtes().get("TeleBlocked");
  2581.         if (teleblock == null)
  2582.             return 0;
  2583.         return teleblock;
  2584.     }
  2585.  
  2586.     public int getTemporaryMovementType() {
  2587.         return temporaryMovementType;
  2588.     }
  2589.  
  2590.     public int getTemporaryMoveType() {
  2591.         return getTemporaryMovementType();
  2592.     }
  2593.  
  2594.     public Trade getTrade() {
  2595.         return trade;
  2596.     }
  2597.  
  2598.     public int getTradeStatus() {
  2599.         return tradeStatus;
  2600.     }
  2601.  
  2602.     public int getUniquePlayerId() {
  2603.         return uniquePlayerId;
  2604.     }
  2605.  
  2606.     public String getUsername() {
  2607.         return username;
  2608.     }
  2609.  
  2610.     public int getVecnaTimer() {
  2611.         return vecnaTimer;
  2612.     }
  2613.  
  2614.     public int getVotePoints() {
  2615.         return votePoints;
  2616.     }
  2617.  
  2618.     public int getGanodermicFlakes() {
  2619.         return ganodermicFlakes;
  2620.     }
  2621.  
  2622.     public boolean hasPermenantTurmBonus;
  2623.  
  2624.     public boolean hasPermenantTurmoilBonus() {
  2625.         return hasPermenantTurmBonus;
  2626.     }
  2627.  
  2628.     public boolean unlockedArcPots;
  2629.  
  2630.     public boolean unlockedArcPots() {
  2631.         return unlockedArcPots;
  2632.     }
  2633.  
  2634.     @Override
  2635.     public void handleIngoingHit(final Hit hit) {
  2636.         if (hit.getLook() != HitLook.MELEE_DAMAGE && hit.getLook() != HitLook.RANGE_DAMAGE
  2637.                 && hit.getLook() != HitLook.MAGIC_DAMAGE)
  2638.             return;
  2639.         if (invulnerable) {
  2640.             hit.setDamage(0);
  2641.             return;
  2642.         }
  2643.         if (auraManager.usingPenance()) {
  2644.             int amount = (int) (hit.getDamage() * 0.2);
  2645.             if (amount > 0)
  2646.                 prayer.restorePrayer(amount);
  2647.         }
  2648.         Entity source = hit.getSource();
  2649.         if (source == null)
  2650.             return;
  2651.         if (polDelay > Utils.currentTimeMillis())
  2652.             hit.setDamage((int) (hit.getDamage() * 0.5));
  2653.         if (prayer.hasPrayersOn() && hit.getDamage() != 0) {
  2654.             if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
  2655.                 if (prayer.usingPrayer(0, 17))
  2656.                     hit.setDamage((int) (hit.getDamage() * source.getMagePrayerMultiplier()));
  2657.                 else if (prayer.usingPrayer(1, 7)) {
  2658.                     int deflectedDamage = source instanceof Nex ? 0 : (int) (hit.getDamage() * 0.1);
  2659.                     hit.setDamage((int) (hit.getDamage() * source.getMagePrayerMultiplier()));
  2660.                     if (deflectedDamage > 0) {
  2661.                         source.applyHit(new Hit(this, deflectedDamage, HitLook.REFLECTED_DAMAGE));
  2662.                         setNextGraphics(new Graphics(2228));
  2663.                         setNextAnimation(new Animation(12573));
  2664.                     }
  2665.                 }
  2666.             } else if (hit.getLook() == HitLook.RANGE_DAMAGE) {
  2667.                 if (prayer.usingPrayer(0, 18))
  2668.                     hit.setDamage((int) (hit.getDamage() * source.getRangePrayerMultiplier()));
  2669.                 else if (prayer.usingPrayer(1, 8)) {
  2670.                     int deflectedDamage = source instanceof Nex ? 0 : (int) (hit.getDamage() * 0.1);
  2671.                     hit.setDamage((int) (hit.getDamage() * source.getRangePrayerMultiplier()));
  2672.                     if (deflectedDamage > 0) {
  2673.                         source.applyHit(new Hit(this, deflectedDamage, HitLook.REFLECTED_DAMAGE));
  2674.                         setNextGraphics(new Graphics(2229));
  2675.                         setNextAnimation(new Animation(12573));
  2676.                     }
  2677.                 }
  2678.             } else if (hit.getLook() == HitLook.MELEE_DAMAGE) {
  2679.                 if (prayer.usingPrayer(0, 19))
  2680.                     hit.setDamage((int) (hit.getDamage() * source.getMeleePrayerMultiplier()));
  2681.                 else if (prayer.usingPrayer(1, 9)) {
  2682.                     int deflectedDamage = source instanceof Nex ? 0 : (int) (hit.getDamage() * 0.1);
  2683.                     hit.setDamage((int) (hit.getDamage() * source.getMeleePrayerMultiplier()));
  2684.                     if (deflectedDamage > 0) {
  2685.                         source.applyHit(new Hit(this, deflectedDamage, HitLook.REFLECTED_DAMAGE));
  2686.                         setNextGraphics(new Graphics(2230));
  2687.                         setNextAnimation(new Animation(12573));
  2688.                     }
  2689.                 }
  2690.             }
  2691.         }
  2692.         if (hit.getDamage() >= 200) {
  2693.             if (hit.getLook() == HitLook.MELEE_DAMAGE) {
  2694.                 int reducedDamage = hit.getDamage()
  2695.                         * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_MELEE_BONUS] / 100;
  2696.                 if (reducedDamage > 0) {
  2697.                     hit.setDamage(hit.getDamage() - reducedDamage);
  2698.                     hit.setSoaking(new Hit(source, reducedDamage, HitLook.ABSORB_DAMAGE));
  2699.                 }
  2700.             } else if (hit.getLook() == HitLook.RANGE_DAMAGE) {
  2701.                 int reducedDamage = hit.getDamage()
  2702.                         * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_RANGE_BONUS] / 100;
  2703.                 if (reducedDamage > 0) {
  2704.                     hit.setDamage(hit.getDamage() - reducedDamage);
  2705.                     hit.setSoaking(new Hit(source, reducedDamage, HitLook.ABSORB_DAMAGE));
  2706.                 }
  2707.             } else if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
  2708.                 int reducedDamage = hit.getDamage()
  2709.                         * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_MAGE_BONUS] / 100;
  2710.                 if (reducedDamage > 0) {
  2711.                     hit.setDamage(hit.getDamage() - reducedDamage);
  2712.                     hit.setSoaking(new Hit(source, reducedDamage, HitLook.ABSORB_DAMAGE));
  2713.                 }
  2714.             }
  2715.         }
  2716.         int shieldId = equipment.getShieldId();
  2717.         if (shieldId == 13742 || shieldId == 23699) { // elsyian
  2718.             if (Utils.getRandom(100) <= 70)
  2719.                 hit.setDamage((int) (hit.getDamage() * 0.75));
  2720.         } else if (shieldId == 13740 || shieldId == 23698) { // divine
  2721.             int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2);
  2722.             if (prayer.getPrayerpoints() >= drain) {
  2723.                 hit.setDamage((int) (hit.getDamage() * 0.70));
  2724.                 prayer.drainPrayer(drain);
  2725.             }
  2726.         }
  2727.         if (castedVeng && hit.getDamage() >= 4) {
  2728.             castedVeng = false;
  2729.             setNextForceTalk(new ForceTalk("Taste vengeance!"));
  2730.             source.applyHit(new Hit(this, (int) (hit.getDamage() * 0.75), HitLook.REGULAR_DAMAGE));
  2731.         }
  2732.         if (source instanceof Player) {
  2733.             final Player p2 = (Player) source;
  2734.             if (p2.prayer.hasPrayersOn()) {
  2735.                 if (p2.prayer.usingPrayer(0, 24)) { // smite
  2736.                     int drain = hit.getDamage() / 4;
  2737.                     if (drain > 0)
  2738.                         prayer.drainPrayer(drain);
  2739.                 } else {
  2740.                     if (hit.getDamage() == 0)
  2741.                         return;
  2742.                     if (!p2.prayer.isBoostedLeech()) {
  2743.                         if (hit.getLook() == HitLook.MELEE_DAMAGE) {
  2744.                             if (p2.prayer.usingPrayer(1, 19)) {
  2745.                                 if (Utils.getRandom(4) == 0) {
  2746.                                     p2.prayer.increaseTurmoilBonus(this);
  2747.                                     p2.prayer.setBoostedLeech(true);
  2748.                                     return;
  2749.                                 }
  2750.                             } else if (p2.prayer.usingPrayer(1, 1)) { // sap att
  2751.                                 if (Utils.getRandom(4) == 0) {
  2752.                                     if (p2.prayer.reachedMax(0)) {
  2753.                                         p2.getPackets().sendGameMessage(
  2754.                                                 "Your opponent has been weakened so much that your sap curse has no effect.",
  2755.                                                 true);
  2756.                                     } else {
  2757.                                         p2.prayer.increaseLeechBonus(0);
  2758.                                         p2.getPackets().sendGameMessage(
  2759.                                                 "Your curse drains Attack from the enemy, boosting your Attack.", true);
  2760.                                     }
  2761.                                     p2.setNextAnimation(new Animation(12569));
  2762.                                     p2.setNextGraphics(new Graphics(2214));
  2763.                                     p2.prayer.setBoostedLeech(true);
  2764.                                     World.sendProjectile(p2, this, 2215, 35, 35, 20, 5, 0, 0);
  2765.                                     WorldTasksManager.schedule(new WorldTask() {
  2766.                                         @Override
  2767.                                         public void run() {
  2768.                                             setNextGraphics(new Graphics(2216));
  2769.                                         }
  2770.                                     }, 1);
  2771.                                     return;
  2772.                                 }
  2773.                             } else {
  2774.                                 if (p2.prayer.usingPrayer(1, 10)) {
  2775.                                     if (Utils.getRandom(7) == 0) {
  2776.                                         if (p2.prayer.reachedMax(3)) {
  2777.                                             p2.getPackets().sendGameMessage(
  2778.                                                     "Your opponent has been weakened so much that your leech curse has no effect.",
  2779.                                                     true);
  2780.                                         } else {
  2781.                                             p2.prayer.increaseLeechBonus(3);
  2782.                                             p2.getPackets().sendGameMessage(
  2783.                                                     "Your curse drains Attack from the enemy, boosting your Attack.",
  2784.                                                     true);
  2785.                                         }
  2786.                                         p2.setNextAnimation(new Animation(12575));
  2787.                                         p2.prayer.setBoostedLeech(true);
  2788.                                         World.sendProjectile(p2, this, 2231, 35, 35, 20, 5, 0, 0);
  2789.                                         WorldTasksManager.schedule(new WorldTask() {
  2790.  
  2791.                                             @Override
  2792.                                             public void run() {
  2793.                                                 setNextGraphics(new Graphics(2232));
  2794.                                             }
  2795.                                         }, 1);
  2796.                                         return;
  2797.                                     }
  2798.                                 }
  2799.                                 if (lendMessage != 0) {
  2800.                                     if (lendMessage == 1)
  2801.                                         getPackets().sendGameMessage(
  2802.                                                 "<col=FF0000>An item you lent out has been added back to your bank.");
  2803.                                     else if (lendMessage == 2)
  2804.                                         getPackets().sendGameMessage(
  2805.                                                 "<col=FF0000>The item you borrowed has been returned to the owner.");
  2806.                                     lendMessage = 0;
  2807.                                 }
  2808.                                 if (p2.prayer.usingPrayer(1, 14)) {
  2809.                                     if (Utils.getRandom(7) == 0) {
  2810.                                         if (p2.prayer.reachedMax(7)) {
  2811.                                             p2.getPackets().sendGameMessage(
  2812.                                                     "Your opponent has been weakened so much that your leech curse has no effect.",
  2813.                                                     true);
  2814.                                         } else {
  2815.                                             p2.prayer.increaseLeechBonus(7);
  2816.                                             p2.getPackets().sendGameMessage(
  2817.                                                     "Your curse drains Strength from the enemy, boosting your Strength.",
  2818.                                                     true);
  2819.                                         }
  2820.                                         p2.setNextAnimation(new Animation(12575));
  2821.                                         p2.prayer.setBoostedLeech(true);
  2822.                                         World.sendProjectile(p2, this, 2248, 35, 35, 20, 5, 0, 0);
  2823.                                         WorldTasksManager.schedule(new WorldTask() {
  2824.                                             @Override
  2825.                                             public void run() {
  2826.                                                 setNextGraphics(new Graphics(2250));
  2827.                                             }
  2828.                                         }, 1);
  2829.                                         return;
  2830.                                     }
  2831.                                 }
  2832.  
  2833.                             }
  2834.                         }
  2835.                         if (hit.getLook() == HitLook.RANGE_DAMAGE) {
  2836.                             if (p2.prayer.usingPrayer(1, 2)) { // sap range
  2837.                                 if (Utils.getRandom(4) == 0) {
  2838.                                     if (p2.prayer.reachedMax(1)) {
  2839.                                         p2.getPackets().sendGameMessage(
  2840.                                                 "Your opponent has been weakened so much that your sap curse has no effect.",
  2841.                                                 true);
  2842.                                     } else {
  2843.                                         p2.prayer.increaseLeechBonus(1);
  2844.                                         p2.getPackets().sendGameMessage(
  2845.                                                 "Your curse drains Range from the enemy, boosting your Range.", true);
  2846.                                     }
  2847.                                     p2.setNextAnimation(new Animation(12569));
  2848.                                     p2.setNextGraphics(new Graphics(2217));
  2849.                                     p2.prayer.setBoostedLeech(true);
  2850.                                     World.sendProjectile(p2, this, 2218, 35, 35, 20, 5, 0, 0);
  2851.                                     WorldTasksManager.schedule(new WorldTask() {
  2852.  
  2853.                                         @Override
  2854.                                         public void run() {
  2855.                                             setNextGraphics(new Graphics(2219));
  2856.                                         }
  2857.                                     }, 1);
  2858.                                     return;
  2859.                                 }
  2860.                             } else if (p2.prayer.usingPrayer(1, 11)) {
  2861.                                 if (Utils.getRandom(7) == 0) {
  2862.                                     if (p2.prayer.reachedMax(4)) {
  2863.                                         p2.getPackets().sendGameMessage(
  2864.                                                 "Your opponent has been weakened so much that your leech curse has no effect.",
  2865.                                                 true);
  2866.                                     } else {
  2867.                                         p2.prayer.increaseLeechBonus(4);
  2868.                                         p2.getPackets().sendGameMessage(
  2869.                                                 "Your curse drains Range from the enemy, boosting your Range.", true);
  2870.                                     }
  2871.                                     p2.setNextAnimation(new Animation(12575));
  2872.                                     p2.prayer.setBoostedLeech(true);
  2873.                                     World.sendProjectile(p2, this, 2236, 35, 35, 20, 5, 0, 0);
  2874.                                     WorldTasksManager.schedule(new WorldTask() {
  2875.                                         @Override
  2876.                                         public void run() {
  2877.                                             setNextGraphics(new Graphics(2238));
  2878.                                         }
  2879.                                     });
  2880.                                     return;
  2881.                                 }
  2882.                             }
  2883.                         }
  2884.                         if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
  2885.                             if (p2.prayer.usingPrayer(1, 3)) { // sap mage
  2886.                                 if (Utils.getRandom(4) == 0) {
  2887.                                     if (p2.prayer.reachedMax(2)) {
  2888.                                         p2.getPackets().sendGameMessage(
  2889.                                                 "Your opponent has been weakened so much that your sap curse has no effect.",
  2890.                                                 true);
  2891.                                     } else {
  2892.                                         p2.prayer.increaseLeechBonus(2);
  2893.                                         p2.getPackets().sendGameMessage(
  2894.                                                 "Your curse drains Magic from the enemy, boosting your Magic.", true);
  2895.                                     }
  2896.                                     p2.setNextAnimation(new Animation(12569));
  2897.                                     p2.setNextGraphics(new Graphics(2220));
  2898.                                     p2.prayer.setBoostedLeech(true);
  2899.                                     World.sendProjectile(p2, this, 2221, 35, 35, 20, 5, 0, 0);
  2900.                                     WorldTasksManager.schedule(new WorldTask() {
  2901.  
  2902.                                         @Override
  2903.                                         public void run() {
  2904.                                             setNextGraphics(new Graphics(2222));
  2905.                                         }
  2906.                                     }, 1);
  2907.                                     return;
  2908.                                 }
  2909.                             } else if (p2.prayer.usingPrayer(1, 12)) {
  2910.                                 if (Utils.getRandom(7) == 0) {
  2911.                                     if (p2.prayer.reachedMax(5)) {
  2912.                                         p2.getPackets().sendGameMessage(
  2913.                                                 "Your opponent has been weakened so much that your leech curse has no effect.",
  2914.                                                 true);
  2915.                                     } else {
  2916.                                         p2.prayer.increaseLeechBonus(5);
  2917.                                         p2.getPackets().sendGameMessage(
  2918.                                                 "Your curse drains Magic from the enemy, boosting your Magic.", true);
  2919.                                     }
  2920.                                     p2.setNextAnimation(new Animation(12575));
  2921.                                     p2.prayer.setBoostedLeech(true);
  2922.                                     World.sendProjectile(p2, this, 2240, 35, 35, 20, 5, 0, 0);
  2923.                                     WorldTasksManager.schedule(new WorldTask() {
  2924.                                         @Override
  2925.                                         public void run() {
  2926.                                             setNextGraphics(new Graphics(2242));
  2927.                                         }
  2928.                                     }, 1);
  2929.                                     return;
  2930.                                 }
  2931.                             }
  2932.                         }
  2933.  
  2934.                         // overall
  2935.  
  2936.                         if (p2.prayer.usingPrayer(1, 13)) { // leech defence
  2937.                             if (Utils.getRandom(10) == 0) {
  2938.                                 if (p2.prayer.reachedMax(6)) {
  2939.                                     p2.getPackets().sendGameMessage(
  2940.                                             "Your opponent has been weakened so much that your leech curse has no effect.",
  2941.                                             true);
  2942.                                 } else {
  2943.                                     p2.prayer.increaseLeechBonus(6);
  2944.                                     p2.getPackets().sendGameMessage(
  2945.                                             "Your curse drains Defence from the enemy, boosting your Defence.", true);
  2946.                                 }
  2947.                                 p2.setNextAnimation(new Animation(12575));
  2948.                                 p2.prayer.setBoostedLeech(true);
  2949.                                 World.sendProjectile(p2, this, 2244, 35, 35, 20, 5, 0, 0);
  2950.                                 WorldTasksManager.schedule(new WorldTask() {
  2951.  
  2952.                                     @Override
  2953.                                     public void run() {
  2954.                                         setNextGraphics(new Graphics(2246));
  2955.                                     }
  2956.                                 }, 1);
  2957.                                 return;
  2958.                             }
  2959.                         }
  2960.  
  2961.                         if (p2.prayer.usingPrayer(1, 15)) {
  2962.                             if (Utils.getRandom(10) == 0) {
  2963.                                 if (getRunEnergy() <= 0) {
  2964.                                     p2.getPackets().sendGameMessage(
  2965.                                             "Your opponent has been weakened so much that your leech curse has no effect.",
  2966.                                             true);
  2967.                                 } else {
  2968.                                     p2.setRunEnergy(p2.getRunEnergy() > 90 ? 100 : p2.getRunEnergy() + 10);
  2969.                                     setRunEnergy(p2.getRunEnergy() > 10 ? getRunEnergy() - 10 : 0);
  2970.                                 }
  2971.                                 p2.setNextAnimation(new Animation(12575));
  2972.                                 p2.prayer.setBoostedLeech(true);
  2973.                                 World.sendProjectile(p2, this, 2256, 35, 35, 20, 5, 0, 0);
  2974.                                 WorldTasksManager.schedule(new WorldTask() {
  2975.                                     @Override
  2976.                                     public void run() {
  2977.                                         setNextGraphics(new Graphics(2258));
  2978.                                     }
  2979.                                 }, 1);
  2980.                                 return;
  2981.                             }
  2982.                         }
  2983.  
  2984.                         if (p2.prayer.usingPrayer(1, 16)) {
  2985.                             if (Utils.getRandom(10) == 0) {
  2986.                                 if (combatDefinitions.getSpecialAttackPercentage() <= 0) {
  2987.                                     p2.getPackets().sendGameMessage(
  2988.                                             "Your opponent has been weakened so much that your leech curse has no effect.",
  2989.                                             true);
  2990.                                 } else {
  2991.                                     p2.combatDefinitions.restoreSpecialAttack();
  2992.                                     combatDefinitions.desecreaseSpecialAttack(10);
  2993.                                 }
  2994.                                 p2.setNextAnimation(new Animation(12575));
  2995.                                 p2.prayer.setBoostedLeech(true);
  2996.                                 World.sendProjectile(p2, this, 2252, 35, 35, 20, 5, 0, 0);
  2997.                                 WorldTasksManager.schedule(new WorldTask() {
  2998.  
  2999.                                     @Override
  3000.                                     public void run() {
  3001.                                         setNextGraphics(new Graphics(2254));
  3002.                                     }
  3003.                                 }, 1);
  3004.                                 return;
  3005.                             }
  3006.                         }
  3007.  
  3008.                         if (p2.prayer.usingPrayer(1, 4)) { // sap spec
  3009.                             if (Utils.getRandom(10) == 0) {
  3010.                                 p2.setNextAnimation(new Animation(12569));
  3011.                                 p2.setNextGraphics(new Graphics(2223));
  3012.                                 p2.prayer.setBoostedLeech(true);
  3013.                                 if (combatDefinitions.getSpecialAttackPercentage() <= 0) {
  3014.                                     p2.getPackets().sendGameMessage(
  3015.                                             "Your opponent has been weakened so much that your sap curse has no effect.",
  3016.                                             true);
  3017.                                 } else {
  3018.                                     combatDefinitions.desecreaseSpecialAttack(10);
  3019.                                 }
  3020.                                 World.sendProjectile(p2, this, 2224, 35, 35, 20, 5, 0, 0);
  3021.                                 WorldTasksManager.schedule(new WorldTask() {
  3022.                                     @Override
  3023.                                     public void run() {
  3024.                                         setNextGraphics(new Graphics(2225));
  3025.                                     }
  3026.                                 }, 1);
  3027.                                 return;
  3028.                             }
  3029.                         }
  3030.                     }
  3031.                 }
  3032.             }
  3033.         } else {
  3034.  
  3035.             NPC n = (NPC) source;
  3036.             /*
  3037.              * if (prayer.usingPrayer(1, 19)) { if (Utils.getRandom(4) == 0) {
  3038.              * prayer.increaseTurmoilBonus(n); prayer.setBoostedLeech(true); } }
  3039.              */
  3040.             if (n.getId() == 13448)
  3041.  
  3042.                 sendSoulSplit(hit, n);
  3043.             /*
  3044.              * if (n instanceof Glacor) { Glacor glacor = (Glacor) n; if
  3045.              * (glacor.getEffect() == GlacorEffect.SAPPING) {
  3046.              * this.getPrayer().drainPrayer( (int) Utils.getPercent(10,
  3047.              * this.getPrayer() .getPrayerpoints())); } } else if (n instanceof
  3048.              * SappingGlacyte) { this.getPrayer().drainPrayer( (int)
  3049.              * Utils.getPercent(5, this.getPrayer() .getPrayerpoints())); } } }
  3050.              */}
  3051.  
  3052.     }
  3053.  
  3054.     public boolean hasDisabledYell() {
  3055.         return yellDisabled;
  3056.     }
  3057.  
  3058.     public boolean hasDisplayName() {
  3059.         return displayName != null;
  3060.     }
  3061.  
  3062.     public boolean hasInstantSpecial(final int weaponId) {
  3063.         switch (weaponId) {
  3064.         case 4153:
  3065.         case 15486:
  3066.         case 22207:
  3067.         case 22209:
  3068.         case 22211:
  3069.         case 22213:
  3070.         case 1377:
  3071.         case 13472:
  3072.         case 35:// Excalibur
  3073.         case 8280:
  3074.         case 14632:
  3075.             return true;
  3076.         default:
  3077.             return false;
  3078.         }
  3079.     }
  3080.  
  3081.     public boolean hasLargeSceneView() {
  3082.         return largeSceneView;
  3083.     }
  3084.  
  3085.     public boolean hasRecievedStarter() {
  3086.         return setStarter;
  3087.     }
  3088.  
  3089.     public boolean hasSkull() {
  3090.         return skullDelay > 0;
  3091.     }
  3092.  
  3093.     public boolean hasStarted() {
  3094.         return started;
  3095.     }
  3096.  
  3097.     public boolean hasTalkedtoCook() {
  3098.         return talkedtoCook;
  3099.     }
  3100.  
  3101.     @Override
  3102.     public void heal(int ammount, int extra) {
  3103.         super.heal(ammount, extra);
  3104.         refreshHitPoints();
  3105.     }
  3106.  
  3107.     public boolean hideSofInterface() {
  3108.         // TODO Auto-generated method stub
  3109.         return hideSofInterface;
  3110.     }
  3111.  
  3112.     public void increaseCrucibleHighScore() {
  3113.         crucibleHighScore++;
  3114.     }
  3115.  
  3116.     public void increaseKillCount(Player killed) {
  3117.         if (lastKilled == killed.getUsername()) {
  3118.             sendMessage("You haven't been awarded any pk points for killing " + killed.getDisplayName() + " twice.");
  3119.             return;
  3120.         }
  3121.         if (killed.getSession().getIP().equals(getSession().getIP()))
  3122.             return;
  3123.         if (killed.getCurrentMac().equals(getCurrentMac()))
  3124.             return;
  3125.         killed.deathCount++;
  3126.         PkRank.checkRank(killed);
  3127.         lastKilled = killed.getUsername();
  3128.         if (killed.getSession().getIP().equals(getSession().getIP()))
  3129.             return;
  3130.         if (isLegendary()) {
  3131.             setPkPoints(getPkPoints() + 15);
  3132.         } else if (Wilderness.isAtWild(this)) {
  3133.             setPkPoints(getPkPoints() + 10);
  3134.         } else {
  3135.             setPkPoints(getPkPoints() + 3);
  3136.         }
  3137.         killCount++;
  3138.         sendMessage("<shad=000000><col=ff0000>You have been awarded a pk point for killing; " + killed.getDisplayName()
  3139.                 + ".");
  3140.         PkRank.checkRank(this);
  3141.     }
  3142.  
  3143.     // @SuppressWarnings("null")
  3144.     public void init(Session session, String string, IsaacKeyPair isaacKeyPair) {
  3145.         username = string;
  3146.         this.session = session;
  3147.         this.isaacKeyPair = isaacKeyPair;
  3148.         World.addLobbyPlayer(this);
  3149.         if (Settings.DEBUG) {
  3150.             Logger.log(this, new StringBuilder("Lobby Inited Player: ").append(string).append(", pass: ")
  3151.                     .append(password).toString());
  3152.         }
  3153.     }
  3154.  
  3155.     public boolean isApeAtoll() {
  3156.         return (getX() >= 2693 && getX() <= 2821 && getY() >= 2693 && getY() <= 2817);
  3157.     }
  3158.  
  3159.     public boolean isCanPvp() {
  3160.         return canPvp;
  3161.     }
  3162.  
  3163.     public boolean isCantTrade() {
  3164.         return cantTrade;
  3165.     }
  3166.  
  3167.     public boolean isCastVeng() {
  3168.         return castedVeng;
  3169.     }
  3170.  
  3171.     public boolean isCompletedFightCaves() {
  3172.         return completedFightCaves;
  3173.     }
  3174.  
  3175.     public boolean isCompletedFightKiln() {
  3176.         return completedFightKiln;
  3177.     }
  3178.  
  3179.     public boolean isCompletedRfd() {
  3180.         return completedRfd;
  3181.     }
  3182.  
  3183.     public boolean isDfsActivated() {
  3184.         return dfsActivated;
  3185.     }
  3186.  
  3187.     public boolean isDonator() {
  3188.         return isExtremeDonator() || isLegendary() || isGold() || isSilver() || donator
  3189.                 || donatorTill > Utils.currentTimeMillis();
  3190.     }
  3191.  
  3192.     public boolean isDicer() {
  3193.         return dicer;
  3194.     }
  3195.  
  3196.     public boolean isEquipDisabled() {
  3197.         return disableEquip;
  3198.     }
  3199.  
  3200.     public boolean wearingMasterCape(int id) {
  3201.         if (getEquipment().getCapeId() == id)
  3202.             return true;
  3203.         return false;
  3204.     }
  3205.  
  3206.     public boolean isExtremeDonator() {
  3207.         return isLegendary() || extremeDonator || extremeDonatorTill > Utils.currentTimeMillis();
  3208.     }
  3209.  
  3210.     public boolean isExtremePermDonator() {
  3211.         return extremeDonator;
  3212.     }
  3213.  
  3214.     public boolean isFilterGame() {
  3215.         return filterGame;
  3216.     }
  3217.  
  3218.     public boolean isForceNextMapLoadRefresh() {
  3219.         return forceNextMapLoadRefresh;
  3220.     }
  3221.  
  3222.     public boolean isForumModerator() {
  3223.         return isForumModerator;
  3224.     }
  3225.  
  3226.     public boolean isGotInfernoAdze() {
  3227.         return gotInfernoAdze;
  3228.     }
  3229.  
  3230.     public boolean isGraphicDesigner() {
  3231.         return isGraphicDesigner;
  3232.     }
  3233.  
  3234.     public boolean isYoutuber() {
  3235.         return isYoutuber;
  3236.     }
  3237.  
  3238.     public boolean isHasCutEnoughLogs() {
  3239.         return hasCutEnoughLogs;
  3240.     }
  3241.  
  3242.     public boolean hasFinishedBarrows() {
  3243.         return hasFinishedBarrows;
  3244.     }
  3245.  
  3246.     public boolean isHasCutMoreEnoughLogs() {
  3247.         return hasCutMoreEnoughLogs;
  3248.     }
  3249.  
  3250.     public boolean isHidden() {
  3251.         // TODO Auto-generated method stub
  3252.         return true;
  3253.     }
  3254.  
  3255.     public boolean isHidingWorldMessages() {
  3256.         return hideWorldAnnouncements;
  3257.     }
  3258.  
  3259.     public boolean isInAnimationRoom() {
  3260.         return inAnimationRoom;
  3261.     }
  3262.  
  3263.     public boolean isInDefenderRoom() {
  3264.         return isInDefenderRoom;
  3265.     }
  3266.  
  3267.     public boolean isKalphiteLairEntranceSetted() {
  3268.         return khalphiteLairEntranceSetted;
  3269.     }
  3270.  
  3271.     public boolean isKalphiteLairSetted() {
  3272.         return khalphiteLairSetted;
  3273.     }
  3274.  
  3275.     public boolean isKilledAgrithNaNa() {
  3276.         return agrithNaNa;
  3277.     }
  3278.  
  3279.     public boolean isKilledBork() {
  3280.         return killedBork;
  3281.     }
  3282.  
  3283.     /**
  3284.      * RFD
  3285.      */
  3286.  
  3287.     public boolean isKilledCulinaromancer() {
  3288.         return culinaromancer;
  3289.     }
  3290.  
  3291.     public boolean isKilledDessourt() {
  3292.         return dessourt;
  3293.     }
  3294.  
  3295.     public boolean isKilledFlambeed() {
  3296.         return flamBeed;
  3297.     }
  3298.  
  3299.     public boolean isKilledKaramel() {
  3300.         return karamel;
  3301.     }
  3302.  
  3303.     /**
  3304.      * Gets the killedQueenBlackDragon.
  3305.      *
  3306.      * @return The killedQueenBlackDragon.
  3307.      */
  3308.     public boolean isKilledQueenBlackDragon() {
  3309.         return killedQueenBlackDragon;
  3310.     }
  3311.  
  3312.     public boolean isLocked() {
  3313.         return lockDelay >= Utils.currentTimeMillis();
  3314.     }
  3315.  
  3316.     public boolean isOldItemsLook() {
  3317.         return oldItemsLook;
  3318.     }
  3319.  
  3320.     public boolean isPermBanned() {
  3321.         return permBanned;
  3322.     }
  3323.  
  3324.     public boolean isPermMuted() {
  3325.         return permMuted;
  3326.     }
  3327.  
  3328.     public boolean isResting() {
  3329.         return resting;
  3330.     }
  3331.  
  3332.     public boolean isRunning() {
  3333.         return running;
  3334.     }
  3335.  
  3336.     public boolean isSpawnsMode() {
  3337.         return spawnsMode;
  3338.     }
  3339.  
  3340.     public boolean isSupporter() {
  3341.         return isSupporter;
  3342.     }
  3343.  
  3344.     public boolean isHelper() {
  3345.         return isHelper;
  3346.     }
  3347.  
  3348.     public boolean hasAccountPin;
  3349.     public boolean hasEnteredPin;
  3350.     public int accountpin;
  3351.  
  3352.     public int getAccountPin() {
  3353.         return accountpin;
  3354.     }
  3355.  
  3356.     /*
  3357.      * public boolean hasAccountPin() { return hasAccountPin; }
  3358.      */
  3359.  
  3360.     public void setAccountPin(int accountpin) {
  3361.         this.accountpin = accountpin;
  3362.     }
  3363.  
  3364.     public boolean isMod() {
  3365.         return getRights() == 1;
  3366.     }
  3367.  
  3368.     public boolean isTalkedWithMarv() {
  3369.         return talkedWithMarv;
  3370.     }
  3371.  
  3372.     public boolean isTalkedWithVannaka() {
  3373.         return talkedWithVannaka;
  3374.     }
  3375.  
  3376.     public boolean isUpdateMovementType() {
  3377.         return updateMovementType;
  3378.     }
  3379.  
  3380.     public boolean isUsingReportOption() {
  3381.         return reportOption;
  3382.     }
  3383.  
  3384.     public boolean isUsingZenRest() {
  3385.         // TODO Auto-generated method stub
  3386.         return zenRest;
  3387.     }
  3388.  
  3389.     public boolean isWonFightPits() {
  3390.         return wonFightPits;
  3391.     }
  3392.  
  3393.     public boolean isXpLocked() {
  3394.         return xpLocked;
  3395.     }
  3396.  
  3397.     public boolean isYellOff() {
  3398.         return yellOff;
  3399.     }
  3400.  
  3401.     public void kickPlayerFromFriendsChannel(String name) {
  3402.         if (currentFriendChat == null)
  3403.             return;
  3404.         currentFriendChat.kickPlayerFromChat(this, name);
  3405.     }
  3406.  
  3407.     @Override
  3408.     public void loadMapRegions() {
  3409.         boolean wasAtDynamicRegion = isAtDynamicRegion();
  3410.         super.loadMapRegions();
  3411.         clientLoadedMapRegion = false;
  3412.         if (isAtDynamicRegion()) {
  3413.             getPackets().sendDynamicMapRegion(!started);
  3414.             if (!wasAtDynamicRegion)
  3415.                 localNPCUpdate.reset();
  3416.         } else {
  3417.             getPackets().sendMapRegion(!started);
  3418.             if (wasAtDynamicRegion)
  3419.                 localNPCUpdate.reset();
  3420.         }
  3421.         forceNextMapLoadRefresh = false;
  3422.     }
  3423.  
  3424.     public boolean accountLocked;
  3425.  
  3426.     public boolean accountLocked() {
  3427.         if (this.accountLocked == true) {
  3428.             lock();
  3429.             return true;
  3430.         }
  3431.         return false;
  3432.     }
  3433.  
  3434.     public void lock() {
  3435.         lockDelay = Long.MAX_VALUE;
  3436.     }
  3437.  
  3438.     public void lock(long time) {
  3439.         lockDelay = Utils.currentTimeMillis() + (time * 600);
  3440.     }
  3441.  
  3442.     public static int dayOfWeek() {
  3443.         Calendar cal = Calendar.getInstance();
  3444.         return cal.get(Calendar.DAY_OF_WEEK);
  3445.     }
  3446.  
  3447.     public static boolean isWeekend() {
  3448.         return dayOfWeek() == 1 ? true : dayOfWeek() == 6 ? true : dayOfWeek() == 7 ? true : false;
  3449.     }
  3450.  
  3451.     public int MutePoints;
  3452.  
  3453.     public boolean isAdministrator() {
  3454.         return getRights() == 2 || isOwner() || isHeadAdmin();
  3455.     }
  3456.  
  3457.     public int getMutePoints() {
  3458.         return MutePoints;
  3459.     }
  3460.  
  3461.     public void setMutePoints(int MutePoints) {
  3462.         this.MutePoints = MutePoints;
  3463.     }
  3464.  
  3465.     public boolean lootshareEnabled() {
  3466.         return lootshareEnabled;
  3467.     }
  3468.  
  3469.     @SuppressWarnings("deprecation")
  3470.     public void makeDonator(int months) {
  3471.         if (donatorTill < Utils.currentTimeMillis())
  3472.             donatorTill = Utils.currentTimeMillis();
  3473.         Date date = new Date(donatorTill);
  3474.         date.setMonth(date.getMonth() + months);
  3475.         donatorTill = date.getTime();
  3476.     }
  3477.  
  3478.     @Override
  3479.     public boolean needMasksUpdate() {
  3480.         return super.needMasksUpdate() || getTemporaryMovementType() != -1 || isUpdateMovementType();
  3481.     }
  3482.  
  3483.     public void ordinanceTimer() {
  3484.         CoresManager.fastExecutor.schedule(new TimerTask() {
  3485.             @Override
  3486.             public void run() {
  3487.                 if (ordinanceTimer > 0)
  3488.                     ordinanceTimer--;
  3489.                 if (ordinanceTimer == 0) {
  3490.                     getPackets().sendGameMessage("<col=FFCC00>You are able to take more items from the ordinance.");
  3491.                     cancel();
  3492.                 }
  3493.             }
  3494.         }, 0, 1);
  3495.     }
  3496.  
  3497.     public void performInstantSpecial(final int weaponId) {
  3498.         int specAmt = PlayerCombat.getSpecialAmmount(weaponId);
  3499.         if (combatDefinitions.hasRingOfVigour())
  3500.             specAmt *= 0.9;
  3501.         if (combatDefinitions.getSpecialAttackPercentage() < specAmt) {
  3502.             sendMessage("You don't have enough power left.");
  3503.             combatDefinitions.desecreaseSpecialAttack(0);
  3504.             return;
  3505.         }
  3506.         if (this.getSwitchItemCache().size() > 0) {
  3507.             ButtonHandler.submitSpecialRequest(this);
  3508.             return;
  3509.         }
  3510.         switch (weaponId) {
  3511.         case 4153:
  3512.             combatDefinitions.setInstantAttack(true);
  3513.             combatDefinitions.switchUsingSpecialAttack();
  3514.             Entity target = (Entity) getTemporaryAttributtes().get("last_target");
  3515.             if (target != null && target.getTemporaryAttributtes().get("last_attacker") == this) {
  3516.                 if (!(getActionManager().getAction() instanceof PlayerCombat)
  3517.                         || ((PlayerCombat) getActionManager().getAction()).getTarget() != target) {
  3518.                     getActionManager().setAction(new PlayerCombat(target));
  3519.                 }
  3520.             }
  3521.             gmaulSpecCheapFix(true);
  3522.             break;
  3523.         case 1377:
  3524.         case 13472:
  3525.             setNextAnimation(new Animation(1056));
  3526.             setNextGraphics(new Graphics(246));
  3527.             setNextForceTalk(new ForceTalk("Raarrrrrgggggghhhhhhh!"));
  3528.             int defence = (int) (skills.getLevelForXp(Skills.DEFENCE) * 0.90D);
  3529.             int attack = (int) (skills.getLevelForXp(Skills.ATTACK) * 0.90D);
  3530.             int range = (int) (skills.getLevelForXp(Skills.RANGE) * 0.90D);
  3531.             int magic = (int) (skills.getLevelForXp(Skills.MAGIC) * 0.90D);
  3532.             int strength = (int) (skills.getLevelForXp(Skills.STRENGTH) * 1.2D);
  3533.             skills.set(Skills.DEFENCE, defence);
  3534.             skills.set(Skills.ATTACK, attack);
  3535.             skills.set(Skills.RANGE, range);
  3536.             skills.set(Skills.MAGIC, magic);
  3537.             skills.set(Skills.STRENGTH, strength);
  3538.             combatDefinitions.desecreaseSpecialAttack(specAmt);
  3539.             break;
  3540.         case 35:// Excalibur
  3541.         case 8280:
  3542.         case 14632:
  3543.             setNextAnimation(new Animation(1168));
  3544.             setNextGraphics(new Graphics(247));
  3545.             final boolean enhanced = weaponId == 14632;
  3546.             skills.set(Skills.DEFENCE, enhanced ? (int) (skills.getLevelForXp(Skills.DEFENCE) * 1.15D)
  3547.                     : (skills.getLevel(Skills.DEFENCE) + 8));
  3548.             WorldTasksManager.schedule(new WorldTask() {
  3549.                 int count = 5;
  3550.  
  3551.                 @Override
  3552.                 public void run() {
  3553.                     if (isDead() || hasFinished() || getHitpoints() >= getMaxHitpoints()) {
  3554.                         stop();
  3555.                         return;
  3556.                     }
  3557.                     heal(enhanced ? 80 : 40);
  3558.                     if (count-- == 0) {
  3559.                         stop();
  3560.                         return;
  3561.                     }
  3562.                 }
  3563.             }, 4, 2);
  3564.             combatDefinitions.desecreaseSpecialAttack(specAmt);
  3565.             break;
  3566.         case 15486:
  3567.         case 22207:
  3568.         case 22209:
  3569.         case 22211:
  3570.         case 22213:
  3571.             setNextAnimation(new Animation(12804));
  3572.             setNextGraphics(new Graphics(2319));// 2320
  3573.             setNextGraphics(new Graphics(2321));
  3574.             addPolDelay(60000);
  3575.             combatDefinitions.desecreaseSpecialAttack(specAmt);
  3576.             break;
  3577.         }
  3578.     }
  3579.  
  3580.     private boolean gmaulSpecCheapFix;
  3581.  
  3582.     public boolean getGmaulSpecCheapFix() {
  3583.         return gmaulSpecCheapFix;
  3584.     }
  3585.  
  3586.     public void gmaulSpecCheapFix(boolean b) {
  3587.         gmaulSpecCheapFix = b;
  3588.     }
  3589.  
  3590.     public void addItemEvent(Runnable addItemEvent) {
  3591.         this.addItemEvent = addItemEvent;
  3592.     }
  3593.  
  3594.     private transient Runnable addItemEvent;
  3595.  
  3596.     @Override
  3597.     public void processEntity() {
  3598.         processLogicPackets();
  3599.         cutscenesManager.process();
  3600.         if (coordsEvent != null && coordsEvent.processEvent(this))
  3601.             coordsEvent = null;
  3602.         if (routeEvent != null && routeEvent.processEvent(this))
  3603.             routeEvent = null;
  3604.         if (addItemEvent != null) {
  3605.             addItemEvent.run();
  3606.             addItemEvent = null;
  3607.         }
  3608.         super.processEntity();
  3609.         if (musicsManager.musicEnded())
  3610.             musicsManager.replayMusic();
  3611.         if (hasSkull()) {
  3612.             skullDelay--;
  3613.             if (!hasSkull())
  3614.                 appearence.generateAppearenceData();
  3615.         }
  3616.         if (polDelay != 0 && polDelay <= Utils.currentTimeMillis()) {
  3617.             getPackets().sendGameMessage(
  3618.                     "The power of the light fades. Your resistance to melee attacks return to normal.");
  3619.             polDelay = 0;
  3620.         }
  3621.         if (overloadDelay > 0) {
  3622.             if (overloadDelay == 1 || isDead()) {
  3623.                 Pots.resetOverLoadEffect(this);
  3624.                 return;
  3625.             } else if ((overloadDelay - 1) % 25 == 0)
  3626.                 Pots.applyOverLoadEffect(this);
  3627.             overloadDelay--;
  3628.         }
  3629.         if (arcPotDelay > 0) {
  3630.             if (arcPotDelay == 1 || isDead()) {
  3631.                 Pots.resetArcPotEffect(this);
  3632.                 return;
  3633.             } else if ((arcPotDelay - 1) % 25 == 0)
  3634.                 Pots.applyArcPotEffect(this);
  3635.             arcPotDelay--;
  3636.         }
  3637.         if (prayerRenewalDelay > 0) {
  3638.             if (prayerRenewalDelay == 1 || isDead()) {
  3639.                 sendMessage("<col=0000FF>Your prayer renewal has ended.");
  3640.                 prayerRenewalDelay = 0;
  3641.                 return;
  3642.             } else {
  3643.                 if (prayerRenewalDelay == 50)
  3644.                     getPackets().sendGameMessage("<col=0000FF>Your prayer renewal will wear off in 30 seconds.");
  3645.                 if (!prayer.hasFullPrayerpoints()) {
  3646.                     getPrayer().restorePrayer(1);
  3647.                     if ((prayerRenewalDelay - 1) % 25 == 0)
  3648.                         setNextGraphics(new Graphics(1295));
  3649.                 }
  3650.             }
  3651.             prayerRenewalDelay--;
  3652.         }
  3653.         if (dfscoolDown > 0) {
  3654.             dfscoolDown--;
  3655.         }
  3656.         if (specRestoreTimer > 0) {
  3657.             specRestoreTimer--;
  3658.         }
  3659.         if (lastBonfire > 0) {
  3660.             lastBonfire--;
  3661.             if (lastBonfire == 500)
  3662.                 getPackets().sendGameMessage(
  3663.                         "<col=ffff00>The health boost you received from stoking a bonfire will run out in 5 minutes.");
  3664.             else if (lastBonfire == 0) {
  3665.                 getPackets().sendGameMessage(
  3666.                         "<col=ff0000>The health boost you received from stoking a bonfire has run out.");
  3667.                 equipment.refreshConfigs(false);
  3668.             }
  3669.         }
  3670.         charges.process();
  3671.         auraManager.process();
  3672.         actionManager.process();
  3673.         prayer.processPrayer();
  3674.         controlerManager.process();
  3675.     }
  3676.  
  3677.     public void processLogicPackets() {
  3678.         LogicPacket packet;
  3679.         while ((packet = logicPackets.poll()) != null)
  3680.             WorldPacketsDecoder.decodeLogicPacket(this, packet);
  3681.     }
  3682.  
  3683.     @Override
  3684.     public void processReceivedHits() {
  3685.         if (lockDelay > Utils.currentTimeMillis())
  3686.             return;
  3687.         super.processReceivedHits();
  3688.     }
  3689.  
  3690.     public void realFinish() {
  3691.         if (hasFinished())
  3692.             return;
  3693.  
  3694.         if (!World.containsLobbyPlayer(username)) {
  3695.             stopAll();
  3696.             cutscenesManager.logout();
  3697.             // controlerManager.logout();
  3698.         }
  3699.         /* ITEM LEDNING */
  3700.         Lend lend = LendingManager.getLend(this);
  3701.         Lend hasLendedOut = LendingManager.getHasLendedItemsOut(this);
  3702.         if (lend != null) {
  3703.             if (isUntillLogout()) {
  3704.                 LendingManager.unLend(lend);
  3705.             }
  3706.         }
  3707.         if (hasLendedOut != null) {
  3708.             if (isUntillLogout()) {
  3709.                 LendingManager.unLend(hasLendedOut);
  3710.             }
  3711.         }
  3712.         /* END OF ITEM LEDNING */
  3713.         setRunning(false);
  3714.         if (!World.containsLobbyPlayer(username)) {
  3715.             friendsIgnores.sendFriendsMyStatus(false);
  3716.         }
  3717.         if (currentFriendChat != null) {
  3718.             currentFriendChat.leaveChat(this, true);
  3719.         }
  3720.         if (getDwarfCannon().hasCannon())
  3721.             getDwarfCannon().pickUpDwarfCannon(0, getDwarfCannon().getObject());
  3722.         if (clanManager != null)
  3723.             clanManager.disconnect(this, false);
  3724.         if (guestClanManager != null)
  3725.             guestClanManager.disconnect(this, true);
  3726.         if (getSlayerManager() != null)
  3727.             getSlayerManager().removePartner(true);
  3728.         if (familiar != null && !familiar.isFinished()) {
  3729.             familiar.dissmissFamiliar(true);
  3730.         } else if (pet != null) {
  3731.             pet.finish();
  3732.         }
  3733.         setFinished(true);
  3734.         session.setDecoder(-1);
  3735.         this.lastLoggedIn = System.currentTimeMillis();
  3736.         SerializableFilesManager.savePlayer(this);
  3737.         /*
  3738.          * if (!World.isUpdating()) GrinderList.remove(this);
  3739.          */
  3740.         if (World.containsLobbyPlayer(username)) {
  3741.             World.removeLobbyPlayer(this);
  3742.         }
  3743.         World.updateEntityRegion(this);
  3744.         if (World.containsPlayer(username)) {
  3745.             World.removePlayer(this);
  3746.         }
  3747.         if (Settings.DEBUG) {
  3748.             Logger.log(this, "Finished Player: " + username + ", pass: " + password);
  3749.         }
  3750.     }
  3751.  
  3752.     public void refreshAllowChatEffects() {
  3753.         getPackets().sendConfig(171, allowChatEffects ? 0 : 1);
  3754.     }
  3755.  
  3756.     private void refreshFightKilnEntrance() {
  3757.         if (completedFightCaves)
  3758.             getPackets().sendConfigByFile(10838, 1);
  3759.     }
  3760.  
  3761.     public void refreshHitPoints() {
  3762.         getPackets().sendConfigByFile(7198, getHitpoints());
  3763.     }
  3764.  
  3765.     private void refreshKalphiteLair() {
  3766.         if (khalphiteLairSetted)
  3767.             getPackets().sendConfigByFile(7263, 1);
  3768.     }
  3769.  
  3770.     private void refreshKalphiteLairEntrance() {
  3771.         if (khalphiteLairEntranceSetted)
  3772.             getPackets().sendConfigByFile(7262, 1);
  3773.     }
  3774.  
  3775.     public boolean lumby, draynor, port, alkarid, varrock, falador, burth, tav, adrougne, cath, seers, yanille, edge;
  3776.  
  3777.     public void refreshLodestoneNetwork() {
  3778.         getPackets().sendConfigByFile(358, 15); // unlocks bandit camp lodestone
  3779.         getPackets().sendConfigByFile(2448, 190); // unlocks lunar isle
  3780.                                                     // lodestone
  3781.         getPackets().sendConfigByFile(10907, 1); // unlocks lumbridge lodestone
  3782.         // unlocks alkarid lodestone
  3783.         if (alkarid == true) {
  3784.             getPackets().sendConfigByFile(10900, 1);
  3785.         }
  3786.         // unlocks ardougne lodestone
  3787.         if (adrougne == true) {
  3788.             getPackets().sendConfigByFile(10901, 1);
  3789.         }
  3790.         // unlocks burthorpe lodestone
  3791.         if (burth == true) {
  3792.             getPackets().sendConfigByFile(10902, 1);
  3793.         }
  3794.         // unlocks catherbay lodestone
  3795.         if (cath == true) {
  3796.             getPackets().sendConfigByFile(10903, 1);
  3797.         }
  3798.         // unlocks draynor lodestone
  3799.         if (draynor == true) {
  3800.             getPackets().sendConfigByFile(10904, 1);
  3801.         }
  3802.         // unlocks edgeville lodestone
  3803.         if (edge == true) {
  3804.             getPackets().sendConfigByFile(10905, 1);
  3805.         }
  3806.         // unlocks falador lodestone
  3807.         if (falador == true) {
  3808.             getPackets().sendConfigByFile(10906, 1);
  3809.         }
  3810.         // unlocks port sarim lodestone
  3811.         if (port == true) {
  3812.             getPackets().sendConfigByFile(10908, 1);
  3813.         }
  3814.         // unlocks seers village lodestone
  3815.         if (seers == true) {
  3816.             getPackets().sendConfigByFile(10909, 1);
  3817.         }
  3818.         // unlocks taverley lodestone
  3819.         if (tav == true) {
  3820.             getPackets().sendConfigByFile(10910, 1);
  3821.         }
  3822.         // unlocks varrock lodestone
  3823.         if (varrock == true) {
  3824.             getPackets().sendConfigByFile(10911, 1);
  3825.         }
  3826.         // unlocks yanille lodestone
  3827.         if (yanille == true) {
  3828.             getPackets().sendConfigByFile(10912, 1);
  3829.         }
  3830.     }
  3831.  
  3832.     /*
  3833.      * private void refreshLodestoneNetworkClosed() { // unlocks bandit camp
  3834.      * lodestone getPackets().sendConfigByFile(359, 15); // Nomal Lodestone =
  3835.      * 358, 15 // unlocks lunar isle lodestone
  3836.      * getPackets().sendConfigByFile(2449, 190); // Nomal Lodestone = 2448 190
  3837.      * // unlocks alkarid lodestone getPackets().sendConfigByFile(10924, 1); //
  3838.      * Nomal Lodestone = 10900 // unlocks ardougne lodestone
  3839.      * getPackets().sendConfigByFile(10923, 1); // Nomal Lodestone = 10901 //
  3840.      * unlocks burthorpe lodestone getPackets().sendConfigByFile(10922, 1); //
  3841.      * Nomal Lodestone = 10902 // unlocks catherbay lodestone
  3842.      * getPackets().sendConfigByFile(10921, 1); // Nomal Lodestone = 10903 //
  3843.      * unlocks draynor lodestone getPackets().sendConfigByFile(10920, 1); //
  3844.      * Nomal Lodestone = 10904 // unlocks edgeville lodestone
  3845.      * getPackets().sendConfigByFile(10910, 1); // Nomal Lodestone = 10905 //
  3846.      * unlocks falador lodestone getPackets().sendConfigByFile(10919, 1); //
  3847.      * Nomal Lodestone = 10906 // unlocks lumbridge lodestone
  3848.      * getPackets().sendConfigByFile(10907, 1); // Normal Lodestone = 10907 //
  3849.      * unlocks port sarim lodestone getPackets().sendConfigByFile(10917, 1); //
  3850.      * Normal Lodestone = 10908 // unlocks seers village lodestone
  3851.      * getPackets().sendConfigByFile(10916, 1); //// Normal Lodestone = 10909 //
  3852.      * unlocks taverley lodestone getPackets().sendConfigByFile(10915, 1); //
  3853.      * Normal Lodestone = 10910 // unlocks varrock lodestone
  3854.      * getPackets().sendConfigByFile(10914, 1); // Normal Lodestone = 10911 //
  3855.      * unlocks yanille lodestone getPackets().sendConfigByFile(10913, 1); //
  3856.      * Normal Lodestone = 10912 }
  3857.      */
  3858.     public void refreshMoneyPouch() {
  3859.         getPackets().sendRunScript(5560, getMoneyPouch().getTotal());
  3860.     }
  3861.  
  3862.     public void refreshMouseButtons() {
  3863.         getPackets().sendConfig(170, mouseButtons ? 0 : 1);
  3864.     }
  3865.  
  3866.     private transient ClansManager clanManager, guestClanManager;
  3867.  
  3868.     public ClansManager getClanManager() {
  3869.         return clanManager;
  3870.     }
  3871.  
  3872.     public void setClanManager(ClansManager clanManager) {
  3873.         this.clanManager = clanManager;
  3874.     }
  3875.  
  3876.     private String clanName;
  3877.  
  3878.     private int clanChatSetup;
  3879.  
  3880.     public int getClanChatSetup() {
  3881.         return clanChatSetup;
  3882.     }
  3883.  
  3884.     public void setClanChatSetup(int clanChatSetup) {
  3885.         this.clanChatSetup = clanChatSetup;
  3886.     }
  3887.  
  3888.     private int guestChatSetup;
  3889.  
  3890.     public void refreshOtherChatsSetup() {
  3891.         int value = friendChatSetup << 6;
  3892.         getPackets().sendConfig(1438, value);
  3893.         getPackets().sendConfigByFile(3612, clanChatSetup);
  3894.         getPackets().sendConfigByFile(9191, guestChatSetup);
  3895.     }
  3896.  
  3897.     public void kickPlayerFromClanChannel(String name) {
  3898.         if (clanManager == null)
  3899.             return;
  3900.         clanManager.kickPlayerFromChat(this, name);
  3901.     }
  3902.  
  3903.     public void sendClanChannelMessage(ChatMessage message) {
  3904.         if (clanManager == null)
  3905.             return;
  3906.         clanManager.sendMessage(this, message);
  3907.     }
  3908.  
  3909.     public void sendClanChannelQuickMessage(QuickChatMessage message) {
  3910.         if (clanManager == null)
  3911.             return;
  3912.         clanManager.sendQuickMessage(this, message);
  3913.     }
  3914.  
  3915.     public void sendGuestClanChannelMessage(ChatMessage message) {
  3916.         if (guestClanManager == null)
  3917.             return;
  3918.         guestClanManager.sendMessage(this, message);
  3919.     }
  3920.  
  3921.     public void sendGuestClanChannelQuickMessage(QuickChatMessage message) {
  3922.         if (guestClanManager == null)
  3923.             return;
  3924.         guestClanManager.sendQuickMessage(this, message);
  3925.     }
  3926.  
  3927.     private boolean connectedClanChannel;
  3928.  
  3929.     public void emoteGfx(int emoteId, int gfxId) {
  3930.         setNextAnimation(new Animation(emoteId));
  3931.         setNextGraphics(new Graphics(gfxId));
  3932.     }
  3933.  
  3934.     public int ganodermicFlakes;
  3935.  
  3936.     public void refreshPrivateChatSetup() {
  3937.         getPackets().sendConfig(287, privateChatSetup);
  3938.     }
  3939.  
  3940.     public void refreshSpawnedItems() {
  3941.         for (int regionId : getMapRegionsIds()) {
  3942.             List<FloorItem> floorItems = World.getRegion(regionId).getFloorItems();
  3943.             if (floorItems == null)
  3944.                 continue;
  3945.             for (FloorItem item : floorItems) {
  3946.                 if ((item.isInvisible() || !this.getDisplayName().equalsIgnoreCase(item.getOwner())
  3947.                         || item.getTile().getPlane() != getPlane()))
  3948.                     continue;
  3949.                 getPackets().sendRemoveGroundItem(item);
  3950.             }
  3951.         }
  3952.         for (int regionId : getMapRegionsIds()) {
  3953.             List<FloorItem> floorItems = World.getRegion(regionId).getFloorItems();
  3954.             if (floorItems == null)
  3955.                 continue;
  3956.             for (FloorItem item : floorItems) {
  3957.                 if ((item.isInvisible() || !this.getDisplayName().equalsIgnoreCase(item.getOwner())
  3958.                         || item.getTile().getPlane() != getPlane()))
  3959.                     continue;
  3960.                 getPackets().sendGroundItem(item);
  3961.             }
  3962.         }
  3963.     }
  3964.  
  3965.     public void refreshSpawnedObjects() {
  3966.         for (int regionId : getMapRegionsIds()) {
  3967.             List<WorldObject> spawnedObjects = World.getRegion(regionId).getSpawnedObjects();
  3968.             if (spawnedObjects != null) {
  3969.                 for (WorldObject object : spawnedObjects)
  3970.                     if (object.getPlane() == getPlane())
  3971.                         getPackets().sendSpawnedObject(object);
  3972.             }
  3973.             List<WorldObject> removedObjects = World.getRegion(regionId).getRemovedObjects();
  3974.             if (removedObjects != null) {
  3975.                 for (WorldObject object : removedObjects)
  3976.                     if (object.getPlane() == getPlane())
  3977.                         getPackets().sendDestroyObject(object);
  3978.             }
  3979.         }
  3980.     }
  3981.  
  3982.     @Override
  3983.     public void removeHitpoints(Hit hit) {
  3984.         super.removeHitpoints(hit);
  3985.         refreshHitPoints();
  3986.     }
  3987.  
  3988.     public void removeSkull() {
  3989.         skullDelay = -1;
  3990.         appearence.generateAppearenceData();
  3991.     }
  3992.  
  3993.     @Override
  3994.     public void reset() {
  3995.         reset(true);
  3996.     }
  3997.  
  3998.     @Override
  3999.     public void reset(boolean attributes) {
  4000.         super.reset(attributes);
  4001.         refreshHitPoints();
  4002.         hintIconsManager.removeAll();
  4003.         skills.restoreSkills();
  4004.         combatDefinitions.resetSpecialAttack();
  4005.         prayer.reset();
  4006.         combatDefinitions.resetSpells(true);
  4007.         resting = false;
  4008.         lastBonfire = 0;
  4009.         equipment.refreshConfigs(false);
  4010.         skullDelay = 0;
  4011.         foodDelay = 0;
  4012.         potDelay = 0;
  4013.         poisonImmune = 0;
  4014.         fireImmune = 0;
  4015.         castedVeng = false;
  4016.         setDfsActivated(false);
  4017.         dfscoolDown = 0;
  4018.         getEquipment().refreshConfigs(false);
  4019.         if (getOverloadDelay() > 0)
  4020.             Pots.resetOverLoadEffect(this);
  4021.         if (getArcPotDelay() > 0)
  4022.             Pots.resetArcPotEffect(this);
  4023.         setRunEnergy(100);
  4024.         removeDamage(this);
  4025.         appearence.generateAppearenceData();
  4026.         if (getFamiliar() != null) {
  4027.             familiar.sendDeath(this);
  4028.             return;
  4029.         }
  4030.     }
  4031.  
  4032.     public void resetBarrows() {
  4033.         hiddenBrother = -1;
  4034.         killedBarrowBrothers = new boolean[7]; // includes new bro for future
  4035.         // use
  4036.         barrowsKillCount = 0;
  4037.     }
  4038.  
  4039.     @Override
  4040.     public void resetMasks() {
  4041.         super.resetMasks();
  4042.         setTemporaryMovementType(-1);
  4043.         setUpdateMovementType(false);
  4044.         if (!clientHasLoadedMapRegion()) {
  4045.             // load objects and items here
  4046.             setClientHasLoadedMapRegion();
  4047.             refreshSpawnedObjects();
  4048.             refreshSpawnedItems();
  4049.         }
  4050.     }
  4051.  
  4052.     @Override
  4053.     public boolean restoreHitPoints() {
  4054.         boolean update = super.restoreHitPoints();
  4055.         if (update) {
  4056.             if (prayer.usingPrayer(0, 9))
  4057.                 super.restoreHitPoints();
  4058.             if (resting)
  4059.                 super.restoreHitPoints();
  4060.             refreshHitPoints();
  4061.         }
  4062.         return update;
  4063.     }
  4064.  
  4065.     public void restoreRunEnergy() {
  4066.         if (getNextRunDirection() == -1 && runEnergy < 100) {
  4067.             runEnergy++;
  4068.             if (resting && runEnergy < 100)
  4069.                 runEnergy++;
  4070.             getPackets().sendRunEnergy();
  4071.         }
  4072.     }
  4073.  
  4074.     /*
  4075.      * public void run() { if (getRights() == 2) for (Player players:
  4076.      * World.getPlayers()) { if (players == null) continue;
  4077.      * players.getPackets().
  4078.      * sendGameMessage("<col=0000FF><img=1> An Administrator has just logged on!<img=1>"
  4079.      * ); } }
  4080.      */
  4081.  
  4082.     @Override
  4083.     public void sendDeath(final Entity source) {
  4084.         if (prayer.hasPrayersOn() && getTemporaryAttributtes().get("startedDuel") != Boolean.TRUE) {
  4085.             if (prayer.usingPrayer(0, 22)) {
  4086.                 setNextGraphics(new Graphics(437));
  4087.                 final Player target = this;
  4088.                 if (isAtMultiArea()) {
  4089.                     for (int regionId : getMapRegionsIds()) {
  4090.                         List<Integer> playersIndexes = World.getRegion(regionId).getPlayerIndexes();
  4091.                         if (playersIndexes != null) {
  4092.                             for (int playerIndex : playersIndexes) {
  4093.                                 Player player = World.getPlayers().get(playerIndex);
  4094.                                 if (player == null || !player.hasStarted() || player.isDead() || player.hasFinished()
  4095.                                         || !player.withinDistance(this, 1) || !player.isCanPvp()
  4096.                                         || !target.getControlerManager().canHit(player))
  4097.                                     continue;
  4098.                                 player.applyHit(new Hit(target,
  4099.                                         Utils.getRandom((int) (skills.getLevelForXp(Skills.PRAYER) * 2.5)),
  4100.                                         HitLook.REGULAR_DAMAGE));
  4101.                             }
  4102.                         }
  4103.                         List<Integer> npcsIndexes = World.getRegion(regionId).getNPCsIndexes();
  4104.                         if (npcsIndexes != null) {
  4105.                             for (int npcIndex : npcsIndexes) {
  4106.                                 NPC npc = World.getNPCs().get(npcIndex);
  4107.                                 if (npc == null || npc.isDead() || npc.hasFinished() || !npc.withinDistance(this, 1)
  4108.                                         || !npc.getDefinitions().hasAttackOption()
  4109.                                         || !target.getControlerManager().canHit(npc))
  4110.                                     continue;
  4111.                                 npc.applyHit(new Hit(target,
  4112.                                         Utils.getRandom((int) (skills.getLevelForXp(Skills.PRAYER) * 2.5)),
  4113.                                         HitLook.REGULAR_DAMAGE));
  4114.                             }
  4115.                         }
  4116.                     }
  4117.                 } else {
  4118.                     if (source != null && source != this && !source.isDead() && !source.hasFinished()
  4119.                             && source.withinDistance(this, 1))
  4120.                         source.applyHit(
  4121.                                 new Hit(target, Utils.getRandom((int) (skills.getLevelForXp(Skills.PRAYER) * 2.5)),
  4122.                                         HitLook.REGULAR_DAMAGE));
  4123.                 }
  4124.                 WorldTasksManager.schedule(new WorldTask() {
  4125.                     @Override
  4126.                     public void run() {
  4127.                         World.sendGraphics(target, new Graphics(438),
  4128.                                 new WorldTile(target.getX() - 1, target.getY(), target.getPlane()));
  4129.                         World.sendGraphics(target, new Graphics(438),
  4130.                                 new WorldTile(target.getX() + 1, target.getY(), target.getPlane()));
  4131.                         World.sendGraphics(target, new Graphics(438),
  4132.                                 new WorldTile(target.getX(), target.getY() - 1, target.getPlane()));
  4133.                         World.sendGraphics(target, new Graphics(438),
  4134.                                 new WorldTile(target.getX(), target.getY() + 1, target.getPlane()));
  4135.                         World.sendGraphics(target, new Graphics(438),
  4136.                                 new WorldTile(target.getX() - 1, target.getY() - 1, target.getPlane()));
  4137.                         World.sendGraphics(target, new Graphics(438),
  4138.                                 new WorldTile(target.getX() - 1, target.getY() + 1, target.getPlane()));
  4139.                         World.sendGraphics(target, new Graphics(438),
  4140.                                 new WorldTile(target.getX() + 1, target.getY() - 1, target.getPlane()));
  4141.                         World.sendGraphics(target, new Graphics(438),
  4142.                                 new WorldTile(target.getX() + 1, target.getY() + 1, target.getPlane()));
  4143.                     }
  4144.                 });
  4145.             } else if (prayer.usingPrayer(1, 17)) {
  4146.                 World.sendProjectile(this, new WorldTile(getX() + 2, getY() + 2, getPlane()), 2260, 24, 0, 41, 35, 30,
  4147.                         0);
  4148.                 World.sendProjectile(this, new WorldTile(getX() + 2, getY(), getPlane()), 2260, 41, 0, 41, 35, 30, 0);
  4149.                 World.sendProjectile(this, new WorldTile(getX() + 2, getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30,
  4150.                         0);
  4151.                 World.sendProjectile(this, new WorldTile(getX() - 2, getY() + 2, getPlane()), 2260, 41, 0, 41, 35, 30,
  4152.                         0);
  4153.                 World.sendProjectile(this, new WorldTile(getX() - 2, getY(), getPlane()), 2260, 41, 0, 41, 35, 30, 0);
  4154.                 World.sendProjectile(this, new WorldTile(getX() - 2, getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30,
  4155.                         0);
  4156.  
  4157.                 World.sendProjectile(this, new WorldTile(getX(), getY() + 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
  4158.                 World.sendProjectile(this, new WorldTile(getX(), getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
  4159.                 final Player target = this;
  4160.                 WorldTasksManager.schedule(new WorldTask() {
  4161.  
  4162.                     @Override
  4163.                     public void run() {
  4164.                         setNextGraphics(new Graphics(2259));
  4165.  
  4166.                         if (isAtMultiArea()) {
  4167.                             for (int regionId : getMapRegionsIds()) {
  4168.                                 List<Integer> playersIndexes = World.getRegion(regionId).getPlayerIndexes();
  4169.                                 if (playersIndexes != null) {
  4170.                                     for (int playerIndex : playersIndexes) {
  4171.                                         Player player = World.getPlayers().get(playerIndex);
  4172.                                         if (player == null || !player.hasStarted() || player.isDead()
  4173.                                                 || player.hasFinished() || !player.isCanPvp()
  4174.                                                 || !player.withinDistance(target, 2)
  4175.                                                 || !target.getControlerManager().canHit(player))
  4176.                                             continue;
  4177.                                         player.applyHit(new Hit(target,
  4178.                                                 Utils.getRandom((skills.getLevelForXp(Skills.PRAYER) * 3)),
  4179.                                                 HitLook.REGULAR_DAMAGE));
  4180.                                     }
  4181.                                 }
  4182.                                 List<Integer> npcsIndexes = World.getRegion(regionId).getNPCsIndexes();
  4183.                                 if (npcsIndexes != null) {
  4184.                                     for (int npcIndex : npcsIndexes) {
  4185.                                         NPC npc = World.getNPCs().get(npcIndex);
  4186.                                         if (npc == null || npc.isDead() || npc.hasFinished()
  4187.                                                 || !npc.withinDistance(target, 2)
  4188.                                                 || !npc.getDefinitions().hasAttackOption()
  4189.                                                 || !target.getControlerManager().canHit(npc))
  4190.                                             continue;
  4191.                                         npc.applyHit(new Hit(target,
  4192.                                                 Utils.getRandom((skills.getLevelForXp(Skills.PRAYER) * 3)),
  4193.                                                 HitLook.REGULAR_DAMAGE));
  4194.                                     }
  4195.                                 }
  4196.                             }
  4197.                         } else {
  4198.                             if (source != null && source != target && !source.isDead() && !source.hasFinished()
  4199.                                     && source.withinDistance(target, 2))
  4200.                                 source.applyHit(
  4201.                                         new Hit(target, Utils.getRandom((skills.getLevelForXp(Skills.PRAYER) * 3)),
  4202.                                                 HitLook.REGULAR_DAMAGE));
  4203.                         }
  4204.  
  4205.                         World.sendGraphics(target, new Graphics(2260),
  4206.                                 new WorldTile(getX() + 2, getY() + 2, getPlane()));
  4207.                         World.sendGraphics(target, new Graphics(2260), new WorldTile(getX() + 2, getY(), getPlane()));
  4208.                         World.sendGraphics(target, new Graphics(2260),
  4209.                                 new WorldTile(getX() + 2, getY() - 2, getPlane()));
  4210.  
  4211.                         World.sendGraphics(target, new Graphics(2260),
  4212.                                 new WorldTile(getX() - 2, getY() + 2, getPlane()));
  4213.                         World.sendGraphics(target, new Graphics(2260), new WorldTile(getX() - 2, getY(), getPlane()));
  4214.                         World.sendGraphics(target, new Graphics(2260),
  4215.                                 new WorldTile(getX() - 2, getY() - 2, getPlane()));
  4216.  
  4217.                         World.sendGraphics(target, new Graphics(2260), new WorldTile(getX(), getY() + 2, getPlane()));
  4218.                         World.sendGraphics(target, new Graphics(2260), new WorldTile(getX(), getY() - 2, getPlane()));
  4219.  
  4220.                         World.sendGraphics(target, new Graphics(2260),
  4221.                                 new WorldTile(getX() + 1, getY() + 1, getPlane()));
  4222.                         World.sendGraphics(target, new Graphics(2260),
  4223.                                 new WorldTile(getX() + 1, getY() - 1, getPlane()));
  4224.                         World.sendGraphics(target, new Graphics(2260),
  4225.                                 new WorldTile(getX() - 1, getY() + 1, getPlane()));
  4226.                         World.sendGraphics(target, new Graphics(2260),
  4227.                                 new WorldTile(getX() - 1, getY() - 1, getPlane()));
  4228.                     }
  4229.                 });
  4230.             }
  4231.         }
  4232.         setNextAnimation(new Animation(-1));
  4233.         if (!controlerManager.sendDeath())
  4234.             return;
  4235.         lock();
  4236.         stopAll();
  4237.         if (familiar != null)
  4238.             familiar.sendDeath(this);
  4239.  
  4240.         WorldTasksManager.schedule(new WorldTask() {
  4241.             int loop;
  4242.  
  4243.             @Override
  4244.             public void run() {
  4245.                 if (loop == 0) {
  4246.                     setNextAnimation(new Animation(836));
  4247.                 } else if (loop == 1) {
  4248.                     sendMessage("Oh dear, you have died.");
  4249.                     if (source instanceof Player) {
  4250.                         Player killer = (Player) source;
  4251.                         killer.setAttackedByDelay(4);
  4252.                     }
  4253.                 } else if (loop == 3) {
  4254.                     lock();
  4255.                     reset();
  4256.                     setNextWorldTile(new WorldTile(Settings.RESPAWN_PLAYER_LOCATION));
  4257.                     setNextAnimation(new Animation(-1));
  4258.                     unlock();
  4259.                 } else if (loop == 4) {
  4260.                     getPackets().sendMusicEffect(90);
  4261.                     stop();
  4262.                 }
  4263.                 loop++;
  4264.             }
  4265.         }, 0, 1);
  4266.     }
  4267.  
  4268.     public void sendDefaultPlayersOptions() {
  4269.         getPackets().sendPlayerOption("Follow", 2, false);
  4270.         // getPackets().sendPlayerOption("Punish", 3, false);
  4271.         getPackets().sendPlayerOption("Trade with", 4, false);
  4272.         getPackets().sendPlayerOption("View stats", 5, false);
  4273.         getPackets().sendPlayerOption("Challenge", 6, false);
  4274.     }
  4275.  
  4276.     public void sendFriendsChannelMessage(ChatMessage message) {
  4277.         if (currentFriendChat == null)
  4278.             return;
  4279.         currentFriendChat.sendMessage(this, message);
  4280.     }
  4281.  
  4282.     public void sendFriendsChannelQuickMessage(QuickChatMessage message) {
  4283.         if (currentFriendChat == null)
  4284.             return;
  4285.         currentFriendChat.sendQuickMessage(this, message);
  4286.     }
  4287.  
  4288.     public void sendItemsOnDeath(Player killer) {
  4289.         if (isAdministrator()) {
  4290.             sm("You are an administrator and therefore dont lose items on death.");
  4291.             return;
  4292.         }
  4293.         auraManager.removeAura();
  4294.         CopyOnWriteArrayList<Item> containedItems = new CopyOnWriteArrayList<Item>();
  4295.         for (int i = 0; i < 14; i++) {
  4296.             if (equipment.getItem(i) != null && equipment.getItem(i).getId() != -1
  4297.                     && equipment.getItem(i).getAmount() != -1)
  4298.                 containedItems.add(new Item(equipment.getItem(i).getId(), equipment.getItem(i).getAmount()));
  4299.         }
  4300.         for (int i = 0; i < 28; i++) {
  4301.             if (inventory.getItem(i) != null && inventory.getItem(i).getId() != -1
  4302.                     && inventory.getItem(i).getAmount() != -1)
  4303.                 containedItems.add(new Item(getInventory().getItem(i).getId(), getInventory().getItem(i).getAmount()));
  4304.         }
  4305.         if (containedItems.isEmpty())
  4306.             return;
  4307.         int keptAmount = 0;
  4308.         if (!(controlerManager.getControler() instanceof CorpBeastControler)) {
  4309.             keptAmount = hasSkull() ? 0 : 3;
  4310.             if (prayer.usingPrayer(0, 10) || prayer.usingPrayer(1, 0))
  4311.                 keptAmount++;
  4312.         }
  4313.         CopyOnWriteArrayList<Item> keptItems = new CopyOnWriteArrayList<Item>();
  4314.         Item lastItem = new Item(1, 1);
  4315.         for (int i = 0; i < keptAmount; i++) {
  4316.             for (Item item : containedItems) {
  4317.                 int price = Prices.getDeathPrice(item);
  4318.                 if (price >= lastItem.getDefinitions().getValue()) {
  4319.                     lastItem = item;
  4320.                 }
  4321.             }
  4322.             keptItems.add(lastItem);
  4323.             containedItems.remove(lastItem);
  4324.             lastItem = new Item(1, 1);
  4325.         }
  4326.         // LENDED ITEMS ON DEATH WILL NOT BE REMOVED
  4327.         for (Item item : containedItems) {
  4328.             if (item.getDefinitions().isLended()) {
  4329.                 keptItems.add(item);
  4330.                 containedItems.remove(item);
  4331.             }
  4332.         }
  4333.         inventory.reset();
  4334.         equipment.reset();
  4335.         for (Item item : keptItems) {
  4336.             getInventory().addItem(item);
  4337.         }
  4338.         for (Item item : containedItems) {
  4339.             if (!ItemConstants.isTradeable(item)) {
  4340.                 if (isDonator()) {
  4341.                     // charges.dust(item);
  4342.                     containedItems.remove(item);
  4343.                     getInventory().addItem(item);
  4344.                 } else if (!isDonator()) {
  4345.                     containedItems.remove(item);
  4346.                     World.addGroundItem(item, getLastWorldTile(), this, false, 180, true, true);
  4347.                     continue;
  4348.                 }
  4349.             }
  4350.         }
  4351.         if (killer != null) {
  4352.             LoggingSystem.logDeath(this, killer, containedItems);
  4353.             DbLogs.logDeath(this, killer, containedItems);
  4354.         }
  4355.         for (Item item : containedItems) {
  4356.             if (!killer.isIronman()) {
  4357.                 World.addGroundItem(item, getLastWorldTile(), killer == null ? this : killer, false, 180, true, true);
  4358.             } else {
  4359.                 killer.sm("You are an ironman account and cannot receive loot from other players.");
  4360.             }
  4361.         }
  4362.     }
  4363.  
  4364.     public boolean isUntillLogout() {
  4365.         return untillLogout;
  4366.     }
  4367.  
  4368.     public void setUntillLogout(boolean untillLogout) {
  4369.         this.untillLogout = untillLogout;
  4370.     }
  4371.  
  4372.     public void sendLobbyConfigs(Player player) {
  4373.         for (int i = 0; i < Utils.DEFAULT_LOBBY_CONFIGS.length; i++) {
  4374.             int val = Utils.DEFAULT_LOBBY_CONFIGS[i];
  4375.             if (val != 0) {
  4376.                 player.getPackets().sendConfig(i, val);
  4377.             }
  4378.         }
  4379.     }
  4380.  
  4381.     public void sendMessage(String message) {
  4382.         getPackets().sendGameMessage(message);
  4383.     }
  4384.  
  4385.     public void sendPublicChatMessage(PublicChatMessage message) {
  4386.         for (int regionId : getMapRegionsIds()) {
  4387.             List<Integer> playersIndexes = World.getRegion(regionId).getPlayerIndexes();
  4388.             if (playersIndexes == null)
  4389.                 continue;
  4390.             for (Integer playerIndex : playersIndexes) {
  4391.                 Player p = World.getPlayers().get(playerIndex);
  4392.                 if (p == null || !p.hasStarted() || p.hasFinished()
  4393.                         || p.getLocalPlayerUpdate().getLocalPlayers()[getIndex()] == null)
  4394.                     continue;
  4395.                 p.getPackets().sendPublicMessage(this, message);
  4396.             }
  4397.         }
  4398.     }
  4399.  
  4400.     public void sendRandomJail(Player p) {
  4401.         p.resetWalkSteps();
  4402.         switch (Utils.getRandom(2)) {
  4403.         case 0:
  4404.             p.setNextWorldTile(new WorldTile(2931, 9698, 0));
  4405.             break;
  4406.         case 1:
  4407.             p.setNextWorldTile(new WorldTile(2931, 9687, 0));
  4408.             break;
  4409.         case 2:
  4410.             p.setNextWorldTile(new WorldTile(2933, 9703, 0));
  4411.             break;
  4412.         }
  4413.     }
  4414.  
  4415.     public void sendRunButtonConfig() {
  4416.         getPackets().sendConfig(173, resting ? 3 : getRun() ? 1 : 0);
  4417.     }
  4418.  
  4419.     public void sendSoulSplit(final Hit hit, final Entity user) {
  4420.         final Player target = this;
  4421.         if (hit.getDamage() > 0)
  4422.             World.sendProjectile(user, this, 2263, 11, 11, 20, 5, 0, 0);
  4423.         user.heal(hit.getDamage() / 5);
  4424.         prayer.drainPrayer(hit.getDamage() / 5);
  4425.         WorldTasksManager.schedule(new WorldTask() {
  4426.             @Override
  4427.             public void run() {
  4428.                 setNextGraphics(new Graphics(2264));
  4429.                 if (hit.getDamage() > 0)
  4430.                     World.sendProjectile(target, user, 2263, 11, 11, 20, 5, 0, 0);
  4431.             }
  4432.         }, 0);
  4433.     }
  4434.  
  4435.     public void sendUnlockedObjectConfigs() {
  4436.         refreshKalphiteLairEntrance();
  4437.         refreshKalphiteLair();
  4438.         refreshLodestoneNetwork();
  4439.         refreshFightKilnEntrance();
  4440.     }
  4441.  
  4442.     public void setAssistStatus(int assistStatus) {
  4443.         this.assistStatus = assistStatus;
  4444.     }
  4445.  
  4446.     public void setBankPin(String bankPinString) {
  4447.     }
  4448.  
  4449.     public void setBanned(long banned) {
  4450.         this.banned = banned;
  4451.     }
  4452.  
  4453.     public void setBarbarianAdvancedLaps(int barbarianAdvancedLaps) {
  4454.         this.barbarianAdvancedLaps = barbarianAdvancedLaps;
  4455.     }
  4456.  
  4457.     public int setBarrowsKillCount(int barrowsKillCount) {
  4458.         return this.barrowsKillCount = barrowsKillCount;
  4459.     }
  4460.  
  4461.     public void setBarsDone(int barsDone) {
  4462.         this.barsDone = barsDone;
  4463.     }
  4464.  
  4465.     public void setCanPvp(boolean canPvp) {
  4466.         this.canPvp = canPvp;
  4467.         appearence.generateAppearenceData();
  4468.         getPackets().sendPlayerOption(canPvp ? "Attack" : "null", 1, true);
  4469.         getPackets().sendPlayerUnderNPCPriority(canPvp);
  4470.     }
  4471.  
  4472.     public void setCantTrade(boolean canTrade) {
  4473.         this.cantTrade = canTrade;
  4474.     }
  4475.  
  4476.     public void setCastVeng(boolean castVeng) {
  4477.         this.castedVeng = castVeng;
  4478.     }
  4479.  
  4480.     public void setClanStatus(int clanStatus) {
  4481.         this.clanStatus = clanStatus;
  4482.     }
  4483.  
  4484.     public void setClientHasLoadedMapRegion() {
  4485.         clientLoadedMapRegion = true;
  4486.     }
  4487.  
  4488.     public void setClientHasntLoadedMapRegion() {
  4489.         clientLoadedMapRegion = false;
  4490.     }
  4491.  
  4492.     public void setCloseInterfacesEvent(Runnable closeInterfacesEvent) {
  4493.         this.closeInterfacesEvent = closeInterfacesEvent;
  4494.     }
  4495.  
  4496.     public void setClueReward(int clueReward) {
  4497.         this.clueReward = clueReward;
  4498.     }
  4499.  
  4500.     public void setCompletedFightCaves() {
  4501.         if (!completedFightCaves) {
  4502.             completedFightCaves = true;
  4503.             refreshFightKilnEntrance();
  4504.         }
  4505.     }
  4506.  
  4507.     public void setCompletedFightKiln() {
  4508.         completedFightKiln = true;
  4509.     }
  4510.  
  4511.     public void setCompletedRfd() {
  4512.         completedRfd = true;
  4513.     }
  4514.  
  4515.     public void setCompletionistCapeCustomized(int[] skillcapeCustomized) {
  4516.         this.completionistCapeCustomized = skillcapeCustomized;
  4517.     }
  4518.  
  4519.     /*
  4520.      * public void setCoordsEvent(CoordsEvent coordsEvent) { this.coordsEvent =
  4521.      * coordsEvent; }
  4522.      */
  4523.  
  4524.     public void setCreationDate(long creationDate) {
  4525.         this.creationDate = creationDate;
  4526.     }
  4527.  
  4528.     public void setCurrentFriendChat(FriendChatsManager currentFriendChat) {
  4529.         this.currentFriendChat = currentFriendChat;
  4530.     }
  4531.  
  4532.     public void setCurrentFriendChatOwner(String currentFriendChatOwner) {
  4533.         this.currentFriendChatOwner = currentFriendChatOwner;
  4534.     }
  4535.  
  4536.     public void setCurrentWorldLobby(int currentWorldLobby) {
  4537.         this.currentWorldLobby = currentWorldLobby;
  4538.     }
  4539.  
  4540.     public void setCustomTitle(String customTitle) {
  4541.         this.customTitle = customTitle;
  4542.     }
  4543.  
  4544.     public int setDeathCount(int deathCount) {
  4545.         return this.deathCount = deathCount;
  4546.     }
  4547.  
  4548.     public void setDefenderRoom(boolean isInDefenderRoom) {
  4549.         this.isInDefenderRoom = isInDefenderRoom;
  4550.     }
  4551.  
  4552.     public void setDfsActivated(boolean dfsActivated) {
  4553.         this.dfsActivated = dfsActivated;
  4554.     }
  4555.  
  4556.     public void setdfscoolDown(int dfscoolDown) {
  4557.         this.dfscoolDown = dfscoolDown;
  4558.     }
  4559.  
  4560.     public void setDisableEquip(boolean equip) {
  4561.         disableEquip = equip;
  4562.     }
  4563.  
  4564.     public void setDisplayMode(int displayMode) {
  4565.         this.displayMode = displayMode;
  4566.     }
  4567.  
  4568.     public void setDisplayName(String displayName) {
  4569.         this.displayName = displayName;
  4570.     }
  4571.  
  4572.     public void setDominionFactor(int dominionFactor) {
  4573.         this.dominionFactor = dominionFactor;
  4574.     }
  4575.  
  4576.     public void setDonator(boolean donator) {
  4577.         this.donator = donator;
  4578.     }
  4579.  
  4580.     public void setDicer(boolean dicer) {
  4581.         this.dicer = dicer;
  4582.     }
  4583.  
  4584.     public void setEasterPoints(int easterPoints) {
  4585.         this.easterPoints = easterPoints;
  4586.     }
  4587.  
  4588.     public void setEmailAttached(String email) {
  4589.         this.email = email;
  4590.     }
  4591.  
  4592.     public void setEnteredBankPin(String enteredPinString) {
  4593.         this.enteredPinString = enteredPinString;
  4594.     }
  4595.  
  4596.     public void setExtremeDonator(boolean extremeDonator) {
  4597.         this.extremeDonator = extremeDonator;
  4598.     }
  4599.  
  4600.     public void setFamiliar(Familiar familiar) {
  4601.         this.familiar = familiar;
  4602.     }
  4603.  
  4604.     public void setFightPitsSkull() {
  4605.         skullDelay = Integer.MAX_VALUE;
  4606.         skullId = 1;
  4607.         appearence.generateAppearenceData();
  4608.     }
  4609.  
  4610.     public void setFilterGame(boolean filterGame) {
  4611.         this.filterGame = filterGame;
  4612.     }
  4613.  
  4614.     public void setForceNextMapLoadRefresh(boolean forceNextMapLoadRefresh) {
  4615.         this.forceNextMapLoadRefresh = forceNextMapLoadRefresh;
  4616.     }
  4617.  
  4618.     public void setForumModerator(boolean isForumModerator) {
  4619.         this.isForumModerator = isForumModerator;
  4620.     }
  4621.  
  4622.     public void setFriendChatSetup(int friendChatSetup) {
  4623.         this.friendChatSetup = friendChatSetup;
  4624.     }
  4625.  
  4626.     public void setGnomeAdvancedLaps(int gnomeAdvancedLaps) {
  4627.         this.gnomeAdvancedLaps = gnomeAdvancedLaps;
  4628.     }
  4629.  
  4630.     public void setGotInfernoAdze(boolean gotInfernoAdze) {
  4631.         this.gotInfernoAdze = gotInfernoAdze;
  4632.     }
  4633.  
  4634.     public void setGraphicDesigner(boolean isGraphicDesigner) {
  4635.         this.isGraphicDesigner = isGraphicDesigner;
  4636.     }
  4637.  
  4638.     public void setYoutuber(boolean isYoutuber) {
  4639.         this.isYoutuber = isYoutuber;
  4640.     }
  4641.  
  4642.     public void setHelper(boolean isHelper) {
  4643.         this.isHelper = isHelper;
  4644.     }
  4645.  
  4646.     public void setHasCutEnoughLogs(boolean hasCutEnoughLogs) {
  4647.         this.hasCutEnoughLogs = hasCutEnoughLogs;
  4648.     }
  4649.  
  4650.     private boolean hadEnoughVotes;
  4651.  
  4652.     public boolean hadEnoughVotes() {
  4653.         return hadEnoughVotes;
  4654.     }
  4655.  
  4656.     public void setHadEnoughVotes(boolean hadEnoughVotes) {
  4657.         this.hadEnoughVotes = hadEnoughVotes;
  4658.     }
  4659.  
  4660.     public void setHasFinishedBarrows(boolean hasFinishedBarrows) {
  4661.         this.hasFinishedBarrows = hasFinishedBarrows;
  4662.     }
  4663.  
  4664.     public void setHasCutMoreEnoughLogs(boolean hasCutMoreEnoughLogs) {
  4665.         this.hasCutMoreEnoughLogs = hasCutMoreEnoughLogs;
  4666.     }
  4667.  
  4668.     public void setHiddenBrother(int hiddenBrother) {
  4669.         this.hiddenBrother = hiddenBrother;
  4670.     }
  4671.  
  4672.     public void setHideSofInterface(boolean hideSofInterface) {
  4673.         // TODO Auto-generated method stub
  4674.         this.hideSofInterface = hideSofInterface;
  4675.     }
  4676.  
  4677.     public void setHideWorldMessages(boolean hideWorldAnnouncements) {
  4678.         this.hideWorldAnnouncements = hideWorldAnnouncements;
  4679.     }
  4680.  
  4681.     public void setHpBoostMultiplier(double hpBoostMultiplier) {
  4682.         this.hpBoostMultiplier = hpBoostMultiplier;
  4683.     }
  4684.  
  4685.     public void setInAnimationRoom(boolean inAnimationRoom) {
  4686.         this.inAnimationRoom = inAnimationRoom;
  4687.     }
  4688.  
  4689.     public void setInvulnerable(boolean invulnerable) {
  4690.         this.invulnerable = invulnerable;
  4691.     }
  4692.  
  4693.     public void setIsInLobby(boolean isInLobby) {
  4694.         this.isInLobby = isInLobby;
  4695.     }
  4696.  
  4697.     public void setJailed(long jailed) {
  4698.         this.jailed = jailed;
  4699.     }
  4700.  
  4701.     public void setCoolDown(long cooldown) {
  4702.         this.cooldown = cooldown;
  4703.     }
  4704.  
  4705.     public void setWorldXp(long WorldXp) {
  4706.         this.WorldXp = WorldXp;
  4707.     }
  4708.  
  4709.     public void setKalphiteLair() {
  4710.         khalphiteLairSetted = true;
  4711.         refreshKalphiteLair();
  4712.     }
  4713.  
  4714.     public void setKalphiteLairEntrance() {
  4715.         khalphiteLairEntranceSetted = true;
  4716.         refreshKalphiteLairEntrance();
  4717.     }
  4718.  
  4719.     public int setKillCount(int killCount) {
  4720.         return this.killCount = killCount;
  4721.     }
  4722.  
  4723.     public void setKilledAgrithNaNa(boolean agrithNaNa) {
  4724.         this.agrithNaNa = agrithNaNa;
  4725.     }
  4726.  
  4727.     public void setKilledBork(boolean killedBork) {
  4728.         this.killedBork = killedBork;
  4729.     }
  4730.  
  4731.     public void setKilledCulinaromancer(boolean culinaromancer) {
  4732.         this.culinaromancer = culinaromancer;
  4733.     }
  4734.  
  4735.     public void setKilledDessourt(boolean dessourt) {
  4736.         this.dessourt = dessourt;
  4737.     }
  4738.  
  4739.     public void setKilledFlamBeed(boolean flamBeed) {
  4740.         this.flamBeed = flamBeed;
  4741.     }
  4742.  
  4743.     public void setKilledKaramel(boolean karamel) {
  4744.         this.karamel = karamel;
  4745.     }
  4746.  
  4747.     /**
  4748.      * Sets the killedQueenBlackDragon.
  4749.      *
  4750.      * @param killedQueenBlackDragon
  4751.      *            The killedQueenBlackDragon to set.
  4752.      */
  4753.     public void setKilledQueenBlackDragon(boolean killedQueenBlackDragon) {
  4754.         this.killedQueenBlackDragon = killedQueenBlackDragon;
  4755.     }
  4756.  
  4757.     public void setLargeSceneView(boolean largeSceneView) {
  4758.         this.largeSceneView = largeSceneView;
  4759.     }
  4760.  
  4761.     public void setLastBonfire(int lastBonfire) {
  4762.         this.lastBonfire = lastBonfire;
  4763.     }
  4764.  
  4765.     public void setLastDuelRules(DuelRules duelRules) {
  4766.         this.lastDuelRules = duelRules;
  4767.     }
  4768.  
  4769.     public void setLastIP(String lastIP) {
  4770.         this.lastIP = lastIP;
  4771.     }
  4772.  
  4773.     public void setLastMsg(String lastMsg) {
  4774.         this.lastMsg = lastMsg;
  4775.     }
  4776.  
  4777.     public void setLastPublicMessage(long lastPublicMessage) {
  4778.         this.lastPublicMessage = lastPublicMessage;
  4779.     }
  4780.  
  4781.     public void setLastRequestSQL(long lastRequestSQL) {
  4782.         // TODO Auto-generated method stub
  4783.         this.lastRequestSQL = lastRequestSQL;
  4784.  
  4785.     }
  4786.  
  4787.     public void setLastUsedGodwarsAltar(long l) {
  4788.         // TODO Auto-generated method stub
  4789.  
  4790.     }
  4791.  
  4792.     public void setLastWalked(long lastWalkedMillis) {
  4793.         // TODO Auto-generated method stub
  4794.         this.lastWalkedMillis = lastWalkedMillis;
  4795.     }
  4796.  
  4797.     public void setLoadedLogs(int loadedLogs) {
  4798.         this.loadedLogs = loadedLogs;
  4799.     }
  4800.  
  4801.     public void setLoggedInWorld(int loggedWorld) {
  4802.         this.loggedWorld = loggedWorld;
  4803.     }
  4804.  
  4805.     public void setLogsCut(int logsCut) {
  4806.         this.logsCut = logsCut;
  4807.     }
  4808.  
  4809.     public void setLoyaltyPoints(int Loyaltypoints) {
  4810.         this.Loyaltypoints = Loyaltypoints;
  4811.     }
  4812.  
  4813.     public void setMagicLogsBurned(int magicLogsBurned) {
  4814.         this.magicLogsBurned = magicLogsBurned;
  4815.     }
  4816.  
  4817.     public void setMaxedCapeCustomized(int[] maxedCapeCustomized) {
  4818.         this.maxedCapeCustomized = maxedCapeCustomized;
  4819.     }
  4820.  
  4821.     public void setMoneyPouchValue(int money) {
  4822.         this.money = money;
  4823.     }
  4824.  
  4825.     public void setMuted(long muted) {
  4826.         this.muted = muted;
  4827.     }
  4828.  
  4829.     public void setOverloadDelay(int overloadDelay) {
  4830.         this.overloadDelay = overloadDelay;
  4831.     }
  4832.  
  4833.     public void setArcPotDelay(int arcPotDelay) {
  4834.         this.arcPotDelay = arcPotDelay;
  4835.     }
  4836.  
  4837.     public void setOwner(String Owner) {
  4838.         this.Owner = Owner;
  4839.     }
  4840.  
  4841.     public void setPacketsDecoderPing(long packetsDecoderPing) {
  4842.         this.packetsDecoderPing = packetsDecoderPing;
  4843.     }
  4844.  
  4845.     public void setPassword(String password) {
  4846.         this.password = password;
  4847.     }
  4848.  
  4849.     public void setPermBanned(boolean permBanned) {
  4850.         this.permBanned = permBanned;
  4851.     }
  4852.  
  4853.     public void setPermMuted(boolean permMuted) {
  4854.         this.permMuted = permMuted;
  4855.     }
  4856.  
  4857.     public void setPestControlGames(int pestControlGames) {
  4858.         this.pestControlGames = pestControlGames;
  4859.     }
  4860.  
  4861.     public void setPestPoints(int pestPoints) {
  4862.         this.pestPoints = pestPoints;
  4863.     }
  4864.  
  4865.     /**
  4866.      * Sets the pet.
  4867.      *
  4868.      * @param pet
  4869.      *            The pet to set.
  4870.      */
  4871.     public void setPet(Pet pet) {
  4872.         this.pet = pet;
  4873.     }
  4874.  
  4875.     /**
  4876.      * Sets the petManager.
  4877.      *
  4878.      * @param petManager
  4879.      *            The petManager to set.
  4880.      */
  4881.     public void setPetManager(PetManager petManager) {
  4882.         this.petManager = petManager;
  4883.     }
  4884.  
  4885.     public void setPkPoints(int pkPoints) {
  4886.         this.pkPoints = pkPoints;
  4887.     }
  4888.  
  4889.     public void setPolDelay(long delay) {
  4890.         this.polDelay = delay;
  4891.     }
  4892.  
  4893.     public void setPrayerDelay(long teleDelay) {
  4894.         getTemporaryAttributtes().put("PrayerBlocked", teleDelay + Utils.currentTimeMillis());
  4895.         prayer.closeAllPrayers();
  4896.     }
  4897.  
  4898.     public void setPrayerRenewalDelay(int delay) {
  4899.         this.prayerRenewalDelay = delay;
  4900.     }
  4901.  
  4902.     public void setPrestige(int prestige) {
  4903.         this.prestige = prestige;
  4904.     }
  4905.  
  4906.     public void setPrivateChatSetup(int privateChatSetup) {
  4907.         this.privateChatSetup = privateChatSetup;
  4908.     }
  4909.  
  4910.     public void setPublicStatus(int publicStatus) {
  4911.         this.publicStatus = publicStatus;
  4912.     }
  4913.  
  4914.     public void setPvmPoints(int pvmPoints) {
  4915.         this.pvmPoints = pvmPoints;
  4916.     }
  4917.  
  4918.     public void setRecovAnswer(String recovAnswer) {
  4919.         this.recovAnswer = recovAnswer;
  4920.     }
  4921.  
  4922.     public void setRecovQuestion(String recovQuestion) {
  4923.         this.recovQuestion = recovQuestion;
  4924.     }
  4925.  
  4926.     public void setResting(boolean resting) {
  4927.         this.resting = resting;
  4928.         sendRunButtonConfig();
  4929.  
  4930.         if (customNpcId != -1) {
  4931.             getAppearence().transformIntoNPC(customNpcId);
  4932.         }
  4933.     }
  4934.  
  4935.     public void setRights(int rights) {
  4936.         this.rights = rights;
  4937.     }
  4938.  
  4939.     public void setRocktailsCooked(int rocktailsCooked) {
  4940.         this.rocktailsCooked = rocktailsCooked;
  4941.     }
  4942.  
  4943.     @Override
  4944.     public void setRun(boolean run) {
  4945.         if (run != getRun()) {
  4946.             super.setRun(run);
  4947.             setUpdateMovementType(true);
  4948.             sendRunButtonConfig();
  4949.         }
  4950.     }
  4951.  
  4952.     public void setRunEnergy(int runEnergy) {
  4953.         this.runEnergy = (byte) runEnergy;
  4954.         getPackets().sendRunEnergy();
  4955.     }
  4956.  
  4957.     /**
  4958.      * @param runeSpanPoint
  4959.      *            the runeSpanPoint to set
  4960.      */
  4961.     public void setRuneSpanPoint(int runeSpanPoints) {
  4962.         this.runeSpanPoints = runeSpanPoints;
  4963.     }
  4964.  
  4965.     public void setRunHidden(boolean run) {
  4966.         super.setRun(run);
  4967.         setUpdateMovementType(true);
  4968.     }
  4969.  
  4970.     public void setRunning(boolean running) {
  4971.         this.running = running;
  4972.     }
  4973.  
  4974.     public void setScreenHeight(int screenHeight) {
  4975.         this.screenHeight = screenHeight;
  4976.     }
  4977.  
  4978.     public void setScreenWidth(int screenWidth) {
  4979.         this.screenWidth = screenWidth;
  4980.     }
  4981.  
  4982.     public int setSkullDelay(int delay) {
  4983.         return this.skullDelay = delay;
  4984.     }
  4985.  
  4986.     public void setSkullId(int skullId) {
  4987.         this.skullId = skullId;
  4988.     }
  4989.  
  4990.     public void setSkullInfiniteDelay(int skullId) {
  4991.         skullDelay = Integer.MAX_VALUE;
  4992.         this.skullId = skullId;
  4993.         appearence.generateAppearenceData();
  4994.     }
  4995.  
  4996.     public void setSlayerPoints(int slayerPoints) {
  4997.         this.slayerPoints = slayerPoints;
  4998.     }
  4999.  
  5000.     public void setSpawnsMode(boolean spawnsMode) {
  5001.         this.spawnsMode = spawnsMode;
  5002.     }
  5003.  
  5004.     public void setSpecRestoreTimer(int specRestoreTimer) {
  5005.         this.specRestoreTimer = specRestoreTimer;
  5006.     }
  5007.  
  5008.     public void setStarter(boolean setStarter) {
  5009.         this.setStarter = setStarter;
  5010.     }
  5011.  
  5012.     public void setSummoningLeftClickOption(int summoningLeftClickOption) {
  5013.         this.summoningLeftClickOption = summoningLeftClickOption;
  5014.     }
  5015.  
  5016.     public void setSupporter(boolean isSupporter) {
  5017.         this.isSupporter = isSupporter;
  5018.     }
  5019.  
  5020.     public void setSwitchItemCache(List<Integer> switchItemCache) {
  5021.         this.switchItemCache = switchItemCache;
  5022.     }
  5023.  
  5024.     public void setTalkedToCook() {
  5025.         talkedtoCook = true;
  5026.     }
  5027.  
  5028.     public void setTalkedWithMarv() {
  5029.         talkedWithMarv = true;
  5030.     }
  5031.  
  5032.     public void setTalkedWithVannaka(boolean talkedWithVannaka) {
  5033.         this.talkedWithVannaka = talkedWithVannaka;
  5034.     }
  5035.  
  5036.     /**
  5037.      * @param task
  5038.      *            the task to set
  5039.      */
  5040.     // Spublic void setTask(SlayerTask task) {
  5041.     // this.task = task;
  5042.     // }
  5043.  
  5044.     public void setTeleBlockDelay(long teleDelay) {
  5045.         getTemporaryAttributtes().put("TeleBlocked", teleDelay + Utils.currentTimeMillis());
  5046.     }
  5047.  
  5048.     public void setTemporaryMovementType(int temporaryMovementType) {
  5049.         this.temporaryMovementType = temporaryMovementType;
  5050.     }
  5051.  
  5052.     public void setTemporaryMoveType(int temporaryMovementType) {
  5053.         this.setTemporaryMovementType(temporaryMovementType);
  5054.     }
  5055.  
  5056.     public void setTradeStatus(int tradeStatus) {
  5057.         this.tradeStatus = tradeStatus;
  5058.     }
  5059.  
  5060.     public void setUniquePlayerId(int uniquePlayerId) {
  5061.         this.uniquePlayerId = uniquePlayerId;
  5062.     }
  5063.  
  5064.     public void setUpdateMovementType(boolean updateMovementType) {
  5065.         this.updateMovementType = updateMovementType;
  5066.     }
  5067.  
  5068.     /*
  5069.      * do not use this, only used by pm
  5070.      */
  5071.     public void setUsername(String username) {
  5072.         this.username = username;
  5073.     }
  5074.  
  5075.     public void setUsingReportOption(boolean option) {
  5076.         reportOption = option;
  5077.     }
  5078.  
  5079.     public void setUsingZenRest(boolean zenRest) {
  5080.         this.zenRest = zenRest;
  5081.     }
  5082.  
  5083.     public void setVecnaTimer(int vecnaTimer) {
  5084.         this.vecnaTimer = vecnaTimer;
  5085.     }
  5086.  
  5087.     public void setLegend(boolean Legend) {
  5088.         this.Legend = Legend;
  5089.     }
  5090.  
  5091.     public void setVotePoints(int votePoints) {
  5092.         this.votePoints = votePoints;
  5093.     }
  5094.  
  5095.     public void setBossPoints(int bossPoints) {
  5096.         this.BossPoints = bossPoints;
  5097.     }
  5098.  
  5099.     public void setGanodermicFlakes(int ganodermicFlakes) {
  5100.         this.ganodermicFlakes = ganodermicFlakes;
  5101.     }
  5102.  
  5103.     public void setWildernessSkull() {
  5104.         skullDelay = 3000;
  5105.         skullId = 0;
  5106.         appearence.generateAppearenceData();
  5107.     }
  5108.  
  5109.     public void setWonFightPits() {
  5110.         wonFightPits = true;
  5111.     }
  5112.  
  5113.     public void setXpLocked(boolean locked) {
  5114.         this.xpLocked = locked;
  5115.     }
  5116.  
  5117.     public void setYellDisabled(boolean yellDisabled) {
  5118.         this.yellDisabled = yellDisabled;
  5119.     }
  5120.  
  5121.     public void setYellOff(boolean yellOff) {
  5122.         this.yellOff = yellOff;
  5123.     }
  5124.  
  5125.     // now that we inited we can start showing game
  5126.     public void start() {
  5127.         loadMapRegions();
  5128.         started = true;
  5129.         LoginManager.sendLogin(this);
  5130.  
  5131.         for (Player p : World.getPlayers()) {
  5132.             if (this.getDisplayName().equals(p.getDisplayName())) {
  5133.                 if (p != this) {
  5134.                     this.forceLogout();
  5135.                 } else {
  5136.                 }
  5137.             }
  5138.         }
  5139.         if (getHitpoints() == 0 || isDead() || getHitpoints() < 0) {
  5140.             sendDeath(null);
  5141.         }
  5142.     }
  5143.  
  5144.     public void startLobby(Player player) {
  5145.         player.sendLobbyConfigs(player);
  5146.         // friendsIgnores.setPlayer(this);
  5147.         // friendsIgnores.init();
  5148.         player.getPackets().sendFriendsChatChannel();
  5149.         // friendsIgnores.sendFriendsMyStatus(true);
  5150.     }
  5151.  
  5152.     public void stopAll() {
  5153.         stopAll(true);
  5154.     }
  5155.  
  5156.     public void stopAll(boolean stopWalk) {
  5157.         stopAll(stopWalk, true);
  5158.     }
  5159.  
  5160.     public void stopAll(boolean stopWalk, boolean stopInterface) {
  5161.         stopAll(stopWalk, stopInterface, true);
  5162.     }
  5163.  
  5164.     public void closeInputScript() {
  5165.         getPackets().sendRunScript(1548, 0);
  5166.     }
  5167.  
  5168.     // as walk done clientsided
  5169.     public void stopAll(boolean stopWalk, boolean stopInterfaces, boolean stopActions) {
  5170.         coordsEvent = null;
  5171.         routeEvent = null;
  5172.         if (stopInterfaces)
  5173.             closeInterfaces();
  5174.         if (stopWalk) {
  5175.             if (cantBeFrozen = true)
  5176.                 resetWalkSteps();
  5177.         }
  5178.         if (stopActions)
  5179.             actionManager.forceStop();
  5180.         combatDefinitions.resetSpells(false);
  5181.         closeInputScript();
  5182.     }
  5183.  
  5184.     public void switchAllowChatEffects() {
  5185.         allowChatEffects = !allowChatEffects;
  5186.         refreshAllowChatEffects();
  5187.     }
  5188.  
  5189.     public void switchItemsLook() {
  5190.         oldItemsLook = !oldItemsLook;
  5191.         getPackets().sendItemsLook();
  5192.     }
  5193.  
  5194.     public void switchMouseButtons() {
  5195.         mouseButtons = !mouseButtons;
  5196.         refreshMouseButtons();
  5197.     }
  5198.  
  5199.     public void toggleLootShare(boolean message) {
  5200.         lootshareEnabled = !lootshareEnabled;
  5201.         getPackets().sendConfig(1083, lootshareEnabled ? 1 : 0);
  5202.         if (!message)
  5203.             return;
  5204.         sendMessage(String.format("Lootshare is now %sactive.</col>", lootshareEnabled ? "" : "un"));
  5205.     }
  5206.  
  5207.     public void toogleRun(boolean update) {
  5208.         super.setRun(!getRun());
  5209.         setUpdateMovementType(true);
  5210.         if (update)
  5211.             sendRunButtonConfig();
  5212.     }
  5213.  
  5214.     public void unlock() {
  5215.         lockDelay = 0;
  5216.     }
  5217.  
  5218.     public void useStairs(int emoteId, final WorldTile dest, int useDelay, int totalDelay) {
  5219.         useStairs(emoteId, dest, useDelay, totalDelay, null);
  5220.     }
  5221.  
  5222.     public void useStairs(int emoteId, final WorldTile dest, int useDelay, int totalDelay, final String message) {
  5223.         stopAll();
  5224.         lock(totalDelay);
  5225.         if (emoteId != -1)
  5226.             setNextAnimation(new Animation(emoteId));
  5227.         if (useDelay == 0)
  5228.             setNextWorldTile(dest);
  5229.         else {
  5230.             WorldTasksManager.schedule(new WorldTask() {
  5231.                 @Override
  5232.                 public void run() {
  5233.                     if (isDead())
  5234.                         return;
  5235.                     setNextWorldTile(dest);
  5236.                     if (message != null)
  5237.                         sendMessage(message);
  5238.                 }
  5239.             }, useDelay - 1);
  5240.         }
  5241.     }
  5242.  
  5243.     public void vecnaTimer(int amount) {
  5244.         if (getVecnaTimer() > 0) {
  5245.             CoresManager.fastExecutor.schedule(new TimerTask() {
  5246.                 @Override
  5247.                 public void run() {
  5248.                     /*
  5249.                      * if (getRights() == 2) for (Player players:
  5250.                      * World.getPlayers()) { if (players == null) continue;
  5251.                      * players.getPackets().
  5252.                      * sendGameMessage("<col=0000FF><img=2>AnaAdministrator has just logged on!<img=2>"
  5253.                      * ); }
  5254.                      */
  5255.                     if (hasFinished())
  5256.                         cancel();
  5257.                     if (getVecnaTimer() > 0)
  5258.                         setVecnaTimer(getVecnaTimer() - 1);
  5259.                     if (getVecnaTimer() == 0) {
  5260.                         getPackets()
  5261.                                 .sendGameMessage("<col=FFCC00>Your skull of Vecna has regained its mysterious aura.");
  5262.                         cancel();
  5263.                     }
  5264.                 }
  5265.             }, 10, 1);
  5266.         }
  5267.     }
  5268.  
  5269.     public boolean takeMoney(int amount) {
  5270.         if (inventory.getNumerOf(995) >= amount) {
  5271.             inventory.deleteItem(995, amount);
  5272.             return true;
  5273.         } else if (getMoneyPouch().getTotal() >= amount) {
  5274.             getMoneyPouch().takeMoneyFromPouch(amount);
  5275.             return true;
  5276.         } else {
  5277.             return false;
  5278.         }
  5279.     }
  5280.  
  5281.     public int getGuestChatSetup() {
  5282.         return guestChatSetup;
  5283.     }
  5284.  
  5285.     public void setGuestChatSetup(int guestChatSetup) {
  5286.         this.guestChatSetup = guestChatSetup;
  5287.     }
  5288.  
  5289.     public ClansManager getGuestClanManager() {
  5290.         return guestClanManager;
  5291.     }
  5292.  
  5293.     public void setGuestClanManager(ClansManager guestClanManager) {
  5294.         this.guestClanManager = guestClanManager;
  5295.     }
  5296.  
  5297.     public String getClanName() {
  5298.         return clanName;
  5299.     }
  5300.  
  5301.     public void setClanName(String clanName) {
  5302.         this.clanName = clanName;
  5303.     }
  5304.  
  5305.     public boolean isConnectedClanChannel() {
  5306.         return connectedClanChannel;
  5307.     }
  5308.  
  5309.     public void setConnectedClanChannel(boolean connectedClanChannel) {
  5310.         this.connectedClanChannel = connectedClanChannel;
  5311.     }
  5312.  
  5313.     public double getDropBonus() {
  5314.         if (getEquipment().getRingId() == 2572)
  5315.             return 0.1;
  5316.         if (isIronman())
  5317.             return 0.7;
  5318.         else if (isExpert())
  5319.             return 1.0;
  5320.         else if (isHard())
  5321.             return 0.5;
  5322.         else if (isMedium())
  5323.             return 0.2;
  5324.         else if (isEasy())
  5325.             return 0.0;
  5326.         if (isLegendary())
  5327.             return 0.3;
  5328.         else if (isExtremeDonator())
  5329.             return 0.2;
  5330.         return 0;
  5331.     }
  5332.  
  5333.     public Item getPrize() {
  5334.         return prize;
  5335.     }
  5336.  
  5337.     public void setPrize(Item price) {
  5338.         this.prize = price;
  5339.     }
  5340.  
  5341.     private transient ConfigDefinitions configDefinitions;
  5342.  
  5343.     public ConfigDefinitions getConfigDefinitions() {
  5344.         return configDefinitions;
  5345.     }
  5346.  
  5347.     public long lastHsUpdate;
  5348.  
  5349.     public int setLootBeam;
  5350.  
  5351.     private boolean legendary;
  5352.  
  5353.     private boolean silver;
  5354.  
  5355.     private boolean gold;
  5356.  
  5357.     public boolean hasStaffPin;
  5358.     /*
  5359.      * public boolean hasClaimedOnce() {
  5360.      *
  5361.      * }
  5362.      */
  5363.  
  5364.     public int loyaltyPoints;
  5365.  
  5366.     public long getLastHsUpdate() {
  5367.         return lastHsUpdate;
  5368.     }
  5369.  
  5370.     public void setLastHsUpdate(long time) {
  5371.         this.lastHsUpdate = time;
  5372.     }
  5373.  
  5374.     public String getClassName() {
  5375.         // TODO Auto-generated method stub
  5376.         return null;
  5377.     }
  5378.  
  5379.     public void setClassName(String string) {
  5380.         // TODO Auto-generated method stub
  5381.  
  5382.     }
  5383.  
  5384.     public void getClassName(String string) {
  5385.         // TODO Auto-generated method stub
  5386.  
  5387.     }
  5388.  
  5389.     public void setTradeLock() {
  5390.         // TODO Auto-generated method stub
  5391.  
  5392.     }
  5393.  
  5394.     public boolean isTradeLocked() {
  5395.         // TODO Auto-generated method stub
  5396.         return false;
  5397.     }
  5398.  
  5399.     public void setLegendary(boolean legendary) {
  5400.         this.legendary = legendary;
  5401.     }
  5402.  
  5403.     public boolean isLegendary() {
  5404.         return legendary;
  5405.     }
  5406.  
  5407.     public void setSilver(boolean silver) {
  5408.         this.silver = silver;
  5409.     }
  5410.  
  5411.     public boolean isSilver() {
  5412.         return silver;
  5413.     }
  5414.  
  5415.     public void setGold(boolean gold) {
  5416.         this.gold = gold;
  5417.     }
  5418.  
  5419.     public boolean isGold() {
  5420.         return gold;
  5421.     }
  5422.  
  5423.     public boolean isLegendaryPerm() {// lol
  5424.         return legendary;
  5425.     }
  5426.  
  5427.     public static void sendCustomText506(Player player) {
  5428.         player.getInterfaceManager().sendTab(player.getInterfaceManager().hasResizableScreen() ? 114 : 174, 506);
  5429.         return;
  5430.     }
  5431.  
  5432.     public void setDungPoints(boolean b) {
  5433.     }
  5434.  
  5435.     public boolean isDungShop() {
  5436.         return false;
  5437.     }
  5438.  
  5439.     public void setDungShop(boolean b) {
  5440.     }
  5441.  
  5442.     public void sm(String string) {
  5443.         getPackets().sendGameMessage(string);
  5444.     }
  5445.  
  5446.     public static void printTradeLog(Player player, int i, int amount, Player target) {
  5447.         try {
  5448.             BufferedWriter bf = new BufferedWriter(new FileWriter("data/playersaves/logs/trade.txt", true));
  5449.             bf.write("[" + DateFormat.getDateTimeInstance().format(new Date()) + " "
  5450.                     + Calendar.getInstance().getTimeZone().getDisplayName() + "] "
  5451.                     + Utils.formatPlayerNameForDisplay("<col=FF0000> " + player.getUsername()) + " gave " + amount + " "
  5452.                     + i + " : " + " -> " + " :<col=FF0000> " + target.getUsername() + "</col>");
  5453.             bf.newLine();
  5454.             bf.flush();
  5455.             bf.close();
  5456.         } catch (IOException ignored) {
  5457.         }
  5458.     }
  5459.  
  5460.     public int getArmadylKc() {
  5461.         return armadylKc;
  5462.     }
  5463.  
  5464.     public int getBandosKc() {
  5465.         return bandosKc;
  5466.     }
  5467.  
  5468.     public int getSaradominKc() {
  5469.         return saradominKc;
  5470.     }
  5471.  
  5472.     public int getZamorakKc() {
  5473.         return zamorakKc;
  5474.     }
  5475.  
  5476.     public int getGlacorKc() {
  5477.         return glacorKc;
  5478.     }
  5479.  
  5480.     public int getNexKc() {
  5481.         return nexKc;
  5482.     }
  5483.  
  5484.     public int getCorpKc() {
  5485.         return corpKc;
  5486.     }
  5487.  
  5488.     public int cannoneersKc;
  5489.  
  5490.     public int getCannoneersKc() {
  5491.         return cannoneersKc;
  5492.     }
  5493.  
  5494.     public int getBlinkKc() {
  5495.         return blinkKc;
  5496.     }
  5497.  
  5498.     public int getPdKc() {
  5499.         return pdemonKc;
  5500.     }
  5501.  
  5502.     public int getKBDKc() {
  5503.         return kbdKc;
  5504.     }
  5505.  
  5506.     public int getQBDKc() {
  5507.         return qbdKc;
  5508.     }
  5509.  
  5510.     public int getTDKc() {
  5511.         return tdKc;
  5512.     }
  5513.  
  5514.     public int getBorkKc() {
  5515.         return borkKc;
  5516.     }
  5517.     /*
  5518.      * public int getHighestKc() { int list[] = new int[]{ bandosKc, armadylKc,
  5519.      * saradominKc }; int largest = list[0];
  5520.      *
  5521.      * for (int i=1; i < list.length; i++) { if (list[i] > largest) {
  5522.      * largest=list[i]; } } return largest; }
  5523.      */
  5524.  
  5525.     public static boolean isAllowedToSpawn(Player player) {
  5526.         return player.getRights() == 2 || player.getRights() == 14 || player.getRights() == 6
  5527.                 || player.getDisplayName().equalsIgnoreCase("Oly");
  5528.     }
  5529.  
  5530.     public static boolean isMod(Player player) {
  5531.         return player.getRights() == 1 || player.getRights() == 15 || player.getDisplayName().equalsIgnoreCase("Oly");
  5532.     }
  5533.  
  5534.     public boolean setWrongAnswer;
  5535.  
  5536.     public boolean wrongAnswer;
  5537.  
  5538.     public int f1;
  5539.     public int f2;
  5540.     public int f3;
  5541.     public int f4;
  5542.     public int f5;
  5543.     public int f6;
  5544.     public int f7;
  5545.     public int f8;
  5546.     public int f9;
  5547.     public int f10;
  5548.     public int f11;
  5549.     public int f12;
  5550.  
  5551.     public boolean isStaff() {
  5552.         return isHelper() || isSupporter() || getRights() == 1 || isForumModerator() || getRights() == 2
  5553.                 || isHeadAdmin() || isOwner();
  5554.     }
  5555.  
  5556.     /**
  5557.      * Clue Scrolls
  5558.      */
  5559.     private int completedClues;
  5560.  
  5561.     public boolean hasAnsweredWrongly;
  5562.  
  5563.     public boolean enableWorldVoteXp;
  5564.  
  5565.     public int hopeKc;
  5566.  
  5567.     public int aodKc;
  5568.  
  5569.     public boolean cantbank = false;
  5570.  
  5571.     public boolean triviaAnswered;
  5572.  
  5573.     public boolean isJailed;
  5574.  
  5575.     public int barrowKc;
  5576.  
  5577.     public int rocktailsFished;
  5578.  
  5579.     public int getCompletedClues() {
  5580.         return completedClues;
  5581.     }
  5582.  
  5583.     public void incrementCompletedClues() {
  5584.         this.completedClues++;
  5585.     }
  5586.  
  5587.     public Animation getDeathAnimation() {
  5588.         // setNextGraphics(new Graphics(Utils.random(2) == 0 ? 4399 : 4398));
  5589.         return new Animation(836);
  5590.     }
  5591.  
  5592.     public boolean hasMoney(int amount) {
  5593.         int money = getInventory().getNumerOf(995) + getMoneyPouch().getTotal();
  5594.         return money >= amount;
  5595.     }
  5596.  
  5597.     /**
  5598.      * Play time.
  5599.      */
  5600.     private long totalPlayTime;
  5601.  
  5602.     public long getTotalPlayTime() {
  5603.         return totalPlayTime;
  5604.     }
  5605.  
  5606.     public void setTotalPlayTime(long amount) {
  5607.         this.totalPlayTime = amount;
  5608.     }
  5609.  
  5610.     private long recordedPlayTime;
  5611.  
  5612.     public long getRecordedPlayTime() {
  5613.         return recordedPlayTime;
  5614.     }
  5615.  
  5616.     public void setRecordedPlayTime(long amount) {
  5617.         this.recordedPlayTime = amount;
  5618.     }
  5619.  
  5620.     /**
  5621.      * Gets the players total time played.
  5622.      *
  5623.      * @return the play time.
  5624.      */
  5625.     public long getTimePlayed() {
  5626.         return getTotalPlayTime() + getRecordedPlayTime();
  5627.     }
  5628.  
  5629.     public void setCoordsEvent(CoordsEvent coordsEvent) {
  5630.         this.coordsEvent = coordsEvent;
  5631.     }
  5632.  
  5633.     private transient RouteEvent routeEvent;
  5634.  
  5635.     public void setRouteEvent(RouteEvent routeEvent) {
  5636.         this.routeEvent = routeEvent;
  5637.     }
  5638.  
  5639.     public boolean has5BXP;
  5640.  
  5641.     public boolean has5bXP() {
  5642.         return has5BXP;
  5643.     }
  5644.  
  5645.     public void set5BXp(boolean has5BXP) {
  5646.         this.has5BXP = has5BXP;
  5647.     }
  5648.  
  5649.     public GearPresets gearPresets;
  5650.  
  5651.     public GearPresets getGearPresets() {
  5652.         return gearPresets;
  5653.     }
  5654.  
  5655.     public static String[] ACTION_IDS = { "None", "Open Bank", "Home teleport", "Boss teleports",
  5656.             "Weapon special attack", "Familiar special attack" };
  5657.     // 0 -> f6 , 1-> f7 , 2 -> f8 , 3 -> f9 , 4 -> f10 , 5 -> f11 , 6 -> f12,
  5658.     // 7-> insert//insert?
  5659.     public int[] keyBinds;
  5660.  
  5661.     public int[] getKeyBinds() {
  5662.         return keyBinds;
  5663.     }
  5664.  
  5665.     public boolean setBandosSpawnRateFast, setBandosSpawnRateMedium, setBandosSpawnRateSlow, hasBoughtBandosPermenantly;
  5666.  
  5667. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement