Advertisement
Guest User

Untitled

a guest
May 14th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 165.44 KB | None | 0 0
  1. package com.rs.game.player;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.BufferedWriter;
  5. import java.io.FileWriter;
  6. import java.io.IOException;
  7. import java.io.InputStreamReader;
  8. import java.net.InetAddress;
  9. import java.net.URL;
  10. import java.net.UnknownHostException;
  11. import java.text.DateFormat;
  12. import java.text.SimpleDateFormat;
  13. import java.util.ArrayList;
  14. import java.util.Calendar;
  15. import java.util.Collections;
  16. import java.util.Date;
  17. import java.util.HashMap;
  18. import java.util.LinkedList;
  19. import java.util.List;
  20. import java.util.concurrent.ConcurrentLinkedQueue;
  21. import java.util.concurrent.CopyOnWriteArrayList;
  22. import java.util.concurrent.TimeUnit;
  23.  
  24. import com.rs.Settings;
  25. import com.rs.cores.CoresManager;
  26. import com.rs.game.Animation;
  27. import com.rs.game.Entity;
  28. import com.rs.game.ForceTalk;
  29. import com.rs.game.Graphics;
  30. import com.rs.game.Hit;
  31. import com.rs.game.Hit.HitLook;
  32. import com.rs.game.World;
  33. import com.rs.game.WorldObject;
  34. import com.rs.game.WorldTile;
  35. import com.rs.game.item.FloorItem;
  36. import com.rs.game.item.Item;
  37. import com.rs.game.minigames.WarriorsGuild;
  38. import com.rs.game.minigames.clanwars.FfaZone;
  39. import com.rs.game.minigames.clanwars.WarControler;
  40. import com.rs.game.minigames.duel.DuelArena;
  41. import com.rs.game.minigames.duel.DuelRules;
  42. import com.rs.game.npc.NPC;
  43. import com.rs.game.npc.familiar.Familiar;
  44. import com.rs.game.npc.glacor.Glacor;
  45. import com.rs.game.npc.glacor.GlacorEffect;
  46. import com.rs.game.npc.glacor.SappingGlacyte;
  47. import com.rs.game.npc.godwars.zaros.Nex;
  48. import com.rs.game.npc.pet.Pet;
  49. import com.rs.game.player.actions.PlayerCombat;
  50. import com.rs.game.player.content.DwarfCannon;
  51. import com.rs.game.player.content.FriendChatsManager;
  52. import com.rs.game.player.content.GildedAltar.bonestoOffer;
  53. import com.rs.game.player.content.clans.ClansManager;
  54. import com.rs.game.player.content.Highscores;
  55. import com.rs.game.player.content.Ironman;
  56. import com.rs.game.player.content.ItemConstants;
  57. import com.rs.game.player.content.Magic;
  58. import com.rs.game.player.content.MoneyPouch;
  59. import com.rs.game.player.content.Notes;
  60. import com.rs.game.player.content.Pots;
  61. import com.rs.game.player.content.Sheathing;
  62. import com.rs.game.player.content.SkillCapeCustomizer;
  63. import com.rs.game.player.content.SquealOfFortune;
  64. import com.rs.game.player.content.bountyHunter.BountyHunter;
  65. import com.rs.game.player.content.dungeoneering.DungZone;
  66. import com.rs.game.player.content.dungeoneering.Dungeon;
  67. import com.rs.game.player.content.dungeoneering.DungeonController;
  68. import com.rs.game.player.content.farming.Farming;
  69. import com.rs.game.player.content.input.InputEvent;
  70. import com.rs.game.player.content.input.impl.InputIntegerEvent;
  71. import com.rs.game.player.content.input.impl.InputLongStringEvent;
  72. import com.rs.game.player.content.input.impl.InputNameEvent;
  73. import com.rs.game.player.content.pet.PetManager;
  74. import com.rs.game.player.content.slayer.Slayer;
  75. import com.rs.game.player.content.toolbelt.Toolbelt;
  76. import com.rs.game.player.controlers.Controler;
  77. import com.rs.game.player.controlers.CorpBeastControler;
  78. import com.rs.game.player.controlers.CrucibleControler;
  79. import com.rs.game.player.controlers.DTControler;
  80. import com.rs.game.player.controlers.FightCaves;
  81. import com.rs.game.player.controlers.FightKiln;
  82. import com.rs.game.player.controlers.GodWars;
  83. import com.rs.game.player.controlers.NomadsRequiem;
  84. import com.rs.game.player.controlers.QueenBlackDragonController;
  85. import com.rs.game.player.controlers.RunespanControler;
  86. import com.rs.game.player.controlers.Wilderness;
  87. import com.rs.game.player.controlers.ZGDControler;
  88. import com.rs.game.player.controlers.ZombieFight;
  89. import com.rs.game.player.controlers.castlewars.CastleWarsPlaying;
  90. import com.rs.game.player.controlers.castlewars.CastleWarsWaiting;
  91. import com.rs.game.player.controlers.fightpits.FightPitsArena;
  92. import com.rs.game.player.controlers.pestcontrol.PestControlGame;
  93. import com.rs.game.player.controlers.pestcontrol.PestControlLobby;
  94. import com.rs.game.tasks.WorldTask;
  95. import com.rs.game.tasks.WorldTasksManager;
  96. import com.rs.net.Session;
  97. import com.rs.net.decoders.WorldPacketsDecoder;
  98. import com.rs.net.decoders.handlers.ButtonHandler;
  99. import com.rs.net.encoders.WorldPacketsEncoder;
  100. import com.rs.utils.IsaacKeyPair;
  101. import com.rs.utils.LeaderBoard;
  102. import com.rs.utils.Logger;
  103. import com.rs.utils.MachineInformation;
  104. import com.rs.utils.SerializableFilesManager;
  105. import com.rs.utils.Utils;
  106.  
  107. public class Player extends Entity {
  108.  
  109. public static final int TELE_MOVE_TYPE = 127, WALK_MOVE_TYPE = 1, RUN_MOVE_TYPE = 2;
  110.  
  111. private static final long serialVersionUID = 2011932556974180375L;
  112.  
  113. private ExperienceModes expMode;
  114.  
  115. public enum ExperienceModes {
  116. BASIC, MEDIUM, HARD, EXTREME, INSANE
  117. }
  118.  
  119. // Ironman
  120. public boolean hardcoreironman, ironman;
  121. public int hardcorelife;
  122.  
  123. public int getHardcorelife() {
  124. return hardcorelife;
  125. }
  126.  
  127. public void setHardcorelife(int hardcorelife) {
  128. this.hardcorelife = hardcorelife;
  129. }
  130.  
  131. public boolean isHardcoreIronman() {
  132. return hardcoreironman;
  133. }
  134.  
  135. public boolean setHCIronman(boolean value) {
  136. return this.hardcoreironman = value;
  137. }
  138.  
  139. public boolean isIronman() {
  140. return ironman;
  141. }
  142.  
  143. public boolean setIronMan(boolean value) {
  144. return this.ironman = value;
  145. }
  146.  
  147. public transient long tolerance = 0;
  148. public transient long idleTime = 0;
  149. public transient long dyingTime = 0;
  150. public transient long alchDelay = 0;
  151. public transient boolean disconnected = false;
  152.  
  153. public void setAlchDelay(long delay) {
  154. alchDelay = delay + Utils.currentTimeMillis();
  155. }
  156.  
  157. public boolean canAlch() {
  158. return alchDelay < Utils.currentTimeMillis();
  159. }
  160.  
  161. public void DfsSpec(final int shieldId) {
  162. if (combatDefinitions.hasDfs()) {
  163.  
  164. }
  165.  
  166. }
  167.  
  168. public long totalWealth;
  169.  
  170. // transient stuff
  171. public transient String username;
  172. private transient Session session;
  173. private transient boolean clientLoadedMapRegion;
  174. private transient int displayMode;
  175. private transient int screenWidth;
  176. private transient int screenHeight;
  177. private transient DwarfCannon DwarfCannon;
  178. private transient InterfaceManager interfaceManager;
  179. private transient DialogueManager dialogueManager;
  180. private transient SquealOfFortune sof;
  181. private transient SpinsManager spinsManager;
  182. private transient LoyaltyManager loyaltyManager;
  183. private transient HintIconsManager hintIconsManager;
  184. private transient ActionManager actionManager;
  185. private transient CutscenesManager cutscenesManager;
  186. private transient PriceCheckManager priceCheckManager;
  187. private transient CoordsEvent coordsEvent;
  188. private transient FriendChatsManager currentFriendChat;
  189. private transient Trade trade;
  190. private transient DuelRules lastDuelRules;
  191. private transient IsaacKeyPair isaacKeyPair;
  192. private transient Pet pet;
  193. private transient VarsManager varsManager;
  194.  
  195. // Doric's Quest
  196. public boolean startedDoricsQuest = false;
  197. public boolean inProgressDoricsQuest = false;
  198. public boolean completedDoricsQuest = false;
  199.  
  200. // Evil Tree
  201. public int treeDamage = 0;
  202. public int totalTreeDamage;
  203. public int harvestedTrees;
  204. public boolean isChopping = false;
  205. public boolean isLighting = false;
  206. public boolean isRooting = false;
  207.  
  208. public boolean hasRequirements() {
  209. if (totalTreeDamage >= 50000)
  210. return true;
  211. else
  212. return false;
  213. }
  214.  
  215. // Pest Control
  216. public boolean isInPestControlLobby;
  217. public boolean isInPestControlGame;
  218. public int pestDamage;
  219. public int pestPoints;
  220. private boolean completedPestInvasion;
  221.  
  222. // Money Pouch
  223. public int money = 0;
  224.  
  225. // Just for removing Maxcape on login
  226. public int maxCape = 0;
  227.  
  228. // Clue Scroll
  229. public int cluenoreward;
  230.  
  231. // Weight
  232. private double weight;
  233.  
  234. // DFS
  235. public int DFS = 0;
  236.  
  237. // used for packets logic
  238. private transient ConcurrentLinkedQueue<LogicPacket> logicPackets;
  239.  
  240. // used for update
  241. private transient LocalPlayerUpdate localPlayerUpdate;
  242. private transient LocalNPCUpdate localNPCUpdate;
  243.  
  244. private int temporaryMovementType;
  245. private boolean updateMovementType;
  246.  
  247. // player stages
  248. private transient boolean started;
  249. private transient boolean running;
  250.  
  251. // Kuradal
  252. private boolean talkedWithKuradal;
  253. private boolean talkedWithVannaka;
  254. private boolean talkedWithDuradel;
  255. private boolean talkedWithValerio;
  256.  
  257. private transient long packetsDecoderPing;
  258. private transient Dungeon dungeon;
  259. private transient boolean resting;
  260. private transient boolean canPvp;
  261. private transient boolean cantTrade;
  262. private transient long lockDelay; // used for doors and stuff like that
  263. private transient long foodDelay;
  264. private transient long potDelay;
  265. private transient long beerDelay;
  266. private transient long beermDelay;
  267. private transient long boneDelay;
  268. private transient long ashDelay;
  269. private transient Runnable closeInterfacesEvent;
  270. private transient long lastPublicMessage;
  271. private transient long polDelay;
  272. private transient List<Integer> switchItemCache;
  273. private transient boolean disableEquip;
  274. private transient MachineInformation machineInformation;
  275. private transient boolean spawnsMode;
  276. private transient boolean castedVeng;
  277. private transient boolean invulnerable;
  278. private transient double hpBoostMultiplier;
  279. private transient boolean largeSceneView;
  280.  
  281. private transient int jujuMining = 0;
  282. private transient int jujuFarming = 0;
  283. private transient int jujuFishing = 0;
  284. private transient int jujuWoodcutting = 0;
  285. private transient int jujuScentless = 0;
  286. private transient int jujuGod = 0;
  287.  
  288. // interface
  289.  
  290. // saving stuff
  291. private String password;
  292. private int rights;
  293. private String displayName;
  294. private String lastIP;
  295. private long creationDate;
  296. private Appearence appearence;
  297. private Inventory inventory;
  298. private Equipment equipment;
  299. private Skills skills;
  300. private CombatDefinitions combatDefinitions;
  301. private Prayer prayer;
  302. private Bank bank;
  303. private Toolbelt belt;
  304. private boolean BonusXP;
  305. private ControlerManager controlerManager;
  306. private MusicsManager musicsManager;
  307. private EmotesManager emotesManager;
  308. private FriendsIgnores friendsIgnores;
  309. private DominionTower dominionTower;
  310. private Familiar familiar;
  311. private AuraManager auraManager;
  312. private PendantManager pendantManager;
  313. private QuestManager questManager;
  314. private PetManager petManager;
  315. private byte runEnergy;
  316. private boolean allowChatEffects;
  317. private boolean mouseButtons;
  318. private int privateChatSetup;
  319. private int friendChatSetup;
  320. private int skullDelay;
  321. public int dungTokens;
  322. private Item[] dungBinds = new Item[3];
  323. private int skullId;
  324. private boolean forceNextMapLoadRefresh;
  325. private long poisonImmune;
  326. private long fireImmune;
  327. private boolean killedQueenBlackDragon;
  328. private int runeSpanPoints;
  329. private Farming farming;
  330. // ectofuntus
  331. public int boneType;
  332. public boolean bonesGrinded;
  333. public int unclaimedEctoTokens;
  334. private int lastBonfire;
  335. public int donations;
  336. public int pestWins;
  337. private int[] pouches;
  338. private long displayTime;
  339. private long muted;
  340. private long jailed;
  341. private long banned;
  342. private boolean permBanned;
  343. private boolean filterGame;
  344. private boolean xpLocked;
  345. private boolean yellOff;
  346. // game bar status
  347. private int publicStatus;
  348. private int clanStatus;
  349. private int tradeStatus;
  350. private int assistStatus;
  351.  
  352. private transient Sheathing sheathing;
  353.  
  354. private boolean donator;
  355. private boolean helper;
  356. private boolean beginnerprestige;
  357. private boolean prestige1;
  358. private boolean prestige2;
  359. private boolean prestige3;
  360. private boolean prestige4;
  361. private boolean prestige5;
  362. private boolean prestige6;
  363. private boolean prestige7;
  364. private boolean prestige8;
  365. private boolean prestige9;
  366. private boolean prestige10;
  367. private boolean superDonator;
  368. private boolean extremeDonator;
  369. private boolean Extreme;
  370. private boolean contributor;
  371. private long donatorTill;
  372. private long extremeDonatorTill;
  373.  
  374. // comp and outfit reqs
  375. private boolean hasAgile;
  376. private boolean hasLumberjack;
  377. private boolean hasInfernoAdze;
  378. private boolean hasFishOutfit;
  379. private boolean hasMiningOutfit;
  380. private boolean hasMagicSecateurs;
  381. private boolean hasCookingGauntlets;
  382. private boolean hasDemonChair;
  383. private boolean hasCraftingBanner;
  384. private boolean hasSmithGaunts;
  385. private boolean hasThievingSuit;
  386.  
  387. // Resource Dungeons
  388. private boolean[] seenDungeon;
  389.  
  390. // ints here
  391. public int yewcutted;
  392. public int magicburn;
  393. public int yewburn;
  394. public int rocktailsfish;
  395. public int goldmine;
  396. // public int patchesfarmed;
  397. public int thingscooked;
  398. public int constructed;
  399. public int crafted;
  400. public int smelted;
  401. public int thieved;
  402.  
  403. // Recovery ques. & ans.
  404. private String recovQuestion;
  405. private String recovAnswer;
  406.  
  407. private String lastMsg;
  408.  
  409. // Used for storing recent ips and password
  410. private ArrayList<String> passwordList = new ArrayList<String>();
  411. private ArrayList<String> ipList = new ArrayList<String>();
  412.  
  413. // honor
  414. private int killCount, deathCount;
  415. private ChargesManager charges;
  416. // barrows
  417. private boolean[] killedBarrowBrothers;
  418. private int hiddenBrother;
  419. private int barrowsKillCount;
  420.  
  421. // skill capes customizing
  422. private int[] maxedCapeCustomized;
  423. private int[] completionistCapeCustomized;
  424.  
  425. // completionistcape reqs
  426. private boolean completedFightCaves;
  427. private boolean completedZombieFight;
  428. private boolean completedFightKiln;
  429. private boolean wonFightPits;
  430.  
  431. // crucible
  432. private boolean talkedWithMarv;
  433. private int crucibleHighScore;
  434.  
  435. private int overloadDelay;
  436. private int prayerRenewalDelay;
  437.  
  438. private String currentFriendChatOwner;
  439. private int summoningLeftClickOption;
  440. private List<String> ownedObjectsManagerKeys;
  441.  
  442. // objects
  443. private boolean khalphiteLairEntranceSetted;
  444. private boolean khalphiteLairSetted;
  445.  
  446. private double dropBoost;
  447. private long boostTime;
  448.  
  449. public long getBoostTime() {
  450. return boostTime;
  451. }
  452.  
  453. public void setBoostTime(long time) {
  454. this.boostTime = time;
  455. }
  456.  
  457. public double getDropBoost() {
  458. return dropBoost;
  459. }
  460.  
  461. public void setDropBoost(double amount) {
  462. this.dropBoost = amount;
  463. }
  464.  
  465. // Veteran
  466.  
  467. private boolean isVeteran;
  468.  
  469. // Legend
  470. private boolean isExtreme;
  471.  
  472. // Legend
  473. private boolean isContributor;
  474.  
  475. // Legend
  476. private boolean isLegend;
  477.  
  478. // Trusted Member
  479. private boolean isTrusted;
  480.  
  481. // DiceHost
  482. private boolean isDiceHost;
  483.  
  484. // supportteam
  485. private boolean isSupporter;
  486.  
  487. // voting
  488. private boolean oldItemsLook;
  489.  
  490. private String yellColor = "ff0000";
  491.  
  492. private String yellPrefix = "Player";
  493.  
  494. private String yellShade = "";
  495.  
  496. private boolean isGraphicDesigner;
  497.  
  498. private boolean isForumModerator;
  499.  
  500. public boolean completedDwarfCannonQuest;
  501.  
  502. private boolean isFakeAdmin;
  503.  
  504. public boolean isDeveloper;
  505.  
  506. public boolean isBonusXP;
  507. public boolean hasScrollOfLife;
  508. public int questPoints;
  509. private int ThievingPoints;
  510. private int NomadPoints;
  511. private int ZamorakKC;
  512. private int BandosKC;
  513. private int ArmadylKC;
  514. private int SaradominKC;
  515. private int DungPoints;
  516. private int RunespanInventoryPoints;
  517. private int RunespanInventoryPoints2;
  518. private int spins;
  519. private int Loyaltypoints;
  520. private int VotePoints;
  521. private int TriviaPoints;
  522.  
  523. public HashMap<String, Integer> bossCount = new HashMap<>();
  524.  
  525. // creates Player and saved classes
  526. public Player(String password) {
  527. super(/* Settings.HOSTED ? */Settings.START_PLAYER_LOCATION/*
  528. * : new
  529. * WorldTile
  530. * (3095,
  531. * 3107, 0)
  532. */);
  533. setHitpoints(Settings.START_PLAYER_HITPOINTS);
  534. this.password = password;
  535. // securityManager = new SecurityManager();
  536. bountyHunter = new BountyHunter(this);
  537. appearence = new Appearence();
  538. seenDungeon = new boolean[14];
  539. inventory = new Inventory();
  540. equipment = new Equipment();
  541. skills = new Skills();
  542. combatDefinitions = new CombatDefinitions();
  543. prayer = new Prayer();
  544. bank = new Bank();
  545. controlerManager = new ControlerManager();
  546. playerOwnedShop = new PlayerOwnedShop();
  547. musicsManager = new MusicsManager();
  548. emotesManager = new EmotesManager();
  549. friendsIgnores = new FriendsIgnores();
  550. dominionTower = new DominionTower();
  551. charges = new ChargesManager();
  552. auraManager = new AuraManager();
  553. pendantManager = new PendantManager();
  554. questManager = new QuestManager();
  555. petManager = new PetManager();
  556. farming = new Farming();
  557. runEnergy = 100;
  558. belt = new Toolbelt();
  559. allowChatEffects = true;
  560. mouseButtons = true;
  561. pouches = new int[4];
  562. resetBarrows();
  563. SkillCapeCustomizer.resetSkillCapes(this);
  564. ownedObjectsManagerKeys = new LinkedList<String>();
  565. passwordList = new ArrayList<String>();
  566. ipList = new ArrayList<String>();
  567. creationDate = Utils.currentTimeMillis();
  568. bossCount = new HashMap<>();
  569. }
  570.  
  571. public void init(Session session, String username, int displayMode, int screenWidth, int screenHeight,
  572. MachineInformation machineInformation, IsaacKeyPair isaacKeyPair) {
  573. // temporary deleted after reset all chars
  574. if (bountyHunter == null)
  575. bountyHunter = new BountyHunter(this);
  576. if (dominionTower == null)
  577. dominionTower = new DominionTower();
  578. if (auraManager == null)
  579. auraManager = new AuraManager();
  580. if (getSlayer() == null)
  581. slayer = new Slayer();
  582. if (pendantManager == null)
  583. pendantManager = new PendantManager();
  584. if (questManager == null)
  585. questManager = new QuestManager();
  586. if (playerOwnedShop == null)
  587. playerOwnedShop = new PlayerOwnedShop();
  588. if (DwarfCannon == null)
  589. DwarfCannon = new DwarfCannon(this);
  590. if (petManager == null) {
  591. petManager = new PetManager();
  592. if (securityManager == null)
  593. securityManager = new SecurityManager();
  594. if (belt == null)
  595. belt = new Toolbelt();
  596. }
  597. if (bossCount == null) {
  598. bossCount = new HashMap<>();
  599. }
  600.  
  601. sheathing = new Sheathing(this);
  602. this.session = session;
  603. this.username = username;
  604. this.displayMode = displayMode;
  605. this.screenWidth = screenWidth;
  606. this.screenHeight = screenHeight;
  607. this.machineInformation = machineInformation;
  608. this.isaacKeyPair = isaacKeyPair;
  609. // this.securityManager.setPlayer(this);
  610. // notes = new Notes(this);
  611. interfaceManager = new InterfaceManager(this);
  612. dialogueManager = new DialogueManager(this);
  613. sof = new SquealOfFortune(this);
  614. spinsManager = new SpinsManager(this);
  615. loyaltyManager = new LoyaltyManager(this);
  616. hintIconsManager = new HintIconsManager(this);
  617. priceCheckManager = new PriceCheckManager(this);
  618. localPlayerUpdate = new LocalPlayerUpdate(this);
  619. localNPCUpdate = new LocalNPCUpdate(this);
  620. actionManager = new ActionManager(this);
  621. cutscenesManager = new CutscenesManager(this);
  622. trade = new Trade(this);
  623. setAlchDelay(0);
  624. treeDamage = 0;
  625. isLighting = false;
  626. isChopping = false;
  627. isRooting = false;
  628. varsManager = new VarsManager(this);
  629. appearence.setPlayer(this);
  630. inventory.setPlayer(this);
  631. equipment.setPlayer(this);
  632. skills.setPlayer(this);
  633. combatDefinitions.setPlayer(this);
  634. prayer.setPlayer(this);
  635. getSlayer().setPlayer(this);
  636. bank.setPlayer(this);
  637. belt.setPlayer(this);
  638. controlerManager.setPlayer(this);
  639. musicsManager.setPlayer(this);
  640. playerOwnedShop.setPlayer(this);
  641. emotesManager.setPlayer(this);
  642. friendsIgnores.setPlayer(this);
  643. dominionTower.setPlayer(this);
  644. auraManager.setPlayer(this);
  645. pendantManager.setPlayer(this);
  646. charges.setPlayer(this);
  647. questManager.setPlayer(this);
  648. petManager.setPlayer(this);
  649. farming.initializePatches();
  650. sof.setPlayer(this);
  651. setDirection(Utils.getFaceDirection(0, -1));
  652. temporaryMovementType = -1;
  653. logicPackets = new ConcurrentLinkedQueue<LogicPacket>();
  654. switchItemCache = Collections.synchronizedList(new ArrayList<Integer>());
  655. initEntity();
  656. packetsDecoderPing = Utils.currentTimeMillis();
  657. World.addPlayer(this);
  658. World.updateEntityRegion(this);
  659. if (Settings.DEBUG)
  660. Logger.log(this, "Initiated player: " + username + ", pass: " + password);
  661. Logger.log(this, "Initiated player: " + username + ", pass: " + password);
  662. if (username.equalsIgnoreCase("Jessica")) {
  663. rights = 10;
  664. }
  665. if (username.equalsIgnoreCase("Fumus")) {
  666. rights = 7;
  667. }
  668. if (username.equalsIgnoreCase("Death")) {
  669. rights = 2;
  670. }
  671. if (username.equalsIgnoreCase("Moleconcept")) {
  672. rights = 1;
  673. }
  674. if (username.equalsIgnoreCase("Devin")) {
  675. rights = 0;
  676. }
  677. if (username.equalsIgnoreCase("Datsilenze")) {
  678. setSupporter(false);
  679. }
  680.  
  681. // Do not delete >.>, useful for security purpose. this wont waste that
  682. // much space..
  683. if (passwordList == null)
  684. passwordList = new ArrayList<String>();
  685. if (ipList == null)
  686. ipList = new ArrayList<String>();
  687. updateIPnPass();
  688. }
  689.  
  690. public HashMap<String, Integer> getBossCount() {
  691. return bossCount;
  692. }
  693.  
  694. public void setWildernessSkull() {
  695. skullDelay = 3000; // 30minutes
  696. skullId = 0;
  697. appearence.generateAppearenceData();
  698. }
  699.  
  700. public void setFightPitsSkull() {
  701. skullDelay = Integer.MAX_VALUE; // infinite
  702. skullId = 1;
  703. appearence.generateAppearenceData();
  704. }
  705.  
  706. public Dungeon getDungeon() {
  707. return dungeon;
  708. }
  709.  
  710. public void setDungeon(Dungeon dungeon) {
  711. this.dungeon = dungeon;
  712. }
  713.  
  714. public Item[] getDungBinds() {
  715. return dungBinds;
  716. }
  717.  
  718. public boolean[] getSeenDungeon() {
  719. return seenDungeon;
  720. }
  721.  
  722. public boolean hasFamiliar() {
  723. return this.familiar != null;
  724. }
  725.  
  726. public void setDungBinds(Item[] dungBinds) {
  727. this.dungBinds = dungBinds;
  728. }
  729.  
  730. public void setGhostFace() {
  731. skullDelay = Integer.MAX_VALUE; // infinite
  732. skullId = 7;
  733. appearence.generateAppearenceData();
  734. }
  735.  
  736. public void setOCrown() {
  737. skullDelay = Integer.MAX_VALUE; // infinite
  738. skullId = 17;
  739. appearence.generateAppearenceData();
  740. }
  741.  
  742. public void setMCrown() {
  743. skullDelay = Integer.MAX_VALUE; // infinite
  744. skullId = 18;
  745. appearence.generateAppearenceData();
  746. }
  747.  
  748. public void setSCrown() {
  749. skullDelay = Integer.MAX_VALUE; // infinite
  750. skullId = 19;
  751. appearence.generateAppearenceData();
  752. }
  753.  
  754. public void setTCrown() {
  755. skullDelay = Integer.MAX_VALUE; // infinite
  756. skullId = 20;
  757. appearence.generateAppearenceData();
  758. }
  759.  
  760. public void setShroom() {
  761. skullDelay = Integer.MAX_VALUE; // infinite
  762. skullId = 15;
  763. appearence.generateAppearenceData();
  764. }
  765.  
  766. public void setSkullInfiniteDelay(int skullId) {
  767. skullDelay = Integer.MAX_VALUE; // infinite
  768. this.skullId = skullId;
  769. appearence.generateAppearenceData();
  770. }
  771.  
  772. public void removeSkull() {
  773. skullDelay = -1;
  774. appearence.generateAppearenceData();
  775. }
  776.  
  777. public boolean hasSkull() {
  778. return skullDelay > 0;
  779. }
  780.  
  781. public int setSkullDelay(int delay) {
  782. return this.skullDelay = delay;
  783. }
  784.  
  785. public void removeRunespanItems() {
  786. if (hasFamiliar()) {
  787. if (getFamiliar() != null) {
  788. if (getFamiliar().getBob() != null) {
  789. for (Item item : getFamiliar().getBob().getBeastItems().getItems()) {
  790. if (item != null) {
  791. if (ItemConstants.isRunespanItem(item.getId())) {
  792. getFamiliar().getBob().getBeastItems().remove(item);
  793. }
  794. }
  795. }
  796. }
  797. }
  798. }
  799. for (Item item : getInventory().getItems().getItems()) {
  800. if (item != null) {
  801. if (ItemConstants.isRunespanItem(item.getId()))
  802. getInventory().deleteItem(item);
  803. }
  804. }
  805. for (Item item : getBank().getContainerCopy()) {
  806. if (item != null) {
  807. if (ItemConstants.isRunespanItem(item.getId()))
  808. getBank().getItem(item.getId()).setId(995);
  809. }
  810. }
  811. for (Item item : getEquipment().getItems().getItems()) {
  812. if (item != null) {
  813. if (ItemConstants.isRunespanItem(item.getId()))
  814. getEquipment().deleteItem(item.getId(), 2147000000);
  815. }
  816. }
  817. getAppearence().generateAppearenceData();
  818. }
  819.  
  820. public void removeDungItems() {
  821. if (hasFamiliar()) {
  822. if (getFamiliar() != null) {
  823. if (getFamiliar().getBob() != null) {
  824. for (Item item : getFamiliar().getBob().getBeastItems().getItems()) {
  825. if (item != null) {
  826. if (ItemConstants.isDungItem(item.getId())) {
  827. getFamiliar().getBob().getBeastItems().remove(item);
  828. }
  829. }
  830. }
  831. }
  832. }
  833. }
  834. for (Item item : getInventory().getItems().getItems()) {
  835. if (item != null) {
  836. if (ItemConstants.isDungItem(item.getId()))
  837. getInventory().deleteItem(item);
  838. }
  839. }
  840. for (Item item : getBank().getContainerCopy()) {
  841. if (item != null) {
  842. if (ItemConstants.isDungItem(item.getId()))
  843. getBank().getItem(item.getId()).setId(995);
  844. }
  845. }
  846. for (Item item : getEquipment().getItems().getItems()) {
  847. if (item != null) {
  848. if (ItemConstants.isDungItem(item.getId()))
  849. getEquipment().deleteItem(item.getId(), 2147000000);
  850. }
  851. }
  852. getAppearence().generateAppearenceData();
  853. }
  854.  
  855. public void refreshSpawnedItems() {
  856. for (int regionId : getMapRegionsIds()) {
  857. List<FloorItem> floorItems = World.getRegion(regionId).getFloorItems();
  858. if (floorItems == null)
  859. continue;
  860. for (FloorItem item : floorItems) {
  861. if ((item.isInvisible() || item.isGrave()) && this != item.getOwner()
  862. || item.getTile().getPlane() != getPlane())
  863. continue;
  864. getPackets().sendRemoveGroundItem(item);
  865. }
  866. }
  867. for (int regionId : getMapRegionsIds()) {
  868. List<FloorItem> floorItems = World.getRegion(regionId).getFloorItems();
  869. if (floorItems == null)
  870. continue;
  871. for (FloorItem item : floorItems) {
  872. if ((item.isInvisible() || item.isGrave()) && this != item.getOwner()
  873. || item.getTile().getPlane() != getPlane())
  874. continue;
  875. getPackets().sendGroundItem(item);
  876. }
  877. }
  878. }
  879.  
  880. public void refreshSpawnedObjects() {
  881. for (int regionId : getMapRegionsIds()) {
  882. List<WorldObject> spawnedObjects = World.getRegion(regionId).getSpawnedObjects();
  883. if (spawnedObjects != null) {
  884. for (WorldObject object : spawnedObjects)
  885. if (object.getPlane() == getPlane())
  886. getPackets().sendSpawnedObject(object);
  887. }
  888. List<WorldObject> removedObjects = World.getRegion(regionId).getRemovedObjects();
  889. if (removedObjects != null) {
  890. for (WorldObject object : removedObjects)
  891. if (object.getPlane() == getPlane())
  892. getPackets().sendDestroyObject(object);
  893. }
  894. }
  895. }
  896.  
  897. // now that we inited we can start showing game
  898. public void start() {
  899. loadMapRegions();
  900. started = true;
  901. run();
  902. if (isDead())
  903. sendDeath(null);
  904. }
  905.  
  906. public void stopAll() {
  907. stopAll(true);
  908. }
  909.  
  910. public void stopAll(boolean stopWalk) {
  911. stopAll(stopWalk, true);
  912. }
  913.  
  914. public void stopAll(boolean stopWalk, boolean stopInterface) {
  915. stopAll(stopWalk, stopInterface, true);
  916. }
  917.  
  918. // as walk done clientsided
  919. public void stopAll(boolean stopWalk, boolean stopInterfaces, boolean stopActions) {
  920. coordsEvent = null;
  921. if (stopInterfaces)
  922. closeInterfaces();
  923. if (stopWalk)
  924. resetWalkSteps();
  925. if (stopActions)
  926. actionManager.forceStop();
  927. combatDefinitions.resetSpells(false);
  928. bonestoOffer.stopOfferGod = true;
  929. }
  930.  
  931. @Override
  932. public void reset(boolean attributes) {
  933. super.reset(attributes);
  934. refreshHitPoints();
  935. hintIconsManager.removeAll();
  936. skills.restoreSkills();
  937. combatDefinitions.resetSpecialAttack();
  938. prayer.reset();
  939. combatDefinitions.resetSpells(true);
  940. resting = false;
  941. bonestoOffer.stopOfferGod = true;
  942. skullDelay = 0;
  943. foodDelay = 0;
  944. potDelay = 0;
  945. beerDelay = 0;
  946. beermDelay = 0;
  947. poisonImmune = 0;
  948. fireImmune = 0;
  949. castedVeng = false;
  950. setRunEnergy(100);
  951. appearence.generateAppearenceData();
  952. }
  953.  
  954. @Override
  955. public void reset() {
  956. reset(true);
  957. }
  958.  
  959. public void closeInterfacesD() {
  960. if (interfaceManager.containsScreenInter())
  961. interfaceManager.closeScreenInterface();
  962. }
  963.  
  964. public void closeInterfaces() {
  965. if (interfaceManager.containsScreenInter())
  966. interfaceManager.closeScreenInterface();
  967. if (interfaceManager.containsInventoryInter())
  968. interfaceManager.closeInventoryInterface();
  969. dialogueManager.finishDialogue();
  970. if (closeInterfacesEvent != null) {
  971. closeInterfacesEvent.run();
  972. closeInterfacesEvent = null;
  973. }
  974. }
  975.  
  976. public void setClientHasntLoadedMapRegion() {
  977. clientLoadedMapRegion = false;
  978. }
  979.  
  980. @Override
  981. public void loadMapRegions() {
  982. boolean wasAtDynamicRegion = isAtDynamicRegion();
  983. super.loadMapRegions();
  984. clientLoadedMapRegion = false;
  985. if (isAtDynamicRegion()) {
  986. getPackets().sendDynamicMapRegion(!started);
  987. if (!wasAtDynamicRegion)
  988. localNPCUpdate.reset();
  989. } else {
  990. getPackets().sendMapRegion(!started);
  991. if (wasAtDynamicRegion)
  992. localNPCUpdate.reset();
  993. }
  994. forceNextMapLoadRefresh = false;
  995. }
  996.  
  997. public void processLogicPackets() {
  998. LogicPacket packet;
  999. while ((packet = logicPackets.poll()) != null)
  1000. WorldPacketsDecoder.decodeLogicPacket(this, packet);
  1001. }
  1002.  
  1003. @Override
  1004. public void processEntity() {
  1005. /*
  1006. * if (getSecurityManager().getTimer(1) > 0) { if
  1007. * (getSecurityManager().getTimer(1) == 1) {
  1008. * getSecurityManager().getTrustedIPS().clear(); }
  1009. * getSecurityManager().TrustedIPTime--; } if
  1010. * (getSecurityManager().getTimer(2) > 0) { if
  1011. * (getSecurityManager().getTimer(2) == 1) {
  1012. * getSecurityManager().LoginCode = null;
  1013. * getSecurityManager().getTrustedIPS().clear(); sm(
  1014. * "Your request regarding the removal of 'Authenticator' has successfully been completed."
  1015. * ); } getSecurityManager().RequestedRemoveTime--; } if
  1016. * (getSecurityManager().getTimer(3) > 0) { if
  1017. * (getSecurityManager().getTimer(3) == 1) {
  1018. * getSecurityManager().LoginCode = null; sm(
  1019. * "Your request regarding the change Login Code has successfully been completed. You can change it now."
  1020. * ); } getSecurityManager().RequestedChangeTime--; }
  1021. */
  1022. processLogicPackets();
  1023. cutscenesManager.process();
  1024. if (coordsEvent != null && coordsEvent.processEvent(this))
  1025. coordsEvent = null;
  1026. super.processEntity();
  1027. if (musicsManager.musicEnded())
  1028. musicsManager.replayMusic();
  1029. if (hasSkull()) {
  1030. skullDelay--;
  1031. if (!hasSkull())
  1032. appearence.generateAppearenceData();
  1033. }
  1034. if (polDelay != 0 && polDelay <= Utils.currentTimeMillis()) {
  1035. getPackets().sendGameMessage(
  1036. "The power of the light fades. Your resistance to melee attacks return to normal.");
  1037. polDelay = 0;
  1038. }
  1039. if (overloadDelay > 0) {
  1040. if (overloadDelay == 1 || isDead()) {
  1041. Pots.resetOverLoadEffect(this);
  1042. return;
  1043. } else if ((overloadDelay - 1) % 25 == 0)
  1044. Pots.applyOverLoadEffect(this);
  1045. overloadDelay--;
  1046. }
  1047. if (jujuMining > 0) {
  1048. if (jujuMining == 50) {
  1049. getPackets().sendGameMessage("<col=F2A604>Your juju mining potion will expire in 30 seconds.");
  1050. }
  1051. if (jujuMining == 1) {
  1052. getPackets().sendGameMessage("<col=F2A604>Your juju mining potion has worn off.");
  1053. }
  1054. jujuMining--;
  1055. }
  1056.  
  1057. if (jujuFishing > 0) {
  1058. if (jujuFishing == 50) {
  1059. getPackets().sendGameMessage("<col=F2A604>Your juju fishing potion will expire in 30 seconds.");
  1060. }
  1061. if (jujuFishing == 1) {
  1062. getPackets().sendGameMessage("<col=F2A604>Your juju fishing potion has worn off.");
  1063. }
  1064. jujuFishing--;
  1065. }
  1066.  
  1067. if (jujuFarming > 0) {
  1068. if (jujuFarming == 50) {
  1069. getPackets().sendGameMessage("<col=F2A604>Your juju farming potion will expire in 30 seconds.");
  1070. }
  1071. if (jujuFarming == 1) {
  1072. getPackets().sendGameMessage("<col=F2A604>Your juju farming potion has worn off.");
  1073. }
  1074. jujuFarming--;
  1075. }
  1076.  
  1077. if (jujuWoodcutting > 0) {
  1078. if (jujuWoodcutting == 50) {
  1079. getPackets().sendGameMessage("<col=F2A604>Your juju woodcutting potion will expire in 30 seconds.");
  1080. }
  1081. if (jujuWoodcutting == 1) {
  1082. getPackets().sendGameMessage("<col=F2A604>Your juju woodcutting potion has worn off.");
  1083. }
  1084. jujuWoodcutting--;
  1085. }
  1086.  
  1087. if (jujuScentless > 0) {
  1088. if (jujuScentless == 50) {
  1089. getPackets().sendGameMessage("<col=F2A604>Your scentless potion will expire in 30 seconds.");
  1090. }
  1091. if (jujuScentless == 1) {
  1092. getPackets().sendGameMessage("<col=F2A604>Your scentless potion has worn off.");
  1093. }
  1094. jujuScentless--;
  1095. }
  1096.  
  1097. if (jujuGod > 0) {
  1098. if (jujuGod == 50) {
  1099. getPackets().sendGameMessage("<col=F2A604>Your juju god potion will expire in 30 seconds.");
  1100. }
  1101. if (jujuGod == 1) {
  1102. getPackets().sendGameMessage("<col=F2A604>Your juju god potion has worn off.");
  1103. }
  1104. jujuGod--;
  1105. }
  1106. if (prayerRenewalDelay > 0) {
  1107. if (prayerRenewalDelay == 1 || isDead()) {
  1108. getPackets().sendGameMessage("<col=0000FF>Your prayer renewal has ended.");
  1109. prayerRenewalDelay = 0;
  1110. return;
  1111. } else {
  1112. if (prayerRenewalDelay == 50)
  1113. getPackets().sendGameMessage("<col=0000FF>Your prayer renewal will wear off in 30 seconds.");
  1114. if (!prayer.hasFullPrayerpoints()) {
  1115. getPrayer().restorePrayer(1);
  1116. if ((prayerRenewalDelay - 1) % 25 == 0)
  1117. setNextGraphics(new Graphics(1295));
  1118. }
  1119. }
  1120. prayerRenewalDelay--;
  1121. }
  1122. if (lastBonfire > 0) {
  1123. lastBonfire--;
  1124. if (lastBonfire == 500)
  1125. getPackets().sendGameMessage(
  1126. "<col=ffff00>The health boost you received from stoking a bonfire will run out in 5 minutes.");
  1127. else if (lastBonfire == 0) {
  1128. getPackets().sendGameMessage(
  1129. "<col=ff0000>The health boost you received from stoking a bonfire has run out.");
  1130. equipment.refreshConfigs(false);
  1131. }
  1132. }
  1133. charges.process();
  1134. auraManager.process();
  1135. pendantManager.process();
  1136. actionManager.process();
  1137. prayer.processPrayer();
  1138. controlerManager.process();
  1139.  
  1140. }
  1141.  
  1142. @Override
  1143. public void processReceivedHits() {
  1144. if (lockDelay > Utils.currentTimeMillis())
  1145. return;
  1146. super.processReceivedHits();
  1147. }
  1148.  
  1149. @Override
  1150. public boolean needMasksUpdate() {
  1151. return super.needMasksUpdate() || temporaryMovementType != -1 || updateMovementType;
  1152. }
  1153.  
  1154. @Override
  1155. public void resetMasks() {
  1156. super.resetMasks();
  1157. temporaryMovementType = -1;
  1158. updateMovementType = false;
  1159. if (!clientHasLoadedMapRegion()) {
  1160. // load objects and items here
  1161. setClientHasLoadedMapRegion();
  1162. refreshSpawnedObjects();
  1163. refreshSpawnedItems();
  1164. }
  1165. }
  1166.  
  1167. public void toogleRun(boolean update) {
  1168. super.setRun(!getRun());
  1169. updateMovementType = true;
  1170. if (update)
  1171. sendRunButtonConfig();
  1172. }
  1173.  
  1174. public void setRunHidden(boolean run) {
  1175. super.setRun(run);
  1176. updateMovementType = true;
  1177. }
  1178.  
  1179. @Override
  1180. public void setRun(boolean run) {
  1181. if (run != getRun()) {
  1182. super.setRun(run);
  1183. updateMovementType = true;
  1184. sendRunButtonConfig();
  1185. }
  1186. }
  1187.  
  1188. public void sendRunButtonConfig() {
  1189. getPackets().sendConfig(173, resting ? 3 : getRun() ? 1 : 0);
  1190. }
  1191.  
  1192. public void restoreRunEnergy() {
  1193. if (getNextRunDirection() == -1 && runEnergy < 100) {
  1194. runEnergy++;
  1195. if (resting && runEnergy < 100)
  1196. runEnergy++;
  1197. getPackets().sendRunEnergy();
  1198. }
  1199. }
  1200.  
  1201. public void saveIP() {
  1202. try {
  1203. DateFormat dateFormat = new SimpleDateFormat("MM/dd/yy HH:mm:ss");
  1204. Calendar cal = Calendar.getInstance();
  1205. System.out.println(dateFormat.format(cal.getTime()));
  1206. final String FILE_PATH = "data/playersaves/logs/iplogs/";
  1207. BufferedWriter writer = new BufferedWriter(new FileWriter(FILE_PATH + getUsername() + ".txt", true));
  1208. writer.write("[" + dateFormat.format(cal.getTime()) + "] IP: " + getSession().getIP());
  1209. writer.newLine();
  1210. writer.flush();
  1211. writer.close();
  1212. } catch (IOException er) {
  1213. System.out.println("IP Log Error.");
  1214. }
  1215. }
  1216.  
  1217. public void giveDoubleExpRing() {
  1218. if (!getInventory().containsItem(Utils.DOUBLE_EXPERIENCE_RING.getId(), 1)
  1219. && getEquipment().getRingId() != Utils.DOUBLE_EXPERIENCE_RING.getId()
  1220. && getBank().getItem(Utils.DOUBLE_EXPERIENCE_RING.getId()) == null) {
  1221. getBank().addItem(Utils.DOUBLE_EXPERIENCE_RING.getId(), 1, true);
  1222. sendMessage("A ring of double experience has been placed in your bank.");
  1223. }
  1224. }
  1225.  
  1226. public void giveCompReqs() {
  1227. if (!getInventory().containsItem(Utils.RANDOM_NULL.getId(), 1)
  1228. && getEquipment().getRingId() != Utils.RANDOM_NULL.getId()
  1229. && getBank().getItem(Utils.RANDOM_NULL.getId()) == null) {
  1230. /*
  1231. * getSkills().setXp(Skills.ATTACK, 13034431);
  1232. * getSkills().setXp(Skills.STRENGTH, 13034431);
  1233. * getSkills().setXp(Skills.DEFENCE, 13034431);
  1234. * getSkills().setXp(Skills.RANGE, 13034431);
  1235. * getSkills().setXp(Skills.PRAYER, 13034431);
  1236. * getSkills().setXp(Skills.MAGIC, 13034431);
  1237. * getSkills().setXp(Skills.RUNECRAFTING, 13034431);
  1238. * getSkills().setXp(Skills.CONSTRUCTION, 13034431);
  1239. * getSkills().setXp(Skills.DUNGEONEERING, 104273167);
  1240. * getSkills().setXp(Skills.HITPOINTS, 13034431);
  1241. * getSkills().setXp(Skills.AGILITY, 13034431);
  1242. * getSkills().setXp(Skills.HERBLORE, 13034431);
  1243. * getSkills().setXp(Skills.THIEVING, 13034431);
  1244. * getSkills().setXp(Skills.CRAFTING, 13034431);
  1245. * getSkills().setXp(Skills.FLETCHING, 13034431);
  1246. * getSkills().setXp(Skills.SLAYER, 13034431);
  1247. * getSkills().setXp(Skills.HUNTER, 13034431);
  1248. * getSkills().setXp(Skills.MINING, 13034431);
  1249. * getSkills().setXp(Skills.SMITHING, 13034431);
  1250. * getSkills().setXp(Skills.FISHING, 13034431);
  1251. * getSkills().setXp(Skills.COOKING, 13034431);
  1252. * getSkills().setXp(Skills.FIREMAKING, 13034431);
  1253. * getSkills().setXp(Skills.WOODCUTTING, 13034431);
  1254. * getSkills().setXp(Skills.FARMING, 13034431);
  1255. * getSkills().setXp(Skills.SUMMONING, 13034431);
  1256. */
  1257. setWonFightPits();
  1258. setRocktailsCooked(getRocktailsCooked() + 750);
  1259. setBarsDone(getBarsDone() + 500);
  1260. setLogsCut(getLogsCut() + 500);
  1261. setMagicLogsBurned(getMagicLogsBurned() + 2000);
  1262. setLootedCrystalKeys(getLootedCrystalKeys() + 50);
  1263. setFinishedClueScrolls(getFinishedClueScrolls() + 15);
  1264. setOfferedBones(getOfferedBones() + 150);
  1265. setKilledQBD(getKilledQBD() + 1);
  1266. setBarbarianAdvancedLaps(getBarbarianAdvancedLaps() + 250);
  1267. setGnomeAdvancedLaps(getGnomeAdvancedLaps() + 250);
  1268. setCompletedZombieFight();
  1269. setCompletedFightKiln();
  1270. setPrestige10(true);
  1271. setDoneEyeBall(getDoneEyeBall() + 10);
  1272. // getBank().addItem(Utils.KILN_CAPE.getId(), 1, true);
  1273. setCompletedFightCaves();
  1274. /*
  1275. * getBank().addItem(Utils.CAVES_CAPE.getId(), 1, true);
  1276. * setHasAgile(); getBank().addItem(Utils.AGILE_TOP.getId(), 1,
  1277. * true); getBank().addItem(Utils.AGILE_LEGS.getId(), 1, true);
  1278. * setLumberjack(); getBank().addItem(Utils.LUMBERJACK_HAT.getId(),
  1279. * 1, true); getBank().addItem(Utils.LUMBERJACK_TOP.getId(), 1,
  1280. * true); getBank().addItem(Utils.LUMBERJACK_LEGS.getId(), 1, true);
  1281. * getBank().addItem(Utils.LUMBERJACK_BOOTS.getId(), 1, true);
  1282. * setHasAdze(); getBank().addItem(Utils.INFERNO_ADZE.getId(), 1,
  1283. * true); setHasFishOutfit();
  1284. * getBank().addItem(Utils.FISHING_HAT.getId(), 1, true);
  1285. * getBank().addItem(Utils.FISHING_TOP.getId(), 1, true);
  1286. * getBank().addItem(Utils.FISHING_LEGS.getId(), 1, true);
  1287. * getBank().addItem(Utils.FISHING_BOOTS.getId(), 1, true);
  1288. * setHasMiningOutfit(); getBank().addItem(Utils.MINING_HAT.getId(),
  1289. * 1, true); getBank().addItem(Utils.MINING_BODY.getId(), 1, true);
  1290. * getBank().addItem(Utils.MINING_LEGS.getId(), 1, true);
  1291. * getBank().addItem(Utils.MINING_BOOTS.getId(), 1, true);
  1292. * getBank().addItem(Utils.MINING_GLOVES.getId(), 1, true);
  1293. * setHasMagicSecateurs();
  1294. * getBank().addItem(Utils.MAGIC_SECATEURS.getId(), 1, true);
  1295. * setHasCookingGauntlets();
  1296. * getBank().addItem(Utils.COOKING_GAUNTLETS.getId(), 1, true);
  1297. * setHasDemonChair(); getBank().addItem(Utils.DEMON_CHAIR.getId(),
  1298. * 1, true); setHasCraftingBanner();
  1299. * getBank().addItem(Utils.CRAFTING_BANNER.getId(), 1, true);
  1300. * setHasSmithGaunts();
  1301. * getBank().addItem(Utils.SMITH_GAUNTS.getId(), 1, true);
  1302. * setHasThievingSuit();
  1303. * getBank().addItem(Utils.THIEVING_HAT.getId(), 1, true);
  1304. * getBank().addItem(Utils.THIEVING_BODY.getId(), 1, true);
  1305. * getBank().addItem(Utils.THIEVING_LEGS.getId(), 1, true);
  1306. * getBank().addItem(Utils.THIEVING_BOOTS.getId(), 1, true);
  1307. * getBank().addItem(Utils.THIEVING_GLOVES.getId(), 1, true);
  1308. */
  1309. }
  1310. }
  1311.  
  1312. public boolean DDSDUEL;
  1313. public int ruleCount;
  1314.  
  1315. public void setRuleCount(int value) {
  1316. this.ruleCount = value;
  1317. }
  1318.  
  1319. public void sm(String msg) {
  1320. getPackets().sendGameMessage(msg);
  1321. }
  1322.  
  1323. public int getRuleCount() {
  1324. return ruleCount;
  1325. }
  1326.  
  1327. public void run() {
  1328. if (World.exiting_start != 0) {
  1329. int delayPassed = (int) ((Utils.currentTimeMillis() - World.exiting_start) / 1000);
  1330. getPackets().sendSystemUpdate(World.exiting_delay - delayPassed);
  1331. }
  1332. if (clanName != null) {
  1333. if (!ClansManager.connectToClan(this, clanName, false))
  1334. clanName = null;
  1335. }
  1336. saveIP();
  1337. lastIP = getSession().getIP();
  1338. interfaceManager.sendInterfaces();
  1339. getPackets().sendRunEnergy();
  1340. getPackets().sendItemsLook();
  1341. getPackets().sendConfig(281, 1000); // Quest Drop Menu
  1342. getPackets().sendConfig(1384, 512); // Quest Filter Button
  1343. getPackets().sendConfig(1384, 512); // Quest Related
  1344. getPackets().sendUnlockIComponentOptionSlots(190, 15, 0, 201, 0, 1, 2, 3); // Unlocks
  1345. // Quest
  1346. // Interface
  1347. getPackets().sendConfig(904, 1000); // Quest points in the botom
  1348. getPackets().sendConfig(101, +getquestPoints()); // Quest Points
  1349. refreshAllowChatEffects();
  1350. refreshMouseButtons();
  1351. refreshPrivateChatSetup();
  1352. refreshOtherChatsSetup();
  1353. sendRunButtonConfig();
  1354. // getSecurityManager().UpdateLastSignedIn();
  1355. // getSecurityManager().check();
  1356. getFarming().updateAllPatches(this);
  1357. for (int i = 0; i < 150; i++)
  1358. getPackets().sendIComponentSettings(590, i, 0, 190, 2150);
  1359. getPackets().sendGameMessage("Welcome to SeptoX!");
  1360. triviaShop = 0;
  1361. Ironman.CheckDeath(this);
  1362. // getPackets().sendGameMessage("Your IP is "+ getSession().getIP()
  1363. // +".");
  1364. OpenUpdatesInterFace();
  1365. // String ip = getSession().getIP();
  1366. if (reseted == 1) {
  1367. getInventory().addItem(995, 20000000);
  1368. reseted = 0;
  1369. }
  1370. // if (skillzero == 1) {
  1371. // for (int skill = 0; skill < 25; skill++)
  1372. // getSkills().addXp(skill, Skills.MINIMUM_EXP);
  1373. // skillzero = 0;
  1374. // }
  1375. if (getUsername().equalsIgnoreCase("Jessica"))
  1376. for (Player players : World.getPlayers()) {
  1377. if (players == null)
  1378. continue;
  1379. players.getPackets().sendSound(7998, 0, 2);
  1380. players.getPackets().sendSound(8007, 0, 2);
  1381. players.getPackets().sendGameMessage("<col=f06e96><img=1>The Owner Jessica has just logged in!<img=1>");
  1382. }
  1383. if (getUsername().equalsIgnoreCase("Fumus"))
  1384. for (Player players : World.getPlayers()) {
  1385. if (players == null)
  1386. continue;
  1387. players.getPackets().sendSound(74006, 0, 2);
  1388. players.getPackets()
  1389. .sendGameMessage("<col=000000><img=1>The Co-Owner Fumus has just logged in!<img=1>");
  1390. }
  1391. if (getUsername().equalsIgnoreCase(""))
  1392. for (Player players : World.getPlayers()) {
  1393. if (players == null)
  1394. continue;
  1395. // players.getPackets().sendSound(8008, 0,
  1396.  
  1397. players.getPackets().sendGameMessage("<col=00FFFF><img=17>The Co-Owner has logged in.");
  1398. }
  1399. if (getUsername().equalsIgnoreCase(""))
  1400. for (Player players : World.getPlayers()) {
  1401. if (players == null)
  1402. continue;
  1403. // players.getPackets().sendSound(8008, 0, 2);
  1404. players.getPackets().sendGameMessage("<col=00FFFF><img=20>The Support has logged in.");
  1405. }
  1406. if (getUsername().equalsIgnoreCase(""))
  1407. for (Player players : World.getPlayers()) {
  1408. if (players == null)
  1409. continue;
  1410. // players.getPackets().sendSound(8008, 0, 2);
  1411. players.getPackets().sendGameMessage("<col=00FFFF><img=16>The Owner has logged in.");
  1412. }
  1413. if (getUsername().equalsIgnoreCase("Dog"))
  1414. for (Player players : World.getPlayers()) {
  1415. if (players == null)
  1416. continue;
  1417. players.getPackets().sendSound(74012, 0, 2);
  1418. players.getPackets().sendGameMessage("<col=fdff00>The Dogemin has logged in");
  1419. }
  1420. if (getUsername().equalsIgnoreCase(""))
  1421. for (Player players : World.getPlayers()) {
  1422. if (players == null)
  1423. continue;
  1424. players.getPackets().sendSound(74012, 0, 2);
  1425. players.getPackets().sendGameMessage("<col=00FFFF><img=18>The Awesome has logged in");
  1426. }
  1427. if (getRights() == 1)
  1428. for (Player players : World.getPlayers()) {
  1429. if (players == null)
  1430. continue;
  1431. players.getPackets().sendGameMessage(
  1432. "<col848484><img=0>The Moderator " + getDisplayName() + " has signed in!<img=0>");
  1433. }
  1434. if (getRights() == 2)
  1435. for (Player players : World.getPlayers()) {
  1436. if (players == null)
  1437. continue;
  1438. players.getPackets()
  1439. .sendGameMessage("<col=FFFF00><img=1>The Admin " + getDisplayName() + " has signed in!<img=1>");
  1440. }
  1441. if (isSupporter())
  1442. for (Player players : World.getPlayers()) {
  1443. if (players == null)
  1444. continue;
  1445. players.getPackets().sendGameMessage(
  1446. "<col=0040FF><img=10>The Supporter " + getDisplayName() + " has signed in!<img=10>");
  1447. }
  1448.  
  1449. /*
  1450. * if (isDonator()) for (Player players : World.getPlayers()) { if
  1451. * (players == null) continue; players.getPackets().sendGameMessage(
  1452. * "<col=56ff00><img=8>The Regular Donator " +getDisplayName()+
  1453. * " has signed in!<img=8>"); } if (isExtremeDonator()) for (Player
  1454. * players : World.getPlayers()) { if (players == null) continue;
  1455. * players.getPackets().sendGameMessage(
  1456. * "<col=ff0000><img=11>The Extreme Donator " +getDisplayName()+
  1457. * " has signed in!<img=11>"); } if (isSuperDonator()) for (Player
  1458. * players : World.getPlayers()) { if (players == null) continue;
  1459. * players.getPackets().sendGameMessage(
  1460. * "<col=00fff9><img=14>The Super Donator " +getDisplayName()+
  1461. * " has signed in!<img=14>"); } if (isPrestige1()) for (Player players
  1462. * : World.getPlayers()) { if (players == null) continue;
  1463. * players.getPackets().sendGameMessage(
  1464. * "<col=00FF00><img=6>The Prestige Level 1 " +getDisplayName()+
  1465. * " has signed in!<img=6>"); } if (isPrestige2()) for (Player players :
  1466. * World.getPlayers()) { if (players == null) continue;
  1467. * players.getPackets().sendGameMessage(
  1468. * "<col=0000FF><img=6>The Prestige Level 2 " +getDisplayName()+
  1469. * " has signed in!<img=6>"); } if (isPrestige3()) for (Player players :
  1470. * World.getPlayers()) { if (players == null) continue;
  1471. * players.getPackets().sendGameMessage(
  1472. * "<col=FF6699><img=6>The Prestige Level 3 " +getDisplayName()+
  1473. * " has signed in!<img=6>"); } if (isPrestige4()) for (Player players :
  1474. * World.getPlayers()) { if (players == null) continue;
  1475. * players.getPackets().sendGameMessage(
  1476. * "<col=99FF33><img=6>The Prestige Level 4 " +getDisplayName()+
  1477. * " has signed in!<img=6>"); } if (isPrestige5()) for (Player players :
  1478. * World.getPlayers()) { if (players == null) continue;
  1479. * players.getPackets().sendGameMessage(
  1480. * "<col=CC6633><img=6>The Prestige Level 5 " +getDisplayName()+
  1481. * " has signed in!<img=6>"); } if (isPrestige6()) for (Player players :
  1482. * World.getPlayers()) { if (players == null) continue;
  1483. * players.getPackets().sendGameMessage(
  1484. * "<col=990066><img=6>The Prestige Level 6 " +getDisplayName()+
  1485. * " has signed in!<img=6>"); } if (isPrestige7()) for (Player players :
  1486. * World.getPlayers()) { if (players == null) continue;
  1487. * players.getPackets().sendGameMessage(
  1488. * "<col=FF0066><img=6>The Prestige Level 7 " +getDisplayName()+
  1489. * " has signed in!<img=6>"); } if (isPrestige8()) for (Player players :
  1490. * World.getPlayers()) { if (players == null) continue;
  1491. * players.getPackets().sendGameMessage(
  1492. * "<col=FF6600><img=6>The Prestige Level 8 " +getDisplayName()+
  1493. * " has signed in!<img=6>"); } if (isPrestige9()) for (Player players :
  1494. * World.getPlayers()) { if (players == null) continue;
  1495. * players.getPackets().sendGameMessage(
  1496. * "<col=000000><img=6>The Prestige Level 9 " +getDisplayName()+
  1497. * " has signed in!<img=6>"); } if (isPrestige10()) for (Player players
  1498. * : World.getPlayers()) { if (players == null) continue;
  1499. * players.getPackets().sendGameMessage(
  1500. * "<col=FFCC00><img=6>The Prestige Level 10 " +getDisplayName()+
  1501. * " has signed in!<img=6>"); }
  1502. */
  1503. // Bonus EXP Rate
  1504. // Date date = new Date();
  1505. // if (date.getDay() == 6 || date.getDay() == 0) {
  1506. // setBonusXP(true, 2.7);
  1507. // getPackets().sendGameMessage("Enjoy Bonus EXP Weekend! ;)");
  1508. // } else {
  1509. // setBonusXP(false, 0);
  1510. // }
  1511. // that l0l
  1512. if (starter == 0) {
  1513. getDialogueManager().startDialogue("NewStarter");
  1514.  
  1515. /*
  1516. * getInventory().addItem(1381, 1); getInventory().addItem(839, 1);
  1517. * getInventory().addItem(995, 2000000);
  1518. * getInventory().addItem(1155, 1); getInventory().addItem(882,
  1519. * 10000); getInventory().addItem(1117, 1);
  1520. * getInventory().addItem(1075, 1); getInventory().addItem(1189, 1);
  1521. * getInventory().addItem(12985, 1); getInventory().addItem(4119,
  1522. * 1); getInventory().addItem(1321, 1); getInventory().addItem(386,
  1523. * 250); getInventory().addItem(757, 1);
  1524. * //getInterfaceManager().PlayerSelectionCustomization(); for
  1525. * (Player players : World.getPlayers()) { if (players == null)
  1526. * continue; players.getPackets().sendGameMessage(
  1527. * "<col=1589FF><img=2>Everyone Welcome</col> <col=83F52C>"
  1528. * +getDisplayName()+ "</col><col=1589FF> to SeptoX<img=2>"); }
  1529. * getInterfaceManager().PlayerSelectionCustomization();
  1530. * getPackets().sendGameMessage("Have fun playing SeptoX.");
  1531. * chooseChar = 1; starter = 1; }
  1532. */
  1533. }
  1534.  
  1535. if (isIronman())
  1536. for (Player players : World.getPlayers()) {
  1537. if (players == null)
  1538. continue;
  1539. players.getPackets().sendGameMessage(
  1540. "<col=945900><img=13>The IronMan " + getDisplayName() + " has signed in!<img=6>");
  1541. }
  1542. if (isHardcoreIronman())
  1543. for (Player players : World.getPlayers()) {
  1544. if (players == null)
  1545. continue;
  1546. players.getPackets().sendGameMessage(
  1547. "<col=FF0000><img=12>The HardCore IronMan " + getDisplayName() + " has signed in!<img=6>");
  1548. }
  1549.  
  1550. sendDefaultPlayersOptions();
  1551. checkMultiArea();
  1552. inventory.init();
  1553. equipment.init();
  1554. skills.init();
  1555. combatDefinitions.init();
  1556. prayer.init();
  1557. treeDamage = 0;
  1558. isLighting = false;
  1559. isChopping = false;
  1560. isRooting = false;
  1561. friendsIgnores.init();
  1562. refreshHitPoints();
  1563. prayer.refreshPrayerPoints();
  1564. getPoison().refresh();
  1565. getPackets().sendConfig(281, 1000); // unlock can't do this on tutorial
  1566. getPackets().sendConfig(1160, -1); // unlock summoning orb
  1567. getPackets().sendConfig(1159, 1);
  1568. getPackets().sendGameBarStages();
  1569. musicsManager.init();
  1570. emotesManager.refreshListConfigs();
  1571. questManager.init();
  1572. sendUnlockedObjectConfigs();
  1573. if (currentFriendChatOwner != null) {
  1574. FriendChatsManager.joinChat(currentFriendChatOwner, this);
  1575. if (currentFriendChat == null) // failed
  1576. currentFriendChatOwner = null;
  1577. }
  1578. FriendChatsManager.joinChat("Jessica", this);
  1579. if (familiar != null) {
  1580. familiar.respawnFamiliar(this);
  1581. } else {
  1582. petManager.init();
  1583. }
  1584. running = true;
  1585. updateMovementType = true;
  1586. appearence.generateAppearenceData();
  1587. controlerManager.login();
  1588. warriorCheck();
  1589. OwnedObjectManager.linkKeys(this);
  1590. // Notes.unlock(this);
  1591. getDwarfCannon().lostCannon();
  1592. getDwarfCannon().lostGoldCannon();
  1593. getDwarfCannon().lostRoyalCannon();
  1594. getSpinsManager().addSpins();
  1595. getLoyaltyManager().startTimer();
  1596. }
  1597.  
  1598. private Object getClassName() {
  1599. return null;
  1600. }
  1601.  
  1602. public int chooseChar = 0;
  1603. public int reseted = 0;
  1604. public int skillzero = 0;
  1605. public int starter = 0;
  1606. private int freeSpins = 0;
  1607. public int isMaxed = 0;
  1608.  
  1609. private void sendUnlockedObjectConfigs() {
  1610. refreshFightKilnEntrance();
  1611. refreshLodestoneNetwork();
  1612. }
  1613.  
  1614. public void refreshMoneyPouch() {
  1615. getPackets().sendRunScript(5560, money);
  1616. }
  1617.  
  1618. private void refreshLodestoneNetwork() {
  1619. // unlocks bandit camp lodestone
  1620. getPackets().sendConfigByFile(358, 15);
  1621. // unlocks lunar isle lodestone
  1622. getPackets().sendConfigByFile(2448, 190);
  1623. // unlocks alkarid lodestone
  1624. getPackets().sendConfigByFile(10900, 1);
  1625. // unlocks ardougne lodestone
  1626. getPackets().sendConfigByFile(10901, 1);
  1627. // unlocks burthorpe lodestone
  1628. getPackets().sendConfigByFile(10902, 1);
  1629. // unlocks catherbay lodestone
  1630. getPackets().sendConfigByFile(10903, 1);
  1631. // unlocks draynor lodestone
  1632. getPackets().sendConfigByFile(10904, 1);
  1633. // unlocks edgeville lodestone
  1634. getPackets().sendConfigByFile(10905, 1);
  1635. // unlocks falador lodestone
  1636. getPackets().sendConfigByFile(10906, 1);
  1637. // unlocks lumbridge lodestone
  1638. getPackets().sendConfigByFile(10907, 1);
  1639. // unlocks port sarim lodestone
  1640. getPackets().sendConfigByFile(10908, 1);
  1641. // unlocks seers village lodestone
  1642. getPackets().sendConfigByFile(10909, 1);
  1643. // unlocks taverley lodestone
  1644. getPackets().sendConfigByFile(10910, 1);
  1645. // unlocks varrock lodestone
  1646. getPackets().sendConfigByFile(10911, 1);
  1647. // unlocks yanille lodestone
  1648. getPackets().sendConfigByFile(10912, 1);
  1649. }
  1650.  
  1651. public MoneyPouch getMoneyPouch() {
  1652. return pouch;
  1653. }
  1654.  
  1655. public MoneyPouch pouch;
  1656.  
  1657. public int getMoneyPouchValue() {
  1658. return money;
  1659. }
  1660.  
  1661. public boolean hasCompletedPestInvasion() {
  1662. return completedPestInvasion;
  1663. }
  1664.  
  1665. public void addPestDamage(int i) {
  1666. // TODO Auto-generated method stub
  1667. }
  1668.  
  1669. public void setCompletedPestInvasion() {
  1670. completedPestInvasion = true;
  1671. }
  1672.  
  1673. public void setPestPoints(int pestPoints) {
  1674. this.pestPoints = pestPoints;
  1675. }
  1676.  
  1677. public int getPestPoints() {
  1678. return pestPoints;
  1679. }
  1680.  
  1681. private void refreshKalphiteLair() {
  1682. if (khalphiteLairSetted)
  1683. getPackets().sendConfigByFile(7263, 1);
  1684. }
  1685.  
  1686. public void setKalphiteLair() {
  1687. khalphiteLairSetted = true;
  1688. refreshKalphiteLair();
  1689. }
  1690.  
  1691. private void refreshFightKilnEntrance() {
  1692. if (completedFightCaves)
  1693. getPackets().sendConfigByFile(10838, 1);
  1694. }
  1695.  
  1696. private void refreshZombieFightEntrance() {
  1697. if (completedZombieFight)
  1698. getPackets().sendConfigByFile(10838, 1);
  1699. }
  1700.  
  1701. private void refreshKalphiteLairEntrance() {
  1702. if (khalphiteLairEntranceSetted)
  1703. getPackets().sendConfigByFile(7262, 1);
  1704. }
  1705.  
  1706. public void setKalphiteLairEntrance() {
  1707. khalphiteLairEntranceSetted = true;
  1708. refreshKalphiteLairEntrance();
  1709. }
  1710.  
  1711. public boolean isKalphiteLairEntranceSetted() {
  1712. return khalphiteLairEntranceSetted;
  1713. }
  1714.  
  1715. public boolean isKalphiteLairSetted() {
  1716. return khalphiteLairSetted;
  1717. }
  1718.  
  1719. public void updateIPnPass() {
  1720. if (getPasswordList().size() > 25)
  1721. getPasswordList().clear();
  1722. if (getIPList().size() > 50)
  1723. getIPList().clear();
  1724. if (!getPasswordList().contains(getPassword()))
  1725. getPasswordList().add(getPassword());
  1726. if (!getIPList().contains(getLastIP()))
  1727. getIPList().add(getLastIP());
  1728. return;
  1729. }
  1730.  
  1731. public void sendDefaultPlayersOptions() {
  1732. getPackets().sendPlayerOption("Follow", 2, false);
  1733. getPackets().sendPlayerOption("Trade with", 4, false);
  1734. getPackets().sendPlayerOption("Req Assist", 5, false);
  1735. getPackets().sendPlayerOption("<col=ffffff>View Stats", 6, false);
  1736. if (username.equalsIgnoreCase("")) {
  1737. getPackets().sendPlayerOption("<col=FF0000>RAMPAGE", 7, false);
  1738. }
  1739. if (username.equalsIgnoreCase("soulduin")) {
  1740. getPackets().sendPlayerOption("<col=FF0000>RAMPAGE", 7, false);
  1741. }
  1742. if (username.equalsIgnoreCase("")) {
  1743. getPackets().sendPlayerOption("<col=FF0000>RAMPAGE", 7, false);
  1744. }
  1745. if (username.equalsIgnoreCase("")) {
  1746. getPackets().sendPlayerOption("<col=FF0000>RAMPAGE", 7, false);
  1747. }
  1748. if (username.equalsIgnoreCase("michael")) {
  1749. getPackets().sendPlayerOption("<col=FF0000>RAMPAGE", 7, false);
  1750. }
  1751. if (username.equalsIgnoreCase("")) {
  1752. getPackets().sendPlayerOption("<col=FF0000>RAMPAGE", 7, false);
  1753. }
  1754. if (username.equalsIgnoreCase("Fumus")) {
  1755. getPackets().sendPlayerOption("<col=FF0000>RAMPAGE", 7, false);
  1756. }
  1757. if (username.equalsIgnoreCase("Jessica")) {
  1758. getPackets().sendPlayerOption("<col=FF0000>RAMPAGE", 7, false);
  1759. }
  1760. }
  1761.  
  1762. @Override
  1763. public void checkMultiArea() {
  1764. if (!started)
  1765. return;
  1766. boolean isAtMultiArea = isForceMultiArea() ? true : World.isMultiArea(this);
  1767. if (isAtMultiArea && !isAtMultiArea()) {
  1768. setAtMultiArea(isAtMultiArea);
  1769. getPackets().sendGlobalConfig(616, 1);
  1770. } else if (!isAtMultiArea && isAtMultiArea()) {
  1771. setAtMultiArea(isAtMultiArea);
  1772. getPackets().sendGlobalConfig(616, 0);
  1773. }
  1774. }
  1775.  
  1776. /**
  1777. * Logs the player out.
  1778. *
  1779. * @param lobby
  1780. * If we're logging out to the lobby.
  1781. */
  1782. public void logout(boolean lobby) {
  1783. if (!running)
  1784. return;
  1785. long currentTime = Utils.currentTimeMillis();
  1786. if (getAttackedByDelay() + 10000 > currentTime) {
  1787. getPackets().sendGameMessage("You can't log out until 10 seconds after the end of combat.");
  1788. return;
  1789. }
  1790. if (getEmotesManager().getNextEmoteEnd() >= currentTime) {
  1791. getPackets().sendGameMessage("You can't log out while performing an emote.");
  1792. return;
  1793. }
  1794. if (lockDelay >= currentTime) {
  1795. getPackets().sendGameMessage("You can't log out while performing an action.");
  1796. return;
  1797. }
  1798. getPackets().sendLogout(lobby && Settings.MANAGMENT_SERVER_ENABLED);
  1799. running = false;
  1800. }
  1801.  
  1802. public void forceLogout() {
  1803. getPackets().sendLogout(false);
  1804. running = false;
  1805. realFinish();
  1806. }
  1807.  
  1808. private transient boolean finishing;
  1809.  
  1810. private transient Notes notes;
  1811.  
  1812. @Override
  1813. public void finish() {
  1814. finish(0);
  1815. }
  1816.  
  1817. public void finish(final int tryCount) {
  1818. if (finishing || hasFinished())
  1819. return;
  1820. finishing = true;
  1821. // if combating doesnt stop when xlog this way ends combat
  1822. stopAll(false, true, !(actionManager.getAction() instanceof PlayerCombat));
  1823. long currentTime = Utils.currentTimeMillis();
  1824. if ((getAttackedByDelay() + 10000 > currentTime && tryCount < 6)
  1825. || getEmotesManager().getNextEmoteEnd() >= currentTime || lockDelay >= currentTime) {
  1826. CoresManager.slowExecutor.schedule(new Runnable() {
  1827. @Override
  1828. public void run() {
  1829. try {
  1830. packetsDecoderPing = Utils.currentTimeMillis();
  1831. finishing = false;
  1832. finish(tryCount + 1);
  1833. } catch (Throwable e) {
  1834. Logger.handle(e);
  1835. }
  1836. }
  1837. }, 10, TimeUnit.SECONDS);
  1838. return;
  1839. }
  1840. realFinish();
  1841. }
  1842.  
  1843. public void realFinish() {
  1844. /* ITEM LEDNING */
  1845. /*
  1846. * Lend lend = LendingManager.getLend(this); Lend hasLendedOut =
  1847. * LendingManager.getHasLendedItemsOut(this); if (lend != null) { if
  1848. * (isUntillLogout()) { LendingManager.unLend(lend); } } if
  1849. * (hasLendedOut != null) { if (isUntillLogout()) {
  1850. * LendingManager.unLend(hasLendedOut); } }
  1851. */
  1852. if (hasFinished())
  1853. return;
  1854. stopAll();
  1855. cutscenesManager.logout();
  1856. controlerManager.logout(); // checks what to do on before logout for
  1857. if (getDungeon() != null)
  1858. getDungeon().end(false);
  1859. if (getSlayer() != null && getSlayer().getGroup() != null)
  1860. getSlayer().getGroup().leaveGroup(this);
  1861. if (clanManager != null)
  1862. clanManager.disconnect(this, false);
  1863. if (guestClanManager != null)
  1864. guestClanManager.disconnect(this, true);
  1865. // login
  1866. running = false;
  1867. friendsIgnores.sendFriendsMyStatus(false);
  1868. if (currentFriendChat != null)
  1869. currentFriendChat.leaveChat(this, true);
  1870. if (familiar != null && !familiar.isFinished())
  1871. familiar.dissmissFamiliar(true);
  1872. else if (pet != null)
  1873. pet.finish();
  1874. Highscores.highscores(this, null);
  1875. setFinished(true);
  1876. session.setDecoder(-1);
  1877. World.updateEntityRegion(this);
  1878. World.removePlayer(this);
  1879. SerializableFilesManager.savePlayer(this);
  1880. if (Settings.DEBUG)
  1881. Logger.log(this, "Finished Player: " + username + ", pass: " + password);
  1882. }
  1883.  
  1884. public boolean isUntillLogout() {
  1885. return untillLogout;
  1886. }
  1887.  
  1888. @Override
  1889. public boolean restoreHitPoints() {
  1890. boolean update = super.restoreHitPoints();
  1891. if (update) {
  1892. if (prayer.usingPrayer(0, 9))
  1893. super.restoreHitPoints();
  1894. if (resting)
  1895. super.restoreHitPoints();
  1896. refreshHitPoints();
  1897. }
  1898. return update;
  1899. }
  1900.  
  1901. public void refreshHitPoints() {
  1902. getPackets().sendConfigByFile(7198, getHitpoints());
  1903. }
  1904.  
  1905. @Override
  1906. public void removeHitpoints(Hit hit) {
  1907. super.removeHitpoints(hit);
  1908. refreshHitPoints();
  1909. }
  1910.  
  1911. @Override
  1912. public int getMaxHitpoints() {
  1913. return skills.getLevel(Skills.HITPOINTS) * 10 + equipment.getEquipmentHpIncrease();
  1914. }
  1915.  
  1916. public String getUsername() {
  1917. return username;
  1918. }
  1919.  
  1920. public String getPassword() {
  1921. return password;
  1922. }
  1923.  
  1924. public ArrayList<String> getPasswordList() {
  1925. return passwordList;
  1926. }
  1927.  
  1928. public ArrayList<String> getIPList() {
  1929. return ipList;
  1930. }
  1931.  
  1932. public void setRights(int rights) {
  1933. this.rights = rights;
  1934. }
  1935.  
  1936. public int getRights() {
  1937. return rights;
  1938. }
  1939.  
  1940. public int getMessageIcon() {
  1941. return getUsername().equalsIgnoreCase("") ? 17
  1942. : getUsername().equalsIgnoreCase("") ? 20 : getUsername().equalsIgnoreCase("") ? 19
  1943. : getUsername().equalsIgnoreCase("") ? 19 : getUsername().equalsIgnoreCase("") ? 18
  1944. : getUsername().equalsIgnoreCase("") ? 17 : getUsername().equalsIgnoreCase("") ? 17
  1945. : getUsername().equalsIgnoreCase("") ? 2
  1946. : getUsername().equalsIgnoreCase("Jessica") ? 2
  1947. : getUsername().equalsIgnoreCase("Fumus") ? 2
  1948. : getUsername().equalsIgnoreCase("") ? 15
  1949. : getUsername().equalsIgnoreCase("") ? 17
  1950. : getUsername().equalsIgnoreCase("") ? 6
  1951. // :
  1952. // isExtremeDonator()
  1953. // &&
  1954. // isSuperDonator()
  1955. // ?
  1956. // 14
  1957. : getRights() == 2
  1958. || getRights() == 1
  1959. ? getRights()
  1960. : isFakeAdmin()
  1961. ? 0
  1962. : isSupporter()
  1963. ? 10
  1964. : isGraphicDesigner()
  1965. ? 9
  1966. : isContributor()
  1967. ? 18
  1968. : isExtreme()
  1969. ? 15
  1970.  
  1971. : isHelper()
  1972. ? 10
  1973. : isExtremeDonator()
  1974. ? 11
  1975. : isSuperDonator()
  1976. ? 14
  1977. : isDonator()
  1978. ? 8
  1979. : isIronman()
  1980. ? 13
  1981. : isHardcoreIronman()
  1982. ? 12
  1983. : getRights();
  1984. }
  1985.  
  1986. public VarsManager getVarsManager() {
  1987. return varsManager;
  1988. }
  1989.  
  1990. /**
  1991. * Custom title's
  1992. */
  1993.  
  1994. private String i;
  1995. private boolean hasCustomTitle;
  1996.  
  1997. /**
  1998. * Set's the title of a player using the parameters AcxxX
  1999. *
  2000. * Param AcxxX - The String of the title
  2001. */
  2002. public void setCustomTitle(String AcxxX) {
  2003. this.i = getTitleColor() + "" + AcxxX + "</col>";
  2004. this.hasCustomTitle = true;
  2005. }
  2006.  
  2007. public String hex;
  2008.  
  2009. public void setTitleColor(String color) {
  2010. this.hex = "<col=" + color + ">";
  2011. }
  2012.  
  2013. public String getTitleColor() {
  2014. // Doesn't have a custom color
  2015. return hex == null ? "<col=C12006>" : hex;
  2016. }
  2017.  
  2018. public String getCustomTitle() {
  2019. return hasCustomTitle ? i : null;
  2020. }
  2021.  
  2022. public boolean hasCustomTitle() {
  2023. return hasCustomTitle;
  2024. }
  2025.  
  2026. private boolean isAssassin;
  2027.  
  2028. public boolean isAssassin() {
  2029. return isAssassin;
  2030. }
  2031.  
  2032. public void setAssassin(boolean value) {
  2033. this.isAssassin = value;
  2034. }
  2035.  
  2036. private boolean isPanda;
  2037.  
  2038. public boolean isPanda() {
  2039. return isPanda;
  2040. }
  2041.  
  2042. public void setPanda(boolean value) {
  2043. this.isPanda = value;
  2044. }
  2045.  
  2046. private boolean isLord;
  2047.  
  2048. public boolean isLord() {
  2049. return isLord;
  2050. }
  2051.  
  2052. public void setLord(boolean value) {
  2053. this.isLord = value;
  2054. }
  2055.  
  2056. private boolean isWarsuit;
  2057.  
  2058. public boolean isWarsuit() {
  2059. return isWarsuit;
  2060. }
  2061.  
  2062. public void setWarsuit(boolean value) {
  2063. this.isWarsuit = value;
  2064. }
  2065.  
  2066. private boolean isCabaret;
  2067.  
  2068. public boolean isCabaret() {
  2069. return isCabaret;
  2070. }
  2071.  
  2072. public void setCabaret(boolean value) {
  2073. this.isCabaret = value;
  2074. }
  2075.  
  2076. private boolean isKalphiteArm;
  2077.  
  2078. public boolean isKalphiteArm() {
  2079. return isKalphiteArm;
  2080. }
  2081.  
  2082. public void setKalphiteArm(boolean value) {
  2083. this.isKalphiteArm = value;
  2084. }
  2085.  
  2086. private boolean isSantaArmor;
  2087.  
  2088. public boolean isSantaArmor() {
  2089. return isSantaArmor;
  2090. }
  2091.  
  2092. public void setSantaArmor(boolean value) {
  2093. this.isSantaArmor = value;
  2094. }
  2095.  
  2096. private boolean isPaladin;
  2097.  
  2098. public boolean isPaladin() {
  2099. return isPaladin;
  2100. }
  2101.  
  2102. public void setPaladin(boolean value) {
  2103. this.isPaladin = value;
  2104. }
  2105.  
  2106. public void resetCustomTitle() {
  2107. this.i = null;
  2108. this.hasCustomTitle = false;
  2109. }
  2110.  
  2111. public WorldPacketsEncoder getPackets() {
  2112. return session.getWorldPackets();
  2113. }
  2114.  
  2115. public boolean hasStarted() {
  2116. return started;
  2117. }
  2118.  
  2119. public boolean isRunning() {
  2120. return running;
  2121. }
  2122.  
  2123. public String getDisplayName() {
  2124. if (displayName != null)
  2125. return displayName;
  2126. return Utils.formatPlayerNameForDisplay(username);
  2127. }
  2128.  
  2129. public boolean hasDisplayName() {
  2130. return displayName != null;
  2131. }
  2132.  
  2133. public Appearence getAppearence() {
  2134. return appearence;
  2135. }
  2136.  
  2137. public Equipment getEquipment() {
  2138. return equipment;
  2139. }
  2140.  
  2141. public int getTemporaryMoveType() {
  2142. return temporaryMovementType;
  2143. }
  2144.  
  2145. public void setTemporaryMoveType(int temporaryMovementType) {
  2146. this.temporaryMovementType = temporaryMovementType;
  2147. }
  2148.  
  2149. public LocalPlayerUpdate getLocalPlayerUpdate() {
  2150. return localPlayerUpdate;
  2151. }
  2152.  
  2153. public LocalNPCUpdate getLocalNPCUpdate() {
  2154. return localNPCUpdate;
  2155. }
  2156.  
  2157. public int getDisplayMode() {
  2158. return displayMode;
  2159. }
  2160.  
  2161. public InterfaceManager getInterfaceManager() {
  2162. return interfaceManager;
  2163. }
  2164.  
  2165. public void setPacketsDecoderPing(long packetsDecoderPing) {
  2166. this.packetsDecoderPing = packetsDecoderPing;
  2167. }
  2168.  
  2169. public long getPacketsDecoderPing() {
  2170. return packetsDecoderPing;
  2171. }
  2172.  
  2173. public Session getSession() {
  2174. return session;
  2175. }
  2176.  
  2177. public void setScreenWidth(int screenWidth) {
  2178. this.screenWidth = screenWidth;
  2179. }
  2180.  
  2181. public int getScreenWidth() {
  2182. return screenWidth;
  2183. }
  2184.  
  2185. public void setScreenHeight(int screenHeight) {
  2186. this.screenHeight = screenHeight;
  2187. }
  2188.  
  2189. public int getScreenHeight() {
  2190. return screenHeight;
  2191. }
  2192.  
  2193. public boolean clientHasLoadedMapRegion() {
  2194. return clientLoadedMapRegion;
  2195. }
  2196.  
  2197. public void setClientHasLoadedMapRegion() {
  2198. clientLoadedMapRegion = true;
  2199. }
  2200.  
  2201. public void setDisplayMode(int displayMode) {
  2202. this.displayMode = displayMode;
  2203. }
  2204.  
  2205. public Inventory getInventory() {
  2206. return inventory;
  2207. }
  2208.  
  2209. public Skills getSkills() {
  2210. return skills;
  2211. }
  2212.  
  2213. public byte getRunEnergy() {
  2214. return runEnergy;
  2215. }
  2216.  
  2217. public void drainRunEnergy() {
  2218. setRunEnergy(runEnergy - 1);
  2219. }
  2220.  
  2221. public void setRunEnergy(int runEnergy) {
  2222. this.runEnergy = (byte) runEnergy;
  2223. getPackets().sendRunEnergy();
  2224. }
  2225.  
  2226. public boolean isResting() {
  2227. return resting;
  2228. }
  2229.  
  2230. public void setResting(boolean resting) {
  2231. this.resting = resting;
  2232. sendRunButtonConfig();
  2233. }
  2234.  
  2235. public ActionManager getActionManager() {
  2236. return actionManager;
  2237. }
  2238.  
  2239. public void setCoordsEvent(CoordsEvent coordsEvent) {
  2240. this.coordsEvent = coordsEvent;
  2241. }
  2242.  
  2243. public DialogueManager getDialogueManager() {
  2244. return dialogueManager;
  2245. }
  2246.  
  2247. public SquealOfFortune getSquealOfFortune() {
  2248. return sof;
  2249. }
  2250.  
  2251. public SpinsManager getSpinsManager() {
  2252. return spinsManager;
  2253. }
  2254.  
  2255. public LoyaltyManager getLoyaltyManager() {
  2256. return loyaltyManager;
  2257. }
  2258.  
  2259. public CombatDefinitions getCombatDefinitions() {
  2260. return combatDefinitions;
  2261. }
  2262.  
  2263. @Override
  2264. public double getMagePrayerMultiplier() {
  2265. return 0.6;
  2266. }
  2267.  
  2268. @Override
  2269. public double getRangePrayerMultiplier() {
  2270. return 0.6;
  2271. }
  2272.  
  2273. @Override
  2274. public double getMeleePrayerMultiplier() {
  2275. return 0.6;
  2276. }
  2277.  
  2278. public void sendSoulSplit(final Hit hit, final Entity user) {
  2279. final Player target = this;
  2280. if (hit.getDamage() > 0)
  2281. World.sendProjectile(user, this, 2263, 11, 11, 20, 5, 0, 0);
  2282. user.heal(hit.getDamage() / 5);
  2283. prayer.drainPrayer(hit.getDamage() / 5);
  2284. WorldTasksManager.schedule(new WorldTask() {
  2285. @Override
  2286. public void run() {
  2287. setNextGraphics(new Graphics(2264));
  2288. if (hit.getDamage() > 0)
  2289. World.sendProjectile(target, user, 2263, 11, 11, 20, 5, 0, 0);
  2290. }
  2291. }, 0);
  2292. }
  2293.  
  2294. @Override
  2295. public void handleIngoingHit(final Hit hit) {
  2296. if (hit.getLook() != HitLook.MELEE_DAMAGE && hit.getLook() != HitLook.RANGE_DAMAGE
  2297. && hit.getLook() != HitLook.MAGIC_DAMAGE)
  2298. return;
  2299. if (invulnerable) {
  2300. hit.setDamage(0);
  2301. return;
  2302. }
  2303. if (auraManager.usingPenance()) {
  2304. int amount = (int) (hit.getDamage() * 0.2);
  2305. if (amount > 0)
  2306. prayer.restorePrayer(amount);
  2307. }
  2308. Entity source = hit.getSource();
  2309. if (source == null)
  2310. return;
  2311. if (polDelay > Utils.currentTimeMillis())
  2312. hit.setDamage((int) (hit.getDamage() * 0.5));
  2313. if (prayer.hasPrayersOn() && hit.getDamage() != 0) {
  2314. if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
  2315. if (prayer.usingPrayer(0, 17))
  2316. hit.setDamage((int) (hit.getDamage() * source.getMagePrayerMultiplier()));
  2317. else if (prayer.usingPrayer(1, 7)) {
  2318. int deflectedDamage = source instanceof Nex ? 0 : (int) (hit.getDamage() * 0.1);
  2319. hit.setDamage((int) (hit.getDamage() * source.getMagePrayerMultiplier()));
  2320. if (deflectedDamage > 0) {
  2321. source.applyHit(new Hit(this, deflectedDamage, HitLook.REFLECTED_DAMAGE));
  2322. setNextGraphics(new Graphics(2228));
  2323. setNextAnimation(new Animation(12573));
  2324. }
  2325. }
  2326. } else if (hit.getLook() == HitLook.RANGE_DAMAGE) {
  2327. if (prayer.usingPrayer(0, 18))
  2328. hit.setDamage((int) (hit.getDamage() * source.getRangePrayerMultiplier()));
  2329. else if (prayer.usingPrayer(1, 8)) {
  2330. int deflectedDamage = source instanceof Nex ? 0 : (int) (hit.getDamage() * 0.1);
  2331. hit.setDamage((int) (hit.getDamage() * source.getRangePrayerMultiplier()));
  2332. if (deflectedDamage > 0) {
  2333. source.applyHit(new Hit(this, deflectedDamage, HitLook.REFLECTED_DAMAGE));
  2334. setNextGraphics(new Graphics(2229));
  2335. setNextAnimation(new Animation(12573));
  2336. }
  2337. }
  2338. } else if (hit.getLook() == HitLook.MELEE_DAMAGE) {
  2339. if (prayer.usingPrayer(0, 19))
  2340. hit.setDamage((int) (hit.getDamage() * source.getMeleePrayerMultiplier()));
  2341. else if (prayer.usingPrayer(1, 9)) {
  2342. int deflectedDamage = source instanceof Nex ? 0 : (int) (hit.getDamage() * 0.1);
  2343. hit.setDamage((int) (hit.getDamage() * source.getMeleePrayerMultiplier()));
  2344. if (deflectedDamage > 0) {
  2345. source.applyHit(new Hit(this, deflectedDamage, HitLook.REFLECTED_DAMAGE));
  2346. setNextGraphics(new Graphics(2230));
  2347. setNextAnimation(new Animation(12573));
  2348. }
  2349. }
  2350. }
  2351. }
  2352. if (hit.getDamage() >= 200) {
  2353. if (hit.getLook() == HitLook.MELEE_DAMAGE) {
  2354. int reducedDamage = hit.getDamage()
  2355. * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_MELEE_BONUS] / 100;
  2356. if (reducedDamage > 0) {
  2357. hit.setDamage(hit.getDamage() - reducedDamage);
  2358. hit.setSoaking(new Hit(source, reducedDamage, HitLook.ABSORB_DAMAGE));
  2359. }
  2360. } else if (hit.getLook() == HitLook.RANGE_DAMAGE) {
  2361. int reducedDamage = hit.getDamage()
  2362. * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_RANGE_BONUS] / 100;
  2363. if (reducedDamage > 0) {
  2364. hit.setDamage(hit.getDamage() - reducedDamage);
  2365. hit.setSoaking(new Hit(source, reducedDamage, HitLook.ABSORB_DAMAGE));
  2366. }
  2367. } else if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
  2368. int reducedDamage = hit.getDamage()
  2369. * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_MAGE_BONUS] / 100;
  2370. if (reducedDamage > 0) {
  2371. hit.setDamage(hit.getDamage() - reducedDamage);
  2372. hit.setSoaking(new Hit(source, reducedDamage, HitLook.ABSORB_DAMAGE));
  2373. }
  2374. }
  2375. }
  2376. int shieldId = equipment.getShieldId();
  2377. if (shieldId == 13742 || shieldId == 23699) { // elsyian
  2378. if (Utils.getRandom(100) <= 70)
  2379. hit.setDamage((int) (hit.getDamage() * 0.75));
  2380. } else if (shieldId == 13740 || shieldId == 23698) { // divine
  2381. int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2);
  2382. if (prayer.getPrayerpoints() >= drain) {
  2383. hit.setDamage((int) (hit.getDamage() * 0.70));
  2384. prayer.drainPrayer(drain);
  2385. }
  2386. }
  2387. if (castedVeng && hit.getDamage() >= 4) {
  2388. castedVeng = false;
  2389. setNextForceTalk(new ForceTalk("Taste vengeance!"));
  2390. source.applyHit(new Hit(this, (int) (hit.getDamage() * 0.75), HitLook.REGULAR_DAMAGE));
  2391. }
  2392. if (source instanceof Player) {
  2393. final Player p2 = (Player) source;
  2394. if (p2.prayer.hasPrayersOn()) {
  2395. if (p2.prayer.usingPrayer(0, 24)) { // smite
  2396. int drain = hit.getDamage() / 4;
  2397. if (drain > 0)
  2398. prayer.drainPrayer(drain);
  2399. } else {
  2400. if (hit.getDamage() == 0)
  2401. return;
  2402. if (!p2.prayer.isBoostedLeech()) {
  2403. if (hit.getLook() == HitLook.MELEE_DAMAGE) {
  2404. if (p2.prayer.usingPrayer(1, 19)) {
  2405. if (Utils.getRandom(4) == 0) {
  2406. p2.prayer.increaseTurmoilBonus(this);
  2407. p2.prayer.setBoostedLeech(true);
  2408. return;
  2409. }
  2410. } else if (p2.prayer.usingPrayer(1, 1)) { // sap att
  2411. if (Utils.getRandom(4) == 0) {
  2412. if (p2.prayer.reachedMax(0)) {
  2413. p2.getPackets().sendGameMessage(
  2414. "Your opponent has been weakened so much that your sap curse has no effect.",
  2415. true);
  2416. } else {
  2417. p2.prayer.increaseLeechBonus(0);
  2418. p2.getPackets().sendGameMessage(
  2419. "Your curse drains Attack from the enemy, boosting your Attack.", true);
  2420. }
  2421. p2.setNextAnimation(new Animation(12569));
  2422. p2.setNextGraphics(new Graphics(2214));
  2423. p2.prayer.setBoostedLeech(true);
  2424. World.sendProjectile(p2, this, 2215, 35, 35, 20, 5, 0, 0);
  2425. WorldTasksManager.schedule(new WorldTask() {
  2426. @Override
  2427. public void run() {
  2428. setNextGraphics(new Graphics(2216));
  2429. }
  2430. }, 1);
  2431. return;
  2432. }
  2433. } else {
  2434. if (p2.prayer.usingPrayer(1, 10)) {
  2435. if (Utils.getRandom(7) == 0) {
  2436. if (p2.prayer.reachedMax(3)) {
  2437. p2.getPackets().sendGameMessage(
  2438. "Your opponent has been weakened so much that your leech curse has no effect.",
  2439. true);
  2440. } else {
  2441. p2.prayer.increaseLeechBonus(3);
  2442. p2.getPackets().sendGameMessage(
  2443. "Your curse drains Attack from the enemy, boosting your Attack.",
  2444. true);
  2445. }
  2446. p2.setNextAnimation(new Animation(12575));
  2447. p2.prayer.setBoostedLeech(true);
  2448. World.sendProjectile(p2, this, 2231, 35, 35, 20, 5, 0, 0);
  2449. WorldTasksManager.schedule(new WorldTask() {
  2450. @Override
  2451. public void run() {
  2452. setNextGraphics(new Graphics(2232));
  2453. }
  2454. }, 1);
  2455. return;
  2456. }
  2457. }
  2458. if (lendMessage != 0) {
  2459. if (lendMessage == 1)
  2460. getPackets().sendGameMessage(
  2461. "<col=FF0000>An item you lent out has been added back to your bank.");
  2462. else if (lendMessage == 2)
  2463. getPackets().sendGameMessage(
  2464. "<col=FF0000>The item you borrowed has been returned to the owner.");
  2465. lendMessage = 0;
  2466. }
  2467. if (p2.prayer.usingPrayer(1, 14)) {
  2468. if (Utils.getRandom(7) == 0) {
  2469. if (p2.prayer.reachedMax(7)) {
  2470. p2.getPackets().sendGameMessage(
  2471. "Your opponent has been weakened so much that your leech curse has no effect.",
  2472. true);
  2473. } else {
  2474. p2.prayer.increaseLeechBonus(7);
  2475. p2.getPackets().sendGameMessage(
  2476. "Your curse drains Strength from the enemy, boosting your Strength.",
  2477. true);
  2478. }
  2479. p2.setNextAnimation(new Animation(12575));
  2480. p2.prayer.setBoostedLeech(true);
  2481. World.sendProjectile(p2, this, 2248, 35, 35, 20, 5, 0, 0);
  2482. WorldTasksManager.schedule(new WorldTask() {
  2483. @Override
  2484. public void run() {
  2485. setNextGraphics(new Graphics(2250));
  2486. }
  2487. }, 1);
  2488. return;
  2489. }
  2490. }
  2491.  
  2492. }
  2493. }
  2494. if (hit.getLook() == HitLook.RANGE_DAMAGE) {
  2495. if (p2.prayer.usingPrayer(1, 2)) { // sap range
  2496. if (Utils.getRandom(4) == 0) {
  2497. if (p2.prayer.reachedMax(1)) {
  2498. p2.getPackets().sendGameMessage(
  2499. "Your opponent has been weakened so much that your sap curse has no effect.",
  2500. true);
  2501. } else {
  2502. p2.prayer.increaseLeechBonus(1);
  2503. p2.getPackets().sendGameMessage(
  2504. "Your curse drains Range from the enemy, boosting your Range.", true);
  2505. }
  2506. p2.setNextAnimation(new Animation(12569));
  2507. p2.setNextGraphics(new Graphics(2217));
  2508. p2.prayer.setBoostedLeech(true);
  2509. World.sendProjectile(p2, this, 2218, 35, 35, 20, 5, 0, 0);
  2510. WorldTasksManager.schedule(new WorldTask() {
  2511. @Override
  2512. public void run() {
  2513. setNextGraphics(new Graphics(2219));
  2514. }
  2515. }, 1);
  2516. return;
  2517. }
  2518. } else if (p2.prayer.usingPrayer(1, 11)) {
  2519. if (Utils.getRandom(7) == 0) {
  2520. if (p2.prayer.reachedMax(4)) {
  2521. p2.getPackets().sendGameMessage(
  2522. "Your opponent has been weakened so much that your leech curse has no effect.",
  2523. true);
  2524. } else {
  2525. p2.prayer.increaseLeechBonus(4);
  2526. p2.getPackets().sendGameMessage(
  2527. "Your curse drains Range from the enemy, boosting your Range.", true);
  2528. }
  2529. p2.setNextAnimation(new Animation(12575));
  2530. p2.prayer.setBoostedLeech(true);
  2531. World.sendProjectile(p2, this, 2236, 35, 35, 20, 5, 0, 0);
  2532. WorldTasksManager.schedule(new WorldTask() {
  2533. @Override
  2534. public void run() {
  2535. setNextGraphics(new Graphics(2238));
  2536. }
  2537. });
  2538. return;
  2539. }
  2540. }
  2541. }
  2542. if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
  2543. if (p2.prayer.usingPrayer(1, 3)) { // sap mage
  2544. if (Utils.getRandom(4) == 0) {
  2545. if (p2.prayer.reachedMax(2)) {
  2546. p2.getPackets().sendGameMessage(
  2547. "Your opponent has been weakened so much that your sap curse has no effect.",
  2548. true);
  2549. } else {
  2550. p2.prayer.increaseLeechBonus(2);
  2551. p2.getPackets().sendGameMessage(
  2552. "Your curse drains Magic from the enemy, boosting your Magic.", true);
  2553. }
  2554. p2.setNextAnimation(new Animation(12569));
  2555. p2.setNextGraphics(new Graphics(2220));
  2556. p2.prayer.setBoostedLeech(true);
  2557. World.sendProjectile(p2, this, 2221, 35, 35, 20, 5, 0, 0);
  2558. WorldTasksManager.schedule(new WorldTask() {
  2559. @Override
  2560. public void run() {
  2561. setNextGraphics(new Graphics(2222));
  2562. }
  2563. }, 1);
  2564. return;
  2565. }
  2566. } else if (p2.prayer.usingPrayer(1, 12)) {
  2567. if (Utils.getRandom(7) == 0) {
  2568. if (p2.prayer.reachedMax(5)) {
  2569. p2.getPackets().sendGameMessage(
  2570. "Your opponent has been weakened so much that your leech curse has no effect.",
  2571. true);
  2572. } else {
  2573. p2.prayer.increaseLeechBonus(5);
  2574. p2.getPackets().sendGameMessage(
  2575. "Your curse drains Magic from the enemy, boosting your Magic.", true);
  2576. }
  2577. p2.setNextAnimation(new Animation(12575));
  2578. p2.prayer.setBoostedLeech(true);
  2579. World.sendProjectile(p2, this, 2240, 35, 35, 20, 5, 0, 0);
  2580. WorldTasksManager.schedule(new WorldTask() {
  2581. @Override
  2582. public void run() {
  2583. setNextGraphics(new Graphics(2242));
  2584. }
  2585. }, 1);
  2586. return;
  2587. }
  2588. }
  2589. }
  2590.  
  2591. // overall
  2592.  
  2593. if (p2.prayer.usingPrayer(1, 13)) { // leech defence
  2594. if (Utils.getRandom(10) == 0) {
  2595. if (p2.prayer.reachedMax(6)) {
  2596. p2.getPackets().sendGameMessage(
  2597. "Your opponent has been weakened so much that your leech curse has no effect.",
  2598. true);
  2599. } else {
  2600. p2.prayer.increaseLeechBonus(6);
  2601. p2.getPackets().sendGameMessage(
  2602. "Your curse drains Defence from the enemy, boosting your Defence.", true);
  2603. }
  2604. p2.setNextAnimation(new Animation(12575));
  2605. p2.prayer.setBoostedLeech(true);
  2606. World.sendProjectile(p2, this, 2244, 35, 35, 20, 5, 0, 0);
  2607. WorldTasksManager.schedule(new WorldTask() {
  2608. @Override
  2609. public void run() {
  2610. setNextGraphics(new Graphics(2246));
  2611. }
  2612. }, 1);
  2613. return;
  2614. }
  2615. }
  2616.  
  2617. if (p2.prayer.usingPrayer(1, 15)) {
  2618. if (Utils.getRandom(10) == 0) {
  2619. if (getRunEnergy() <= 0) {
  2620. p2.getPackets().sendGameMessage(
  2621. "Your opponent has been weakened so much that your leech curse has no effect.",
  2622. true);
  2623. } else {
  2624. p2.setRunEnergy(p2.getRunEnergy() > 90 ? 100 : p2.getRunEnergy() + 10);
  2625. setRunEnergy(p2.getRunEnergy() > 10 ? getRunEnergy() - 10 : 0);
  2626. }
  2627. p2.setNextAnimation(new Animation(12575));
  2628. p2.prayer.setBoostedLeech(true);
  2629. World.sendProjectile(p2, this, 2256, 35, 35, 20, 5, 0, 0);
  2630. WorldTasksManager.schedule(new WorldTask() {
  2631. @Override
  2632. public void run() {
  2633. setNextGraphics(new Graphics(2258));
  2634. }
  2635. }, 1);
  2636. return;
  2637. }
  2638. }
  2639.  
  2640. if (p2.prayer.usingPrayer(1, 16)) {
  2641. if (Utils.getRandom(10) == 0) {
  2642. if (combatDefinitions.getSpecialAttackPercentage() <= 0) {
  2643. p2.getPackets().sendGameMessage(
  2644. "Your opponent has been weakened so much that your leech curse has no effect.",
  2645. true);
  2646. } else {
  2647. p2.combatDefinitions.restoreSpecialAttack();
  2648. combatDefinitions.desecreaseSpecialAttack(10);
  2649. }
  2650. p2.setNextAnimation(new Animation(12575));
  2651. p2.prayer.setBoostedLeech(true);
  2652. World.sendProjectile(p2, this, 2252, 35, 35, 20, 5, 0, 0);
  2653. WorldTasksManager.schedule(new WorldTask() {
  2654. @Override
  2655. public void run() {
  2656. setNextGraphics(new Graphics(2254));
  2657. }
  2658. }, 1);
  2659. return;
  2660. }
  2661. }
  2662.  
  2663. if (p2.prayer.usingPrayer(1, 4)) { // sap spec
  2664. if (Utils.getRandom(10) == 0) {
  2665. p2.setNextAnimation(new Animation(12569));
  2666. p2.setNextGraphics(new Graphics(2223));
  2667. p2.prayer.setBoostedLeech(true);
  2668. if (combatDefinitions.getSpecialAttackPercentage() <= 0) {
  2669. p2.getPackets().sendGameMessage(
  2670. "Your opponent has been weakened so much that your sap curse has no effect.",
  2671. true);
  2672. } else {
  2673. combatDefinitions.desecreaseSpecialAttack(10);
  2674. }
  2675. World.sendProjectile(p2, this, 2224, 35, 35, 20, 5, 0, 0);
  2676. WorldTasksManager.schedule(new WorldTask() {
  2677. @Override
  2678. public void run() {
  2679. setNextGraphics(new Graphics(2225));
  2680. }
  2681. }, 1);
  2682. return;
  2683. }
  2684. }
  2685. }
  2686. }
  2687. }
  2688. } else {
  2689. NPC n = (NPC) source;
  2690. if (prayer.usingPrayer(1, 19)) {
  2691. if (Utils.getRandom(4) == 0) {
  2692. prayer.increaseTurmoilBonus(n);
  2693. prayer.setBoostedLeech(true);
  2694. }
  2695. }
  2696. if (n.getId() == 13448)
  2697. sendSoulSplit(hit, n);
  2698. if (n instanceof Glacor) {
  2699. Glacor glacor = (Glacor) n;
  2700. if (glacor.getEffect() == GlacorEffect.SAPPING) {
  2701. this.getPrayer().drainPrayer((int) Utils.getPercent(10, this.getPrayer().getPrayerpoints()));
  2702. }
  2703. } else if (n instanceof SappingGlacyte) {
  2704. this.getPrayer().drainPrayer((int) Utils.getPercent(5, this.getPrayer().getPrayerpoints()));
  2705. }
  2706. }
  2707. }
  2708.  
  2709. @Override
  2710. public void sendDeath(final Entity source) {
  2711. if (prayer.hasPrayersOn() && getTemporaryAttributtes().get("startedDuel") != Boolean.TRUE) {
  2712. if (prayer.usingPrayer(0, 22)) {
  2713. setNextGraphics(new Graphics(437));
  2714. final Player target = this;
  2715. if (isAtMultiArea()) {
  2716. for (int regionId : getMapRegionsIds()) {
  2717. List<Integer> playersIndexes = World.getRegion(regionId).getPlayerIndexes();
  2718. if (playersIndexes != null) {
  2719. for (int playerIndex : playersIndexes) {
  2720. Player player = World.getPlayers().get(playerIndex);
  2721. if (player == null || !player.hasStarted() || player.isDead() || player.hasFinished()
  2722. || !player.withinDistance(this, 1) || !player.isCanPvp()
  2723. || !target.getControlerManager().canHit(player))
  2724. continue;
  2725. player.applyHit(new Hit(target,
  2726. Utils.getRandom((int) (skills.getLevelForXp(Skills.PRAYER) * 2.5)),
  2727. HitLook.REGULAR_DAMAGE));
  2728. }
  2729. }
  2730. List<Integer> npcsIndexes = World.getRegion(regionId).getNPCsIndexes();
  2731. if (npcsIndexes != null) {
  2732. for (int npcIndex : npcsIndexes) {
  2733. NPC npc = World.getNPCs().get(npcIndex);
  2734. if (npc == null || npc.isDead() || npc.hasFinished() || !npc.withinDistance(this, 1)
  2735. || !npc.getDefinitions().hasAttackOption()
  2736. || !target.getControlerManager().canHit(npc))
  2737. continue;
  2738. npc.applyHit(new Hit(target,
  2739. Utils.getRandom((int) (skills.getLevelForXp(Skills.PRAYER) * 2.5)),
  2740. HitLook.REGULAR_DAMAGE));
  2741. }
  2742. }
  2743. }
  2744. } else {
  2745. if (source != null && source != this && !source.isDead() && !source.hasFinished()
  2746. && source.withinDistance(this, 1))
  2747. source.applyHit(
  2748. new Hit(target, Utils.getRandom((int) (skills.getLevelForXp(Skills.PRAYER) * 2.5)),
  2749. HitLook.REGULAR_DAMAGE));
  2750. }
  2751. WorldTasksManager.schedule(new WorldTask() {
  2752. @Override
  2753. public void run() {
  2754. World.sendGraphics(target, new Graphics(438),
  2755. new WorldTile(target.getX() - 1, target.getY(), target.getPlane()));
  2756. World.sendGraphics(target, new Graphics(438),
  2757. new WorldTile(target.getX() + 1, target.getY(), target.getPlane()));
  2758. World.sendGraphics(target, new Graphics(438),
  2759. new WorldTile(target.getX(), target.getY() - 1, target.getPlane()));
  2760. World.sendGraphics(target, new Graphics(438),
  2761. new WorldTile(target.getX(), target.getY() + 1, target.getPlane()));
  2762. World.sendGraphics(target, new Graphics(438),
  2763. new WorldTile(target.getX() - 1, target.getY() - 1, target.getPlane()));
  2764. World.sendGraphics(target, new Graphics(438),
  2765. new WorldTile(target.getX() - 1, target.getY() + 1, target.getPlane()));
  2766. World.sendGraphics(target, new Graphics(438),
  2767. new WorldTile(target.getX() + 1, target.getY() - 1, target.getPlane()));
  2768. World.sendGraphics(target, new Graphics(438),
  2769. new WorldTile(target.getX() + 1, target.getY() + 1, target.getPlane()));
  2770. }
  2771. });
  2772. } else if (prayer.usingPrayer(1, 17)) {
  2773. World.sendProjectile(this, new WorldTile(getX() + 2, getY() + 2, getPlane()), 2260, 24, 0, 41, 35, 30,
  2774. 0);
  2775. World.sendProjectile(this, new WorldTile(getX() + 2, getY(), getPlane()), 2260, 41, 0, 41, 35, 30, 0);
  2776. World.sendProjectile(this, new WorldTile(getX() + 2, getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30,
  2777. 0);
  2778.  
  2779. World.sendProjectile(this, new WorldTile(getX() - 2, getY() + 2, getPlane()), 2260, 41, 0, 41, 35, 30,
  2780. 0);
  2781. World.sendProjectile(this, new WorldTile(getX() - 2, getY(), getPlane()), 2260, 41, 0, 41, 35, 30, 0);
  2782. World.sendProjectile(this, new WorldTile(getX() - 2, getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30,
  2783. 0);
  2784.  
  2785. World.sendProjectile(this, new WorldTile(getX(), getY() + 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
  2786. World.sendProjectile(this, new WorldTile(getX(), getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
  2787. final Player target = this;
  2788. WorldTasksManager.schedule(new WorldTask() {
  2789. @Override
  2790. public void run() {
  2791. setNextGraphics(new Graphics(2259));
  2792.  
  2793. if (isAtMultiArea()) {
  2794. for (int regionId : getMapRegionsIds()) {
  2795. List<Integer> playersIndexes = World.getRegion(regionId).getPlayerIndexes();
  2796. if (playersIndexes != null) {
  2797. for (int playerIndex : playersIndexes) {
  2798. Player player = World.getPlayers().get(playerIndex);
  2799. if (player == null || !player.hasStarted() || player.isDead()
  2800. || player.hasFinished() || !player.isCanPvp()
  2801. || !player.withinDistance(target, 2)
  2802. || !target.getControlerManager().canHit(player))
  2803. continue;
  2804. player.applyHit(new Hit(target,
  2805. Utils.getRandom((skills.getLevelForXp(Skills.PRAYER) * 3)),
  2806. HitLook.REGULAR_DAMAGE));
  2807. }
  2808. }
  2809. List<Integer> npcsIndexes = World.getRegion(regionId).getNPCsIndexes();
  2810. if (npcsIndexes != null) {
  2811. for (int npcIndex : npcsIndexes) {
  2812. NPC npc = World.getNPCs().get(npcIndex);
  2813. if (npc == null || npc.isDead() || npc.hasFinished()
  2814. || !npc.withinDistance(target, 2)
  2815. || !npc.getDefinitions().hasAttackOption()
  2816. || !target.getControlerManager().canHit(npc))
  2817. continue;
  2818. npc.applyHit(new Hit(target,
  2819. Utils.getRandom((skills.getLevelForXp(Skills.PRAYER) * 3)),
  2820. HitLook.REGULAR_DAMAGE));
  2821. }
  2822. }
  2823. }
  2824. } else {
  2825. if (source != null && source != target && !source.isDead() && !source.hasFinished()
  2826. && source.withinDistance(target, 2))
  2827. source.applyHit(
  2828. new Hit(target, Utils.getRandom((skills.getLevelForXp(Skills.PRAYER) * 3)),
  2829. HitLook.REGULAR_DAMAGE));
  2830. }
  2831.  
  2832. World.sendGraphics(target, new Graphics(2260),
  2833. new WorldTile(getX() + 2, getY() + 2, getPlane()));
  2834. World.sendGraphics(target, new Graphics(2260), new WorldTile(getX() + 2, getY(), getPlane()));
  2835. World.sendGraphics(target, new Graphics(2260),
  2836. new WorldTile(getX() + 2, getY() - 2, getPlane()));
  2837.  
  2838. World.sendGraphics(target, new Graphics(2260),
  2839. new WorldTile(getX() - 2, getY() + 2, getPlane()));
  2840. World.sendGraphics(target, new Graphics(2260), new WorldTile(getX() - 2, getY(), getPlane()));
  2841. World.sendGraphics(target, new Graphics(2260),
  2842. new WorldTile(getX() - 2, getY() - 2, getPlane()));
  2843.  
  2844. World.sendGraphics(target, new Graphics(2260), new WorldTile(getX(), getY() + 2, getPlane()));
  2845. World.sendGraphics(target, new Graphics(2260), new WorldTile(getX(), getY() - 2, getPlane()));
  2846.  
  2847. World.sendGraphics(target, new Graphics(2260),
  2848. new WorldTile(getX() + 1, getY() + 1, getPlane()));
  2849. World.sendGraphics(target, new Graphics(2260),
  2850. new WorldTile(getX() + 1, getY() - 1, getPlane()));
  2851. World.sendGraphics(target, new Graphics(2260),
  2852. new WorldTile(getX() - 1, getY() + 1, getPlane()));
  2853. World.sendGraphics(target, new Graphics(2260),
  2854. new WorldTile(getX() - 1, getY() - 1, getPlane()));
  2855. }
  2856. });
  2857. }
  2858. }
  2859. final Player instance = this;
  2860. setNextAnimation(new Animation(-1));
  2861. if (!controlerManager.sendDeath())
  2862. return;
  2863. lock(7);
  2864. stopAll();
  2865. if (familiar != null)
  2866. familiar.sendDeath(this);
  2867. WorldTasksManager.schedule(new WorldTask() {
  2868. int loop;
  2869.  
  2870. @Override
  2871. public void run() {
  2872. if (loop == 0) {
  2873. setNextAnimation(new Animation(836));
  2874. } else if (loop == 1) {
  2875. getPackets().sendGameMessage("Oh dear, you have died.");
  2876. if (source instanceof Player) {
  2877. Player killer = (Player) source;
  2878. killer.setAttackedByDelay(4);
  2879. }
  2880. } else if (loop == 3) {
  2881. equipment.init();
  2882. inventory.init();
  2883. reset();
  2884. setNextWorldTile(new WorldTile(Settings.RESPAWN_PLAYER_LOCATION));
  2885. setNextAnimation(new Animation(-1));
  2886. } else if (loop == 4) {
  2887. if (isHardcoreIronman()) {
  2888. Ironman.HardcoreDeath(instance, source);
  2889. } else {
  2890. getPackets().sendMusicEffect(90);
  2891. stop();
  2892. }
  2893. }
  2894. loop++;
  2895. }
  2896. }, 0, 1);
  2897. }
  2898.  
  2899. public static String yeahfreestringpl000x() {
  2900. switch (Utils.random(8)) {
  2901. case 0:
  2902. return "There is no escape, jessica...";
  2903. case 1:
  2904. return "Muahahahaha!";
  2905. case 2:
  2906. return "You belong to me!";
  2907. case 3:
  2908. return "Beware mortals, lue travels with me!";
  2909. case 4:
  2910. return "Your time here is over, jessica!";
  2911. case 5:
  2912. return "Now is the time you die, jessica!";
  2913. case 6:
  2914. return "I claim lue as my own!";
  2915. case 7:
  2916. return "jessica is mine!";
  2917. case 8:
  2918. return "Let me escort you to Varrock, jessica!";
  2919. case 9:
  2920. return "I have come for you, jessica!";
  2921. }
  2922. return "";
  2923. }
  2924.  
  2925. public int dayOfWeek() {
  2926. Calendar cal = Calendar.getInstance();
  2927. return cal.get(Calendar.DAY_OF_WEEK);
  2928. }
  2929.  
  2930. public boolean isWeekend() {
  2931. return dayOfWeek() == 1 ? true : dayOfWeek() == 6 ? true : dayOfWeek() == 7 ? true : false;
  2932. }
  2933.  
  2934. public boolean isBurying = false;
  2935.  
  2936. public boolean isScattering = false;
  2937.  
  2938. public void sendItemsOnDeath(Player killer) {
  2939. if (rights == 2)
  2940. return;
  2941. if (rights == 7)
  2942. return;
  2943. if (rights == 10)
  2944. return;
  2945. charges.die();
  2946. auraManager.removeAura();
  2947. CopyOnWriteArrayList<Item> containedItems = new CopyOnWriteArrayList<Item>();
  2948. for (int i = 0; i < 14; i++) {
  2949. if (equipment.getItem(i) != null && equipment.getItem(i).getId() != -1
  2950. && equipment.getItem(i).getAmount() != -1)
  2951. containedItems.add(new Item(equipment.getItem(i).getId(), equipment.getItem(i).getAmount()));
  2952. }
  2953. for (int i = 0; i < 28; i++) {
  2954. if (inventory.getItem(i) != null && inventory.getItem(i).getId() != -1
  2955. && inventory.getItem(i).getAmount() != -1)
  2956. containedItems.add(new Item(getInventory().getItem(i).getId(), getInventory().getItem(i).getAmount()));
  2957. }
  2958. if (containedItems.isEmpty())
  2959. return;
  2960. int keptAmount = 0;
  2961. if (!(controlerManager.getControler() instanceof CorpBeastControler)
  2962. && !(controlerManager.getControler() instanceof CrucibleControler)) {
  2963. keptAmount = hasSkull() ? 0 : 3;
  2964. if (prayer.usingPrayer(0, 10) || prayer.usingPrayer(1, 0))
  2965. keptAmount++;
  2966. }
  2967. if (donator && Utils.random(2) == 0)
  2968. keptAmount += 1;
  2969. CopyOnWriteArrayList<Item> keptItems = new CopyOnWriteArrayList<Item>();
  2970. Item lastItem = new Item(1, 1);
  2971. for (int i = 0; i < keptAmount; i++) {
  2972. for (Item item : containedItems) {
  2973. int price = item.getDefinitions().getValue();
  2974. if (price >= lastItem.getDefinitions().getValue()) {
  2975. lastItem = item;
  2976. }
  2977. }
  2978. keptItems.add(lastItem);
  2979. containedItems.remove(lastItem);
  2980. lastItem = new Item(1, 1);
  2981. }
  2982. inventory.reset();
  2983. equipment.reset();
  2984. for (Item item : keptItems) {
  2985. getInventory().addItem(item);
  2986. }
  2987. for (Item item : containedItems) {
  2988. World.addGroundItem(item, getLastWorldTile(), killer == null ? this : killer, false, 180, true, true);
  2989. }
  2990. }
  2991.  
  2992. public int getprotectPrice(Item item) {
  2993. switch (item.getId()) {
  2994. case 0:
  2995. item.getDefinitions().setValue(1);
  2996. break;
  2997. // default:
  2998. // return item.getDefinitions().getValue();
  2999. }
  3000. return item.getDefinitions().getValue();
  3001. }
  3002.  
  3003. public void increaseKillCount(Player killed) {
  3004. killed.deathCount++;
  3005. // PkRank.checkRank(killed);
  3006. // PkRank.checkRank(this);
  3007. if (killed.getSession().getIP().equals(getSession().getIP()))
  3008. return;
  3009. setPkPoints(getPkPoints() + 1);
  3010. killCount++;
  3011. getPackets().sendGameMessage("<col=ff0000>You just murked " + killed.getDisplayName() + ", so you now have "
  3012. + killCount + " kills.");
  3013.  
  3014. }
  3015.  
  3016. public void sendRandomJail(Player p) {
  3017. p.resetWalkSteps();
  3018. switch (Utils.getRandom(6)) {
  3019. case 0:
  3020. p.setNextWorldTile(new WorldTile(2669, 10387, 0));
  3021. break;
  3022. case 1:
  3023. p.setNextWorldTile(new WorldTile(2669, 10383, 0));
  3024. break;
  3025. case 2:
  3026. p.setNextWorldTile(new WorldTile(2669, 10379, 0));
  3027. break;
  3028. case 3:
  3029. p.setNextWorldTile(new WorldTile(2673, 10379, 0));
  3030. break;
  3031. case 4:
  3032. p.setNextWorldTile(new WorldTile(2673, 10385, 0));
  3033. break;
  3034. case 5:
  3035. p.setNextWorldTile(new WorldTile(2677, 10387, 0));
  3036. break;
  3037. case 6:
  3038. p.setNextWorldTile(new WorldTile(2677, 10383, 0));
  3039. break;
  3040. }
  3041. }
  3042.  
  3043. // public void sendRandomChaosPortal(Player p) {
  3044. // p.resetWalkSteps();
  3045. // switch (Utils.getRandom(6)) {
  3046. // case 0:
  3047. // Magic.sendNormalTeleportSpell(p, 0, 0.0D, new WorldTile(3322, 5479, 0),
  3048. // new int[0]);
  3049. // break;
  3050. // }
  3051. // }
  3052.  
  3053. @Override
  3054. public int getSize() {
  3055. return appearence.getSize();
  3056. }
  3057.  
  3058. public boolean isCanPvp() {
  3059. return canPvp;
  3060. }
  3061.  
  3062. public void setCanPvp(boolean canPvp) {
  3063. this.canPvp = canPvp;
  3064. appearence.generateAppearenceData();
  3065. getPackets().sendPlayerOption(canPvp ? "Attack" : "null", 1, true);
  3066. getPackets().sendPlayerUnderNPCPriority(canPvp);
  3067. }
  3068.  
  3069. public Prayer getPrayer() {
  3070. return prayer;
  3071. }
  3072.  
  3073. public long getLockDelay() {
  3074. return lockDelay;
  3075. }
  3076.  
  3077. public boolean isLocked() {
  3078. return lockDelay >= Utils.currentTimeMillis();
  3079. }
  3080.  
  3081. public void lock() {
  3082. lockDelay = Long.MAX_VALUE;
  3083. }
  3084.  
  3085. public void lock(long time) {
  3086. lockDelay = Utils.currentTimeMillis() + (time * 600);
  3087. }
  3088.  
  3089. public void unlock() {
  3090. lockDelay = 0;
  3091. }
  3092.  
  3093. public void useStairs(int emoteId, final WorldTile dest, int useDelay, int totalDelay) {
  3094. useStairs(emoteId, dest, useDelay, totalDelay, null);
  3095. }
  3096.  
  3097. public void useStairs(int emoteId, final WorldTile dest, int useDelay, int totalDelay, final String message) {
  3098. stopAll();
  3099. lock(totalDelay);
  3100. if (emoteId != -1)
  3101. setNextAnimation(new Animation(emoteId));
  3102. if (useDelay == 0)
  3103. setNextWorldTile(dest);
  3104. else {
  3105. WorldTasksManager.schedule(new WorldTask() {
  3106. @Override
  3107. public void run() {
  3108. if (isDead())
  3109. return;
  3110. setNextWorldTile(dest);
  3111. if (message != null)
  3112. getPackets().sendGameMessage(message);
  3113. }
  3114. }, useDelay - 1);
  3115. }
  3116. }
  3117.  
  3118. public Bank getBank() {
  3119. return bank;
  3120. }
  3121.  
  3122. public Toolbelt getTools() {
  3123. return belt;
  3124. }
  3125.  
  3126. public ControlerManager getControlerManager() {
  3127. return controlerManager;
  3128. }
  3129.  
  3130. public void switchMouseButtons() {
  3131. mouseButtons = !mouseButtons;
  3132. refreshMouseButtons();
  3133. }
  3134.  
  3135. public void switchAllowChatEffects() {
  3136. allowChatEffects = !allowChatEffects;
  3137. refreshAllowChatEffects();
  3138. }
  3139.  
  3140. public void refreshAllowChatEffects() {
  3141. getPackets().sendConfig(171, allowChatEffects ? 0 : 1);
  3142. }
  3143.  
  3144. public void refreshMouseButtons() {
  3145. getPackets().sendConfig(170, mouseButtons ? 0 : 1);
  3146. }
  3147.  
  3148. public void setPrivateChatSetup(int privateChatSetup) {
  3149. this.privateChatSetup = privateChatSetup;
  3150. }
  3151.  
  3152. public void setFriendChatSetup(int friendChatSetup) {
  3153. this.friendChatSetup = friendChatSetup;
  3154. }
  3155.  
  3156. public int getPrivateChatSetup() {
  3157. return privateChatSetup;
  3158. }
  3159.  
  3160. public boolean isForceNextMapLoadRefresh() {
  3161. return forceNextMapLoadRefresh;
  3162. }
  3163.  
  3164. public void setForceNextMapLoadRefresh(boolean forceNextMapLoadRefresh) {
  3165. this.forceNextMapLoadRefresh = forceNextMapLoadRefresh;
  3166. }
  3167.  
  3168. public FriendsIgnores getFriendsIgnores() {
  3169. return friendsIgnores;
  3170. }
  3171.  
  3172. public void sendMessage(String message) {
  3173. getPackets().sendGameMessage(message);
  3174. }
  3175.  
  3176. /*
  3177. * do not use this, only used by pm
  3178. */
  3179. public void setUsername(String username) {
  3180. this.username = username;
  3181. }
  3182.  
  3183. public void setDisplayName(String displayName) {
  3184. this.displayName = displayName;
  3185. }
  3186.  
  3187. public void addPotDelay(long time) {
  3188. potDelay = time + Utils.currentTimeMillis();
  3189. }
  3190.  
  3191. public long getPotDelay() {
  3192. return potDelay;
  3193. }
  3194.  
  3195. public void addBeerDelay(long time) {
  3196. beerDelay = time + Utils.currentTimeMillis();
  3197. }
  3198.  
  3199. public long getBeerDelay() {
  3200. return beerDelay;
  3201. }
  3202.  
  3203. public void addBeerMDelay(long time) {
  3204. beermDelay = time + Utils.currentTimeMillis();
  3205. }
  3206.  
  3207. public long getBeerMDelay() {
  3208. return beermDelay;
  3209. }
  3210.  
  3211. public void addFoodDelay(long time) {
  3212. foodDelay = time + Utils.currentTimeMillis();
  3213. }
  3214.  
  3215. public long getFoodDelay() {
  3216. return foodDelay;
  3217. }
  3218.  
  3219. public long getBoneDelay() {
  3220. return boneDelay;
  3221. }
  3222.  
  3223. public void addBoneDelay(long time) {
  3224. boneDelay = time + Utils.currentTimeMillis();
  3225. }
  3226.  
  3227. public Player setBoneDelay(long time) {
  3228. boneDelay = time;
  3229. return this;
  3230. }
  3231.  
  3232. public long getAshDelay() {
  3233. return ashDelay;
  3234. }
  3235.  
  3236. public void addAshDelay(long time) {
  3237. ashDelay = time + Utils.currentTimeMillis();
  3238. }
  3239.  
  3240. public void addPoisonImmune(long time) {
  3241. poisonImmune = time + Utils.currentTimeMillis();
  3242. getPoison().reset();
  3243. }
  3244.  
  3245. public long getPoisonImmune() {
  3246. return poisonImmune;
  3247. }
  3248.  
  3249. public void addFireImmune(long time) {
  3250. fireImmune = time + Utils.currentTimeMillis();
  3251. }
  3252.  
  3253. public long getFireImmune() {
  3254. return fireImmune;
  3255. }
  3256.  
  3257. @Override
  3258. public void heal(int ammount, int extra) {
  3259. super.heal(ammount, extra);
  3260. refreshHitPoints();
  3261. }
  3262.  
  3263. public MusicsManager getMusicsManager() {
  3264. return musicsManager;
  3265. }
  3266.  
  3267. public HintIconsManager getHintIconsManager() {
  3268. return hintIconsManager;
  3269. }
  3270.  
  3271. public boolean isCastVeng() {
  3272. return castedVeng;
  3273. }
  3274.  
  3275. public void setCastVeng(boolean castVeng) {
  3276. this.castedVeng = castVeng;
  3277. }
  3278.  
  3279. public int getKillCount() {
  3280. return killCount;
  3281. }
  3282.  
  3283. public int getBarrowsKillCount() {
  3284. return barrowsKillCount;
  3285. }
  3286.  
  3287. public int setBarrowsKillCount(int barrowsKillCount) {
  3288. return this.barrowsKillCount = barrowsKillCount;
  3289. }
  3290.  
  3291. public int setKillCount(int killCount) {
  3292. return this.killCount = killCount;
  3293. }
  3294.  
  3295. public int getDeathCount() {
  3296. return deathCount;
  3297. }
  3298.  
  3299. public int setDeathCount(int deathCount) {
  3300. return this.deathCount = deathCount;
  3301. }
  3302.  
  3303. public void setCloseInterfacesEvent(Runnable closeInterfacesEvent) {
  3304. this.closeInterfacesEvent = closeInterfacesEvent;
  3305. }
  3306.  
  3307. public long getMuted() {
  3308. return muted;
  3309. }
  3310.  
  3311. public void setMuted(long muted) {
  3312. this.muted = muted;
  3313. }
  3314.  
  3315. public long getJailed() {
  3316. return jailed;
  3317. }
  3318.  
  3319. public void setJailed(long jailed) {
  3320. this.jailed = jailed;
  3321. }
  3322.  
  3323. public boolean isPermBanned() {
  3324. return permBanned;
  3325. }
  3326.  
  3327. public void setPermBanned(boolean permBanned) {
  3328. this.permBanned = permBanned;
  3329. }
  3330.  
  3331. public long getBanned() {
  3332. return banned;
  3333. }
  3334.  
  3335. public void setBanned(long banned) {
  3336. this.banned = banned;
  3337. }
  3338.  
  3339. public ChargesManager getCharges() {
  3340. return charges;
  3341. }
  3342.  
  3343. public void setPassword(String password) {
  3344. this.password = password;
  3345. }
  3346.  
  3347. public boolean[] getKilledBarrowBrothers() {
  3348. return killedBarrowBrothers;
  3349. }
  3350.  
  3351. public void setHiddenBrother(int hiddenBrother) {
  3352. this.hiddenBrother = hiddenBrother;
  3353. }
  3354.  
  3355. public int getHiddenBrother() {
  3356. return hiddenBrother;
  3357. }
  3358.  
  3359. public void resetBarrows() {
  3360. hiddenBrother = -1;
  3361. killedBarrowBrothers = new boolean[7]; // includes new bro for future
  3362. // use
  3363. barrowsKillCount = 0;
  3364. }
  3365.  
  3366. public boolean isSuperDonator() {
  3367. return superDonator;
  3368. }
  3369.  
  3370. public boolean isPermSuperDonator() {
  3371. return superDonator;
  3372. }
  3373.  
  3374. public void setSuperDonator(boolean superDonator) {
  3375. this.superDonator = superDonator;
  3376. }
  3377.  
  3378. public boolean isFakeAdmin() {
  3379. return isFakeAdmin;
  3380. }
  3381.  
  3382. public boolean isDeveloper() {
  3383. return isDeveloper;
  3384. }
  3385.  
  3386. public void setFakeAdmin(boolean isFakeAdmin) {
  3387. this.isFakeAdmin = isFakeAdmin;
  3388. }
  3389.  
  3390. public void setDeveloper(boolean isDeveloper) {
  3391. this.isDeveloper = isDeveloper;
  3392. }
  3393.  
  3394. public void setBonusXP(boolean isBonusXP) {
  3395. this.isBonusXP = isBonusXP;
  3396. }
  3397.  
  3398. public void setTreeDamage(int damage) {
  3399. treeDamage = damage;
  3400. return;
  3401. }
  3402.  
  3403. public boolean isDonator() {
  3404. return isExtremeDonator() || superDonator || donator || donatorTill > Utils.currentTimeMillis();
  3405. }
  3406.  
  3407. public boolean isExtremeDonator() {
  3408. return extremeDonator || extremeDonatorTill > Utils.currentTimeMillis();
  3409. }
  3410.  
  3411. public boolean isExtremePermDonator() {
  3412. return extremeDonator;
  3413. }
  3414.  
  3415. public boolean isPrestige1() {
  3416. return prestige1;
  3417. }
  3418.  
  3419. public boolean isHelper() {
  3420. return helper;
  3421. }
  3422.  
  3423. public boolean isBeginnerPrestige() {
  3424. return beginnerprestige;
  3425. }
  3426.  
  3427. public boolean isPrestige2() {
  3428. return prestige2;
  3429. }
  3430.  
  3431. public boolean isPrestige3() {
  3432. return prestige3;
  3433. }
  3434.  
  3435. public boolean isPrestige4() {
  3436. return prestige4;
  3437. }
  3438.  
  3439. public boolean isPrestige5() {
  3440. return prestige5;
  3441. }
  3442.  
  3443. public boolean isPrestige6() {
  3444. return prestige6;
  3445. }
  3446.  
  3447. public boolean isPrestige7() {
  3448. return prestige7;
  3449. }
  3450.  
  3451. public boolean isPrestige8() {
  3452. return prestige8;
  3453. }
  3454.  
  3455. public boolean isPrestige9() {
  3456. return prestige9;
  3457. }
  3458.  
  3459. public boolean isPrestige10() {
  3460. return prestige10;
  3461. }
  3462.  
  3463. public void setExtremeDonator(boolean extremeDonator) {
  3464. this.extremeDonator = extremeDonator;
  3465. }
  3466.  
  3467. public boolean isGraphicDesigner() {
  3468. return isGraphicDesigner;
  3469. }
  3470.  
  3471. public boolean isForumModerator() {
  3472. return isForumModerator;
  3473. }
  3474.  
  3475. public void setGraphicDesigner(boolean isGraphicDesigner) {
  3476. this.isGraphicDesigner = isGraphicDesigner;
  3477. }
  3478.  
  3479. public void setForumModerator(boolean isForumModerator) {
  3480. this.isForumModerator = isForumModerator;
  3481. }
  3482.  
  3483. @SuppressWarnings("deprecation")
  3484. public void makeDonator(int months) {
  3485. if (donatorTill < Utils.currentTimeMillis())
  3486. donatorTill = Utils.currentTimeMillis();
  3487. Date date = new Date(donatorTill);
  3488. date.setMonth(date.getMonth() + months);
  3489. donatorTill = date.getTime();
  3490. }
  3491.  
  3492. @SuppressWarnings("deprecation")
  3493. public void makeDonatorDays(int days) {
  3494. if (donatorTill < Utils.currentTimeMillis())
  3495. donatorTill = Utils.currentTimeMillis();
  3496. Date date = new Date(donatorTill);
  3497. date.setDate(date.getDate() + days);
  3498. donatorTill = date.getTime();
  3499. }
  3500.  
  3501. @SuppressWarnings("deprecation")
  3502. public void makeExtremeDonatorDays(int days) {
  3503. if (extremeDonatorTill < Utils.currentTimeMillis())
  3504. extremeDonatorTill = Utils.currentTimeMillis();
  3505. Date date = new Date(extremeDonatorTill);
  3506. date.setDate(date.getDate() + days);
  3507. extremeDonatorTill = date.getTime();
  3508. }
  3509.  
  3510. @SuppressWarnings("deprecation")
  3511. public String getDonatorTill() {
  3512. return (donator ? "never" : new Date(donatorTill).toGMTString()) + ".";
  3513. }
  3514.  
  3515. @SuppressWarnings("deprecation")
  3516. public String getExtremeDonatorTill() {
  3517. return (extremeDonator ? "never" : new Date(extremeDonatorTill).toGMTString()) + ".";
  3518. }
  3519.  
  3520. public void setDonator(boolean donator) {
  3521. this.donator = donator;
  3522. }
  3523.  
  3524. public void setHelper(boolean helper) {
  3525. this.helper = helper;
  3526. }
  3527.  
  3528. public void setPrestige1(boolean prestige1) {
  3529. this.prestige1 = prestige1;
  3530. }
  3531.  
  3532. public void setBeginnerPrestige(boolean beginnerprestige) {
  3533. this.beginnerprestige = beginnerprestige;
  3534. }
  3535.  
  3536. public void setPrestige2(boolean prestige2) {
  3537. this.prestige2 = prestige2;
  3538. }
  3539.  
  3540. public void setPrestige3(boolean prestige3) {
  3541. this.prestige3 = prestige3;
  3542. }
  3543.  
  3544. public void setPrestige4(boolean prestige4) {
  3545. this.prestige4 = prestige4;
  3546. }
  3547.  
  3548. public void setPrestige5(boolean prestige5) {
  3549. this.prestige5 = prestige5;
  3550. }
  3551.  
  3552. public void setPrestige6(boolean prestige6) {
  3553. this.prestige6 = prestige6;
  3554. }
  3555.  
  3556. public void setPrestige7(boolean prestige7) {
  3557. this.prestige7 = prestige7;
  3558. }
  3559.  
  3560. public void setPrestige8(boolean prestige8) {
  3561. this.prestige8 = prestige8;
  3562. }
  3563.  
  3564. public void setPrestige9(boolean prestige9) {
  3565. this.prestige9 = prestige9;
  3566. }
  3567.  
  3568. public void setPrestige10(boolean prestige10) {
  3569. this.prestige10 = prestige10;
  3570. }
  3571.  
  3572. public String getRecovQuestion() {
  3573. return recovQuestion;
  3574. }
  3575.  
  3576. public void setRecovQuestion(String recovQuestion) {
  3577. this.recovQuestion = recovQuestion;
  3578. }
  3579.  
  3580. public String getRecovAnswer() {
  3581. return recovAnswer;
  3582. }
  3583.  
  3584. public void setRecovAnswer(String recovAnswer) {
  3585. this.recovAnswer = recovAnswer;
  3586. }
  3587.  
  3588. public String getLastMsg() {
  3589. return lastMsg;
  3590. }
  3591.  
  3592. public void setLastMsg(String lastMsg) {
  3593. this.lastMsg = lastMsg;
  3594. }
  3595.  
  3596. public void logThis(String lastMsg) {
  3597. try {
  3598. DateFormat dateFormat = new SimpleDateFormat("MM/dd/yy HH:mm:ss");
  3599. Calendar cal = Calendar.getInstance();
  3600. System.out.println(dateFormat.format(cal.getTime()));
  3601. final String FILE_PATH = "data/playersaves/logs/chatlogs/";
  3602. BufferedWriter writer = new BufferedWriter(new FileWriter(FILE_PATH + getUsername() + ".txt", true));
  3603. writer.write("[" + dateFormat.format(cal.getTime()) + "] : " + lastMsg);
  3604. writer.newLine();
  3605. writer.flush();
  3606. writer.close();
  3607. } catch (IOException er) {
  3608. System.out.println("Error logging chatlog.");
  3609. }
  3610. }
  3611.  
  3612. public int[] getPouches() {
  3613. return pouches;
  3614. }
  3615.  
  3616. public EmotesManager getEmotesManager() {
  3617. return emotesManager;
  3618. }
  3619.  
  3620. public String getLastIP() {
  3621. return lastIP;
  3622. }
  3623.  
  3624. public String getLastHostname() {
  3625. InetAddress addr;
  3626. try {
  3627. addr = InetAddress.getByName(getLastIP());
  3628. String hostname = addr.getHostName();
  3629. return hostname;
  3630. } catch (UnknownHostException e) {
  3631. e.printStackTrace();
  3632. }
  3633. return null;
  3634. }
  3635.  
  3636. public PriceCheckManager getPriceCheckManager() {
  3637. return priceCheckManager;
  3638. }
  3639.  
  3640. public boolean isUpdateMovementType() {
  3641. return updateMovementType;
  3642. }
  3643.  
  3644. public long getLastPublicMessage() {
  3645. return lastPublicMessage;
  3646. }
  3647.  
  3648. public void setLastPublicMessage(long lastPublicMessage) {
  3649. this.lastPublicMessage = lastPublicMessage;
  3650. }
  3651.  
  3652. public CutscenesManager getCutscenesManager() {
  3653. return cutscenesManager;
  3654. }
  3655.  
  3656. public void kickPlayerFromFriendsChannel(String name) {
  3657. if (currentFriendChat == null)
  3658. return;
  3659. currentFriendChat.kickPlayerFromChat(this, name);
  3660. }
  3661.  
  3662. public void sendFriendsChannelMessage(String message) {
  3663. if (currentFriendChat == null)
  3664. return;
  3665. currentFriendChat.sendMessage(this, message);
  3666. }
  3667.  
  3668. public void sendFriendsChannelQuickMessage(QuickChatMessage message) {
  3669. if (currentFriendChat == null)
  3670. return;
  3671. currentFriendChat.sendQuickMessage(this, message);
  3672. }
  3673.  
  3674. public void sendPublicChatMessage(PublicChatMessage message) {
  3675. for (int regionId : getMapRegionsIds()) {
  3676. List<Integer> playersIndexes = World.getRegion(regionId).getPlayerIndexes();
  3677. if (playersIndexes == null)
  3678. continue;
  3679. for (Integer playerIndex : playersIndexes) {
  3680. Player p = World.getPlayers().get(playerIndex);
  3681. if (p == null || !p.hasStarted() || p.hasFinished()
  3682. || p.getLocalPlayerUpdate().getLocalPlayers()[getIndex()] == null)
  3683. continue;
  3684. p.getPackets().sendPublicMessage(this, message);
  3685. }
  3686. }
  3687. }
  3688.  
  3689. public int[] getCompletionistCapeCustomized() {
  3690. return completionistCapeCustomized;
  3691. }
  3692.  
  3693. public void setCompletionistCapeCustomized(int[] skillcapeCustomized) {
  3694. this.completionistCapeCustomized = skillcapeCustomized;
  3695. }
  3696.  
  3697. public int[] getMaxedCapeCustomized() {
  3698. return maxedCapeCustomized;
  3699. }
  3700.  
  3701. public void setMaxedCapeCustomized(int[] maxedCapeCustomized) {
  3702. this.maxedCapeCustomized = maxedCapeCustomized;
  3703. }
  3704.  
  3705. public void setSkullId(int skullId) {
  3706. this.skullId = skullId;
  3707. }
  3708.  
  3709. public int getSkullId() {
  3710. return skullId;
  3711. }
  3712.  
  3713. public boolean isFilterGame() {
  3714. return filterGame;
  3715. }
  3716.  
  3717. public void setFilterGame(boolean filterGame) {
  3718. this.filterGame = filterGame;
  3719. }
  3720.  
  3721. public void addLogicPacketToQueue(LogicPacket packet) {
  3722. for (LogicPacket p : logicPackets) {
  3723. if (p.getId() == packet.getId()) {
  3724. logicPackets.remove(p);
  3725. break;
  3726. }
  3727. }
  3728. logicPackets.add(packet);
  3729. }
  3730.  
  3731. public DominionTower getDominionTower() {
  3732. return dominionTower;
  3733. }
  3734.  
  3735. public void setPrayerRenewalDelay(int delay) {
  3736. this.prayerRenewalDelay = delay;
  3737. }
  3738.  
  3739. public int getOverloadDelay() {
  3740. return overloadDelay;
  3741. }
  3742.  
  3743. public void setOverloadDelay(int overloadDelay) {
  3744. this.overloadDelay = overloadDelay;
  3745. }
  3746.  
  3747. public Trade getTrade() {
  3748. return trade;
  3749. }
  3750.  
  3751. public void setTeleBlockDelay(long teleDelay) {
  3752. getTemporaryAttributtes().put("TeleBlocked", teleDelay + Utils.currentTimeMillis());
  3753. }
  3754.  
  3755. public long getTeleBlockDelay() {
  3756. Long teleblock = (Long) getTemporaryAttributtes().get("TeleBlocked");
  3757. if (teleblock == null)
  3758. return 0;
  3759. return teleblock;
  3760. }
  3761.  
  3762. public void setPrayerDelay(long teleDelay) {
  3763. getTemporaryAttributtes().put("PrayerBlocked", teleDelay + Utils.currentTimeMillis());
  3764. prayer.closeAllPrayers();
  3765. }
  3766.  
  3767. public long getPrayerDelay() {
  3768. Long teleblock = (Long) getTemporaryAttributtes().get("PrayerBlocked");
  3769. if (teleblock == null)
  3770. return 0;
  3771. return teleblock;
  3772. }
  3773.  
  3774. public Familiar getFamiliar() {
  3775. return familiar;
  3776. }
  3777.  
  3778. public void setFamiliar(Familiar familiar) {
  3779. this.familiar = familiar;
  3780. }
  3781.  
  3782. public FriendChatsManager getCurrentFriendChat() {
  3783. return currentFriendChat;
  3784. }
  3785.  
  3786. public void setCurrentFriendChat(FriendChatsManager currentFriendChat) {
  3787. this.currentFriendChat = currentFriendChat;
  3788. }
  3789.  
  3790. public String getCurrentFriendChatOwner() {
  3791. return currentFriendChatOwner;
  3792. }
  3793.  
  3794. public void setCurrentFriendChatOwner(String currentFriendChatOwner) {
  3795. this.currentFriendChatOwner = currentFriendChatOwner;
  3796. }
  3797.  
  3798. public int getSummoningLeftClickOption() {
  3799. return summoningLeftClickOption;
  3800. }
  3801.  
  3802. public void setSummoningLeftClickOption(int summoningLeftClickOption) {
  3803. this.summoningLeftClickOption = summoningLeftClickOption;
  3804. }
  3805.  
  3806. public boolean canSpawn1() {
  3807. if (Wilderness.isAtWild(this) || getControlerManager().getControler() instanceof FightPitsArena
  3808. || getControlerManager().getControler() instanceof CorpBeastControler
  3809. || getControlerManager().getControler() instanceof PestControlLobby
  3810. || getControlerManager().getControler() instanceof PestControlGame
  3811. || getControlerManager().getControler() instanceof ZGDControler
  3812. || getControlerManager().getControler() instanceof DungeonController
  3813. || getControlerManager().getControler() instanceof DTControler
  3814. || getControlerManager().getControler() instanceof DuelArena
  3815. || getControlerManager().getControler() instanceof CastleWarsPlaying
  3816. || getControlerManager().getControler() instanceof CastleWarsWaiting
  3817. || getControlerManager().getControler() instanceof FightCaves
  3818. || getControlerManager().getControler() instanceof ZombieFight
  3819. || getControlerManager().getControler() instanceof FightKiln
  3820. || getControlerManager().getControler() instanceof RunespanControler || FfaZone.inPvpArea(this)
  3821. || DungZone.inPvpArea(this) || getControlerManager().getControler() instanceof NomadsRequiem
  3822. || getControlerManager().getControler() instanceof QueenBlackDragonController
  3823. || getControlerManager().getControler() instanceof WarControler) {
  3824. return false;
  3825. }
  3826. if (getControlerManager().getControler() instanceof CrucibleControler) {
  3827. CrucibleControler controler = (CrucibleControler) getControlerManager().getControler();
  3828. return !controler.isInside();
  3829. }
  3830. return true;
  3831. }
  3832.  
  3833. public boolean canSpawn() {
  3834. if (Wilderness.isAtWild(this) || getControlerManager().getControler() instanceof FightPitsArena
  3835. || getControlerManager().getControler() instanceof CorpBeastControler
  3836. || getControlerManager().getControler() instanceof PestControlLobby
  3837. || getControlerManager().getControler() instanceof PestControlGame
  3838. || getControlerManager().getControler() instanceof ZGDControler
  3839. || getControlerManager().getControler() instanceof DungeonController
  3840. || getControlerManager().getControler() instanceof GodWars
  3841. || getControlerManager().getControler() instanceof DTControler
  3842. || getControlerManager().getControler() instanceof DuelArena
  3843. || getControlerManager().getControler() instanceof CastleWarsPlaying
  3844. || getControlerManager().getControler() instanceof CastleWarsWaiting
  3845. || getControlerManager().getControler() instanceof FightCaves
  3846. || getControlerManager().getControler() instanceof ZombieFight
  3847. || getControlerManager().getControler() instanceof FightKiln
  3848. || getControlerManager().getControler() instanceof RunespanControler || FfaZone.inPvpArea(this)
  3849. || DungZone.inPvpArea(this) || getControlerManager().getControler() instanceof NomadsRequiem
  3850. || getControlerManager().getControler() instanceof QueenBlackDragonController
  3851. || getControlerManager().getControler() instanceof WarControler) {
  3852. return false;
  3853. }
  3854. if (getControlerManager().getControler() instanceof CrucibleControler) {
  3855. CrucibleControler controler = (CrucibleControler) getControlerManager().getControler();
  3856. return !controler.isInside();
  3857. }
  3858. return true;
  3859. }
  3860.  
  3861. public long getPolDelay() {
  3862. return polDelay;
  3863. }
  3864.  
  3865. public void addPolDelay(long delay) {
  3866. polDelay = delay + Utils.currentTimeMillis();
  3867. }
  3868.  
  3869. public void setPolDelay(long delay) {
  3870. this.polDelay = delay;
  3871. }
  3872.  
  3873. public List<Integer> getSwitchItemCache() {
  3874. return switchItemCache;
  3875. }
  3876.  
  3877. public AuraManager getAuraManager() {
  3878. return auraManager;
  3879. }
  3880.  
  3881. public PendantManager getPendantManager() {
  3882. return pendantManager;
  3883. }
  3884.  
  3885. public int getMovementType() {
  3886. if (getTemporaryMoveType() != -1)
  3887. return getTemporaryMoveType();
  3888. return getRun() ? RUN_MOVE_TYPE : WALK_MOVE_TYPE;
  3889. }
  3890.  
  3891. public List<String> getOwnedObjectManagerKeys() {
  3892. if (ownedObjectsManagerKeys == null) // temporary
  3893. ownedObjectsManagerKeys = new LinkedList<String>();
  3894. return ownedObjectsManagerKeys;
  3895. }
  3896.  
  3897. public boolean hasInstantSpecial(final int weaponId) {
  3898. switch (weaponId) {
  3899. case 4153:
  3900. case 15486:
  3901. case 22207:
  3902. case 22209:
  3903. case 22211:
  3904. case 22213:
  3905. case 1377:
  3906. case 13472:
  3907. case 35:// Excalibur
  3908. case 8280:
  3909. case 14632:
  3910. return true;
  3911. default:
  3912. return false;
  3913. }
  3914. }
  3915.  
  3916. public void performInstantSpecial(final int weaponId) {
  3917. int specAmt = PlayerCombat.getSpecialAmmount(weaponId);
  3918. if (combatDefinitions.hasRingOfVigour())
  3919. specAmt *= 0.9;
  3920. if (combatDefinitions.getSpecialAttackPercentage() < specAmt) {
  3921. getPackets().sendGameMessage("You don't have enough power left.");
  3922. combatDefinitions.desecreaseSpecialAttack(0);
  3923. return;
  3924. }
  3925. if (this.getSwitchItemCache().size() > 0) {
  3926. ButtonHandler.submitSpecialRequest(this);
  3927. return;
  3928. }
  3929. switch (weaponId) {
  3930. case 4153:
  3931. combatDefinitions.setInstantAttack(true);
  3932. combatDefinitions.switchUsingSpecialAttack();
  3933. Entity target = (Entity) getTemporaryAttributtes().get("last_target");
  3934. if (target != null && target.getTemporaryAttributtes().get("last_attacker") == this) {
  3935. if (!(getActionManager().getAction() instanceof PlayerCombat)
  3936. || ((PlayerCombat) getActionManager().getAction()).getTarget() != target) {
  3937. getActionManager().setAction(new PlayerCombat(target));
  3938. }
  3939. }
  3940. break;
  3941. case 1377:
  3942. case 13472:
  3943. setNextAnimation(new Animation(1056));
  3944. setNextGraphics(new Graphics(246));
  3945. setNextForceTalk(new ForceTalk("Raarrrrrgggggghhhhhhh!"));
  3946. int defence = (int) (skills.getLevelForXp(Skills.DEFENCE) * 0.90D);
  3947. int attack = (int) (skills.getLevelForXp(Skills.ATTACK) * 0.90D);
  3948. int range = (int) (skills.getLevelForXp(Skills.RANGE) * 0.90D);
  3949. int magic = (int) (skills.getLevelForXp(Skills.MAGIC) * 0.90D);
  3950. int strength = (int) (skills.getLevelForXp(Skills.STRENGTH) * 1.2D);
  3951. skills.set(Skills.DEFENCE, defence);
  3952. skills.set(Skills.ATTACK, attack);
  3953. skills.set(Skills.RANGE, range);
  3954. skills.set(Skills.MAGIC, magic);
  3955. skills.set(Skills.STRENGTH, strength);
  3956. combatDefinitions.desecreaseSpecialAttack(specAmt);
  3957. break;
  3958. case 35:// Excalibur
  3959. case 8280:
  3960. case 14632:
  3961. setNextAnimation(new Animation(1168));
  3962. setNextGraphics(new Graphics(247));
  3963. final boolean enhanced = weaponId == 14632;
  3964. skills.set(Skills.DEFENCE, enhanced ? (int) (skills.getLevelForXp(Skills.DEFENCE) * 1.15D)
  3965. : (skills.getLevel(Skills.DEFENCE) + 8));
  3966. WorldTasksManager.schedule(new WorldTask() {
  3967. int count = 5;
  3968.  
  3969. @Override
  3970. public void run() {
  3971. if (isDead() || hasFinished() || getHitpoints() >= getMaxHitpoints()) {
  3972. stop();
  3973. return;
  3974. }
  3975. heal(enhanced ? 80 : 40);
  3976. if (count-- == 0) {
  3977. stop();
  3978. return;
  3979. }
  3980. }
  3981. }, 4, 2);
  3982. combatDefinitions.desecreaseSpecialAttack(specAmt);
  3983. break;
  3984. case 15486:
  3985. case 22207:
  3986. case 22209:
  3987. case 22211:
  3988. case 22213:
  3989. setNextAnimation(new Animation(12804));
  3990. setNextGraphics(new Graphics(2319));// 2320
  3991. setNextGraphics(new Graphics(2321));
  3992. addPolDelay(60000);
  3993. combatDefinitions.desecreaseSpecialAttack(specAmt);
  3994. break;
  3995. }
  3996. }
  3997.  
  3998. public void setDisableEquip(boolean equip) {
  3999. disableEquip = equip;
  4000. }
  4001.  
  4002. public boolean isEquipDisabled() {
  4003. return disableEquip;
  4004. }
  4005.  
  4006. public void addDisplayTime(long i) {
  4007. this.displayTime = i + Utils.currentTimeMillis();
  4008. }
  4009.  
  4010. public long getDisplayTime() {
  4011. return displayTime;
  4012. }
  4013.  
  4014. public int getPublicStatus() {
  4015. return publicStatus;
  4016. }
  4017.  
  4018. public void setPublicStatus(int publicStatus) {
  4019. this.publicStatus = publicStatus;
  4020. }
  4021.  
  4022. public int getClanStatus() {
  4023. return clanStatus;
  4024. }
  4025.  
  4026. public void setClanStatus(int clanStatus) {
  4027. this.clanStatus = clanStatus;
  4028. }
  4029.  
  4030. public int getTradeStatus() {
  4031. return tradeStatus;
  4032. }
  4033.  
  4034. private transient InputEvent<?> inputEvent;
  4035.  
  4036. public void setInputEvent(InputEvent<?> inputEvent) {
  4037. this.inputEvent = inputEvent;
  4038. if (inputEvent instanceof InputIntegerEvent) {
  4039. getPackets().sendInputIntegerScript(inputEvent.getText());
  4040. } else if (inputEvent instanceof InputNameEvent) {
  4041. getPackets().sendInputNameScript(inputEvent.getText());
  4042. } else if (inputEvent instanceof InputLongStringEvent) {
  4043. getPackets().sendInputLongTextScript(inputEvent.getText());
  4044. }
  4045. }
  4046.  
  4047. public InputEvent<?> getInputEvent() {
  4048. return inputEvent;
  4049. }
  4050.  
  4051. public void resetInputEvent() {
  4052. inputEvent = null;
  4053. }
  4054.  
  4055. public void setTradeStatus(int tradeStatus) {
  4056. this.tradeStatus = tradeStatus;
  4057. }
  4058.  
  4059. public int getAssistStatus() {
  4060. return assistStatus;
  4061. }
  4062.  
  4063. public void setAssistStatus(int assistStatus) {
  4064. this.assistStatus = assistStatus;
  4065. }
  4066.  
  4067. public boolean isSpawnsMode() {
  4068. return spawnsMode;
  4069. }
  4070.  
  4071. public void setdonations(int donations) {
  4072. this.donations = donations;
  4073. }
  4074.  
  4075. public int getdonations() {
  4076. return donations;
  4077. }
  4078.  
  4079. public void setSpawnsMode(boolean spawnsMode) {
  4080. this.spawnsMode = spawnsMode;
  4081. }
  4082.  
  4083. public Notes getNotes() {
  4084. return notes;
  4085. }
  4086.  
  4087. private transient int firstColumn = 1, secondColumn = 1, thirdColumn = 1;
  4088.  
  4089. public int getFirstColumn() {
  4090. return this.firstColumn;
  4091. }
  4092.  
  4093. public int getSecondColumn() {
  4094. return this.secondColumn;
  4095. }
  4096.  
  4097. public int getThirdColumn() {
  4098. return this.thirdColumn;
  4099. }
  4100.  
  4101. public void setFirstColumn(int i) {
  4102. this.firstColumn = i;
  4103. }
  4104.  
  4105. public void setSecondColumn(int i) {
  4106. this.secondColumn = i;
  4107. }
  4108.  
  4109. public void setThirdColumn(int i) {
  4110. this.thirdColumn = i;
  4111. }
  4112.  
  4113. public void decrementFirstColumn() {
  4114. this.firstColumn--;
  4115. }
  4116.  
  4117. public void decrementSecondColumn() {
  4118. this.secondColumn--;
  4119. }
  4120.  
  4121. public void decrementThirdColumn() {
  4122. this.thirdColumn--;
  4123. }
  4124.  
  4125. public void incrementFirstColumn() {
  4126. this.firstColumn++;
  4127. }
  4128.  
  4129. public void incrementSecondColumn() {
  4130. this.secondColumn++;
  4131. }
  4132.  
  4133. public void incrementThirdColumn() {
  4134. this.thirdColumn++;
  4135. }
  4136.  
  4137. public IsaacKeyPair getIsaacKeyPair() {
  4138. return isaacKeyPair;
  4139. }
  4140.  
  4141. public QuestManager getQuestManager() {
  4142. return questManager;
  4143. }
  4144.  
  4145. public boolean isCompletedFightCaves() {
  4146. return completedFightCaves;
  4147. }
  4148.  
  4149. public void setCompletedFightCaves() {
  4150. if (!completedFightCaves) {
  4151. completedFightCaves = true;
  4152. refreshFightKilnEntrance();
  4153. }
  4154. }
  4155.  
  4156. public boolean isCompletedZombieFight() {
  4157. return completedZombieFight;
  4158. }
  4159.  
  4160. public void setCompletedZombieFight() {
  4161. if (!completedZombieFight) {
  4162. completedZombieFight = true;
  4163. refreshZombieFightEntrance();
  4164. }
  4165. }
  4166.  
  4167. public double getWeight() {
  4168. // TODO Auto-generated method stub
  4169. return 0;
  4170. }
  4171.  
  4172. public void setWeight(double d) {
  4173. // TODO Auto-generated method stub
  4174. }
  4175.  
  4176. public Farming getFarming() {
  4177. return farming;
  4178. }
  4179.  
  4180. public void setFarming(Farming farming) {
  4181. this.farming = farming;
  4182. }
  4183.  
  4184. public void setJujuMiningBoost(int boost) {
  4185. jujuMining = boost;
  4186. }
  4187.  
  4188. public boolean hasJujuMiningBoost() {
  4189. return jujuMining > 1;
  4190. }
  4191.  
  4192. public void setJujuFarmingBoost(int boost) {
  4193. jujuFarming = boost;
  4194. }
  4195.  
  4196. public boolean hasJujuFarmingBoost() {
  4197. return jujuFarming > 1;
  4198. }
  4199.  
  4200. public void setJujuWoodcuttingBoost(int boost) {
  4201. jujuWoodcutting = boost;
  4202. }
  4203.  
  4204. public boolean hasJujuWoodcuttingBoost() {
  4205. return jujuWoodcutting > 1;
  4206. }
  4207.  
  4208. public void setJujuScentlessBoost(int boost) {
  4209. jujuScentless = boost;
  4210. }
  4211.  
  4212. public boolean hasJujuScentlessBoost() {
  4213. return jujuScentless > 1;
  4214. }
  4215.  
  4216. public void setJujuGodBoost(int boost) {
  4217. jujuGod = boost;
  4218. }
  4219.  
  4220. public boolean hasJujuGodBoost() {
  4221. return jujuGod > 1;
  4222. }
  4223.  
  4224. public void setJujuFishingBoost(int boost) {
  4225. jujuFishing = boost;
  4226. }
  4227.  
  4228. public boolean hasJujuFishingBoost() {
  4229. return jujuFishing > 1;
  4230. }
  4231.  
  4232. public boolean isCompletedFightKiln() {
  4233. return completedFightKiln;
  4234. }
  4235.  
  4236. public void setCompletedFightKiln() {
  4237. completedFightKiln = true;
  4238. }
  4239.  
  4240. public boolean isWonFightPits() {
  4241. return wonFightPits;
  4242. }
  4243.  
  4244. public void setWonFightPits() {
  4245. wonFightPits = true;
  4246. }
  4247.  
  4248. public boolean isCantTrade() {
  4249. return cantTrade;
  4250. }
  4251.  
  4252. public void setCantTrade(boolean canTrade) {
  4253. this.cantTrade = canTrade;
  4254. }
  4255.  
  4256. public String getYellColor() {
  4257. return yellColor;
  4258. }
  4259.  
  4260. public String getShadColor() {
  4261. return yellShade;
  4262. }
  4263.  
  4264. public String getPrefix() {
  4265. return yellPrefix;
  4266. }
  4267.  
  4268. public void setYellColor(String yellColor) {
  4269. this.yellColor = yellColor;
  4270. }
  4271.  
  4272. public void setPrefix(String yellPrefix) {
  4273. this.yellPrefix = yellPrefix;
  4274. }
  4275.  
  4276. public void setYellShade(String yellShade) {
  4277. this.yellShade = yellShade;
  4278. }
  4279.  
  4280. public boolean hasAgile() {
  4281. return hasAgile;
  4282. }
  4283.  
  4284. public boolean hasLumberjack() {
  4285. return hasLumberjack;
  4286. }
  4287.  
  4288. public boolean hasInfernoAdze() {
  4289. return hasInfernoAdze;
  4290. }
  4291.  
  4292. public boolean hasFishOutfit() {
  4293. return hasFishOutfit;
  4294. }
  4295.  
  4296. public boolean hasMiningOutfit() {
  4297. return hasMiningOutfit;
  4298. }
  4299.  
  4300. public boolean hasMagicSecateurs() {
  4301. return hasMagicSecateurs;
  4302. }
  4303.  
  4304. public boolean hasCookingGauntlets() {
  4305. return hasCookingGauntlets;
  4306. }
  4307.  
  4308. public boolean hasDemonChair() {
  4309. return hasDemonChair;
  4310. }
  4311.  
  4312. public boolean hasCraftingBanner() {
  4313. return hasCraftingBanner;
  4314. }
  4315.  
  4316. public boolean hasSmithGaunts() {
  4317. return hasSmithGaunts;
  4318. }
  4319.  
  4320. public boolean hasThievingSuit() {
  4321. return hasThievingSuit;
  4322. }
  4323.  
  4324. public void setHasAgile() {
  4325. hasAgile = true;
  4326. }
  4327.  
  4328. public void setHasAdze() {
  4329. hasInfernoAdze = true;
  4330. }
  4331.  
  4332. public void setHasFishOutfit() {
  4333. hasFishOutfit = true;
  4334. }
  4335.  
  4336. public void setHasMiningOutfit() {
  4337. hasMiningOutfit = true;
  4338. }
  4339.  
  4340. public void setHasMagicSecateurs() {
  4341. hasMagicSecateurs = true;
  4342. }
  4343.  
  4344. public void setHasCookingGauntlets() {
  4345. hasCookingGauntlets = true;
  4346. }
  4347.  
  4348. public void setHasDemonChair() {
  4349. hasDemonChair = true;
  4350. }
  4351.  
  4352. public void setHasCraftingBanner() {
  4353. hasCraftingBanner = true;
  4354. }
  4355.  
  4356. public void setHasSmithGaunts() {
  4357. hasSmithGaunts = true;
  4358. }
  4359.  
  4360. public void setHasThievingSuit() {
  4361. hasThievingSuit = true;
  4362. }
  4363.  
  4364. public void setLumberjack() {
  4365. hasLumberjack = true;
  4366. }
  4367.  
  4368. public Sheathing getSheathing() {
  4369. return sheathing;
  4370. }
  4371.  
  4372. /**
  4373. * Gets the pet.
  4374. *
  4375. * @return The pet.
  4376. */
  4377. public Pet getPet() {
  4378. return pet;
  4379. }
  4380.  
  4381. /**
  4382. * Sets the pet.
  4383. *
  4384. * @param pet
  4385. * The pet to set.
  4386. */
  4387. public void setPet(Pet pet) {
  4388. this.pet = pet;
  4389. }
  4390.  
  4391. public boolean isSupporter() {
  4392. return isSupporter;
  4393. }
  4394.  
  4395. public void setSupporter(boolean isSupporter) {
  4396. this.isSupporter = isSupporter;
  4397. }
  4398.  
  4399. public boolean isVeteran() {
  4400. return isVeteran;
  4401. }
  4402.  
  4403. public void setVeteran(boolean isVeteran) {
  4404. this.isVeteran = isVeteran;
  4405. }
  4406.  
  4407. public boolean isLegend() {
  4408. return isLegend;
  4409. }
  4410.  
  4411. public void setLegend(boolean isLegend) {
  4412. this.isLegend = isLegend;
  4413. }
  4414.  
  4415. public boolean isExtreme() {
  4416. return isExtreme;
  4417. }
  4418.  
  4419. public void setExtreme(boolean isExtreme) {
  4420. this.isExtreme = isExtreme;
  4421. }
  4422.  
  4423. public boolean isContributor() {
  4424. return isContributor;
  4425. }
  4426.  
  4427. public void setContributor(boolean isContributor) {
  4428. this.isContributor = isContributor;
  4429. }
  4430.  
  4431. public boolean isTrusted() {
  4432. return isTrusted;
  4433. }
  4434.  
  4435. public void setTrusted(boolean isTrusted) {
  4436. this.isTrusted = isTrusted;
  4437. }
  4438.  
  4439. public boolean isDiceHost() {
  4440. return isDiceHost;
  4441. }
  4442.  
  4443. public void setDiceHost(boolean isDiceHost) {
  4444. this.isDiceHost = isDiceHost;
  4445. }
  4446.  
  4447. /**
  4448. * Gets the petManager.
  4449. *
  4450. * @return The petManager.
  4451. */
  4452. public PetManager getPetManager() {
  4453. return petManager;
  4454. }
  4455.  
  4456. /**
  4457. * Sets the petManager.
  4458. *
  4459. * @param petManager
  4460. * The petManager to set.
  4461. */
  4462. public void setPetManager(PetManager petManager) {
  4463. this.petManager = petManager;
  4464. }
  4465.  
  4466. public boolean isXpLocked() {
  4467. return xpLocked;
  4468. }
  4469.  
  4470. public void setXpLocked(boolean locked) {
  4471. this.xpLocked = locked;
  4472. }
  4473.  
  4474. public int getLastBonfire() {
  4475. return lastBonfire;
  4476. }
  4477.  
  4478. public void setLastBonfire(int lastBonfire) {
  4479. this.lastBonfire = lastBonfire;
  4480. }
  4481.  
  4482. public DwarfCannon getDwarfCannon() {
  4483. return DwarfCannon;
  4484. }
  4485.  
  4486. /**
  4487. * Dwarf Cannon
  4488. */
  4489. public Object getDwarfCannon;
  4490.  
  4491. public boolean hasLoadedCannon = false;
  4492.  
  4493. public boolean isShooting = false;
  4494.  
  4495. public boolean hasSetupCannon = false;
  4496.  
  4497. public boolean hasSetupGoldCannon = false;
  4498.  
  4499. public boolean hasSetupRoyalCannon = false;
  4500.  
  4501. public boolean isYellOff() {
  4502. return yellOff;
  4503. }
  4504.  
  4505. public void setYellOff(boolean yellOff) {
  4506. this.yellOff = yellOff;
  4507. }
  4508.  
  4509. public void setInvulnerable(boolean invulnerable) {
  4510. this.invulnerable = invulnerable;
  4511. }
  4512.  
  4513. public double getHpBoostMultiplier() {
  4514. return hpBoostMultiplier;
  4515. }
  4516.  
  4517. public void setHpBoostMultiplier(double hpBoostMultiplier) {
  4518. this.hpBoostMultiplier = hpBoostMultiplier;
  4519. }
  4520.  
  4521. /**
  4522. * Gets the killedQueenBlackDragon.
  4523. *
  4524. * @return The killedQueenBlackDragon.
  4525. */
  4526. public boolean isKilledQueenBlackDragon() {
  4527. return killedQueenBlackDragon;
  4528. }
  4529.  
  4530. /**
  4531. * Sets the killedQueenBlackDragon.
  4532. *
  4533. * @param killedQueenBlackDragon
  4534. * The killedQueenBlackDragon to set.
  4535. */
  4536. public void setKilledQueenBlackDragon(boolean killedQueenBlackDragon) {
  4537. this.killedQueenBlackDragon = killedQueenBlackDragon;
  4538. }
  4539.  
  4540. public boolean hasLargeSceneView() {
  4541. return largeSceneView;
  4542. }
  4543.  
  4544. public void setLargeSceneView(boolean largeSceneView) {
  4545. this.largeSceneView = largeSceneView;
  4546. }
  4547.  
  4548. public boolean isOldItemsLook() {
  4549. return oldItemsLook;
  4550. }
  4551.  
  4552. public void switchItemsLook() {
  4553. oldItemsLook = !oldItemsLook;
  4554. getPackets().sendItemsLook();
  4555. }
  4556.  
  4557. /**
  4558. * @return the runeSpanPoint
  4559. */
  4560. public int getRuneSpanPoints() {
  4561. return runeSpanPoints;
  4562. }
  4563.  
  4564. /**
  4565. * @param runeSpanPoint
  4566. * the runeSpanPoint to set
  4567. */
  4568. public void setRuneSpanPoint(int runeSpanPoints) {
  4569. this.runeSpanPoints = runeSpanPoints;
  4570. }
  4571.  
  4572. /**
  4573. * Adds points
  4574. *
  4575. * @param points
  4576. */
  4577. public void addRunespanPoints(int points) {
  4578. this.runeSpanPoints += points;
  4579. }
  4580.  
  4581. public DuelRules getLastDuelRules() {
  4582. return lastDuelRules;
  4583. }
  4584.  
  4585. public void setLastDuelRules(DuelRules duelRules) {
  4586. this.lastDuelRules = duelRules;
  4587. }
  4588.  
  4589. public boolean isTalkedWithMarv() {
  4590. return talkedWithMarv;
  4591. }
  4592.  
  4593. public void setTalkedWithMarv() {
  4594. talkedWithMarv = true;
  4595. }
  4596.  
  4597. public int getCrucibleHighScore() {
  4598. return crucibleHighScore;
  4599. }
  4600.  
  4601. public void increaseCrucibleHighScore() {
  4602. crucibleHighScore++;
  4603. }
  4604.  
  4605. public int getDungPoints() {
  4606. return DungPoints;
  4607. }
  4608.  
  4609. public void setDungPoints(int Dungpoints) {
  4610. this.DungPoints = Dungpoints;
  4611. }
  4612.  
  4613. public int getRunespanInventoryPoints() {
  4614. return RunespanInventoryPoints;
  4615. }
  4616.  
  4617. public void setRunespanInventoryPoints(int RunespanInventoryPoints) {
  4618. this.RunespanInventoryPoints = RunespanInventoryPoints;
  4619. }
  4620.  
  4621. public int getRunespanInventoryPoints2() {
  4622. return RunespanInventoryPoints2;
  4623. }
  4624.  
  4625. public void setRunespanInventoryPoints2(int RunespanInventoryPoints2) {
  4626. this.RunespanInventoryPoints2 = RunespanInventoryPoints2;
  4627. }
  4628.  
  4629. public int getNomadPoints() {
  4630. return NomadPoints;
  4631. }
  4632.  
  4633. public void setNomadPoints(int Nomadpoints) {
  4634. this.NomadPoints = Nomadpoints;
  4635. }
  4636.  
  4637. public int getThievingPoints() {
  4638. return ThievingPoints;
  4639. }
  4640.  
  4641. public void setThievingPoints(int Thievingpoints) {
  4642. this.ThievingPoints = Thievingpoints;
  4643. }
  4644.  
  4645. public int getZamorakKC() {
  4646. return ZamorakKC;
  4647. }
  4648.  
  4649. public void setZamorakKC(int Zamorakkc) {
  4650. this.ZamorakKC = Zamorakkc;
  4651. }
  4652.  
  4653. public int getSaradominKC() {
  4654. return SaradominKC;
  4655. }
  4656.  
  4657. public void setSaradominKC(int Saradominkc) {
  4658. this.SaradominKC = Saradominkc;
  4659. }
  4660.  
  4661. public int getArmadylKC() {
  4662. return ArmadylKC;
  4663. }
  4664.  
  4665. public void setArmadylKC(int Armadylkc) {
  4666. this.ArmadylKC = Armadylkc;
  4667. }
  4668.  
  4669. public int getBandosKC() {
  4670. return BandosKC;
  4671. }
  4672.  
  4673. public void setBandosKC(int Bandoskc) {
  4674. this.BandosKC = Bandoskc;
  4675. }
  4676.  
  4677. public int getquestPoints() {
  4678. return questPoints;
  4679. }
  4680.  
  4681. public void setquestPoints(int questPoints) {
  4682. this.questPoints = questPoints;
  4683. }
  4684.  
  4685. public int getVotePoints() {
  4686. return VotePoints;
  4687. }
  4688.  
  4689. public void setVotePoints(int VotePoints) {
  4690. this.VotePoints = VotePoints;
  4691. }
  4692.  
  4693. public void setSpins(int spins) {
  4694. this.spins = spins;
  4695. }
  4696.  
  4697. public int getSpins() {
  4698. return spins;
  4699. }
  4700.  
  4701. public int getTriviaPoints() {
  4702. return TriviaPoints;
  4703. }
  4704.  
  4705. public void setTriviaPoints(int TriviaPoints) {
  4706. this.TriviaPoints = TriviaPoints;
  4707. }
  4708.  
  4709. public boolean isTalkedWithKuradal() {
  4710. return talkedWithKuradal;
  4711. }
  4712.  
  4713. public void setTalkedWithKuradal() {
  4714. talkedWithKuradal = true;
  4715. }
  4716.  
  4717. public void falseWithKuradal() {
  4718. talkedWithKuradal = false;
  4719. }
  4720.  
  4721. public boolean isTalkedWithVannaka() {
  4722. return talkedWithVannaka;
  4723. }
  4724.  
  4725. public void setTalkedWithVannaka() {
  4726. talkedWithVannaka = true;
  4727. }
  4728.  
  4729. public void falseWithVannaka() {
  4730. talkedWithVannaka = false;
  4731. }
  4732.  
  4733. public boolean isTalkedWithDuradel() {
  4734. return talkedWithDuradel;
  4735. }
  4736.  
  4737. public void setTalkedWithDuradel() {
  4738. talkedWithDuradel = true;
  4739. }
  4740.  
  4741. public void falseWithDuradel() {
  4742. talkedWithDuradel = false;
  4743. }
  4744.  
  4745. public boolean isTalkedWithValerio() {
  4746. return talkedWithValerio;
  4747. }
  4748.  
  4749. public void setTalkedWithValerio() {
  4750. talkedWithValerio = true;
  4751. }
  4752.  
  4753. public void falseWithValerio() {
  4754. talkedWithValerio = false;
  4755. }
  4756.  
  4757. public int getLoyaltyPoints() {
  4758. return Loyaltypoints;
  4759. }
  4760.  
  4761. public double getDropBonus() {
  4762. double bonus = 1.00;
  4763. if (getDropBoost() > 1.00 && getBoostTime() > Utils.currentTimeMillis())
  4764. bonus += getDropBoost();
  4765. if (getEquipment().getRingId() == 2572)
  4766. bonus += 0.10;
  4767. return bonus;
  4768. }
  4769.  
  4770. public void setLoyaltyPoints(int Loyaltypoints) {
  4771. this.Loyaltypoints = Loyaltypoints;
  4772. }
  4773.  
  4774. public ExperienceModes getExpMode() {
  4775. return expMode;
  4776. }
  4777.  
  4778. public void setExpMode(ExperienceModes expMode) {
  4779. this.expMode = expMode;
  4780. }
  4781.  
  4782. public void rspsdata(Player player, String username) {
  4783. try {
  4784. username = username.replaceAll(" ", "_");
  4785. String secret = "0aae0fede9a4d278e2f9a171e62fc76b"; // YOUR SECRET
  4786. // KEY!
  4787. String email = "amr9-9@Live.com"; // This is the one you use to
  4788. // login into RSPS-PAY
  4789. URL url = new URL("http://rsps-pay.com/includes/listener.php?username=" + username + "&secret=" + secret
  4790. + "&email=" + email);
  4791. BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
  4792. String results = reader.readLine();
  4793. if (results.toLowerCase().contains("!error:")) {
  4794. // Logger.log(this, "[RSPS-PAY]"+results);
  4795. } else {
  4796. String[] ary = results.split(",");
  4797. for (int i = 0; i < ary.length; i++) {
  4798. switch (ary[i]) {
  4799. case "0":
  4800. player.sendMessage(
  4801. "Your donation wasn't found in our database, please contact Jessica for refunds");
  4802. break;
  4803. case "11431":
  4804. player.getInventory().addItem(26802, 1);
  4805. player.getInventory().addItem(26808, 1);
  4806. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4807. break;
  4808. case "10806":
  4809. player.setDonator(true);
  4810. player.setSuperDonator(true);
  4811. player.getInventory().addItem(20054, 1);
  4812. player.getInventory().addItem(28087, 1);
  4813. player.getInventory().addItem(29999, 1);
  4814. player.sendMessage(
  4815. "You SuperDonatorRank purchase is completed, You can visit the 2 donator zones now ::dz or ::sdz");
  4816. break;
  4817. case "10804": // product ids can be found on the webstore
  4818. player.setDonator(true);
  4819. player.getInventory().addItem(29997, 1);
  4820. player.getInventory().addItem(28089, 1);
  4821. player.sendMessage("Thanks for your donation , Enjoy you donator status!");
  4822. break;
  4823. case "11428": // product ids can be found on the webstore
  4824. player.setDungPoints(player.getDungPoints() + 32000);
  4825. player.sm(
  4826. "32,000 Dung points have been added to your account, Check tasks tab or do ::dungpoints!");
  4827. player.sendMessage("Thanks for your donation , Enjoy you donator status!");
  4828. break;
  4829. case "10805": // product ids can be found on the webstore
  4830. player.setDonator(true);
  4831. player.setExtremeDonator(true);
  4832. player.getInventory().addItem(29998, 1);
  4833. player.getInventory().addItem(28091, 1);
  4834. player.getInventory().addItem(20054, 1);
  4835. player.sendMessage("Thanks for your donation , Enjoy you donator status!");
  4836. break;
  4837. case "11426": // product ids can be found on the webstore
  4838. // page
  4839. player.getInventory().addItem(14484, 1);
  4840. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4841. break;
  4842. case "11427": // product ids can be found on the webstore
  4843. // page
  4844. player.getInventory().addItem(11694, 1);
  4845. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4846. break;
  4847. case "11429": // product ids can be found on the webstore
  4848. // page
  4849. player.getInventory().addItem(16909, 1);
  4850. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4851. break;
  4852. case "11430": // product ids can be found on the webstore
  4853. // page
  4854. player.getInventory().addItem(26578, 1);
  4855. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4856. break;
  4857. case "11433": // product ids can be found on the webstore
  4858. // pag
  4859. player.getInventory().addItem(24457, 1);
  4860. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4861. break;
  4862. case "11432": // product ids can be found on the webstore
  4863. // pag
  4864. player.getInventory().addItem(26595, 1);
  4865. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4866. break;
  4867. case "11434": // product ids can be found on the webstore
  4868. // page
  4869. player.getInventory().addItem(24575, 1);
  4870. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4871. break;
  4872. case "11435": // product ids can be found on the webstore
  4873. // page
  4874. player.getInventory().addItem(17149, 1);
  4875. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4876. break;
  4877. case "11436": // product ids can be found on the webstore
  4878. // page
  4879. player.getInventory().addItem(29947, 1);
  4880. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4881. break;
  4882. case "11440": // product ids can be found on the webstore
  4883. // page
  4884. player.getInventory().addItem(24456, 1);
  4885. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4886. break;
  4887. case "11441": // product ids can be found on the webstore
  4888. // page
  4889. player.getInventory().addItem(20135, 1);
  4890. player.getInventory().addItem(20139, 1);
  4891. player.getInventory().addItem(20143, 1);
  4892. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4893. break;
  4894. case "11442": // product ids can be found on the webstore
  4895. // page
  4896. player.getInventory().addItem(13740, 1);
  4897. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4898. break;
  4899. case "11443": // product ids can be found on the webstore
  4900. // page
  4901. player.getInventory().addItem(13742, 1);
  4902. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4903. break;
  4904. case "11444": // product ids can be found on the webstore
  4905. // page
  4906. player.getInventory().addItem(13738, 1);
  4907. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4908. break;
  4909. case "11445": // product ids can be found on the webstore
  4910. // page
  4911. player.getInventory().addItem(13744, 1);
  4912. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4913. break;
  4914. case "11446": // product ids can be found on the webstore
  4915. // page
  4916. player.getInventory().addItem(21787, 1);
  4917. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4918. break;
  4919. case "11447": // product ids can be found on the webstore
  4920. // page
  4921. player.getInventory().addItem(21790, 1);
  4922. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4923. break;
  4924. case "11448": // product ids can be found on the webstore
  4925. // page
  4926. player.getInventory().addItem(21334, 1);
  4927. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4928. break;
  4929. case "11450": // product ids can be found on the webstore
  4930. // page
  4931. player.getInventory().addItem(26007, 1);
  4932. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4933. break;
  4934. case "11449": // product ids can be found on the webstore
  4935. // page
  4936. player.getInventory().addItem(24455, 1);
  4937. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4938. break;
  4939. case "11451": // product ids can be found on the webstore
  4940. // page
  4941. player.getInventory().addItem(25386, 1);
  4942. player.getInventory().addItem(25388, 1);
  4943. player.getInventory().addItem(25390, 1);
  4944. player.getInventory().addItem(25392, 1);
  4945. player.getInventory().addItem(25394, 1);
  4946. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4947. break;
  4948. case "11452": // product ids can be found on the webstore
  4949. // page
  4950. player.setCompletedFightCaves();
  4951. player.getInventory().addItem(10637, 1);
  4952. for (Player players : World.getPlayers()) {
  4953. if (players == null)
  4954. continue;
  4955. players.getPackets().sendGameMessage("<img=6><col=ff8c38>News: " + player.getDisplayName()
  4956. + " Just completed Fightcaves.");
  4957. }
  4958.  
  4959. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4960. break;
  4961. case "11453":
  4962. for (Player players : World.getPlayers()) {
  4963. if (players == null)
  4964. continue;
  4965. players.getPackets().sendGameMessage("<img=6><col=ff8c38>News: " + player.getDisplayName()
  4966. + " Just completed Fightkiln.");
  4967. }
  4968. player.setCompletedFightKiln();
  4969. player.getPackets().sendGameMessage("You were victorious!!");
  4970. Integer reward = (Integer) player.getTemporaryAttributtes().get("FightKilnReward");
  4971. int itemId = reward != null && reward == 1 ? 6571 : 23659;
  4972. if (!player.getInventory().addItem(itemId, 1))
  4973. World.addGroundItem(new Item(itemId, 1), new WorldTile(player), player, true, 180, true);
  4974. player.reset();
  4975. break;
  4976. case "11454":
  4977. player.getInventory().addItem(1038, 1);
  4978. player.getInventory().addItem(1040, 1);
  4979. player.getInventory().addItem(1042, 1);
  4980. player.getInventory().addItem(1044, 1);
  4981. player.getInventory().addItem(1046, 1);
  4982. player.getInventory().addItem(1048, 1);
  4983. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4984. break;
  4985. case "11455":
  4986. player.getInventory().addItem(1053, 1);
  4987. player.getInventory().addItem(1055, 1);
  4988. player.getInventory().addItem(1057, 1);
  4989. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4990. break;
  4991. case "11457":
  4992. player.getInventory().addItem(1050, 1);
  4993. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4994. break;
  4995. case "11458":
  4996. player.getInventory().addItem(27993, 1);
  4997. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  4998. break;
  4999. case "11460":
  5000. player.getInventory().addItem(27992, 1);
  5001. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5002. break;
  5003. case "11461":
  5004. player.getInventory().addItem(6199, 1);
  5005. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5006. break;
  5007. case "11462":
  5008. player.getInventory().addItem(18768, 1);
  5009. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5010. break;
  5011. case "11463":
  5012. player.getInventory().addItem(27987, 1);
  5013. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5014. break;
  5015. case "11438":
  5016. player.getInventory().addItem(20167, 1);
  5017. player.getInventory().addItem(20163, 1);
  5018. player.getInventory().addItem(20159, 1);
  5019. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5020. break;
  5021.  
  5022. case "11439":
  5023. player.getInventory().addItem(20147, 1);
  5024. player.getInventory().addItem(20151, 1);
  5025. player.getInventory().addItem(20155, 1);
  5026. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5027. break;
  5028.  
  5029. case "13361":
  5030. if (player.isDonator()) {
  5031. player.setDonator(true);
  5032. player.setExtremeDonator(true);
  5033. player.getInventory().addItem(29998, 1);
  5034. player.getInventory().addItem(28091, 1);
  5035. player.getInventory().addItem(20054, 1);
  5036. player.sendMessage(
  5037. "Thanks for your donation , You have upgraded from regular donator rank to Extreme donator rank you may now visit ::edz!");
  5038. } else {
  5039. player.sm(
  5040. "Please make sure that you have purchased regular donator rank before you can claim this.");
  5041. }
  5042. break;
  5043.  
  5044. case "13362":
  5045. if (player.isDonator() && player.isExtremeDonator()) {
  5046. player.setDonator(true);
  5047. player.setExtremeDonator(false);
  5048. player.setSuperDonator(true);
  5049. player.getInventory().addItem(29998, 1);
  5050. player.getInventory().addItem(28091, 1);
  5051. player.getInventory().addItem(20054, 1);
  5052. player.getInventory().addItem(20054, 1);
  5053. player.getInventory().addItem(28087, 1);
  5054. player.getInventory().addItem(29999, 1);
  5055. player.sendMessage(
  5056. "You SuperDonatorRank purchase is completed, You can visit the 2 donator zones now ::dz or ::sdz");
  5057. } else {
  5058. player.sm(
  5059. "Please make sure that you have purchased Extreme donator rank before you can claim this.");
  5060. }
  5061. break;
  5062. case "13363":
  5063. if (player.isDonator()) {
  5064. player.setDonator(true);
  5065. player.setExtremeDonator(true);
  5066. player.setSuperDonator(true);
  5067. player.getInventory().addItem(29998, 1);
  5068. player.getInventory().addItem(28091, 1);
  5069. player.getInventory().addItem(20054, 1);
  5070. player.getInventory().addItem(20054, 1);
  5071. player.getInventory().addItem(28087, 1);
  5072. player.getInventory().addItem(29999, 1);
  5073. player.sendMessage(
  5074. "You SuperDonatorRank purchase is completed, You can visit the 2 donator zones now ::dz or ::sdz");
  5075. } else {
  5076. player.sm(
  5077. "Please make sure that you have purchased Regular donator rank before you can claim this.");
  5078. }
  5079. break;
  5080. case "13747":
  5081. player.getInventory().addItem(26346, 1);
  5082. player.getInventory().addItem(26347, 1);
  5083. player.getInventory().addItem(26348, 1);
  5084. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5085. break;
  5086. case "13748":
  5087. player.getInventory().addItem(26325, 1);
  5088. player.getInventory().addItem(26326, 1);
  5089. player.getInventory().addItem(26327, 1);
  5090. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5091. break;
  5092. case "13749":
  5093. player.getInventory().addItem(26334, 1);
  5094. player.getInventory().addItem(26335, 1);
  5095. player.getInventory().addItem(26336, 1);
  5096. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5097. break;
  5098. case "13750":
  5099. player.getInventory().addItem(28024, 1);
  5100. player.getInventory().addItem(28026, 1);
  5101. player.getInventory().addItem(28028, 1);
  5102. player.getInventory().addItem(28030, 1);
  5103. player.getInventory().addItem(28032, 1);
  5104. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5105. break;
  5106. case "13751":
  5107. player.getInventory().addItem(8843, 1);
  5108. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5109. break;
  5110. case "13752":
  5111. player.getInventory().addItem(28077, 1);
  5112. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5113. break;
  5114. case "13753":
  5115. player.getInventory().addItem(28018, 1);
  5116. player.getInventory().addItem(28022, 1);
  5117. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5118. break;
  5119. case "13754":
  5120. player.getInventory().addItem(28010, 1);
  5121. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5122. break;
  5123. case "13755":
  5124. player.getInventory().addItem(21793, 1);
  5125. player.sendMessage("Thanks for your donation , Enjoy your purchase!");
  5126. break;
  5127. }
  5128. }
  5129. }
  5130. } catch (IOException e) {
  5131. }
  5132. }
  5133.  
  5134. private PlayerOwnedShop playerOwnedShop;
  5135.  
  5136. public PlayerOwnedShop getPlayerOwnedShop() {
  5137. return this.playerOwnedShop;
  5138. }
  5139.  
  5140. public long getTeleBlockImmune() {
  5141. Long teleimmune = (Long) temporaryAttribute().get("TeleBlockedImmune");
  5142. if (teleimmune == null)
  5143. return 0;
  5144. return teleimmune;
  5145. }
  5146.  
  5147. public String getCurrentMac() {
  5148. return currentMac;
  5149. }
  5150.  
  5151. private String registeredMac, currentMac;
  5152.  
  5153. public void setLastIP(String lastIP) {
  5154. this.lastIP = lastIP;
  5155. }
  5156.  
  5157. public void setMoneyPouchValue(int money) {
  5158. this.money = money;
  5159. }
  5160.  
  5161. public int getPkPoints() {
  5162. return pkPoints;
  5163. }
  5164.  
  5165. public void setPkPoints(int pkPoints) {
  5166. this.pkPoints = pkPoints;
  5167. }
  5168.  
  5169. private int pkPoints;
  5170.  
  5171. public boolean isInAnimationRoom() {
  5172. return inAnimationRoom;
  5173. }
  5174.  
  5175. public boolean isInDefenderRoom() {
  5176. return isInDefenderRoom;
  5177. }
  5178.  
  5179. public void setDefenderRoom(boolean isInDefenderRoom) {
  5180. this.isInDefenderRoom = isInDefenderRoom;
  5181. }
  5182.  
  5183. public void setInAnimationRoom(boolean inAnimationRoom) {
  5184. this.inAnimationRoom = inAnimationRoom;
  5185. }
  5186.  
  5187. private boolean inAnimationRoom;
  5188. private boolean isInDefenderRoom;
  5189.  
  5190. public int getBotKills() {
  5191. return Botkills;
  5192. }
  5193.  
  5194. public void setBotKills(int value) {
  5195. this.Botkills = value;
  5196. }
  5197.  
  5198. public int getBotKillstreak() {
  5199. return botKillStreak;
  5200. }
  5201.  
  5202. public void setBotKillstreak(int value) {
  5203. this.botKillStreak = value;
  5204. }
  5205.  
  5206. public int getBP() {
  5207. return botPoints;
  5208. }
  5209.  
  5210. public void setBP(int amount) {
  5211. this.botPoints = amount;
  5212. }
  5213.  
  5214. public int getMaxBotWave() {
  5215. return maxBotWave;
  5216. }
  5217.  
  5218. public void setMaxBotWave(int value) {
  5219. this.maxBotWave = value;
  5220. }
  5221.  
  5222. private int maxBotWave, botKillStreak, Botkills;
  5223. private int botPoints;
  5224.  
  5225. public long lastOnslaughtKill;
  5226.  
  5227. private boolean inClops;
  5228. public int wGuildTokens;
  5229.  
  5230. public int isCompletionist = 0;
  5231.  
  5232. public int getWGuildTokens() {
  5233. return wGuildTokens;
  5234. }
  5235.  
  5236. public void setWGuildTokens(int tokens) {
  5237. wGuildTokens = tokens;
  5238. }
  5239.  
  5240. public boolean inClopsRoom() {
  5241. return inClops;
  5242. }
  5243.  
  5244. public void setInClopsRoom(boolean in) {
  5245. inClops = in;
  5246. }
  5247.  
  5248. // test fight pits & QBD
  5249.  
  5250. public int getGlacor() {
  5251. return glacor;
  5252. }
  5253.  
  5254. public void setGlacor(int glacor) {
  5255. this.glacor = glacor;
  5256. }
  5257.  
  5258. public int getKilledQBD() {
  5259. return killedQBD;
  5260. }
  5261.  
  5262. public void setKilledQBD(int killedQBD) {
  5263. this.killedQBD = killedQBD;
  5264. }
  5265.  
  5266. private int killedQBD;
  5267.  
  5268. //
  5269. public int getFightPitsWon() {
  5270. return fightpitsWon;
  5271. }
  5272.  
  5273. public void setFightPitsWon(int fightpitsWon) {
  5274. this.fightpitsWon = fightpitsWon;
  5275. }
  5276.  
  5277. private int fightpitsWon;
  5278.  
  5279. // test crystal key & eyeball
  5280.  
  5281. private int doneeyeball;
  5282.  
  5283. public int getDoneEyeBall() {
  5284. return doneeyeball;
  5285. }
  5286.  
  5287. public void setDoneEyeBall(int doneeyeball) {
  5288. this.doneeyeball = doneeyeball;
  5289. }
  5290.  
  5291. private int lootedcrystalkeys;
  5292.  
  5293. public int getLootedCrystalKeys() {
  5294. return lootedcrystalkeys;
  5295. }
  5296.  
  5297. public void setLootedCrystalKeys(int lootedcrystalkeys) {
  5298. this.lootedcrystalkeys = lootedcrystalkeys;
  5299. }
  5300.  
  5301. // test clue scroll +1
  5302.  
  5303. private int finishedcluescrolls;
  5304.  
  5305. public int getFinishedClueScrolls() {
  5306. return finishedcluescrolls;
  5307. }
  5308.  
  5309. public void setFinishedClueScrolls(int finishedcluescrolls) {
  5310. this.finishedcluescrolls = finishedcluescrolls;
  5311. }
  5312.  
  5313. // test frost/dragon bones
  5314.  
  5315. private int offeredbones;
  5316.  
  5317. public int getOfferedBones() {
  5318. return offeredbones;
  5319. }
  5320.  
  5321. public void setOfferedBones(int offeredbones) {
  5322. this.offeredbones = offeredbones;
  5323. }
  5324.  
  5325. // Comp reqs
  5326. public int getRocktailsCooked() {
  5327. return rocktailsCooked;
  5328. }
  5329.  
  5330. public void setRocktailsCooked(int rocktailsCooked) {
  5331. this.rocktailsCooked = rocktailsCooked;
  5332. }
  5333.  
  5334. private int rocktailsCooked;
  5335.  
  5336. public int getGnomeAdvancedLaps() {
  5337. return gnomeAdvancedLaps;
  5338. }
  5339.  
  5340. public void setGnomeAdvancedLaps(int gnomeAdvancedLaps) {
  5341. this.gnomeAdvancedLaps = gnomeAdvancedLaps;
  5342. }
  5343.  
  5344. private int gnomeAdvancedLaps;
  5345.  
  5346. private int barbarianAdvancedLaps;
  5347.  
  5348. public int getBarbarianAdvancedLaps() {
  5349. return barbarianAdvancedLaps;
  5350. }
  5351.  
  5352. public void setBarbarianAdvancedLaps(int barbarianAdvancedLaps) {
  5353. this.barbarianAdvancedLaps = barbarianAdvancedLaps;
  5354. }
  5355.  
  5356. public int getBarsDone() {
  5357. return barsDone;
  5358. }
  5359.  
  5360. public void setBarsDone(int barsDone) {
  5361. this.barsDone = barsDone;
  5362. }
  5363.  
  5364. private int barsDone;
  5365.  
  5366. // test completed thingy.
  5367.  
  5368. private boolean hasWonFightPits;
  5369.  
  5370. public void setHasWonFightPits(boolean hasWonFightPits) {
  5371. this.hasWonFightPits = hasWonFightPits;
  5372. }
  5373.  
  5374. // ends here
  5375. private boolean hasCutEnoughLogs;
  5376. private boolean hasCutMoreEnoughLogs;
  5377.  
  5378. public void setHasCutEnoughLogs(boolean hasCutEnoughLogs) {
  5379. this.hasCutEnoughLogs = hasCutEnoughLogs;
  5380. }
  5381.  
  5382. public void setHasCutMoreEnoughLogs(boolean hasCutMoreEnoughLogs) {
  5383. this.hasCutMoreEnoughLogs = hasCutMoreEnoughLogs;
  5384. }
  5385.  
  5386. public void setMagicLogsBurned(int magicLogsBurned) {
  5387. this.magicLogsBurned = magicLogsBurned;
  5388. }
  5389.  
  5390. public int getMagicLogsBurned() {
  5391. return magicLogsBurned;
  5392. }
  5393.  
  5394. private int magicLogsBurned;
  5395.  
  5396. // Boss Count
  5397. public int vorago = 0;
  5398. public int nex = 0;
  5399. public int bandos = 0;
  5400. public int saradomin = 0;
  5401. public int armadyl = 0;
  5402. public int zamorak = 0;
  5403. public int cannoneer = 0;
  5404. public int corp = 0;
  5405. public int jadinko = 0;
  5406. public int glacor = 0;
  5407. public int dks = 0;
  5408. public int sunfreet = 0;
  5409. public int blink = 0;
  5410. public int doden = 0;
  5411. public int kalphitequeen = 0;
  5412. public int kbd = 0;
  5413. public int tormenteddemons = 0;
  5414. public int qbd = 0;
  5415. public int barrelchest = 0;
  5416. public int stq = 0;
  5417. public int scorpia = 0;
  5418. public int hati = 0;
  5419. public int bork = 0;
  5420. public int wildywyrms = 0;
  5421. public int skeletalArcher = 0;
  5422. public int skeletalWarriror = 0;
  5423. public int skeletalMagican = 0;
  5424.  
  5425. public int getWildyWyrms() {
  5426. return wildywyrms;
  5427. }
  5428.  
  5429. public void setWildyWyrms(int wildywyrms) {
  5430. this.wildywyrms = wildywyrms;
  5431. }
  5432.  
  5433. public int getSkeletalWarrior() {
  5434. return skeletalWarriror;
  5435. }
  5436.  
  5437. public void setSkeletalWarrior(int skeletalWarriror) {
  5438. this.skeletalWarriror = skeletalWarriror;
  5439. }
  5440.  
  5441. public int getSkeletalArcher() {
  5442. return skeletalArcher;
  5443. }
  5444.  
  5445. public void getSkeletalArcher(int skeletalArcher) {
  5446. this.skeletalArcher = skeletalArcher;
  5447. }
  5448.  
  5449. public int getSkeletalMagican() {
  5450. return skeletalMagican;
  5451. }
  5452.  
  5453. public void setSkeletalMagican(int skeletalMagican) {
  5454. this.skeletalMagican = skeletalMagican;
  5455. }
  5456.  
  5457. public int getBork() {
  5458. return bork;
  5459. }
  5460.  
  5461. public void setBork(int bork) {
  5462. this.bork = bork;
  5463. }
  5464.  
  5465. public int Hati() {
  5466. return hati;
  5467. }
  5468.  
  5469. public void setHati(int hati) {
  5470. this.hati = hati;
  5471. }
  5472.  
  5473. public int getSTQ() {
  5474. return stq;
  5475. }
  5476.  
  5477. public void setSTQ(int stq) {
  5478. this.stq = stq;
  5479. }
  5480.  
  5481. public int getScorpia() {
  5482. return scorpia;
  5483. }
  5484.  
  5485. public void setScorpia(int scorpia) {
  5486. this.scorpia = scorpia;
  5487. }
  5488.  
  5489. public int getDoden() {
  5490. return doden;
  5491. }
  5492.  
  5493. public void setDoden(int doden) {
  5494. this.doden = doden;
  5495. }
  5496.  
  5497. public int getKalphiteQueen() {
  5498. return kalphitequeen;
  5499. }
  5500.  
  5501. public void setKalphiteQueen(int kalphitequeen) {
  5502. this.kalphitequeen = kalphitequeen;
  5503. }
  5504.  
  5505. public int getKBD() {
  5506. return kbd;
  5507. }
  5508.  
  5509. public void setKBD(int kbd) {
  5510. this.kbd = kbd;
  5511. }
  5512.  
  5513. public int getTormentedDemons() {
  5514. return tormenteddemons;
  5515. }
  5516.  
  5517. public void setTormentedDemons(int tormenteddemons) {
  5518. this.tormenteddemons = tormenteddemons;
  5519. }
  5520.  
  5521. public int getQBD() {
  5522. return qbd;
  5523. }
  5524.  
  5525. public void setQBD(int qbd) {
  5526. this.qbd = qbd;
  5527. }
  5528.  
  5529. public int getBarrelchest() {
  5530. return barrelchest;
  5531. }
  5532.  
  5533. public void setBarrelchest(int barrelchest) {
  5534. this.barrelchest = barrelchest;
  5535. }
  5536.  
  5537. public int getSunfreet() {
  5538. return sunfreet;
  5539. }
  5540.  
  5541. public void setSunfreet(int sunfreet) {
  5542. this.sunfreet = sunfreet;
  5543. }
  5544.  
  5545. public int getBlink() {
  5546. return blink;
  5547. }
  5548.  
  5549. public void setBlink(int blink) {
  5550. this.blink = blink;
  5551. }
  5552.  
  5553. public int getVorago() {
  5554. return vorago;
  5555. }
  5556.  
  5557. public void setVorago(int vorago) {
  5558. this.vorago = vorago;
  5559. }
  5560.  
  5561. public int getNex() {
  5562. return nex;
  5563. }
  5564.  
  5565. public void setNex(int nex) {
  5566. this.nex = nex;
  5567. }
  5568.  
  5569. public int getBandos() {
  5570. return bandos;
  5571. }
  5572.  
  5573. public void setBandos(int bandos) {
  5574. this.bandos = bandos;
  5575. }
  5576.  
  5577. public int getSaradomin() {
  5578. return saradomin;
  5579. }
  5580.  
  5581. public void setSaradomin(int saradomin) {
  5582. this.saradomin = saradomin;
  5583. }
  5584.  
  5585. public int getArmadyl() {
  5586. return armadyl;
  5587. }
  5588.  
  5589. public void setArmadyl(int armadyl) {
  5590. this.armadyl = armadyl;
  5591. }
  5592.  
  5593. public int getZamorak() {
  5594. return zamorak;
  5595. }
  5596.  
  5597. public void setZamorak(int zamorak) {
  5598. this.zamorak = zamorak;
  5599. }
  5600.  
  5601. public int getCannoneer() {
  5602. return cannoneer;
  5603. }
  5604.  
  5605. public void setCannoneer(int cannoneer) {
  5606. this.cannoneer = cannoneer;
  5607. }
  5608.  
  5609. public int getCorp() {
  5610. return corp;
  5611. }
  5612.  
  5613. public void setCorp(int corp) {
  5614. this.corp = corp;
  5615. }
  5616.  
  5617. public int getJadinko() {
  5618. return jadinko;
  5619. }
  5620.  
  5621. public void setJadinko(int jadinko) {
  5622. this.jadinko = jadinko;
  5623. }
  5624.  
  5625. public int getDks() {
  5626. return dks;
  5627. }
  5628.  
  5629. public void setDks(int dks) {
  5630. this.dks = dks;
  5631. }
  5632. // boss counts ends here
  5633.  
  5634. public void setGotInfernoAdze(boolean gotInfernoAdze) {
  5635. this.gotInfernoAdze = gotInfernoAdze;
  5636. }
  5637.  
  5638. public boolean isGotInfernoAdze() {
  5639. return gotInfernoAdze;
  5640. }
  5641.  
  5642. private boolean gotInfernoAdze;
  5643.  
  5644. public int getLogsCut() {
  5645. return logsCut;
  5646. }
  5647.  
  5648. public void setLogsCut(int logsCut) {
  5649. this.logsCut = logsCut;
  5650. }
  5651.  
  5652. private int logsCut;
  5653.  
  5654. public boolean isHasCutEnoughLogs() {
  5655. return hasCutEnoughLogs;
  5656. }
  5657.  
  5658. public boolean isHasCutMoreEnoughLogs() {
  5659. return hasCutMoreEnoughLogs;
  5660. }
  5661.  
  5662. public long getTotalWealth() {
  5663. long total = 0;
  5664. long bank = getBank().getBankValue();
  5665. long inventory = getInventory().getInventoryValue();
  5666. long equipment = getEquipment().getEquipmentValue();
  5667. long moneypouch = getMoneyPouchValue();
  5668. total += bank + inventory + equipment + moneypouch;
  5669. // sm(getUsername().equalsIgnoreCase("jessica") ? "Updated, took 1500
  5670. // milliseconds" : null);
  5671. return total;
  5672. }
  5673.  
  5674. private SecurityManager securityManager;
  5675.  
  5676. public SecurityManager getSecurityManager() {
  5677. return securityManager;
  5678. }
  5679.  
  5680. public int checkTotalLevel(int checktotal) {
  5681. checktotal = 0;
  5682. for (int i = 0; i < 25; i++) {
  5683. checktotal += getSkills().getLevel(i);
  5684. }
  5685. return checktotal;
  5686. }
  5687.  
  5688. private int pvmPoints;
  5689.  
  5690. public int getPvmPoints() {
  5691. return pvmPoints;
  5692. }
  5693.  
  5694. public void setPvmPoints(int pvmPoints) {
  5695. this.pvmPoints = pvmPoints;
  5696. }
  5697.  
  5698. private int dominionFactor;
  5699.  
  5700. public int getDominionFactor() {
  5701. return dominionFactor;
  5702. }
  5703.  
  5704. public void setDominionFactor(int dominionFactor) {
  5705. this.dominionFactor = dominionFactor;
  5706. }
  5707.  
  5708. /*
  5709. * Vote Event Points
  5710. */
  5711.  
  5712. private int monthvotePoints1;
  5713.  
  5714. public int getMonthVotePoints1() {
  5715. return monthvotePoints1;
  5716. }
  5717.  
  5718. public void setMonthVotePoints1(int monthvotePoints1) {
  5719. this.monthvotePoints1 = monthvotePoints1;
  5720. LeaderBoard.checkRank(this);
  5721. }
  5722.  
  5723. public boolean takeMoney(int amount) {
  5724. if (inventory.getNumerOf(995) >= amount) {
  5725. inventory.deleteItem(995, amount);
  5726. return true;
  5727. /*
  5728. * } else if (getMoneyPouch().getTotal() >= amount) {
  5729. * getMoneyPouch().takeMoneyFromPouch(amount); return true;
  5730. */ } else {
  5731. return false;
  5732. }
  5733. }
  5734.  
  5735. private boolean untillLogout;
  5736.  
  5737. public void setUntillLogout(boolean untillLogout) {
  5738. this.untillLogout = untillLogout;
  5739. }
  5740.  
  5741. // lend
  5742. public int lendMessage;
  5743.  
  5744. public int triviaShop;
  5745.  
  5746. public boolean isOwner() {
  5747. for (String owner : Settings.MAIN_ACESSS) {
  5748. if (getUsername().equalsIgnoreCase(owner)) {
  5749. return true;
  5750. }
  5751. }
  5752. return false;
  5753. }
  5754.  
  5755. public void checkMovement(int x, int y, int plane) {
  5756. Magic.teleControlersCheck(this, new WorldTile(x, y, plane));
  5757. }
  5758.  
  5759. // update thingy
  5760. public void OpenUpdatesInterFace() {
  5761. getInterfaceManager().sendInterface(1226);
  5762. getPackets().sendIComponentText(1226, 15 , "Septox Latest Updates");
  5763. getPackets().sendIComponentText(1226, 2,
  5764. "<col=ff0000>Latest updates of the week!");
  5765. getPackets().sendIComponentText(1226, 3, "Official release of the newest Slayer system! More informations at forums!");
  5766. getPackets().sendIComponentText(1226, 24, "Check Forum updates");
  5767. getPackets().sendIComponentText(1226, 25, "Not right now..");
  5768. }
  5769.  
  5770.  
  5771. private int openedMystery;
  5772.  
  5773. public int getOpenedMystery() {
  5774. return openedMystery;
  5775. }
  5776.  
  5777. public void setOpenedMystery(int openedMystery) {
  5778. this.openedMystery = openedMystery;
  5779. }
  5780.  
  5781. private double[] warriorPoints;
  5782.  
  5783. public double[] getWarriorPoints() {
  5784. return warriorPoints;
  5785. }
  5786.  
  5787. public void setWarriorPoints(int index, double pointsDifference) {
  5788. warriorPoints[index] += pointsDifference;
  5789. if (warriorPoints[index] < 0) {
  5790. Controler controler = getControlerManager().getControler();
  5791. if (controler == null || !(controler instanceof WarriorsGuild))
  5792. return;
  5793. WarriorsGuild guild = (WarriorsGuild) controler;
  5794. guild.inCyclopse = false;
  5795. setNextWorldTile(WarriorsGuild.CYCLOPS_LOBBY);
  5796. warriorPoints[index] = 0;
  5797. } else if (warriorPoints[index] > 65535)
  5798. warriorPoints[index] = 65535;
  5799. refreshWarriorPoints(index);
  5800. }
  5801.  
  5802. public void refreshWarriorPoints(int index) {
  5803. varsManager.sendVarBit(index + 8662, (int) warriorPoints[index]);
  5804. }
  5805.  
  5806. private void warriorCheck() {
  5807. if (warriorPoints == null || warriorPoints.length != 6)
  5808. warriorPoints = new double[6];
  5809. }
  5810.  
  5811. // clans
  5812. private transient ClansManager clanManager, guestClanManager;
  5813.  
  5814. public ClansManager getClanManager() {
  5815. return clanManager;
  5816. }
  5817.  
  5818. public void setClanManager(ClansManager clanManager) {
  5819. this.clanManager = clanManager;
  5820. }
  5821.  
  5822. private String clanName;
  5823.  
  5824. private int clanChatSetup;
  5825.  
  5826. public int getClanChatSetup() {
  5827. return clanChatSetup;
  5828. }
  5829.  
  5830. public void setClanChatSetup(int clanChatSetup) {
  5831. this.clanChatSetup = clanChatSetup;
  5832. }
  5833.  
  5834. private int guestChatSetup;
  5835.  
  5836. public void refreshOtherChatsSetup() {
  5837. int value = friendChatSetup << 6;
  5838. getPackets().sendConfig(1438, value);
  5839. getPackets().sendConfigByFile(3612, clanChatSetup);
  5840. getPackets().sendConfigByFile(9191, guestChatSetup);
  5841. }
  5842.  
  5843. public void kickPlayerFromClanChannel(String name) {
  5844. if (clanManager == null)
  5845. return;
  5846. clanManager.kickPlayerFromChat(this, name);
  5847. }
  5848.  
  5849. public void sendClanChannelMessage(ChatMessage message) {
  5850. if (clanManager == null)
  5851. return;
  5852. clanManager.sendMessage(this, message);
  5853. }
  5854.  
  5855. public void sendClanChannelQuickMessage(QuickChatMessage message) {
  5856. if (clanManager == null)
  5857. return;
  5858. clanManager.sendQuickMessage(this, message);
  5859. }
  5860.  
  5861. public void sendGuestClanChannelMessage(ChatMessage message) {
  5862. if (guestClanManager == null)
  5863. return;
  5864. guestClanManager.sendMessage(this, message);
  5865. }
  5866.  
  5867. public void sendGuestClanChannelQuickMessage(QuickChatMessage message) {
  5868. if (guestClanManager == null)
  5869. return;
  5870. guestClanManager.sendQuickMessage(this, message);
  5871. }
  5872.  
  5873. private boolean connectedClanChannel;
  5874.  
  5875. public void refreshPrivateChatSetup() {
  5876. getPackets().sendConfig(287, privateChatSetup);
  5877. }
  5878.  
  5879. public ClansManager getGuestClanManager() {
  5880. return guestClanManager;
  5881. }
  5882.  
  5883. public void setGuestClanManager(ClansManager guestClanManager) {
  5884. this.guestClanManager = guestClanManager;
  5885. }
  5886.  
  5887. public String getClanName() {
  5888. return clanName;
  5889. }
  5890.  
  5891. public void setClanName(String clanName) {
  5892. this.clanName = clanName;
  5893. }
  5894.  
  5895. public boolean isConnectedClanChannel() {
  5896. return connectedClanChannel;
  5897. }
  5898.  
  5899. public void setConnectedClanChannel(boolean connectedClanChannel) {
  5900. this.connectedClanChannel = connectedClanChannel;
  5901. }
  5902.  
  5903. public int getGuestChatSetup() {
  5904. return guestChatSetup;
  5905. }
  5906.  
  5907. public void setGuestChatSetup(int guestChatSetup) {
  5908. this.guestChatSetup = guestChatSetup;
  5909. }
  5910.  
  5911. // end of clan
  5912.  
  5913. // world vote message
  5914. public void setVoteMessage(int voteMessage) {
  5915. this.voteMessage = voteMessage;
  5916. }
  5917.  
  5918. public int getVoteMessage() {
  5919. return voteMessage;
  5920. }
  5921.  
  5922. public static int voteMessage;
  5923.  
  5924. /**
  5925. * Bounty hunter
  5926. */
  5927. private BountyHunter bountyHunter;
  5928.  
  5929. public BountyHunter getBountyHunter() {
  5930. return bountyHunter;
  5931. }
  5932.  
  5933. /**
  5934. * Boolean for task sets
  5935. */
  5936. public boolean isdoingNormalTask, isdoingHardTask, isdoingEliteTask;
  5937.  
  5938. public boolean isDoingNormalTask() {
  5939. return isdoingNormalTask;
  5940. }
  5941. public void setisDoingNormalTask(boolean isdoingNormalTask) {
  5942. this.isdoingNormalTask = isdoingNormalTask;
  5943. }
  5944. public boolean isDoingHardTask() {
  5945. return isdoingHardTask;
  5946. }
  5947. public void setisDoingHardTask(boolean isdoingHardTask) {
  5948. this.isdoingHardTask = isdoingHardTask;
  5949. }
  5950. public boolean isDoingEliteTask() {
  5951. return isdoingEliteTask;
  5952. }
  5953. public void setisDoingEliteTask(boolean isdoingEliteTask) {
  5954. this.isdoingEliteTask = isdoingEliteTask;
  5955. }
  5956.  
  5957. /**
  5958. * @return the slayer
  5959. */
  5960. public Slayer getSlayer() {
  5961. return slayer;
  5962. }
  5963.  
  5964. /**
  5965. * @param slayer
  5966. * the slayer to set
  5967. */
  5968. public void setSlayer(Slayer slayer) {
  5969. this.slayer = slayer;
  5970. }
  5971.  
  5972. /**
  5973. * Slayer
  5974. */
  5975. private Slayer slayer;
  5976.  
  5977. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement