Zavada

player

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