Advertisement
Guest User

Untitled

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