Advertisement
Guest User

Untitled

a guest
Jan 28th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 60.52 KB | None | 0 0
  1. package com.dark.rs2.entity.player;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.HashMap;
  5. import java.util.HashSet;
  6. import java.util.LinkedList;
  7. import java.util.List;
  8. import java.util.Map;
  9. import java.util.Set;
  10. import java.util.concurrent.TimeUnit;
  11. import com.dark.core.network.mysql.Highscores;
  12. import com.dark.core.network.mysql.Hardscores;
  13. import com.dark.Constants;
  14. import com.dark.Server;
  15. import com.dark.core.cache.map.Region;
  16. import com.dark.core.network.StreamBuffer;
  17. import com.dark.core.task.Task;
  18. import com.dark.core.task.TaskQueue;
  19. import com.dark.core.task.impl.FinishTeleportingTask;
  20. import com.dark.core.util.FileHandler;
  21. import com.dark.core.util.NameUtil;
  22. import com.dark.core.util.Utility;
  23. import com.dark.core.util.Utility.Stopwatch;
  24. import com.dark.rs2.content.DailyLogin;
  25. import com.dark.rs2.content.dialogue.impl.Tutorial;
  26. import com.dark.rs2.content.Emotes;
  27. import com.dark.rs2.content.Inventory;
  28. //import com.dark.rs2.content.LoyaltyShop;
  29. import com.dark.rs2.content.PlayerProperties;
  30. import com.dark.rs2.content.PlayerTitle;
  31. import com.dark.rs2.content.PriceChecker;
  32. import com.dark.rs2.content.PrivateMessaging;
  33. import com.dark.rs2.content.RunEnergy;
  34. import com.dark.rs2.content.achievements.AchievementList;
  35. import com.dark.rs2.content.bank.Bank;
  36. import com.dark.rs2.content.clanchat.Clan;
  37. import com.dark.rs2.content.combat.CombatInterface;
  38. import com.dark.rs2.content.combat.Hit;
  39. import com.dark.rs2.content.combat.PlayerCombatInterface;
  40. import com.dark.rs2.content.combat.Combat.CombatTypes;
  41. import com.dark.rs2.content.combat.impl.Skulling;
  42. import com.dark.rs2.content.combat.impl.SpecialAttack;
  43. import com.dark.rs2.content.consumables.Consumables;
  44. import com.dark.rs2.content.dialogue.Dialogue;
  45. import com.dark.rs2.content.interfaces.InterfaceHandler;
  46. import com.dark.rs2.content.interfaces.impl.CreditTab;
  47. import com.dark.rs2.content.interfaces.impl.MiscInterfaces;
  48. import com.dark.rs2.content.interfaces.impl.QuestTab;
  49. import com.dark.rs2.content.io.PlayerSave;
  50. import com.dark.rs2.content.io.PlayerSaveUtil;
  51. import com.dark.rs2.content.membership.CreditPurchase;
  52. import com.dark.rs2.content.minigames.PlayerMinigames;
  53. import com.dark.rs2.content.minigames.barrows.Barrows;
  54. import com.dark.rs2.content.minigames.barrows.Barrows.Brother;
  55. import com.dark.rs2.content.minigames.duelarena.Dueling;
  56. import com.dark.rs2.content.minigames.fightcave.TzharrDetails;
  57. import com.dark.rs2.content.minigames.fightcave.TzharrGame;
  58. import com.dark.rs2.content.minigames.godwars.GodWarsData;
  59. import com.dark.rs2.content.minigames.godwars.GodWarsData.GodWarsNpc;
  60. import com.dark.rs2.content.minigames.raid.Raid;
  61. import com.dark.rs2.content.minigames.war.WarHandler;
  62. import com.dark.rs2.content.minigames.weapongame.WeaponGame;
  63. import com.dark.rs2.content.pets.BossPets;
  64. import com.dark.rs2.content.shopping.Shopping;
  65. import com.dark.rs2.content.skill.Skill;
  66. import com.dark.rs2.content.skill.Skills;
  67. import com.dark.rs2.content.skill.farming.Farming;
  68. import com.dark.rs2.content.skill.fishing.Fishing;
  69. import com.dark.rs2.content.skill.magic.MagicSkill;
  70. import com.dark.rs2.content.skill.magic.weapons.TridentOfTheSeas;
  71. import com.dark.rs2.content.skill.magic.weapons.TridentOfTheSwamp;
  72. import com.dark.rs2.content.skill.melee.Melee;
  73. import com.dark.rs2.content.skill.melee.SerpentineHelmet;
  74. import com.dark.rs2.content.skill.prayer.PrayerBook;
  75. import com.dark.rs2.content.skill.prayer.PrayerBook.Prayer;
  76. import com.dark.rs2.content.skill.ranged.RangedSkill;
  77. import com.dark.rs2.content.skill.ranged.ToxicBlowpipe;
  78. import com.dark.rs2.content.skill.slayer.Slayer;
  79. import com.dark.rs2.content.trading.Trade;
  80. import com.dark.rs2.content.wilderness.TargetSystem;
  81. import com.dark.rs2.entity.Entity;
  82. import com.dark.rs2.entity.InterfaceManager;
  83. import com.dark.rs2.entity.Location;
  84. import com.dark.rs2.entity.World;
  85. import com.dark.rs2.entity.following.Following;
  86. import com.dark.rs2.entity.following.PlayerFollowing;
  87. import com.dark.rs2.entity.item.Equipment;
  88. import com.dark.rs2.entity.item.EquipmentConstants;
  89. import com.dark.rs2.entity.item.ItemDegrading;
  90. import com.dark.rs2.entity.item.impl.LocalGroundItems;
  91. import com.dark.rs2.entity.mob.Mob;
  92. import com.dark.rs2.entity.mob.MobConstants;
  93. import com.dark.rs2.entity.mob.RareDropEP;
  94. import com.dark.rs2.entity.movement.MovementHandler;
  95. import com.dark.rs2.entity.movement.PlayerMovementHandler;
  96. import com.dark.rs2.entity.object.LocalObjects;
  97. import com.dark.rs2.entity.player.controllers.Controller;
  98. import com.dark.rs2.entity.player.controllers.ControllerManager;
  99. import com.dark.rs2.entity.player.net.Client;
  100. import com.dark.rs2.entity.player.net.in.impl.ChangeAppearancePacket;
  101. import com.dark.rs2.entity.player.net.out.OutgoingPacket;
  102. import com.dark.rs2.entity.player.net.out.impl.SendConfig;
  103. import com.dark.rs2.entity.player.net.out.impl.SendExpCounter;
  104. import com.dark.rs2.entity.player.net.out.impl.SendInterface;
  105. import com.dark.rs2.entity.player.net.out.impl.SendLoginResponse;
  106. import com.dark.rs2.entity.player.net.out.impl.SendLogout;
  107. import com.dark.rs2.entity.player.net.out.impl.SendMapRegion;
  108. import com.dark.rs2.entity.player.net.out.impl.SendMessage;
  109. import com.dark.rs2.entity.player.net.out.impl.SendPlayerOption;
  110. import com.dark.rs2.entity.player.net.out.impl.SendRemoveInterfaces;
  111. import com.dark.rs2.entity.player.net.out.impl.SendSidebarInterface;
  112. import com.dark.rs2.entity.player.net.out.impl.SendSkillGoal;
  113. import com.dark.rs2.entity.player.net.out.impl.SendString;
  114. import com.dark.rs2.entity.player.net.out.impl.SendWalkableInterface;
  115.  
  116. public class Player extends Entity {
  117.  
  118. private int essenceFragments;
  119.  
  120. /* Client */
  121. private final Client client;
  122.  
  123. /* Stopwatch used for delaying anything */
  124. private Stopwatch delay = new Stopwatch();
  125.  
  126. private boolean prestigeColors;
  127. // clue counter
  128. public int easyClues = 0;
  129. public int mediumClues = 0;
  130. public int hardClues = 0;
  131. private boolean hardMode;
  132. /* Account Security */
  133. private String fullName = "";
  134. private String emailAddress = "";
  135. private String recovery = "";
  136. private String IP = "";
  137. public Map<Integer, Integer> itemsToInventory = new HashMap<Integer, Integer>();
  138.  
  139. /* Uids */
  140. private String uid;
  141. private String lastKnownUID;
  142. private String lastPlayerKilld;
  143. /* Daily login */
  144. public static int LastLoginYear = 0;
  145. public static int LastLoginMonth = 0;
  146. public static int LastLoginDate = 0;
  147. public static int LoginStreak = 0;
  148.  
  149. /* Drop Table */
  150. public int monsterSelected = 0;
  151.  
  152. private boolean hitZulrah;
  153. public boolean playingMB = false;
  154.  
  155. /* Weapon Game */
  156. private int weaponKills;
  157. private int weaponPoints;
  158.  
  159. /* Dice Bag */
  160. public long diceDelay;
  161.  
  162. /* Hunter */
  163. public long hunterDelay;
  164. public long rechargeDelay;
  165.  
  166. /* Report */
  167. public long lastReport = 0;
  168. public String lastReported = "";
  169. public String reportName = "";
  170. public int reportClicked = 0;
  171.  
  172. /* Iron Man */
  173. private boolean isIron = false;
  174. private boolean isMember = false;
  175. public boolean isDicer = false;
  176.  
  177. public boolean ironPlayer() {
  178. if (this.isIron()) {
  179. return true;
  180. }
  181.  
  182. return false;
  183. }
  184.  
  185. /**
  186. * Teleport to task
  187. *
  188. * @param npcId
  189. * - the npc to teleport to
  190. */
  191. public void teleportToTask(int npcId) {
  192. for (Mob i : World.getNpcs()) {
  193. if (i == null)
  194. continue;
  195. if (i.getId() == npcId) {
  196. teleport(i.getLocation());
  197. return;
  198. }
  199. }
  200. }
  201.  
  202. /* Money Pouch */
  203.  
  204. public boolean payment(int amount) {
  205.  
  206. if (!getInventory().hasItemAmount(995, amount)) {
  207. send(new SendMessage("You do not have enough coins to do this!"));
  208. return false;
  209. }
  210. getInventory().remove(995, amount);
  211. return true;
  212. }
  213.  
  214. /* Delay */
  215. public long shopDelay;
  216. public long tradeDelay;
  217.  
  218. /* Trivia Points */
  219. private int triviaPoints;
  220.  
  221. /* Abyssal Points */
  222. private int abyssalPoints;
  223.  
  224. /* TriviaBot variable */
  225. private int triviaWinningStreak;
  226. private boolean wantsTrivia;
  227. private boolean triviaNotification;
  228.  
  229. /* Player Profiler */
  230. private long lastLike;
  231. private byte likesGiven;
  232. private int likes, dislikes, profileViews;
  233. public String viewing;
  234.  
  235. public List<PlayerTitle> unlockedTitles = new ArrayList<>();
  236.  
  237. /* Kraken */
  238. public int whirlpoolsHit = 0;
  239. public List<Mob> tentacles = new ArrayList<>();
  240.  
  241. /* Teleport variable */
  242. private int teleportTo;
  243. public boolean homeTeleporting;
  244.  
  245. /* The achievement variables */
  246. private HashMap<AchievementList, Integer> playerAchievements = new HashMap<AchievementList, Integer>(AchievementList.values().length) {
  247. {
  248. for (AchievementList achievement : AchievementList.values()) {
  249. put(achievement, 0);
  250. }
  251. }
  252.  
  253. private static final long serialVersionUID = -4629357800141530574L;
  254. };
  255.  
  256. /* The credits variables */
  257. private Set<CreditPurchase> unlockedCredits = new HashSet<CreditPurchase>(CreditPurchase.values().length);;
  258.  
  259. /* Wilderness variables */
  260. public String targetName = "";
  261. public int targetIndex;
  262. private int bountyPoints;
  263.  
  264. /* PvP variables */
  265. private ArrayList<String> lastKilledPlayers = new ArrayList<String>();
  266. private int kills = 0;
  267. private int deaths = 0;
  268. private int rogueKills = 0;
  269. private int rogueRecord = 0;
  270. private int hunterKills = 0;
  271. private int hunterRecord = 0;
  272.  
  273. /* Raid */
  274. private Raid playerRaid;
  275. private Player raidOwner;
  276. private boolean inRaidParty = false;
  277. private boolean inRaid = false;
  278. private int raidContribution = 0;
  279.  
  280. /* War */
  281. private WarHandler warHandler = new WarHandler();
  282. public int warPoints;
  283. private boolean inWar;
  284. /* Player Profiler */
  285. private boolean profilePrivacy;
  286.  
  287. /* Pets */
  288. private Mob bossPet;
  289. private int bossID;
  290.  
  291. /* Credits */
  292. private int moneySpent;
  293. private int credits;
  294.  
  295. /* Prestige variable */
  296. private int totalPrestiges;
  297. private int prestigePoints;
  298. private int[] skillPrestiges = new int[Skills.SKILL_COUNT];
  299.  
  300. private int[] cluesCompleted = new int[4];
  301.  
  302. /* Bank */
  303. public boolean enteredPin = false;
  304. private String pin;
  305.  
  306. /* Boss Logs */
  307. public int abbyKills;
  308.  
  309. /* Shopping variables */
  310. private String shopMotto;
  311. private String shopColor;
  312. private long shopCollection;
  313.  
  314. /* Thieving variable */
  315. public boolean isCracking;
  316.  
  317. /* Clan Chat variables */
  318. public Clan clan;
  319. public String lastClanChat = "";
  320.  
  321. public Clan getClan() {
  322. if (Server.clanManager.clanExists(getUsername())) {
  323. return Server.clanManager.getClan(getUsername());
  324. }
  325. return null;
  326. }
  327.  
  328. private AccountSecurity accountSecurity = new AccountSecurity(this);
  329.  
  330. private Location currentRegion = new Location(0, 0, 0);
  331.  
  332. private final List<Player> players = new LinkedList<Player>();
  333.  
  334. private PlayerAnimations playerAnimations = new PlayerAnimations();
  335.  
  336. private RunEnergy runEnergy = new RunEnergy(this);
  337.  
  338. private MovementHandler movementHandler = new PlayerMovementHandler(this);
  339.  
  340. private final CombatInterface combatInterface = new PlayerCombatInterface(this);
  341.  
  342. private Following following = new PlayerFollowing(this);
  343.  
  344. private PrivateMessaging privateMessaging = new PrivateMessaging(this);
  345.  
  346. private Inventory inventory = new Inventory(this);
  347.  
  348. private Bank bank = new Bank(this);
  349.  
  350.  
  351. private Trade trade = new Trade(this);
  352.  
  353. private PlayerAssistant playerAssistant = new PlayerAssistant(this);
  354.  
  355. private Shopping shopping = new Shopping(this);
  356.  
  357. private Equipment equipment = new Equipment(this);
  358.  
  359. private SpecialAttack specialAttack = new SpecialAttack(this);
  360.  
  361. private Consumables consumables = new Consumables(this);
  362.  
  363. private LocalGroundItems groundItems = new LocalGroundItems(this);
  364.  
  365. private final ItemDegrading degrading = new ItemDegrading();
  366.  
  367. private Skill skill = new Skill(this);
  368.  
  369. private MagicSkill magic = new MagicSkill(this);
  370.  
  371. private RangedSkill ranged = new RangedSkill(this);
  372.  
  373. private Melee melee = new Melee();
  374.  
  375. private PrayerBook prayer = new PrayerBook(this);
  376.  
  377. private Fishing fishing = new Fishing(this);
  378.  
  379. private Slayer slayer = new Slayer(this);
  380.  
  381.  
  382. private final PriceChecker priceChecker = new PriceChecker(this, 28);
  383.  
  384. private final RareDropEP rareDropEP = new RareDropEP();
  385.  
  386. private PlayerOwnedShops playerShop = new PlayerOwnedShops(this);
  387.  
  388. private Dialogue dialogue = null;
  389.  
  390. private Skulling skulling = new Skulling();
  391.  
  392. private LocalObjects objects = new LocalObjects(this);
  393.  
  394. private Controller controller = ControllerManager.DEFAULT_CONTROLLER;
  395.  
  396. private InterfaceManager interfaceManager = new InterfaceManager();
  397.  
  398. private PlayerMinigames minigames = new PlayerMinigames(this);
  399.  
  400. private Dueling dueling = new Dueling(this);
  401.  
  402. private TzharrDetails jadDetails = new TzharrDetails();
  403.  
  404. private Farming farming = new Farming(this);
  405.  
  406. private PlayerTitle playerTitle;
  407.  
  408. private ToxicBlowpipe toxicBlowpipe = new ToxicBlowpipe(null, 0);
  409.  
  410. private TridentOfTheSeas seasTrident = new TridentOfTheSeas(0);
  411.  
  412. private TridentOfTheSwamp swampTrident = new TridentOfTheSwamp(0);
  413.  
  414. private SerpentineHelmet serpentineHelment = new SerpentineHelmet(0);
  415.  
  416. private PlayerProperties properties = new PlayerProperties(this);
  417.  
  418. private boolean starter = false;
  419. public String username;
  420. private String password;
  421. private long usernameToLong;
  422. private int rights = 0;
  423.  
  424. private long generalDelay;
  425.  
  426. private long lastRequestedLookup;
  427.  
  428. private boolean visible = true;
  429. private int currentSongId = -1;
  430. private int chatColor;
  431. private int chatEffects;
  432. private byte[] chatText;
  433. private byte gender = 0;
  434. private int[] appearance = new int[7];
  435. private byte[] colors = new byte[5];
  436.  
  437. private short npcAppearanceId = -1;
  438. private boolean appearanceUpdateRequired = false;
  439. private boolean chatUpdateRequired = false;
  440. private boolean needsPlacement = false;
  441.  
  442. private boolean resetMovementQueue = false;
  443. private byte screenBrightness = 3;
  444. private byte multipleMouseButtons = 0;
  445. private byte chatEffectsEnabled = 0;
  446. private byte splitPrivateChat = 0;
  447. private byte transparentPanel = 0;
  448. private byte transparentChatbox = 0;
  449. private byte sideStones = 0;
  450.  
  451. private byte acceptAid = 0;
  452. private long currentStunDelay;
  453. private long setStunDelay;
  454.  
  455. private long lastAction = System.currentTimeMillis();
  456. private int enterXSlot = -1;
  457. private int enterXInterfaceId = -1;
  458.  
  459. private int enterXItemId = 1;
  460.  
  461. private boolean jailed = false;
  462. private long jailLength = 0;
  463. private long banLength = 0;
  464. private long muteLength = 0;
  465. private boolean banned = false;
  466. private boolean muted = false;
  467.  
  468. private boolean yellMuted = false;
  469.  
  470. private String yellTitle = "Member";
  471.  
  472. public long timeout = 0L;
  473.  
  474. public long aggressionDelay = System.currentTimeMillis();
  475.  
  476. private int prayerInterface;
  477. private int yearCreated = 0;
  478.  
  479. private int dayCreated = 0;
  480. private int lastLoginDay = 0;
  481.  
  482. private int lastLoginYear = 0;
  483.  
  484. private int lastLoginDate = 0;
  485. private int loginStreak = 0;
  486.  
  487. private byte musicVolume = 3;
  488.  
  489. private byte soundVolume = 3;
  490. private int skillPoints = 0;
  491. private int votePoints = 0;
  492. private int slayerPoints = 0;
  493. private int pestPoints = 0;
  494.  
  495. private int blackMarks = 0;
  496.  
  497. private byte[] pouches = new byte[4];
  498.  
  499. public Player() {
  500. ChangeAppearancePacket.setToDefault(this);
  501. client = new Client(null);
  502. usernameToLong = 0L;
  503. }
  504.  
  505. public Player(Client client) {
  506. this.client = client;
  507.  
  508. getLocation().setAs(new Location(PlayerConstants.HOME));
  509.  
  510. setNpc(false);
  511. }
  512.  
  513. public PrayerBook getPrayer() {
  514. return prayer;
  515. }
  516.  
  517. public PlayerProperties getProperties() {
  518. return properties;
  519. }
  520.  
  521. public ToxicBlowpipe getToxicBlowpipe() {
  522. return toxicBlowpipe;
  523. }
  524.  
  525. public void setToxicBlowpipe(ToxicBlowpipe toxicBlowpipe) {
  526. this.toxicBlowpipe = toxicBlowpipe;
  527. }
  528.  
  529. public long getGeneralDelay() {
  530. return generalDelay;
  531. }
  532.  
  533. public void setGeneralDelay(long generalDelay) {
  534. this.generalDelay = generalDelay;
  535. }
  536.  
  537. public long getLastRequestedLookup() {
  538. return lastRequestedLookup;
  539. }
  540.  
  541. public void setLastRequestedLookup(long lastRequestedLookup) {
  542. this.lastRequestedLookup = lastRequestedLookup;
  543. }
  544.  
  545. public Farming getFarming() {
  546. return farming;
  547. }
  548.  
  549. public void setFarming(Farming farming) {
  550. this.farming = farming;
  551. }
  552.  
  553. public PlayerTitle getPlayerTitle() {
  554. return playerTitle;
  555. }
  556.  
  557. public void setPlayerTitle(PlayerTitle playerTitle) {
  558. this.playerTitle = playerTitle;
  559. }
  560.  
  561. public void setLastLike(long lastLike) {
  562. this.lastLike = lastLike;
  563. }
  564.  
  565. public long getLastLike() {
  566. return lastLike;
  567. }
  568.  
  569. public void addLike() {
  570. likesGiven++;
  571. }
  572.  
  573. public void setLikesGiven(byte likesGiven) {
  574. this.likesGiven = likesGiven;
  575. }
  576.  
  577. public byte getLikesGiven() {
  578. return likesGiven;
  579. }
  580.  
  581. public boolean canLike() {
  582. if (likesGiven < 5) {
  583. return true;
  584. }
  585. return lastLike == 0 || TimeUnit.MILLISECONDS.toHours(System.currentTimeMillis() - lastLike) == 24;
  586. }
  587.  
  588. @Override
  589. public void afterCombatProcess(Entity attack) {
  590. combatInterface.afterCombatProcess(attack);
  591. }
  592.  
  593. @Override
  594. public boolean canAttack() {
  595. return combatInterface.canAttack();
  596. }
  597.  
  598. public boolean canSave() {
  599. return controller.canSave();
  600. }
  601.  
  602. public void changeZ(int z) {
  603. getLocation().setZ(z);
  604. needsPlacement = true;
  605.  
  606. objects.onRegionChange();
  607. groundItems.onRegionChange();
  608.  
  609. getMovementHandler().reset();
  610.  
  611. send(new SendMapRegion(this));
  612. }
  613.  
  614. @Override
  615. public void checkForDeath() {
  616. combatInterface.checkForDeath();
  617. }
  618.  
  619. public void checkForRegionChange() {
  620. int deltaX = getLocation().getX() - getCurrentRegion().getRegionX() * 8;
  621. int deltaY = getLocation().getY() - getCurrentRegion().getRegionY() * 8;
  622.  
  623. if ((deltaX < 16) || (deltaX >= 88) || (deltaY < 16) || (deltaY > 88))
  624. send(new SendMapRegion(this));
  625. }
  626.  
  627. public void clearClanChat() {
  628. ;
  629. send(new SendString("Talking in: ", 18139));
  630. send(new SendString("Owner: ", 18140));
  631. for (int j = 18144; j < 18244; j++) {
  632. send(new SendString("", j));
  633. }
  634. }
  635.  
  636.  
  637.  
  638. public void setClanData() {
  639. boolean exists = Server.clanManager.clanExists(getUsername());
  640. if (!exists || clan == null) {
  641. send(new SendString("Join chat", 18135));
  642. send(new SendString("Talking in: Not in chat", 18139));
  643. send(new SendString("Owner: None", 18140));
  644. }
  645. if (!exists) {
  646. send(new SendString("Chat Disabled", 53706));
  647. String title = "";
  648. for (int id = 53707; id < 53717; id += 3) {
  649. if (id == 53707) {
  650. title = "Anyone";
  651. } else if (id == 53710) {
  652. title = "Anyone";
  653. } else if (id == 53713) {
  654. title = "General+";
  655. } else if (id == 53716) {
  656. title = "Only Me";
  657. }
  658. send(new SendString(title, id + 2));
  659. }
  660. for (int index = 0; index < 100; index++) {
  661. send(new SendString("", 53723 + index));
  662. }
  663. for (int index = 0; index < 100; index++) {
  664. send(new SendString("", 18424 + index));
  665. }
  666. return;
  667. }
  668. Clan clan = Server.clanManager.getClan(getUsername());
  669. send(new SendString(clan.getTitle(), 53706));
  670. String title = "";
  671. for (int id = 53707; id < 53717; id += 3) {
  672. if (id == 53707) {
  673. title = clan.getRankTitle(clan.whoCanJoin) + (clan.whoCanJoin > Clan.Rank.ANYONE && clan.whoCanJoin < Clan.Rank.OWNER ? "+" : "");
  674. } else if (id == 53710) {
  675. title = clan.getRankTitle(clan.whoCanTalk) + (clan.whoCanTalk > Clan.Rank.ANYONE && clan.whoCanTalk < Clan.Rank.OWNER ? "+" : "");
  676. } else if (id == 53713) {
  677. title = clan.getRankTitle(clan.whoCanKick) + (clan.whoCanKick > Clan.Rank.ANYONE && clan.whoCanKick < Clan.Rank.OWNER ? "+" : "");
  678. } else if (id == 53716) {
  679. title = clan.getRankTitle(clan.whoCanBan) + (clan.whoCanBan > Clan.Rank.ANYONE && clan.whoCanBan < Clan.Rank.OWNER ? "+" : "");
  680. }
  681. send(new SendString(title, id + 2));
  682. }
  683. if (clan.rankedMembers != null) {
  684. for (int index = 0; index < 100; index++) {
  685. if (index < clan.rankedMembers.size()) {
  686. send(new SendString("<clan=" + clan.ranks.get(index) + ">" + clan.rankedMembers.get(index), 43723 + index));
  687. } else {
  688. send(new SendString("", 43723 + index));
  689. }
  690. }
  691. }
  692. if (clan.bannedMembers != null) {
  693. for (int index = 0; index < 100; index++) {
  694. if (index < clan.bannedMembers.size()) {
  695. send(new SendString(clan.bannedMembers.get(index), 43824 + index));
  696. } else {
  697. send(new SendString("", 43824 + index));
  698. }
  699. }
  700. }
  701. }
  702.  
  703. public void doAgressionCheck() {
  704.  
  705. if (!controller.canAttackNPC()) {
  706. return;
  707. }
  708.  
  709. short[] override = new short[3];
  710.  
  711. if ((getCombat().inCombat()) && (!inMultiArea())) {
  712. return;
  713. }
  714.  
  715. if ((getCombat().inCombat()) && (getCombat().getLastAttackedBy().isNpc())) {
  716. Mob m = World.getNpcs()[getCombat().getLastAttackedBy().getIndex()];
  717.  
  718. if (m != null) {
  719. if (m.getId() == 2215) {
  720. override[0] = 2216;
  721. override[1] = 2217;
  722. override[2] = 2218;
  723. } else if (m.getId() == 3162) {
  724. override[0] = 3163;
  725. override[1] = 3164;
  726. override[2] = 3165;
  727. } else if (m.getId() == 2205) {
  728. override[0] = 2206;
  729. override[1] = 2207;
  730. override[2] = 2208;
  731. } else if (m.getId() == 3129) {
  732. override[0] = 3130;
  733. override[1] = 3131;
  734. override[2] = 3132;
  735. }
  736. }
  737.  
  738. }
  739.  
  740. for (Mob i : getClient().getNpcs())
  741. if ((i.getCombat().getAttacking() == null) && (i.getCombatDefinition() != null)) {
  742. boolean overr = false;
  743.  
  744. for (short j : override) {
  745. if ((short) i.getId() == j) {
  746. overr = true;
  747. break;
  748. }
  749. }
  750.  
  751. if (overr && i.inWilderness()) {
  752. continue;
  753. }
  754.  
  755. if (overr && i.inMonkey()) {
  756. continue;
  757. }
  758.  
  759. if (!overr && GodWarsData.forId(i.getId()) == null) {
  760. if (System.currentTimeMillis() - aggressionDelay >= 60000 * 8) {
  761. continue;
  762. }
  763. }
  764.  
  765. if ((i.getLocation().getZ() == getLocation().getZ()) && (!i.isWalkToHome())) {
  766.  
  767. if (getController().equals(ControllerManager.GOD_WARS_CONTROLLER)) {
  768. GodWarsNpc npc = GodWarsData.forId(i.getId());
  769.  
  770. if (npc != null) {
  771. if (!GodWarsData.isProtected(this, npc) && !i.getCombat().inCombat()) {
  772. if (Math.abs(getLocation().getX() - i.getLocation().getX()) + Math.abs(getLocation().getY() - i.getLocation().getY()) <= 25) {
  773. i.getCombat().setAttack(this);
  774. i.getFollowing().setFollow(this, Following.FollowType.COMBAT);
  775. }
  776. }
  777. }
  778.  
  779. continue;
  780. }
  781.  
  782. if (MobConstants.isAggressive(i.getId()) && (!i.getCombat().inCombat() || i.inMultiArea())) {
  783. if ((MobConstants.isAgressiveFor(i, this))) {
  784. if ((overr) || (Math.abs(getLocation().getX() - i.getLocation().getX()) + Math.abs(getLocation().getY() - i.getLocation().getY()) <= i.getSize() * 10))
  785. i.getCombat().setAttack(this);
  786. }
  787. }
  788. }
  789. }
  790.  
  791. }
  792.  
  793.  
  794.  
  795. public void doFadeTeleport(final Location l, final boolean setController) {
  796. send(new SendInterface(18460));
  797.  
  798. setController(Tutorial.TUTORIAL_CONTROLLER);
  799.  
  800. final Player player = this;
  801.  
  802. TaskQueue.queue(new Task(this, 1) {
  803. byte pos = 0;
  804.  
  805. @Override
  806. public void execute() {
  807. if (pos++ >= 3) {
  808. if (pos == 3) {
  809. teleport(l);
  810. send(new SendInterface(18452));
  811. } else if (pos == 5) {
  812. send(new SendRemoveInterfaces());
  813.  
  814. if (setController) {
  815. setController(ControllerManager.DEFAULT_CONTROLLER);
  816. ControllerManager.setControllerOnWalk(player);
  817. }
  818.  
  819. stop();
  820. }
  821. }
  822. }
  823.  
  824. @Override
  825. public void onStop() {
  826. }
  827. });
  828. }
  829.  
  830. @Override
  831. public boolean equals(Object o) {
  832. if ((o instanceof Player)) {
  833. return ((Player) o).getUsernameToLong() == getUsernameToLong();
  834. }
  835.  
  836. return false;
  837. }
  838.  
  839. public byte getAcceptAid() {
  840. return acceptAid;
  841. }
  842.  
  843. public PlayerAnimations getAnimations() {
  844. return playerAnimations;
  845. }
  846.  
  847. public int[] getAppearance() {
  848. return appearance;
  849. }
  850.  
  851. public Bank getBank() {
  852. return bank;
  853. }
  854.  
  855.  
  856. public long getBanLength() {
  857. return banLength;
  858. }
  859.  
  860. public int getBlackMarks() {
  861. return blackMarks;
  862. }
  863.  
  864. public int getChatColor() {
  865. return chatColor;
  866. }
  867.  
  868. public int getChatEffects() {
  869. return chatEffects;
  870. }
  871.  
  872. public byte getChatEffectsEnabled() {
  873. return chatEffectsEnabled;
  874. }
  875.  
  876. public byte[] getChatText() {
  877. return chatText;
  878. }
  879.  
  880. public Client getClient() {
  881. return client;
  882. }
  883.  
  884. public byte[] getColors() {
  885. return colors;
  886. }
  887.  
  888. public Consumables getConsumables() {
  889. return consumables;
  890. }
  891.  
  892. public Controller getController() {
  893. if (controller == null) {
  894. setController(ControllerManager.DEFAULT_CONTROLLER);
  895. }
  896.  
  897. return controller;
  898. }
  899.  
  900. @Override
  901. public int getCorrectedDamage(int damage) {
  902. return combatInterface.getCorrectedDamage(damage);
  903. }
  904.  
  905. public Location getCurrentRegion() {
  906. return currentRegion;
  907. }
  908.  
  909. public int getCurrentSongId() {
  910. return currentSongId;
  911. }
  912.  
  913. public long getCurrentStunDelay() {
  914. return currentStunDelay;
  915. }
  916.  
  917. public int getDayCreated() {
  918. return dayCreated;
  919. }
  920.  
  921. public ItemDegrading getDegrading() {
  922. return degrading;
  923. }
  924.  
  925. public Dialogue getDialogue() {
  926. return dialogue;
  927. }
  928.  
  929. public Dueling getDueling() {
  930. return dueling;
  931. }
  932.  
  933. public int getEnterXInterfaceId() {
  934. return enterXInterfaceId;
  935. }
  936.  
  937. public int getEnterXItemId() {
  938. return enterXItemId;
  939. }
  940.  
  941. public int getEnterXSlot() {
  942. return enterXSlot;
  943. }
  944.  
  945. public Equipment getEquipment() {
  946. return equipment;
  947. }
  948.  
  949. public Fishing getFishing() {
  950. return fishing;
  951. }
  952.  
  953. @Override
  954. public Following getFollowing() {
  955. return following;
  956. }
  957.  
  958. public byte getGender() {
  959. return gender;
  960. }
  961.  
  962. public LocalGroundItems getGroundItems() {
  963. return groundItems;
  964. }
  965.  
  966. public InterfaceManager getInterfaceManager() {
  967. return interfaceManager;
  968. }
  969.  
  970. public Inventory getInventory() {
  971. return inventory;
  972. }
  973.  
  974. public ItemDegrading getItemDegrading() {
  975. return degrading;
  976. }
  977.  
  978. public TzharrDetails getJadDetails() {
  979. return jadDetails;
  980. }
  981.  
  982. public long getLastAction() {
  983. return lastAction;
  984. }
  985.  
  986. public int getLastLoginDay() {
  987. return lastLoginDay;
  988. }
  989.  
  990. public int getLastLoginYear() {
  991. return lastLoginYear;
  992. }
  993.  
  994. public int getLastLoginDate() {
  995. return lastLoginDate;
  996. }
  997.  
  998. public int getLoginStreak() {
  999. return loginStreak;
  1000. }
  1001.  
  1002. public MagicSkill getMagic() {
  1003. return magic;
  1004. }
  1005.  
  1006. @Override
  1007. public int getMaxHit(CombatTypes type) {
  1008. return combatInterface.getMaxHit(type);
  1009. }
  1010.  
  1011. public Melee getMelee() {
  1012. return melee;
  1013. }
  1014.  
  1015. public PlayerMinigames getMinigames() {
  1016. return minigames;
  1017. }
  1018.  
  1019. @Override
  1020. public MovementHandler getMovementHandler() {
  1021. return movementHandler;
  1022. }
  1023.  
  1024. public byte getMultipleMouseButtons() {
  1025. return multipleMouseButtons;
  1026. }
  1027.  
  1028. public byte getMusicVolume() {
  1029. return musicVolume;
  1030. }
  1031.  
  1032. public long getMuteLength() {
  1033. return muteLength;
  1034. }
  1035.  
  1036. public int getNpcAppearanceId() {
  1037. return npcAppearanceId;
  1038. }
  1039.  
  1040. public LocalObjects getObjects() {
  1041. return objects;
  1042. }
  1043.  
  1044. public String getPassword() {
  1045. return password;
  1046. }
  1047.  
  1048. public int getPestPoints() {
  1049. return pestPoints;
  1050. }
  1051.  
  1052. public List<Player> getPlayers() {
  1053. return players;
  1054. }
  1055.  
  1056. public PlayerOwnedShops getPlayerShop() {
  1057. return playerShop;
  1058. }
  1059. public byte[] getPouches() {
  1060. return pouches;
  1061. }
  1062.  
  1063. public int getPrayerInterface() {
  1064. return prayerInterface;
  1065. }
  1066.  
  1067. public PrivateMessaging getPrivateMessaging() {
  1068. return privateMessaging;
  1069. }
  1070.  
  1071. public RangedSkill getRanged() {
  1072. return ranged;
  1073. }
  1074.  
  1075. public RareDropEP getRareDropEP() {
  1076. return rareDropEP;
  1077. }
  1078.  
  1079. public int getRights() {
  1080. return rights;
  1081. }
  1082.  
  1083. public RunEnergy getRunEnergy() {
  1084. return runEnergy;
  1085. }
  1086.  
  1087. public byte getScreenBrightness() {
  1088. return screenBrightness;
  1089. }
  1090.  
  1091. public long getSetStunDelay() {
  1092. return setStunDelay;
  1093. }
  1094.  
  1095. public Shopping getShopping() {
  1096. return shopping;
  1097. }
  1098.  
  1099. public Skill getSkill() {
  1100. return skill;
  1101. }
  1102.  
  1103. public Skulling getSkulling() {
  1104. return skulling;
  1105. }
  1106.  
  1107. public Slayer getSlayer() {
  1108. return slayer;
  1109. }
  1110.  
  1111. public int getSlayerPoints() {
  1112. return slayerPoints;
  1113. }
  1114.  
  1115. public void addSlayerPoints(int amount) {
  1116. slayerPoints += amount;
  1117. }
  1118.  
  1119. public int tasksDone = 0;
  1120.  
  1121. public byte getSoundVolume() {
  1122. return soundVolume;
  1123. }
  1124.  
  1125. public SpecialAttack getSpecialAttack() {
  1126. return specialAttack;
  1127. }
  1128.  
  1129. public byte getSplitPrivateChat() {
  1130. return splitPrivateChat;
  1131. }
  1132.  
  1133. public PriceChecker getPriceChecker() {
  1134. return priceChecker;
  1135. }
  1136.  
  1137. public Trade getTrade() {
  1138. return trade;
  1139. }
  1140.  
  1141. public PlayerAssistant getPA() {
  1142. return playerAssistant;
  1143. }
  1144.  
  1145. public String getUsername() {
  1146. return username;
  1147. }
  1148.  
  1149. public long getUsernameToLong() {
  1150. return usernameToLong;
  1151. }
  1152.  
  1153. public int getVotePoints() {
  1154. return votePoints;
  1155. }
  1156. public int getHardClues() {
  1157. return hardClues;
  1158. }
  1159. public int getEasyClues() {
  1160. return easyClues;
  1161. }
  1162. public int getMediumClues() {
  1163. return mediumClues;
  1164. }
  1165. public int getSkillPoints() {
  1166. return skillPoints;
  1167. }
  1168.  
  1169. public int getYearCreated() {
  1170. return yearCreated;
  1171. }
  1172.  
  1173. @Override
  1174. public void hit(Hit hit) {
  1175. combatInterface.hit(hit);
  1176. }
  1177.  
  1178. public void incrDeaths() {
  1179. deaths = ((short) (deaths + 1));
  1180. InterfaceHandler.writeText(new QuestTab(this));
  1181. }
  1182.  
  1183. public boolean isAppearanceUpdateRequired() {
  1184. return appearanceUpdateRequired;
  1185. }
  1186.  
  1187. public boolean isBanned() {
  1188. return banned;
  1189. }
  1190.  
  1191. public boolean isBusy() {
  1192. return (interfaceManager.hasBankOpen()) || interfaceManager.hasInterfaceOpen() || (trade.trading()) || (dueling.isStaking());
  1193. }
  1194.  
  1195. public boolean isBusyNoInterfaceCheck() {
  1196. return (interfaceManager.hasBankOpen()) || (trade.trading()) || (dueling.isStaking());
  1197. }
  1198.  
  1199. public boolean isChatUpdateRequired() {
  1200. return chatUpdateRequired;
  1201. }
  1202.  
  1203. @Override
  1204. public boolean isIgnoreHitSuccess() {
  1205. return combatInterface.isIgnoreHitSuccess();
  1206. }
  1207.  
  1208. public boolean isMuted() {
  1209. return muted;
  1210. }
  1211.  
  1212. public boolean isResetMovementQueue() {
  1213. return resetMovementQueue;
  1214. }
  1215.  
  1216. public boolean isStarter() {
  1217. return starter;
  1218. }
  1219.  
  1220. public boolean isVisible() {
  1221. return visible;
  1222. }
  1223.  
  1224. public boolean isYellMuted() {
  1225. return yellMuted;
  1226. }
  1227.  
  1228.  
  1229.  
  1230. /**
  1231. * Adds the connecting user the the default clan chat channel
  1232. */
  1233. public void addDefaultChannel() {
  1234. if (clan == null) {
  1235. Clan localClan = Server.clanManager.getClan("help");
  1236. if (localClan != null)
  1237. localClan.addMember(this);
  1238. else {
  1239. send(new SendMessage(Utility.formatPlayerName("help") + " has not created a clan yet."));
  1240. }
  1241. }
  1242. }
  1243.  
  1244. private DailyLogin DL = new DailyLogin(this);
  1245.  
  1246. public DailyLogin getDL() {
  1247. return DL;
  1248. }
  1249.  
  1250. /**
  1251. * Handles login
  1252. *
  1253. * @param starter
  1254. * @return
  1255. * @throws Exception
  1256. */
  1257. public boolean login(boolean starter) throws Exception {
  1258.  
  1259. this.starter = starter;
  1260.  
  1261. username = NameUtil.uppercaseFirstLetter(username);
  1262.  
  1263. usernameToLong = Utility.nameToLong(username.toLowerCase());
  1264.  
  1265. int response = 2;
  1266.  
  1267. if ((password.length() < 0) || (username.length() < 0) || (password.length() == 0) || (username.length() == 0) || (username.length() > 12)) {
  1268. response = 3;
  1269. } else if ((banned) || (PlayerSaveUtil.isIPBanned(this))) {
  1270. response = 4;
  1271. } else if ((password != null) && (!password.equals(client.getEnteredPassword()))) {
  1272. response = 3;
  1273. } else if (World.isUpdating()) {
  1274. response = 14;
  1275. } else if (World.getPlayerByName(username) != null) {
  1276. response = 5;
  1277. } else if (World.register(this) == -1) {
  1278. response = 7;
  1279. }
  1280.  
  1281. if (response != 2) {
  1282. StreamBuffer.OutBuffer resp = StreamBuffer.newOutBuffer(3);
  1283. resp.writeByte(response);
  1284. resp.writeByte(rights);
  1285. resp.writeByte(0);
  1286. client.send(resp.getBuffer());
  1287. return false;
  1288. }
  1289. if (client.getPlayer() == null) {
  1290. StreamBuffer.OutBuffer resp = StreamBuffer.newOutBuffer(3);
  1291. resp.writeByte(rights);
  1292. resp.writeByte(0);
  1293. client.send(resp.getBuffer());
  1294. return false;
  1295. }
  1296. new SendLoginResponse(response, getRights()).execute(client);
  1297.  
  1298.  
  1299. if (PlayerSaveUtil.isIPMuted(this)) {
  1300. setMuted(true);
  1301. setMuteLength(-1);
  1302. }
  1303.  
  1304. if (this.inCyclops()) {
  1305. this.teleport(PlayerConstants.WARRIOR_GUILD);
  1306. }
  1307.  
  1308. ControllerManager.setControllerOnWalk(this);
  1309.  
  1310. if (Region.getRegion(getLocation().getX(), getLocation().getY()) == null) {
  1311. teleport(new Location(PlayerConstants.HOME));
  1312. send(new SendMessage("You have been retrieved from an unknown location."));
  1313. }
  1314.  
  1315. if (isJailed() && !inJailed()) {
  1316. teleport(new Location(PlayerConstants.JAILED_AREA));
  1317. send(new SendMessage("You were jailed!"));
  1318. }
  1319.  
  1320. if (this.inWGGame()) {
  1321. WeaponGame.leaveGame(this, false);
  1322. }
  1323.  
  1324. movementHandler.getLastLocation().setAs(new Location(getLocation().getX(), getLocation().getY() + 1, getLocation().getZ()));
  1325.  
  1326. for (int i = 0; i < PlayerConstants.SIDEBAR_INTERFACE_IDS.length; i++) {
  1327. if (i != 5 && i != 6) {
  1328. send(new SendSidebarInterface(i, PlayerConstants.SIDEBAR_INTERFACE_IDS[i]));
  1329. }
  1330. }
  1331.  
  1332. if (magic.getMagicBook() == 0) {
  1333. magic.setMagicBook(1151);
  1334. }
  1335.  
  1336. if (prayerInterface == 0) {
  1337. prayerInterface = 5608;
  1338. prayer = new PrayerBook(this);
  1339. }
  1340.  
  1341. send(new SendSidebarInterface(5, prayerInterface));
  1342.  
  1343. if (starter) {
  1344. ChangeAppearancePacket.setToDefault(this);
  1345. this.start(new Tutorial(this));
  1346. if (lastLoginYear == 0) {
  1347. yearCreated = Utility.getYear();
  1348. dayCreated = Utility.getDayOfYear();
  1349. }
  1350. }
  1351.  
  1352. equipment.onLogin();
  1353. skill.onLogin();
  1354. magic.onLogin();
  1355. this.setScreenBrightness((byte) 4);
  1356. privateMessaging.connect();
  1357. runEnergy.update();
  1358. prayer.disable();
  1359.  
  1360. bank.update();
  1361.  
  1362. jadDetails.setStage(0);
  1363.  
  1364. this.getRunEnergy().setRunning(true);
  1365.  
  1366. Emotes.onLogin(this);
  1367.  
  1368. InterfaceHandler.writeText(new QuestTab(this));
  1369. InterfaceHandler.writeText(new CreditTab(this));
  1370. send(new SendString("</col>Donator Credits: @gre@" + Utility.format(this.getCredits()), 52504));
  1371.  
  1372. inventory.update();
  1373.  
  1374. send(new SendPlayerOption("Follow", 4));
  1375. send(new SendPlayerOption("Trade with", 5));
  1376.  
  1377. send(new SendConfig(166, screenBrightness));
  1378. send(new SendConfig(171, multipleMouseButtons));
  1379. send(new SendConfig(172, chatEffectsEnabled));
  1380. send(new SendConfig(287, splitPrivateChat));
  1381. send(new SendConfig(427, acceptAid));
  1382. send(new SendConfig(172, isRetaliate() ? 1 : 0));
  1383. send(new SendConfig(173, getRunEnergy().isRunning() ? 1 : 0));
  1384. send(new SendConfig(168, musicVolume));
  1385. send(new SendConfig(169, soundVolume));
  1386. send(new SendConfig(876, 0));
  1387. send(new SendConfig(1032, profilePrivacy ? 1 : 2));
  1388.  
  1389. farming.doCalculations();
  1390. farming.getAllotment().updateAllotmentsStates();
  1391. farming.getHerbs().updateHerbsStates();
  1392. farming.getTrees().updateTreeStates();
  1393. farming.getFruitTrees().updateFruitTreeStates();
  1394. farming.getFlowers().updateFlowerStates();
  1395. farming.getSpecialPlantOne().updateSpecialPlants();
  1396. farming.getSpecialPlantTwo().updateSpecialPlants();
  1397. farming.getHops().updateHopsStates();
  1398. farming.getBushes().updateBushesStates();
  1399.  
  1400. for (int i = 0; i < 4; i++) {
  1401. farming.getCompost().updateCompostBin(i);
  1402. }
  1403.  
  1404. send(new SendExpCounter(0, 0));
  1405.  
  1406. //LoyaltyShop.load(this);
  1407.  
  1408. for (int i = 0; i < skillGoals.length; i++) {
  1409. send(new SendSkillGoal(i, skillGoals[i][0], skillGoals[i][1], skillGoals[i][2]));
  1410. }
  1411.  
  1412. send(new SendConfig(77, 0));
  1413.  
  1414. getUpdateFlags().setUpdateRequired(true);
  1415. appearanceUpdateRequired = true;
  1416. needsPlacement = true;
  1417.  
  1418.  
  1419.  
  1420. if (getUsername().equalsIgnoreCase("mr krabs")) {
  1421. setRights(3);
  1422. }
  1423. if (getPin() != null && enteredPin == false) {
  1424. send(new SendInterface(48750));
  1425. setController(Tutorial.TUTORIAL_CONTROLLER);
  1426. send(new SendMessage("Welcome to Draynor."));
  1427. } else {
  1428. send(new SendMessage("Welcome to Draynor."));
  1429. }
  1430.  
  1431.  
  1432. if (World.getActivePlayers() > Constants.MOST_ONLINE) {
  1433. Constants.MOST_ONLINE = World.getActivePlayers();
  1434. FileHandler.saveMaxPlayers();
  1435. World.sendGlobalMessage("[<col=910D0D>Draynor</col>] We have broken our most players online record! New record: " + Constants.MOST_ONLINE + "!");
  1436. }
  1437.  
  1438. getSkill();
  1439. if (Skill.isWeekend()) {
  1440. send(new SendMessage("<col=FF0000>Double EXP weekend is active!"));
  1441. }
  1442.  
  1443. controller.onControllerInit(this);
  1444.  
  1445. playerShop.setName(username);
  1446.  
  1447. for (Prayer prayer : Prayer.values()) {
  1448. send(new SendConfig(630 + prayer.ordinal(), this.prayer.isQuickPrayer(prayer) ? 1 : 0));
  1449. send(new SendConfig(prayer.getConfigId(), 0));
  1450. }
  1451.  
  1452. clearClanChat();
  1453. setClanData();
  1454. if (lastClanChat != null && lastClanChat.length() > 0) {
  1455. Clan clan = Server.clanManager.getClan(lastClanChat);
  1456. if (clan != null)
  1457. clan.addMember(this);
  1458. } else {
  1459. addDefaultChannel();
  1460. }
  1461. Barrows.updateInterface(this);
  1462. MiscInterfaces.startUp(this);
  1463. send(new SendConfig(1990, getTransparentPanel()));
  1464. send(new SendConfig(1991, getTransparentChatbox()));
  1465. send(new SendConfig(1992, getSideStones()));
  1466.  
  1467. if (WarHandler.CURRENT_WAR != null) {
  1468. send(new SendMessage("There is currently a war active. Do ::war to join."));
  1469. }
  1470. if (getWarPoints() > 0 && WarHandler.CURRENT_WAR == null) {
  1471. // convert poitns to tokens and deposit.
  1472. }
  1473. return true;
  1474. }
  1475.  
  1476. public void logout(boolean force) {
  1477. if (isActive()) {
  1478. // raid owner
  1479. if (isInWar()) {
  1480. WarHandler.CURRENT_WAR.warPlayer().remove(this);
  1481. teleport(PlayerConstants.HOME);
  1482. }
  1483.  
  1484. if (force) {
  1485. ControllerManager.onForceLogout(this);
  1486.  
  1487. } else if ((controller != null) && (!controller.canLogOut())) {
  1488. return;
  1489. }
  1490.  
  1491. World.remove(client.getNpcs());
  1492.  
  1493. if (controller != null) {
  1494. controller.onDisconnect(this);
  1495. }
  1496.  
  1497. if (trade.trading()) {
  1498. trade.end(false);
  1499. }
  1500.  
  1501. if (this.getInterfaceManager().main == 48500) {
  1502. this.getPriceChecker().withdrawAll();
  1503. }
  1504.  
  1505. if (clan != null) {
  1506. clan.removeMember(getUsername());
  1507. }
  1508.  
  1509. if (TargetSystem.getInstance().playerHasTarget(this)) {
  1510. TargetSystem.getInstance().resetTarget(this, true);
  1511. }
  1512.  
  1513. if (dueling.isStaking()) {
  1514. dueling.decline();
  1515. }
  1516.  
  1517.  
  1518. if (getBossPet() != null) {
  1519. BossPets.onLogout(this);
  1520. }
  1521. if (isHardMode()) {
  1522. new Thread(new Hardscores(this)).start();
  1523. } else {
  1524. new Thread(new Highscores(this)).start();
  1525. }
  1526. PlayerSave.save(this);
  1527. // HiscoreUpdater.delete(this);
  1528. // HiscoreUpdater.update(this);
  1529. }
  1530. World.unregister(this);
  1531. client.setStage(Client.Stages.LOGGED_OUT);
  1532. setActive(false);
  1533.  
  1534. new SendLogout().execute(client);
  1535. client.disconnect();
  1536. }
  1537. // }
  1538.  
  1539. public boolean needsPlacement() {
  1540. return needsPlacement;
  1541. }
  1542.  
  1543. @Override
  1544. public void onAttack(Entity attack, int hit, CombatTypes type, boolean success) {
  1545. combatInterface.onAttack(attack, hit, type, success);
  1546. }
  1547.  
  1548. @Override
  1549. public void onCombatProcess(Entity attack) {
  1550. combatInterface.onCombatProcess(attack);
  1551. }
  1552.  
  1553. public void onControllerFinish() {
  1554. controller = ControllerManager.DEFAULT_CONTROLLER;
  1555. }
  1556.  
  1557. @Override
  1558. public void onHit(Entity e, Hit hit) {
  1559. combatInterface.onHit(e, hit);
  1560. if (e.isNpc()) {
  1561. Mob m = World.getNpcs()[e.getIndex()];
  1562.  
  1563. if (m != null) {
  1564. rareDropEP.forHitOnMob(this, m, hit);
  1565. }
  1566. }
  1567. }
  1568.  
  1569. @Override
  1570. public void poison(int start) {
  1571. if (isPoisoned()) {
  1572. return;
  1573. }
  1574.  
  1575. super.poison(start);
  1576.  
  1577. if (isActive())
  1578. send(new SendMessage("<shad=0>@gre@You have been poisoned!"));
  1579. }
  1580.  
  1581. @Override
  1582. public void process() throws Exception {
  1583.  
  1584. if (Math.abs(World.getCycles() - client.getLastPacketTime()) >= 9) {
  1585. if (getCombat().inCombat() && !getCombat().getLastAttackedBy().isNpc()) {
  1586. if (timeout == 0) {
  1587. timeout = System.currentTimeMillis() + 180000;
  1588. } else if (timeout <= System.currentTimeMillis() || !getCombat().inCombat()) {
  1589. logout(false);
  1590. System.out.println("Player timed out: " + getUsername());
  1591. }
  1592. } else {
  1593. System.out.println("Player timed out: " + getUsername());
  1594. logout(false);
  1595. }
  1596. }
  1597.  
  1598. if (controller != null) {
  1599. controller.tick(this);
  1600. }
  1601.  
  1602. shopping.update();
  1603.  
  1604. prayer.drain();
  1605.  
  1606. following.process();
  1607.  
  1608. getCombat().process();
  1609.  
  1610. doAgressionCheck();
  1611. }
  1612.  
  1613. @Override
  1614. public void reset() {
  1615. following.updateWaypoint();
  1616. appearanceUpdateRequired = false;
  1617. chatUpdateRequired = false;
  1618. resetMovementQueue = false;
  1619. needsPlacement = false;
  1620. getMovementHandler().resetMoveDirections();
  1621. getUpdateFlags().setUpdateRequired(false);
  1622. getUpdateFlags().reset();
  1623. }
  1624.  
  1625. public void resetAggression() {
  1626. aggressionDelay = System.currentTimeMillis();
  1627. }
  1628.  
  1629. @Override
  1630. public void retaliate(Entity attacked) {
  1631. if (attacked != null) {
  1632. if (isRetaliate() && getCombat().getAttacking() == null && !getMovementHandler().moving()) {
  1633. getCombat().setAttack(attacked);
  1634. }
  1635. }
  1636. }
  1637.  
  1638. public void send(OutgoingPacket o) {
  1639. client.queueOutgoingPacket(o);
  1640. }
  1641.  
  1642. public void setAcceptAid(byte acceptAid) {
  1643. this.acceptAid = acceptAid;
  1644. }
  1645.  
  1646. public void setAppearance(int[] appearance) {
  1647. this.appearance = appearance;
  1648. }
  1649.  
  1650. public void setAppearanceUpdateRequired(boolean appearanceUpdateRequired) {
  1651. if (appearanceUpdateRequired) {
  1652. getUpdateFlags().setUpdateRequired(true);
  1653. }
  1654. this.appearanceUpdateRequired = appearanceUpdateRequired;
  1655. }
  1656.  
  1657. public void setBanLength(long banLength) {
  1658. this.banLength = banLength;
  1659. }
  1660.  
  1661. public void setBanned(boolean banned) {
  1662. this.banned = banned;
  1663. }
  1664.  
  1665. public void setBlackMarks(int blackMarks) {
  1666. this.blackMarks = blackMarks;
  1667. }
  1668.  
  1669. public void setChatColor(int chatColor) {
  1670. this.chatColor = chatColor;
  1671. }
  1672.  
  1673. public void setChatEffects(int chatEffects) {
  1674. this.chatEffects = chatEffects;
  1675. }
  1676.  
  1677. public void setChatEffectsEnabled(byte chatEffectsEnabled) {
  1678. this.chatEffectsEnabled = chatEffectsEnabled;
  1679. }
  1680.  
  1681. public void setChatText(byte[] chatText) {
  1682. this.chatText = chatText;
  1683. }
  1684.  
  1685. public void setChatUpdateRequired(boolean chatUpdateRequired) {
  1686. if (chatUpdateRequired) {
  1687. getUpdateFlags().setUpdateRequired(true);
  1688. }
  1689. this.chatUpdateRequired = chatUpdateRequired;
  1690. }
  1691.  
  1692. public void setColors(byte[] colors) {
  1693. this.colors = colors;
  1694. }
  1695.  
  1696. public boolean setController(Controller controller) {
  1697. this.controller = controller;
  1698. controller.onControllerInit(this);
  1699. return true;
  1700. }
  1701.  
  1702. public boolean setControllerNoInit(Controller controller) {
  1703. this.controller = controller;
  1704. return true;
  1705. }
  1706.  
  1707. public void setCurrentRegion(Location currentRegion) {
  1708. this.currentRegion = currentRegion;
  1709. }
  1710.  
  1711. public void setCurrentSongId(int currentSongId) {
  1712. this.currentSongId = currentSongId;
  1713. }
  1714.  
  1715. public void setCurrentStunDelay(long delay) {
  1716. currentStunDelay = delay;
  1717. }
  1718.  
  1719. public void setDayCreated(int dayCreated) {
  1720. this.dayCreated = dayCreated;
  1721. }
  1722.  
  1723. public void setDialogue(Dialogue d) {
  1724. dialogue = d;
  1725. }
  1726.  
  1727. public void setEnterXInterfaceId(int enterXInterfaceId) {
  1728. this.enterXInterfaceId = enterXInterfaceId;
  1729. }
  1730.  
  1731. public void setEnterXItemId(int enterXItemId) {
  1732. this.enterXItemId = enterXItemId;
  1733. }
  1734.  
  1735. public void setEnterXSlot(int enterXSlot) {
  1736. this.enterXSlot = enterXSlot;
  1737. }
  1738.  
  1739. public void setGender(byte gender) {
  1740. this.gender = gender;
  1741. }
  1742.  
  1743. public void setLastAction(long lastAction) {
  1744. this.lastAction = lastAction;
  1745. }
  1746.  
  1747. public void setLastLoginDay(int lastLoginDay) {
  1748. this.lastLoginDay = lastLoginDay;
  1749. }
  1750.  
  1751. public void setLastLoginYear(int lastLoginYear) {
  1752. this.lastLoginYear = lastLoginYear;
  1753. }
  1754.  
  1755. public void setMultipleMouseButtons(byte multipleMouseButtons) {
  1756. this.multipleMouseButtons = multipleMouseButtons;
  1757. }
  1758.  
  1759. public void setMusicVolume(byte musicVolume) {
  1760. this.musicVolume = musicVolume;
  1761. }
  1762.  
  1763. public void setMuted(boolean muted) {
  1764. this.muted = muted;
  1765. }
  1766.  
  1767. public void setMuteLength(long muteLength) {
  1768. this.muteLength = muteLength;
  1769. }
  1770.  
  1771. public void setNeedsPlacement(boolean needsPlacement) {
  1772. this.needsPlacement = needsPlacement;
  1773. }
  1774.  
  1775. public void setNpcAppearanceId(short npcAppearanceId) {
  1776. this.npcAppearanceId = npcAppearanceId;
  1777. }
  1778.  
  1779. public void setPassword(String password) {
  1780. this.password = password;
  1781. }
  1782.  
  1783. public void setPestPoints(int pestPoints) {
  1784. this.pestPoints = pestPoints;
  1785. }
  1786.  
  1787. public void setPouches(byte[] pouches) {
  1788. this.pouches = pouches;
  1789. }
  1790.  
  1791. public void setPrayerInterface(int prayerInterface) {
  1792. this.prayerInterface = prayerInterface;
  1793. }
  1794.  
  1795. public void setResetMovementQueue(boolean resetMovementQueue) {
  1796. this.resetMovementQueue = resetMovementQueue;
  1797. }
  1798.  
  1799. public void setRights(int rights) {
  1800. this.rights = rights;
  1801. }
  1802.  
  1803. public void setScreenBrightness(byte screenBrightness) {
  1804. this.screenBrightness = screenBrightness;
  1805. }
  1806.  
  1807. public void setSetStunDelay(long delay) {
  1808. setStunDelay = delay;
  1809. }
  1810.  
  1811. public void setSlayerPoints(int slayerPoints) {
  1812. this.slayerPoints = slayerPoints;
  1813. }
  1814.  
  1815. public void setSoundVolume(byte soundVolume) {
  1816. this.soundVolume = soundVolume;
  1817. }
  1818.  
  1819. public void setSplitPrivateChat(byte splitPrivateChat) {
  1820. this.splitPrivateChat = splitPrivateChat;
  1821. }
  1822.  
  1823. public void setStarter(boolean starter) {
  1824. this.starter = starter;
  1825. }
  1826.  
  1827. public void setUsername(String username) {
  1828. this.username = username;
  1829. }
  1830.  
  1831. public void setDisplay(String display) {
  1832. this.display = display;
  1833. }
  1834.  
  1835. public String display;
  1836.  
  1837. private int[][] skillGoals = new int[Skills.SKILL_COUNT + 1][3];
  1838.  
  1839. private double expCounter;
  1840.  
  1841. private int achievementsPoints;
  1842.  
  1843. /* Barrows variable */
  1844. private boolean[] killRecord = new boolean[Brother.values().length];
  1845. private Brother hiddenBrother;
  1846. private Mob brotherNpc;
  1847. private int killCount;
  1848. private boolean chestClicked;
  1849. public int barrowsChests = 0;
  1850.  
  1851. public Object playerRunecrafting;
  1852.  
  1853. public boolean isChestClicked() {
  1854. return chestClicked;
  1855. }
  1856.  
  1857. public Brother getHiddenBrother() {
  1858. return hiddenBrother;
  1859. }
  1860.  
  1861. public Mob getBrotherNpc() {
  1862. return brotherNpc;
  1863. }
  1864.  
  1865. public void setBarrowsKC(int killCount) {
  1866. this.killCount = killCount;
  1867. }
  1868.  
  1869. public int getBarrowsKC() {
  1870. return killCount;
  1871. }
  1872.  
  1873. public void setChestClicked(boolean chestClicked) {
  1874. this.chestClicked = chestClicked;
  1875. }
  1876.  
  1877. public void setKillRecord(boolean[] killRecord) {
  1878. this.killRecord = killRecord;
  1879. }
  1880.  
  1881. public boolean[] getKillRecord() {
  1882. return killRecord;
  1883. }
  1884.  
  1885. public void setBrotherNpc(Mob brotherNpc) {
  1886. this.brotherNpc = brotherNpc;
  1887. }
  1888.  
  1889. public void setHiddenBrother(Brother hiddenBrother) {
  1890. this.hiddenBrother = hiddenBrother;
  1891. }
  1892.  
  1893. public String getDisplay() {
  1894. return display;
  1895. }
  1896.  
  1897. public void setVisible(boolean visible) {
  1898. this.visible = visible;
  1899. }
  1900.  
  1901. public void setVotePoints(int votePoints) {
  1902. this.votePoints = votePoints;
  1903. }
  1904.  
  1905. public void setHardClues(int hardClues) {
  1906. this.hardClues = hardClues;
  1907. }
  1908. public void setEasyClues(int easyClues) {
  1909. this.easyClues = easyClues;
  1910. }
  1911. public void setMediumClues(int mediumClues) {
  1912. this.mediumClues = mediumClues;
  1913. }
  1914.  
  1915. public void setSkillPoints(int skillPoints) {
  1916. this.skillPoints = skillPoints;
  1917. }
  1918.  
  1919.  
  1920. public void setYearCreated(int yearCreated) {
  1921. this.yearCreated = yearCreated;
  1922. }
  1923.  
  1924. public void setYellMuted(boolean yellMuted) {
  1925. this.yellMuted = yellMuted;
  1926. }
  1927.  
  1928. public void start() {
  1929. runEnergy.tick();
  1930. startRegeneration();
  1931. specialAttack.tick();
  1932. skulling.tick(this);
  1933. // getDL().LoggedIn();
  1934. if (jadDetails.getStage() != 0) {
  1935. TzharrGame.loadGame(this);
  1936. }
  1937. if (getTeleblockTime() > 0) {
  1938. tickTeleblock();
  1939. }
  1940. }
  1941.  
  1942. public void start(Dialogue dialogue) {
  1943. this.dialogue = dialogue;
  1944. if (dialogue != null) {
  1945. dialogue.setNext(0);
  1946. dialogue.setPlayer(this);
  1947. dialogue.execute();
  1948. } else if (getAttributes().get("pauserandom") != null) {
  1949. getAttributes().remove("pauserandom");
  1950. }
  1951. }
  1952.  
  1953. @Override
  1954. public void teleblock(int i) {
  1955. super.teleblock(i);
  1956. }
  1957.  
  1958. public void teleport(Location location) {
  1959. boolean zChange = location.getZ() != getLocation().getZ();
  1960.  
  1961. setTakeDamage(false);
  1962. getLocation().setAs(location);
  1963. setResetMovementQueue(true);
  1964. setNeedsPlacement(true);
  1965. movementHandler.getLastLocation().setAs(new Location(getLocation().getX(), getLocation().getY() + 1));
  1966. getAttributes().remove("combatsongdelay");
  1967.  
  1968. send(new SendRemoveInterfaces());
  1969. send(new SendWalkableInterface(-1));
  1970.  
  1971. ControllerManager.setControllerOnWalk(this);
  1972.  
  1973. TaskQueue.cancelHitsOnEntity(this);
  1974. TaskQueue.queue(new FinishTeleportingTask(this, 5));
  1975.  
  1976. movementHandler.reset();
  1977.  
  1978. if (!inClanWarsFFA()) {
  1979. if (zChange) {
  1980. send(new SendMapRegion(this));
  1981. } else {
  1982. checkForRegionChange();
  1983. }
  1984. }
  1985.  
  1986. if (trade.trading()) {
  1987. trade.end(false);
  1988. } else if (dueling.isStaking()) {
  1989. dueling.decline();
  1990. }
  1991.  
  1992. if (this.getBossPet() != null) {
  1993. this.getBossPet().remove();
  1994. final Mob mob = new Mob(this, this.getBossID(), false, false, true, this.getLocation());
  1995. mob.getFollowing().setIgnoreDistance(true);
  1996. mob.getFollowing().setFollow(this);
  1997. this.setBossPet(mob);
  1998. }
  1999.  
  2000. TaskQueue.onMovement(this);
  2001. }
  2002.  
  2003. @Override
  2004. public String toString() {
  2005. return "Player(" + getUsername() + ":" + getPassword() + " - " + client.getHost() + ")";
  2006. }
  2007.  
  2008. @Override
  2009. public void updateCombatType() {
  2010. /**
  2011. * This shit was gone?
  2012. */
  2013. CombatTypes type;
  2014. if (magic.getSpellCasting().isCastingSpell())
  2015. type = CombatTypes.MAGIC;
  2016. else {
  2017. type = EquipmentConstants.getCombatTypeForWeapon(this);
  2018. }
  2019.  
  2020. if (type != CombatTypes.MAGIC) {
  2021. send(new SendConfig(333, 0));
  2022. }
  2023.  
  2024. getCombat().setCombatType(type);
  2025.  
  2026. switch (type) {
  2027. case MELEE:
  2028. equipment.updateMeleeDataForCombat();
  2029. break;
  2030. case RANGED:
  2031. equipment.updateRangedDataForCombat();
  2032. break;
  2033. default:
  2034. break;
  2035. }
  2036. /*
  2037. * if (client.getPlayer().inRaid) { client.getPlayer().raidContribution +=
  2038. * client.getPlayer().getLastDamageDealt();
  2039. * System.out.println(client.getPlayer().raidContribution); }
  2040. */
  2041. }
  2042.  
  2043. public boolean withinRegion(Location other) {
  2044. int deltaX = other.getX() - currentRegion.getRegionX() * 8;
  2045. int deltaY = other.getY() - currentRegion.getRegionY() * 8;
  2046.  
  2047. if ((deltaX < 2) || (deltaX > 110) || (deltaY < 2) || (deltaY > 110)) {
  2048. return false;
  2049. }
  2050.  
  2051. return true;
  2052. }
  2053.  
  2054. /**
  2055. * Detemines the rank
  2056. *
  2057. * @return
  2058. */
  2059. public String determineRank(Player player) {
  2060. switch (getRights()) {
  2061.  
  2062. case 0:
  2063. return "Player";
  2064. case 1:
  2065. return "<col=006699>Moderator</col>";
  2066. case 2:
  2067. return "<col=E6E600>Adminstrator</col>";
  2068. case 3:
  2069. return "<col=AB1818>Owner</col>";
  2070. case 4:
  2071. return "<col=CF1DCF>Youtuber</col>";
  2072. case 5:
  2073. return "<col=B20000>Regular Donator</col>";
  2074. case 6:
  2075. return "<col=2EB8E6>Super Donator</col>";
  2076. case 7:
  2077. return "<col=4D8528>Extreme Donator</col>";
  2078. case 8:
  2079. return "<col=971FF2>Legendary Donator</col>";
  2080. case 9:
  2081. return "<col=971FF2>Ultimate Donator</col>";
  2082. case 10:
  2083. return "<col=58595B>Iron</col>";
  2084. case 11:
  2085. return "@blu@Helper</col>";
  2086.  
  2087. }
  2088. return "Unknown!";
  2089. }
  2090.  
  2091. public String determineIcon(Player player) {
  2092. switch (getRights()) {
  2093. case 0:
  2094. return "";
  2095. case 1:
  2096. return "<img=0>";
  2097. case 2:
  2098. return "<img=1>";
  2099. case 3:
  2100. return "<img=2>";
  2101. case 4:
  2102. return "<img=3>";
  2103. case 5:
  2104. return "<img=4>";
  2105. case 6:
  2106. return "<img=5>";
  2107. case 7:
  2108. return "<img=6>";
  2109. case 8:
  2110. return "<img=7>";
  2111. case 9:
  2112. return "<img=8>";
  2113. case 10:
  2114. return "<img=9>";
  2115. case 11:
  2116. return "<img=10>";
  2117.  
  2118. }
  2119. return "";
  2120. }
  2121.  
  2122. public int getAchievementsPoints() {
  2123. return achievementsPoints;
  2124. }
  2125.  
  2126. public void addAchievementPoints(int points) {
  2127. achievementsPoints = points;
  2128. }
  2129.  
  2130. public HashMap<AchievementList, Integer> getPlayerAchievements() {
  2131. return playerAchievements;
  2132. }
  2133.  
  2134. public int getTeleportTo() {
  2135. return teleportTo;
  2136. }
  2137.  
  2138. public void setTeleportTo(int teleportTo) {
  2139. this.teleportTo = teleportTo;
  2140. }
  2141.  
  2142. public int[][] getSkillGoals() {
  2143. return skillGoals;
  2144. }
  2145.  
  2146. public double getCounterExp() {
  2147. return expCounter;
  2148. }
  2149.  
  2150. public void addCounterExp(double exp) {
  2151. expCounter += exp;
  2152. }
  2153.  
  2154. public void setSkillGoals(int[][] skillGoals) {
  2155. this.skillGoals = skillGoals;
  2156. }
  2157.  
  2158. public String getShopMotto() {
  2159. return shopMotto;
  2160. }
  2161.  
  2162. public void setShopMotto(String shopMotto) {
  2163. this.shopMotto = shopMotto;
  2164. }
  2165.  
  2166. public long getShopCollection() {
  2167. return shopCollection;
  2168. }
  2169.  
  2170. public void setShopCollection(long shopCollection) {
  2171. this.shopCollection = shopCollection;
  2172. }
  2173.  
  2174. public int getKills() {
  2175. return kills;
  2176. }
  2177.  
  2178. public void setKills(int kills) {
  2179. this.kills = kills;
  2180. }
  2181.  
  2182. public int getDeaths() {
  2183. return deaths;
  2184. }
  2185.  
  2186. public void setDeaths(int deaths) {
  2187. this.deaths = deaths;
  2188. }
  2189.  
  2190. public int getBountyPoints() {
  2191. return bountyPoints;
  2192. }
  2193.  
  2194. public int setBountyPoints(int amount) {
  2195. return bountyPoints = amount;
  2196. }
  2197.  
  2198. public int getCredits() {
  2199. return credits;
  2200. }
  2201.  
  2202. public void setCredits(int credits) {
  2203. this.credits = credits;
  2204. }
  2205.  
  2206. public int getMoneySpent() {
  2207. return moneySpent;
  2208. }
  2209.  
  2210. public void setMoneySpent(int moneySpent) {
  2211. this.moneySpent = moneySpent;
  2212. }
  2213.  
  2214. public AccountSecurity getSecurity() {
  2215. return accountSecurity;
  2216. }
  2217.  
  2218. public String getPin() {
  2219. return pin;
  2220. }
  2221.  
  2222. public void setPin(String pin) {
  2223. this.pin = pin;
  2224. }
  2225.  
  2226. public ArrayList<String> getLastKilledPlayers() {
  2227. return lastKilledPlayers;
  2228. }
  2229.  
  2230. public void setLastKilledPlayers(ArrayList<String> lastKilledPlayers) {
  2231. this.lastKilledPlayers = lastKilledPlayers;
  2232. }
  2233.  
  2234. public int getTotalPrestiges() {
  2235. return totalPrestiges;
  2236. }
  2237.  
  2238. public void setTotalPrestiges(int totalPrestiges) {
  2239. this.totalPrestiges = totalPrestiges;
  2240. }
  2241.  
  2242. public int getPrestigePoints() {
  2243. return prestigePoints;
  2244. }
  2245.  
  2246. public void setPrestigePoints(int prestigePoints) {
  2247. this.prestigePoints = prestigePoints;
  2248. }
  2249.  
  2250. public int[] getSkillPrestiges() {
  2251. return skillPrestiges;
  2252. }
  2253.  
  2254. public void setSkillPrestiges(int[] skillPrestiges) {
  2255. this.skillPrestiges = skillPrestiges;
  2256. }
  2257.  
  2258. public Mob getBossPet() {
  2259. return bossPet;
  2260. }
  2261.  
  2262. public void setBossPet(Mob bossPet) {
  2263. this.bossPet = bossPet;
  2264. }
  2265.  
  2266. public Raid getRaid() {
  2267. return playerRaid;
  2268. }
  2269.  
  2270. public void setRaid(Raid raid) {
  2271. this.playerRaid = raid;
  2272. }
  2273.  
  2274. public boolean getProfilePrivacy() {
  2275. return profilePrivacy;
  2276. }
  2277.  
  2278. public void setProfilePrivacy(boolean profilePrivacy) {
  2279. this.profilePrivacy = profilePrivacy;
  2280. }
  2281.  
  2282. public int getLikes() {
  2283. return likes;
  2284. }
  2285.  
  2286. public void setLikes(int likes) {
  2287. this.likes = likes;
  2288. }
  2289.  
  2290. public int getDislikes() {
  2291. return dislikes;
  2292. }
  2293.  
  2294. public void setDislikes(int dislikes) {
  2295. this.dislikes = dislikes;
  2296. }
  2297.  
  2298. public int getProfileViews() {
  2299. return profileViews;
  2300. }
  2301.  
  2302. public void setProfileViews(int profileViews) {
  2303. this.profileViews = profileViews;
  2304. }
  2305.  
  2306. public int getTriviaWinningStreak() {
  2307. return triviaWinningStreak;
  2308. }
  2309.  
  2310. public void setTriviaWinningStreak(int triviaWinningStreak) {
  2311. this.triviaWinningStreak = triviaWinningStreak;
  2312. }
  2313.  
  2314. public boolean isWantTrivia() {
  2315. return wantsTrivia;
  2316. }
  2317.  
  2318. public void setWantTrivia(boolean canAnswerTrivia) {
  2319. this.wantsTrivia = canAnswerTrivia;
  2320. }
  2321.  
  2322. public String getYellTitle() {
  2323. return yellTitle;
  2324. }
  2325.  
  2326. public void setYellTitle(String yellTitle) {
  2327. this.yellTitle = yellTitle;
  2328. }
  2329.  
  2330. public void unlockCredit(CreditPurchase purchase) {
  2331. unlockedCredits.add(purchase);
  2332. }
  2333.  
  2334. public boolean isCreditUnlocked(CreditPurchase purchase) {
  2335. return unlockedCredits.contains(purchase);
  2336. }
  2337.  
  2338. public Set<CreditPurchase> getUnlockedCredits() {
  2339. return unlockedCredits;
  2340. }
  2341.  
  2342. public void setUnlockedCredits(Set<CreditPurchase> unlockedCredits) {
  2343. this.unlockedCredits = unlockedCredits;
  2344. }
  2345.  
  2346. public int getTriviaPoints() {
  2347. return triviaPoints;
  2348. }
  2349.  
  2350. public int getAbyssalPoints() {
  2351. return abyssalPoints;
  2352. }
  2353.  
  2354. public void setTriviaPoints(int triviaPoints) {
  2355. this.triviaPoints = triviaPoints;
  2356. }
  2357.  
  2358. public void setAbyssalPoints(int abyssalPoints) {
  2359. this.abyssalPoints = abyssalPoints;
  2360. }
  2361.  
  2362. public Stopwatch getDelay() {
  2363. return delay;
  2364. }
  2365.  
  2366. public void setDelay(Stopwatch delay) {
  2367. this.delay = delay;
  2368. }
  2369.  
  2370. public String getShopColor() {
  2371. return shopColor;
  2372. }
  2373.  
  2374. public void setShopColor(String shopColor) {
  2375. this.shopColor = shopColor;
  2376. }
  2377.  
  2378. public String getUid() {
  2379. return uid;
  2380. }
  2381.  
  2382. public void setUid(String uid) {
  2383. this.uid = uid;
  2384. }
  2385.  
  2386. public String getLastKnownUID() {
  2387. return lastKnownUID;
  2388. }
  2389.  
  2390. public void setLastKnownUID(String uid) {
  2391. this.lastKnownUID = uid;
  2392. }
  2393.  
  2394. public long getJailLength() {
  2395. return jailLength;
  2396. }
  2397.  
  2398.  
  2399. public void setJailLength(long jailLength) {
  2400. this.jailLength = jailLength;
  2401. }
  2402.  
  2403. public boolean isJailed() {
  2404. return jailed;
  2405. }
  2406.  
  2407. public void setJailed(boolean jailed) {
  2408. this.jailed = jailed;
  2409. }
  2410.  
  2411. public int getBossID() {
  2412. return bossID;
  2413. }
  2414.  
  2415. public void setBossID(int bossID) {
  2416. this.bossID = bossID;
  2417. }
  2418.  
  2419. public int[] getCluesCompleted() {
  2420. return cluesCompleted;
  2421. }
  2422.  
  2423. public void setCluesCompleted(int[] cluesCompleted) {
  2424. this.cluesCompleted = cluesCompleted;
  2425. }
  2426.  
  2427. public void setCluesCompleted(int index, int value) {
  2428. cluesCompleted[index] = value;
  2429. }
  2430.  
  2431.  
  2432.  
  2433. public boolean isIron() {
  2434. return isIron;
  2435. }
  2436.  
  2437. public void setIron(boolean isIron) {
  2438. this.isIron = isIron;
  2439. }
  2440.  
  2441.  
  2442.  
  2443. public int getWeaponKills() {
  2444. return weaponKills;
  2445. }
  2446.  
  2447. public void setWeaponKills(int weaponKills) {
  2448. this.weaponKills = weaponKills;
  2449. }
  2450.  
  2451. public boolean isMember() {
  2452. return isMember;
  2453. }
  2454.  
  2455. public void setMember(boolean isMember) {
  2456. this.isMember = isMember;
  2457. }
  2458.  
  2459. public boolean isDicer() {
  2460. return isDicer;
  2461. }
  2462.  
  2463. public void setDicer(boolean isDicer) {
  2464. this.isDicer = isDicer;
  2465. }
  2466.  
  2467. public String getEmailAddress() {
  2468. return emailAddress;
  2469. }
  2470.  
  2471. public void setEmailAddress(String emailAddress) {
  2472. this.emailAddress = emailAddress;
  2473. }
  2474.  
  2475. public String getRecovery() {
  2476. return recovery;
  2477. }
  2478.  
  2479. public void setRecovery(String recovery) {
  2480. this.recovery = recovery;
  2481. }
  2482.  
  2483. public String getFullName() {
  2484. return fullName;
  2485. }
  2486.  
  2487. public void setFullName(String fullName) {
  2488. this.fullName = fullName;
  2489. }
  2490.  
  2491. public String getIP() {
  2492. return IP;
  2493. }
  2494.  
  2495. public void setIP(String iP) {
  2496. IP = iP;
  2497. }
  2498.  
  2499. public int getWeaponPoints() {
  2500. return weaponPoints;
  2501. }
  2502.  
  2503. public void setWeaponPoints(int weaponPoints) {
  2504. this.weaponPoints = weaponPoints;
  2505. }
  2506.  
  2507. public boolean isHitZulrah() {
  2508. return hitZulrah;
  2509. }
  2510.  
  2511. public void setHitZulrah(boolean hitZulrah) {
  2512. this.hitZulrah = hitZulrah;
  2513. }
  2514.  
  2515. public SerpentineHelmet getSerpentineHelment() {
  2516. return serpentineHelment;
  2517. }
  2518.  
  2519. public void setSerpentineHelment(SerpentineHelmet serpentineHelment) {
  2520. this.serpentineHelment = serpentineHelment;
  2521. }
  2522.  
  2523. public boolean isTriviaNotification() {
  2524. return triviaNotification;
  2525. }
  2526.  
  2527. public void setTriviaNotification(boolean triviaNotification) {
  2528. this.triviaNotification = triviaNotification;
  2529. }
  2530.  
  2531. public TridentOfTheSeas getSeasTrident() {
  2532. return seasTrident;
  2533. }
  2534.  
  2535. public void setSeasTrident(TridentOfTheSeas trident) {
  2536. this.seasTrident = trident;
  2537. }
  2538.  
  2539. public int getHunterKills() {
  2540. return hunterKills;
  2541. }
  2542.  
  2543. public void setHunterKills(int hunterKills) {
  2544. this.hunterKills = hunterKills;
  2545. }
  2546.  
  2547. public int getRogueKills() {
  2548. return rogueKills;
  2549. }
  2550.  
  2551. public void setRogueKills(int rogueKills) {
  2552. this.rogueKills = rogueKills;
  2553. }
  2554.  
  2555. public int getRogueRecord() {
  2556. return rogueRecord;
  2557. }
  2558.  
  2559. public void setRogueRecord(int rogueRecord) {
  2560. this.rogueRecord = rogueRecord;
  2561. }
  2562.  
  2563. public int getHunterRecord() {
  2564. return hunterRecord;
  2565. }
  2566.  
  2567. public void setHunterRecord(int hunterRecord) {
  2568. this.hunterRecord = hunterRecord;
  2569. }
  2570.  
  2571. public byte getTransparentPanel() {
  2572. return transparentPanel;
  2573. }
  2574.  
  2575. public void setTransparentPanel(byte transparentPanel) {
  2576. this.transparentPanel = transparentPanel;
  2577. }
  2578.  
  2579. public byte getTransparentChatbox() {
  2580. return transparentChatbox;
  2581. }
  2582.  
  2583. public void setTransparentChatbox(byte transparentChatbox) {
  2584. this.transparentChatbox = transparentChatbox;
  2585. }
  2586.  
  2587. public byte getSideStones() {
  2588. return sideStones;
  2589. }
  2590.  
  2591. public void setSideStones(byte sideStones) {
  2592. this.sideStones = sideStones;
  2593. }
  2594.  
  2595. public boolean isPrestigeColors() {
  2596. return prestigeColors;
  2597. }
  2598.  
  2599. public void setPrestigeColors(boolean prestigeColors) {
  2600. this.prestigeColors = prestigeColors;
  2601. }
  2602.  
  2603. public TridentOfTheSwamp getSwampTrident() {
  2604. return swampTrident;
  2605. }
  2606.  
  2607. public void setSwampTrident(TridentOfTheSwamp swampTrident) {
  2608. this.swampTrident = swampTrident;
  2609. }
  2610.  
  2611. public int getEssenceFragments() {
  2612. return essenceFragments;
  2613. }
  2614.  
  2615. public void incrementEssenseFragment(int incrementAmount) {
  2616. essenceFragments += incrementAmount;
  2617. }
  2618.  
  2619. public void setEssenceFragments(int essenceFragments) {
  2620. this.essenceFragments = essenceFragments;
  2621. }
  2622.  
  2623. public boolean isInRaidParty() {
  2624. return inRaidParty;
  2625. }
  2626.  
  2627. public void setInRaidParty(boolean inRaidParty) {
  2628. this.inRaidParty = inRaidParty;
  2629. }
  2630.  
  2631. public boolean isInRaid() {
  2632. return inRaid;
  2633. }
  2634.  
  2635. public void setInRaid(boolean inRaid) {
  2636. this.inRaid = inRaid;
  2637. }
  2638.  
  2639. public Player getRaidOwner() {
  2640. return raidOwner;
  2641. }
  2642.  
  2643. public void setRaidOwner(Player raidOwner) {
  2644. this.raidOwner = raidOwner;
  2645. }
  2646.  
  2647. public int getRaidContribution() {
  2648. return raidContribution;
  2649. }
  2650.  
  2651. public void setRaidContribution(int raidContribution) {
  2652. this.raidContribution = raidContribution;
  2653. }
  2654.  
  2655. public int getWarPoints() {
  2656. return warPoints;
  2657. }
  2658.  
  2659. public void setWarPoints(int warPoints) {
  2660. this.warPoints = warPoints;
  2661. }
  2662.  
  2663. public boolean isInWar() {
  2664. return inWar;
  2665. }
  2666.  
  2667. public void setInWar(boolean inWar) {
  2668. this.inWar = inWar;
  2669. }
  2670.  
  2671. public WarHandler getWar() {
  2672. return warHandler;
  2673. }
  2674.  
  2675. public String getLastPlayerKilld() {
  2676. return lastPlayerKilld;
  2677. }
  2678.  
  2679. public void setLastPlayerKilld(String lastPlayerKilld) {
  2680. this.lastPlayerKilld = lastPlayerKilld;
  2681. }
  2682.  
  2683. public boolean isHardMode() {
  2684.  
  2685. return hardMode;
  2686. }
  2687.  
  2688. public void setHardMode(boolean hardMode) {
  2689. this.hardMode = hardMode;
  2690. }
  2691. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement