Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.rs.game.player;
- import java.net.InetAddress;
- import java.net.UnknownHostException;
- import java.text.DateFormat;
- import java.text.SimpleDateFormat;
- import java.util.ArrayList;
- import java.util.Collections;
- import java.util.Date;
- import java.util.LinkedList;
- import java.util.List;
- import java.util.concurrent.ConcurrentLinkedQueue;
- import java.util.concurrent.CopyOnWriteArrayList;
- import java.util.concurrent.TimeUnit;
- import com.rs.Settings;
- import com.rs.cache.loaders.ItemDefinitions;
- import com.rs.cores.CoresManager;
- import com.rs.game.Animation;
- import com.rs.game.CrossWorldMessages;
- import com.rs.game.Entity;
- import com.rs.game.ForceTalk;
- import com.rs.game.Graphics;
- import com.rs.game.Hit;
- import com.rs.game.Hit.HitLook;
- import com.rs.game.LotteryManager;
- import com.rs.game.PlayersOnlineUpdater;
- import com.rs.game.World;
- import com.rs.game.WorldObject;
- import com.rs.game.WorldTile;
- import com.rs.game.item.FloorItem;
- import com.rs.game.item.Item;
- import com.rs.game.item.ItemsContainer;
- import com.rs.game.minigames.ClanWars;
- import com.rs.game.minigames.DiceGame;
- import com.rs.game.minigames.FlowerGame;
- import com.rs.game.minigames.PestControl;
- import com.rs.game.minigames.Trivia;
- import com.rs.game.minigames.War;
- import com.rs.game.minigames.ancientthrone.ThroneManager;
- import com.rs.game.minigames.duel.DuelArena;
- import com.rs.game.minigames.duel.DuelRules;
- import com.rs.game.minigames.duel.DuelTrade;
- import com.rs.game.npc.NPC;
- import com.rs.game.npc.familiar.Familiar;
- import com.rs.game.npc.godwars.zaros.Nex;
- import com.rs.game.npc.reputation.Reputation;
- import com.rs.game.player.BTC.BTCManager;
- import com.rs.game.player.actions.PlayerCombat;
- import com.rs.game.player.actions.Slayer.Master;
- import com.rs.game.player.actions.Slayer.SlayerTask;
- import com.rs.game.player.content.AntiAFK;
- import com.rs.game.player.content.BankPin;
- import com.rs.game.player.content.Bounties;
- import com.rs.game.player.content.ClueScrolls;
- import com.rs.game.player.content.DwarfCannon;
- import com.rs.game.player.content.Familiars;
- import com.rs.game.player.content.FriendChatsManager;
- import com.rs.game.player.content.Highscores;
- import com.rs.game.player.content.Hotspots;
- import com.rs.game.player.content.Killstreaks;
- import com.rs.game.player.content.Magic;
- import com.rs.game.player.content.NetWealth;
- import com.rs.game.player.content.Notes;
- import com.rs.game.player.content.Pots;
- import com.rs.game.player.content.SkillCapeCustomizer;
- import com.rs.game.player.content.YouTubeReward;
- import com.rs.game.player.content.SkinsManager.SKINS;
- import com.rs.game.player.content.Tournaments;
- import com.rs.game.player.content.Trade;
- import com.rs.game.player.content.VoteTimeManager;
- import com.rs.game.player.content.WorldCup;
- import com.rs.game.player.content.XPLamp;
- import com.rs.game.player.content.YellTimer;
- import com.rs.game.player.content.bountyhunter.BountyHunter;
- import com.rs.game.player.content.monsterlogs.LogManager;
- import com.rs.game.player.controlers.AccountProtection;
- import com.rs.game.player.controlers.CastleWarsPlaying;
- import com.rs.game.player.controlers.CastleWarsWaiting;
- import com.rs.game.player.controlers.DTControler;
- import com.rs.game.player.controlers.DamageTent;
- import com.rs.game.player.controlers.FightCaves;
- import com.rs.game.player.controlers.PestControler;
- import com.rs.game.player.controlers.PitsControler;
- import com.rs.game.player.controlers.RedPortal;
- import com.rs.game.player.controlers.SafePortal;
- import com.rs.game.player.controlers.TowersPkControler;
- import com.rs.game.player.controlers.Wilderness;
- import com.rs.game.player.controlers.ZombieEscape;
- import com.rs.game.player.deadman.BankKeyManager;
- import com.rs.game.player.dialogues.MaxCape;
- import com.rs.game.player.towns.TownManager;
- import com.rs.game.sailing.Ship;
- import com.rs.game.sailing.ShipBattle;
- import com.rs.game.tasks.WorldTask;
- import com.rs.game.tasks.WorldTasksManager;
- import com.rs.net.Session;
- import com.rs.net.decoders.WorldPacketsDecoder;
- import com.rs.net.encoders.WorldPacketsEncoder;
- import com.rs.utils.DonationManager;
- import com.rs.utils.IPBanL;
- import com.rs.utils.Logger;
- import com.rs.utils.Misc;
- import com.rs.utils.PkRank;
- import com.rs.utils.SerializableFilesManager;
- import com.rs.utils.Statistics;
- import com.rs.utils.Utils;
- import com.rs.utils.WriteFile;
- public class Player extends Entity {
- public static final boolean MYSQL_ACTIVE = true;
- private transient DonationManager donationmanager;
- //public static VoteChecker voteChecker = new VoteChecker("91.217.178.207", "SherminationXrs_vote", "SherminationXrs_website", "SherminationX123001");
- public static final int TELE_MOVE_TYPE = 127, WALK_MOVE_TYPE = 1,
- RUN_MOVE_TYPE = 2;
- private static final long serialVersionUID = 2011932556974180375L;
- // transient stuff
- private transient Trade trade;
- private transient DuelTrade dueltrade;
- private transient ClanWars clanWars;
- private transient PestControl pestControl;
- private transient String username;
- private transient Session session;
- private transient boolean clientLoadedMapRegion;
- private transient int displayMode;
- private transient int screenWidth;
- private transient boolean usingTicket;
- private transient int trapAmount;
- private transient int screenHeight;
- private transient InterfaceManager interfaceManager;
- private transient AntiAFK afk;
- private transient DuelRules lastDuelRules;
- private transient DwarfCannon dwarfcannon;
- private transient PvpTimer pvpTimer;
- private transient Familiars fams;
- private transient NetWealth netwealth;
- private transient DiceGame dicegame;
- private transient FlowerGame flowergame;
- private transient BTCManager btc;
- private transient YellTimer yelltimer;
- private transient XPLamp xplamp;
- private transient Killstreaks killstreak;
- private transient LotteryManager lottery;
- private transient ClueScrolls clue;
- private transient Trivia trivia;
- private transient VoteTimeManager votetime;
- private transient DialogueManager dialogueManager;
- private transient HintIconsManager hintIconsManager;
- private transient ActionManager actionManager;
- private transient CutscenesManager cutscenesManager;
- private transient DuelConfigurations duelConfigurations;
- private transient PriceCheckManager priceCheckManager;
- private transient CoordsEvent coordsEvent;
- private transient FriendChatsManager currentFriendChat;
- // used for packets logic
- private transient ConcurrentLinkedQueue<LogicPacket> logicPackets;
- // used for update
- private transient LocalPlayerUpdate localPlayerUpdate;
- private transient LocalNPCUpdate localNPCUpdate;
- private int temporaryMovementType;
- private boolean updateMovementType;
- // player stages
- private transient boolean started;
- private transient boolean running;
- private transient long packetsDecoderPing;
- private transient boolean resting;
- private transient boolean canPvp;
- private transient long lockDelay;
- private transient long stopDelay; // used for doors and stuff like that
- private transient long foodDelay;
- private transient long potDelay;
- private transient long boneDelay;
- private transient Runnable closeInterfacesEvent;
- private transient long lastPublicMessage;
- private transient long polDelay;
- private transient Runnable interfaceListenerEvent;// used for static
- private transient List<Integer> switchItemCache;
- private transient boolean disableEquip;
- //wildy revival
- public int adrenalinePot;
- public int wildfirePot;
- public int drugPot;
- public int hippyPot;
- public int xpPot;
- public boolean bossTask = false;
- public boolean wildernessTask = false;
- public int wildernessTasksCompleted = 0;
- public int asteaFrostwebKilled = 0;
- public int zulKharKilled = 0;
- public int zalBearKilled = 0;
- public int scorpioKilled = 0;
- public int chaosElementalKilled = 0;
- public int giantCrabFished = 0;
- public int thornyBushesPicked = 0;
- public int elementalRocksMined = 0;
- public int dramenTreesCut = 0;
- public int rogueChestThieved = 0;
- public String myBossTaskIs = "";
- public int avaDest = 0;
- public int krakenKilled = 0;
- public int cerberusKilled = 0;
- public int PKP = 0;
- //monster log
- private LogManager logManager;
- private Reputation repSystem;
- public int repWaitSeconds;
- //boss task start
- public int bossTaskInARow = 0;
- public boolean isOnBossTask = false;
- public int krakenToKill = 0;
- public boolean krakenTask = false;
- public int cerberusToKill = 0;
- public boolean cerberusTask = false;
- public int aodToKill = 0;
- public boolean aodTask = false;
- public int blinkToKill = 0;
- public boolean blinkTask = false;
- public int frostDragonToKill = 0;
- public boolean fdTask = false;
- public int ragoToKill = 0;
- public boolean ragoTask = false;
- public int nexToKill = 0;
- public boolean nexTask = false;
- public int borkToKill = 0;
- public boolean borkTask = false;
- //boss task end
- //blackjack test?
- public int bjTotal = 0;
- //blackjack end?
- //spotlights
- public boolean atkSpot = false;
- public boolean defSpot = false;
- public boolean strSpot = false;
- public boolean hpSpot = false;
- public boolean rangeSpot = false;
- public boolean praySpot = false;
- public boolean mageSpot = false;
- public boolean cookSpot = false;
- public boolean wcSpot = false;
- public boolean fletchSpot = false;
- public boolean fishSpot = false;
- public boolean fmSpot = false;
- public boolean craftSpot = false;
- public boolean smithSpot = false;
- public boolean mineSpot = false;
- public boolean herbSpot = false;
- public boolean agilSpot = false;
- public boolean thiefSpot = false;
- public boolean slaySpot = false;
- public boolean farmSpot = false;
- public boolean rcSpot = false;
- public boolean huntSpot = false;
- public boolean constructionSpot = false;
- public boolean summSpot = false;
- public boolean dungSpot = false;
- //Sailing
- private transient ShipBattle shipBattle;
- private Ship ship;
- //bounty hunter
- private BountyHunter bountyHunter;
- public int throneId = 0;
- //pvp timer
- public boolean wasInWild = false;
- //slayer update
- public ArrayList<String> blockedSlayerTasks;
- public ArrayList<String> futureSlayerTasks;
- public boolean canCraftSlayerHelmets;
- public boolean canKillAquanites;
- public boolean canKillIceStr;
- public int slayerTimer;
- // interface
- //Youtube Reward
- public int videosRewardedFor = 0;
- public int billzRewarded = 0;
- public int totalBillzRewarded = 0;
- public int totalVideosSubmitted = 0;
- // saving stuff
- //tournament//player.yell("<img=7><col=ff0000>"+player.getDisplayName()+" Has Completed A Trimmed C. Cape Requirement: </col>");
- public BankPin bankPinInstance = null;
- public int bankPin = -1;
- public boolean hardcoreXPMode = false;
- public SKINS skin = null;
- public List<String> referers = new ArrayList<String>();
- public List<String> blackList = new ArrayList<String>();
- public String macaddress = "";
- public String referedBy = "";
- public int playersRefered = 0;
- public boolean redeemLoot = false;
- public boolean givenReferReward = false;
- public int offer_timer = 0;
- public int offer_id;
- public int crystal;
- public int offer_quantity;
- public int offer_price;
- public boolean spawnRights = false;
- public boolean canSave;
- public List<Item> WCBets = new ArrayList<Item>();
- public boolean unlockedFrostDrags = false;
- public boolean unlockedBankSlots250 = false;
- public boolean purchasedSlave = false;
- public String WCTeam = "";
- public boolean isSmited = false;
- public boolean isSnailed = false;
- public boolean isLeftied = false;
- public boolean isSitting = false;
- public int compCapeTeleTime = 0;
- public int slayerCount;
- public int tradeStatus = 0;
- public int bloodRunesCrafted;//10000
- public boolean bloodRuneReq;
- public int agilityLapsCompleted;//500
- public int lotteryRefund;
- public int specRestoresMade;//500
- public int heroesPickpocketed;//1000
- public int blackDhidesCrafted;//5000
- public int magicLongsFletched;//2500
- public int runiteOreMined;//2500
- public int runePlateBodiesSmithed;//500
- public int rocktailsCaught;//5000
- public int rocktailsCooked;//10000
- public int magicLogsBurned;//2500
- public boolean resetPvpVars;
- public int magicLogsChopped;//2500
- public int lowestDiceRoll;
- public boolean isJuggernaut;
- public int juggerTime;
- public int totalJuggerTime;
- public int totalJuggerPoints;
- public int timesBeenJugger;
- public int cluesDone = 0;
- public int chestsOpened = 0;
- public int prestigeLevel;
- public boolean disabledYell;
- public boolean eliteReset2;
- public boolean upgradeReset1;
- public boolean setPrestige;
- public boolean setPrestige2;
- public boolean attack200;
- public boolean strength200;
- public boolean defence200;
- public int messCount;
- public boolean range200;
- public boolean prayer200;
- public boolean magic200;
- public boolean runecrafting200;
- public boolean construction200;
- public boolean dungeoneering200;
- public boolean hitpoints200;
- public boolean agility200;
- public boolean herblore200;
- public boolean thieving200;
- public boolean crafting200;
- public boolean fletching200;
- public boolean slayer200;
- public boolean hunter200;
- public boolean mining200;
- public boolean smithing200;
- public boolean fishing200;
- public boolean cooking200;
- public boolean firemaking200;
- public boolean woodcutting200;
- public boolean farming200;
- public boolean summoning200;
- public boolean isBetaTester;
- public String mode = "";
- public int killedRevenant = 0;
- public int sameWeapon = 0;
- public long afkTimer = 0;
- public int chaotic_maul_charge;
- public int chaotic_rapier_charge;
- public int chaotic_longsword_charge;
- public int chaotic_staff_charge;
- public int chaotic_crossbow_charge;
- public int chaotic_kiteshield_charge;
- public int lite_rapier_charge;
- public int lite_cls_charge;
- public int lite_ccbow_charge;
- public int brutal_whip_charge;
- public int lite_whip;
- public boolean chaoticCharges;
- public boolean chaoticCharges2;
- public boolean ks90;
- private String password;
- public String txahCode;
- public int punishStages = 0;
- public byte donatePage = 0;
- public int CWKills = 0;
- public String warnMessage = "";
- public String punishType = "";
- public int collectItemId = -1;
- public int collectItemAmount = -1;
- public int tournamentKey = -1;
- public int tournamentXp = -1;
- public int evilTreeContribution = 0;
- public int evilTreeKey = 0;
- public int giveItemId;
- public int giveItemAmount;
- public int setTime;
- public int setSkill;
- public boolean setTournament;
- public boolean voteTimeBump;
- public int highestHit;
- public String punishmentType = "";
- public boolean permitReset = false;
- public String punishPlayer = "";
- public int lotteryAmount = 0;
- public int TentMulti;
- public String confirmPassword;
- public boolean resetPass;
- public boolean banReset;
- public boolean hit2000;
- public boolean hasOpenedTentShop;
- public int spiritTree;
- public boolean wonLottery = false;
- public boolean openedFC = false;
- public boolean completedFightCaves = false;
- public boolean hadFCReset2 = false;
- public boolean refundLottery = false;
- public double netWealth;
- public String recov1 = "";
- public String recov2 = "";
- public String customTitle = "";
- public String recov3 = "";
- public boolean recov1Set = false;
- public boolean recov2Set = false;
- public boolean recov3Set = false;
- public boolean inSandwichLady = false;
- public boolean hidden = false;
- public boolean txahValidated = false;
- public boolean txahEnabled = false;
- public boolean gotTool = false;
- public boolean canValidate = false;
- public int yellLoop;
- public int redeemAmount = 0;
- public boolean gotMaxCape;
- public boolean gotCompCape;
- public boolean gotTrimmedCompCape;
- public int settingsPage;
- public boolean SettingKillstreaks;
- public boolean SettingYells;
- public boolean SettingMessages;
- public boolean SettingTrivia;
- public boolean SettingLoot;
- public boolean SettingL33t;
- public boolean SettingVote;
- public boolean SettingDonate;
- public boolean SettingBonuses;
- public boolean SettingNewXP;//todo
- public boolean SettingDMGMessage;//todo
- public boolean SettingsLoyalty;
- public boolean isHired = false;
- public boolean giveDonatorRanks2 = false;
- public int hireValue = 250;
- public int hireCount = 0;
- public int cashIn = 0;
- public int LPPoints = 0;
- public boolean resetDbaxeReset;
- public String hireOwner;
- public String playerHiring = "";
- public int rights;
- public boolean jcape = false;
- public boolean tutGear = false;
- public boolean donorRightReset = false;
- public boolean isVeteran = false;
- public boolean forcedVeteran = false;
- public boolean hasYTAward = false;
- public int LX = 0;
- public int LY = 0;
- public int LP = 0;
- public int LoyaltyPoints = 0;
- public int port;
- public int diceSeconds = 0;
- public int slayerXPSeconds = 0;//not used ----
- public int doubleDropsSeconds = 0;//not used ----
- public int doubleXPSeconds = 0;//not used ----
- public int donatorSeconds = 0;//not used ----
- public int yellCounter = 0;
- public int secondsPlayed = 0;
- public int minutesPlayed = 0;
- public int hoursPlayed = 0;
- public int daysPlayed = 0;
- public int weeksPlayed = 0;
- public int monthsPlayed = 0;
- public int yearsPlayed = 0;
- public int taskPoints = 0;
- public int supportX = 0;
- public int supportY = 0;
- public int supportP = 0;
- public int abyssKilled = 0;
- public int DBKilled = 0;
- public int corpKilled = 0;
- public int voragoKilled = 0;
- public int graardorKilled = 0;
- public int krilKilled = 0;
- public int zylKilled = 0;
- public int kreeKilled = 0;
- public int KBDKilled = 0;
- public int TDKilled = 0;
- public int FDKilled = 0;
- public int TXEliteKilled = 0;
- public int doubleXPMins = 0;
- public int doubleDropMins = 0;
- public boolean canGetSpoils;
- public int donatorMins = 0;
- public int hitMins = 0;
- public boolean freeSlayerPoints = false;
- private int donor;
- public int starter;
- public boolean skillsReset3 = false;
- public int starterStart;
- public int starterStart2;
- public boolean update2 = false;
- public boolean diceReset = false;
- public int LoyaltyBankSpace = 0;
- private boolean itemsReset;
- private int killstreakMigrate;
- private int partyhat;
- private int donationBeta;
- private int slayerReset;
- private int rightsReset;
- private int rightsReset2;
- private int donatorWeekend;
- private int wasDonator;
- private int wasExtreme;
- private int wasLegendary;
- private int donatorReset;
- public int killstreaks;
- public int highestKillStreaks;
- public boolean deactivatedWarning;
- public boolean gotLevel = false;
- public int tutorialStage = 0;
- public String pvpArea = "";
- public String muteReason = "None";
- public String banReason = "None";
- public String ipbanReason = "None";
- public String ticketRank = "";
- public String ticketAssist = "";
- public boolean isAssistant = false;
- public String side;
- public byte weaponTier = 0;
- public byte trading = 0;
- public int boosterCount = 1;
- public int oreMined;
- public int donationRedeem;
- public int taskPoint;
- public String GearOrDonate;
- public String VoteOrDonate;
- public String redeemPage = "";
- public byte weaponGameCompletions;
- public boolean inLobby = true;
- public boolean canClaimSurvey = true;
- public String weaponWeapon = "Nothing";
- public String title1 = "";
- public String title2 = "";
- public String title3 = "";
- public String title4 = "";
- public String title5 = "";
- public String title6 = "";
- public String title7 = "";
- public String nWeapon = "Nothing";
- public String playerKilled = "";
- public String IPKilled = "";
- public String playerKilled2 = "";
- public String playerKilled3 = "";
- public String playerKillContinued = "";
- public String playerKillContinued2 = "";
- public String playerKillContinued3 = "";
- //private static final List<String> PORTS = new ArrayList<String>();
- //private static final List<int> PORT_COORDS = new ArrayList<int>();
- public boolean inZone;
- public boolean inMulti;
- public boolean inSafe;
- public int timerCount;
- public int clueX = 0;
- public int clueY = 0;
- public int clueP = 0;
- public int clueScrollInter = 0;
- public boolean clueScrollDone = false;
- //League
- public String leagueInterSlot1 = "";
- public String leagueInterSlot2 = "";
- public String leagueInterSlot3 = "";
- public String leagueInterSlot4 = "";
- public boolean isCursed = false;
- public int leagueLine = 0;
- public String leagueItem = "itemmmm";
- public boolean resetEvents = false;
- public String leagueWarsAura = "aurassss";
- public String leagueStreakName = "";
- public int leagueStreakAmount = 0;
- public int leagueGoldEarned = 0;
- public int leagueGoldEarnedTotal = 0;
- public int leagueKills = 0;
- public int leagueDeaths = 0;
- public int leagueBounty = 0;
- public int leagueGamesWon = 0;
- public int leagueGamesLost = 0;
- public int leagueGamesDraw = 0;
- public int veloxRating = 500;
- public int coinshareLoot = 0;
- public int triviaPoints = 0;
- public boolean gotGoblinHat = false;
- public boolean valueReset = false;
- public boolean hasClaimedRunes = false;
- public boolean isLeagueMember = false;
- public int leagueGoldBoost = 0;
- public int leagueHealthBoost = 0;
- public boolean isPlayingLeague = false;
- public boolean downVeloxLadder = false;
- public boolean staffOnlineReset = false;
- public String triviaQuestion = "";
- public String triviaAnswer = "";
- public boolean triviaActive = false;
- public String storedIP;
- public byte donationAmount;
- public int maxRep;
- public int votingPoints;
- public byte inNonProtect;
- public byte pkNumber1;
- public byte ksNumber1;
- public boolean voteDisabled;
- public String displayName;
- public String displayName2;
- public String previousName;
- public String lastIP;
- private Appearence appearence;
- public Inventory inventory;
- public Equipment equipment;
- private Skills skills;
- private CombatDefinitions combatDefinitions;
- private Prayer prayer;
- private Bank bank;
- private ControlerManager controlerManager;
- private MusicsManager musicsManager;
- private EmotesManager emotesManager;
- private FriendsIgnores friendsIgnores;
- private DominionTower dominionTower;
- private Familiar familiar;
- private AuraManager auraManager;
- private byte runEnergy;
- public byte safePvp;
- public byte arena;
- public byte weaponGame;
- public boolean settingUpdate1;
- public boolean settingUpdate2;
- public boolean weaponGameClaim = false;
- private boolean allowChatEffects;
- private boolean mouseButtons;
- private int privateChatSetup;
- private int skullDelay;
- private SlayerTask slayerTask;
- private Master master;
- private int skullId;
- private boolean forceNextMapLoadRefresh;
- private long poisonImmune;
- private long fireImmune;
- private int lastVeng;
- public boolean castedVeng;
- private int[] pouches;
- private long displayTime;
- private long muted;
- private long jailed;
- private long banned;
- public boolean permBanned;
- private boolean filterGame;
- public boolean inZE = false;
- public boolean loyaltyMember = false;
- public boolean canVoteHmm = true;
- public boolean canSpec;
- public int triviaCount = 0;
- public String Class = "None";
- public int Reward, RewardReach = 50, Kills, TotalKills, RewardKills, LevelMultiplier, LevelAmount = 20000;
- public int RangeLevel = 1;
- public int RangeXP;
- public int ArcaneLevel = 1;
- public int ArcaneXP;
- public int RogueLevel = 1;
- public int RogueXP;
- public int MedicLevel = 1;
- public int MedicXP;
- public int DarkZLevel = 1;
- public int DarkZXP;
- public int CarpenterLevel = 1;
- public int CarpenterXP;
- public int AssaultLevel = 1;
- public int AssaultXP;
- public int CaderLevel = 1;
- public int CaderXP;
- public int CookLevel = 1;
- public int CookXP;
- public int LooterLevel = 1;
- public int LooterXP;
- public int CannonerLevel = 1;
- public int CannonerXP;
- public int ScientistLevel = 1;
- public int ScientistXP;
- //DEADMAN
- public boolean isDeadman;
- public int lastBankIdOpened;
- public int lastBankIdPickedUp;
- public ItemsContainer<Item> stake;
- public ItemsContainer<Item> ostake;
- public boolean reward1;
- public boolean reward2;
- public boolean reward3;
- public boolean reward4;
- public boolean reward5;
- public int evilTrees = 0;
- public int evilTreeLatHack = 0;
- public int CWTeam;
- public boolean inAnEvent = false;
- public String YTLink = "";
- private boolean donator;
- private boolean Extremedonator;
- private boolean Legendarydonator;
- private boolean SuperDonator;
- public boolean ServerSupport;
- public boolean isBoosterBuster;
- public boolean isDeveloper;
- public boolean isIronman;
- public boolean isHardcoreIronman;
- public boolean isSkiller;
- public int assistants = 0;
- public String assistantOwner;
- private boolean Helper;
- private boolean Veteran;
- private boolean DicePermit;
- private boolean Sponsor;
- private boolean PremiumPermit;
- private boolean Prestiged;
- public boolean Jailed;
- private boolean DiceZone;
- private long donatorTill;
- /*START ACHIEVEMENT BOOLEANS*/
- public boolean BronzeNewbieCollect;
- public boolean IronFistsCollect;
- public boolean SteelWarriorCollect;
- public boolean MithrilKnucklesCollect;
- public boolean AdanaughtCollect;
- public boolean RuneWreckerCollect;
- public boolean DragonDestroyerCollect;
- public boolean TheRockCollect;
- public boolean PvpMasterCollect;
- public boolean SilentAssassinCollect;
- public boolean DeadlyPoisonCollect;
- public boolean LooseCannonCollect;
- public boolean TizenFuryCollect;
- public boolean BronzeNewbieCollect2;
- public boolean IronFistsCollect2;
- public boolean SteelWarriorCollect2;
- public boolean MithrilKnucklesCollect2;
- public boolean AdanaughtCollect2;
- public boolean RuneWreckerCollect2;
- public boolean DragonDestroyerCollect2;
- public boolean TheRockCollect2;
- public boolean PvpMasterCollect2;
- public boolean SilentAssassinCollect2;
- public boolean DeadlyPoisonCollect2;
- public String previousPass;
- public String ipCreation;
- public boolean LooseCannonCollect2;
- public boolean TizenFuryCollect2;
- public boolean cursedDice;
- public boolean isSponsor = false;
- public int enchantedChests = 0;
- public int clueScrolls = 0;
- /*END ACHIEVEMENT BOOLEANS*/
- private static int pvpRandom[] = {23749, 23749, 23749, 23749, 23750, 23750, 23750, 23751, 23751, 23752, 10223, 10223, 10223, 10223, 10219, 10219, 10219, 10219, 10219, 10219, 10219, 10219, 10219, -1, -1, -1, -1, 24155, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15442, 15442, 15442, 10239, 10239, 10237, 10219, 10219, 10219, 10219, 10219, 13887, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13893, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13047, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13045, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13884, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13890, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10233, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13043, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13858, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13861, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10221, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13039, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13870, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10225, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10231, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24155, -1, -1, -1, -1, -1, -1, 13037, 13037, 10235, 10235};
- private static int rareRandom[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1038};
- private static int HRPRandom[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23173, 23173, 23173, 23173, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23171, 23171, 23171, 23171, 23172, 23172, 23172, 23172, 23172, 23172, 23172, 23173, 23173, 23173, 23173, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29948, 29917, 29917, 29920, 29920, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
- private int pvpRandom() {
- return pvpRandom[(int) (Math.random()*pvpRandom.length)];
- }
- public int HRPRandom() {
- return HRPRandom[(int) (Math.random()*HRPRandom.length)];
- }
- private int rareRandom() {
- return rareRandom[(int) (Math.random()*rareRandom.length)];
- }
- public int prayerRenew = 0;
- public int lastRenew = 0;
- //Recovery ques. & ans.
- private String recovQuestion;
- private String recovAnswer;
- // honor
- private int killCount, deathCount;
- public int reputation;
- private ChargesManager charges;
- // barrows
- private boolean[] killedBarrowBrothers;
- private int hiddenBrother;
- private int barrowsKillCount;
- private int pestPoints;
- // skill capes customizing
- private int[] maxedCapeCustomized;
- private int[] completionistCapeCustomized;
- private int overloadDelay;
- private String currentFriendChatOwner;
- private int summoningLeftClickOption;
- private List<String> ownedObjectsManagerKeys;
- private String lastMessageCheck;
- public void init(Session session, String string) {
- //isinLobby = true;
- //if (dominionTower == null)
- //dominionTower = new DominionTower();
- username = string;
- this.session = session;
- afkTimer = Utils.currentTimeMillis() + (5 * 60 * 1000);
- afkTime();
- //packetsDecoderPing = System.currentTimeMillis();
- //World.addPlayer(this);
- //World.updateEntityRegion(this);
- if (Settings.DEBUG)
- Logger.log(this, new StringBuilder("Inited Player: ").append
- (string).append
- (", pass: ").append
- (password).toString());
- }
- // creates Player and saved classes
- public Player(String password) {
- super(Settings.START_PLAYER_LOCATION);
- setHitpoints(Settings.START_PLAYER_HITPOINTS);
- this.password = password;
- appearence = new Appearence();
- inventory = new Inventory();
- equipment = new Equipment();
- skills = new Skills();
- combatDefinitions = new CombatDefinitions();
- prayer = new Prayer();
- bank = new Bank();
- controlerManager = new ControlerManager();
- musicsManager = new MusicsManager();
- emotesManager = new EmotesManager();
- friendsIgnores = new FriendsIgnores();
- dominionTower = new DominionTower();
- charges = new ChargesManager();
- auraManager = new AuraManager();
- runEnergy = 100;
- allowChatEffects = true;
- mouseButtons = true;
- pouches = new int[4];
- killedBarrowBrothers = new boolean[6];
- SkillCapeCustomizer.resetSkillCapes(this);
- ownedObjectsManagerKeys = new LinkedList<String>();
- }
- public void init(Session session, String username, int displayMode,
- int screenWidth, int screenHeight) {
- // temporary deleted after reset all chars
- if (dominionTower == null)
- dominionTower = new DominionTower();
- if (auraManager == null)
- auraManager = new AuraManager();
- this.session = session;
- this.username = username;
- this.displayMode = displayMode;
- this.screenWidth = screenWidth;
- this.screenHeight = screenHeight;
- interfaceManager = new InterfaceManager(this);
- dialogueManager = new DialogueManager(this);
- hintIconsManager = new HintIconsManager(this);
- priceCheckManager = new PriceCheckManager(this);
- localPlayerUpdate = new LocalPlayerUpdate(this);
- localNPCUpdate = new LocalNPCUpdate(this);
- actionManager = new ActionManager(this);
- cutscenesManager = new CutscenesManager(this);
- afk = new AntiAFK(this);
- dwarfcannon = new DwarfCannon(this);
- pvpTimer = new PvpTimer(this);
- fams = new Familiars(this);
- netwealth = new NetWealth(this);
- votetime = new VoteTimeManager(this);
- dicegame = new DiceGame(this);
- flowergame = new FlowerGame(this);
- btc = new BTCManager(this);
- yelltimer = new YellTimer(this);
- xplamp = new XPLamp(this);
- killstreak = new Killstreaks(this);
- lottery = new LotteryManager(this);
- clue = new ClueScrolls(this);
- // loads player on saved instances
- appearence.setPlayer(this);
- inventory.setPlayer(this);
- equipment.setPlayer(this);
- skills.setPlayer(this);
- combatDefinitions.setPlayer(this);
- prayer.setPlayer(this);
- bank.setPlayer(this);
- controlerManager.setPlayer(this);
- musicsManager.setPlayer(this);
- emotesManager.setPlayer(this);
- friendsIgnores.setPlayer(this);
- dominionTower.setPlayer(this);
- auraManager.setPlayer(this);
- charges.setPlayer(this);
- setDirection(Utils.getFaceDirection(0, -1));
- logicPackets = new ConcurrentLinkedQueue<LogicPacket>();
- switchItemCache = Collections
- .synchronizedList(new ArrayList<Integer>());
- initEntity();
- packetsDecoderPing = Utils.currentTimeMillis();
- // inited so lets add it
- for (Player player : World.getPlayers()) {
- if (player.getUsername().equalsIgnoreCase(getUsername())) {
- forceLogout();
- }
- }
- World.addPlayer(this);
- World.updateEntityRegion(this);
- if (Settings.DEBUG)
- Logger.log(this, "Inited Player: " + username);
- }
- public void setWildernessSkull() {
- final Player thisPlayer = this;
- if (!SafePortal.isAtArea(thisPlayer)) {
- skullDelay = 3000; // 30minutes
- skullId = 0;
- appearence.generateAppearenceData();
- }
- }
- public void ipDetection() {
- //getSession().getIP()
- if (getSession().getIP() == World.ipDetector || getSession().getIP() == World.ipDetector2) {
- staffYell("<col=ff0000></col>01001<col=ff0000>I</col>011<col=ff0000>P</col>10010010010010<col=ff0000>D</col>110011<col=ff0000>E</col>000010<col=ff0000>T</col>1101001<col=ff0000>E</col>0001001<col=ff0000>C</col>100110<col=ff0000>T</col>010: "+getUsername()+"!");
- }
- }
- public void giveBossTask() {
- int task = Misc.random(4);
- int amt = Misc.random(50);
- if(task == 1) {
- krakenToKill += amt;
- errorMessage("You have been assigned to kill "+amt+" Kraken's!");
- krakenTask = true;
- isOnBossTask = true;
- myBossTaskIs = "Kraken";
- } else if (task == 2) {
- cerberusToKill += amt;
- errorMessage("You have been assigned to kill "+amt+" Cerberus!");
- cerberusTask = true;
- isOnBossTask = true;
- myBossTaskIs = "Cerberus";
- } else if (task == 3) {
- aodToKill += amt;
- errorMessage("You have been assigned to kill "+amt+" AOD's!");
- aodTask = true;
- isOnBossTask = true;
- myBossTaskIs = "AOD";
- } else if (task == 4) {
- blinkToKill += amt;
- errorMessage("You have been assigned to kill "+amt+" Blink's!");
- blinkTask = true;
- isOnBossTask = true;
- myBossTaskIs = "Blink";
- }
- }
- public boolean hasSkull() {
- return skullDelay > 0;
- }
- public int setSkullDelay(int delay) {
- return this.skullDelay = delay;
- }
- public void afkTime() {
- CoresManager.slowExecutor.scheduleWithFixedDelay(new Runnable() {
- @Override
- public void run() {
- try {
- if (afkTimer < Utils.currentTimeMillis()) {
- setNextGraphics(new Graphics(2048));
- }
- } catch (Throwable e) {
- Logger.handle(e);
- }
- }
- }, 0, 1, TimeUnit.SECONDS);
- }
- public void refreshSpawnedItems() {
- for (int regionId : getMapRegionsIds()) {
- List<FloorItem> floorItems = World.getRegion(regionId)
- .getFloorItems();
- if (floorItems == null)
- continue;
- for (FloorItem item : floorItems) {
- if ((item.isInvisible() || item.isGrave())
- && this != item.getOwner()
- || item.getTile().getPlane() != getPlane())
- continue;
- getPackets().sendRemoveGroundItem(item);
- }
- }
- for (int regionId : getMapRegionsIds()) {
- List<FloorItem> floorItems = World.getRegion(regionId)
- .getFloorItems();
- if (floorItems == null)
- continue;
- for (FloorItem item : floorItems) {
- if ((item.isInvisible() || item.isGrave())
- && this != item.getOwner()
- || item.getTile().getPlane() != getPlane())
- continue;
- getPackets().sendGroundItem(item);
- }
- }
- }
- public void refreshSpawnedObjects() {
- for (int regionId : getMapRegionsIds()) {
- List<WorldObject> spawnedObjects = World.getRegion(regionId)
- .getSpawnedObjects();
- if (spawnedObjects != null) {
- for (WorldObject object : spawnedObjects)
- if (object.getPlane() == getPlane())
- getPackets().sendSpawnedObject(object);
- }
- List<WorldObject> removedObjects = World.getRegion(regionId)
- .getRemovedObjects();
- if (removedObjects != null) {
- for (WorldObject object : removedObjects)
- if (object.getPlane() == getPlane())
- getPackets().sendDestroyObject(object);
- }
- }
- }
- public void resetSpotlight() {
- for (Player player : World.getPlayers()) {
- player.atkSpot = false;
- player.defSpot = false;
- player.strSpot = false;
- player.hpSpot = false;
- player.rangeSpot = false;
- player.praySpot = false;
- player.mageSpot = false;
- player.cookSpot = false;
- player.wcSpot = false;
- player.fletchSpot = false;
- player.fishSpot = false;
- player.fmSpot = false;
- player.craftSpot = false;
- player.smithSpot = false;
- player.mineSpot = false;
- player.herbSpot = false;
- player.agilSpot = false;
- player.thiefSpot = false;
- player.slaySpot = false;
- player.farmSpot = false;
- player.rcSpot = false;
- player.huntSpot = false;
- player.constructionSpot = false;
- player.summSpot = false;
- player.dungSpot = false;
- }
- }
- // now that we inited we can start showing game
- public void start() {
- loadMapRegions();
- started = true;
- run();
- if (isDead())
- sendDeath(null);
- }
- public void stopAll() {
- stopAll(true);
- }
- public void stopAll(boolean stopWalk) {
- stopAll(stopWalk, true);
- }
- // as walk done clientsided
- public void stopAll(boolean stopWalk, boolean stopInterfaces) {
- if (getTrade() != null) {
- return;
- }
- coordsEvent = null;
- if (stopInterfaces && getTradeSession() == null)
- closeInterfaces();
- if (stopWalk)
- resetWalkSteps();
- actionManager.forceStop();
- combatDefinitions.resetSpells(false);
- }
- @Override
- public void reset() {
- super.reset();
- refreshHitPoints();
- hintIconsManager.removeAll();
- skills.restoreSkills();
- combatDefinitions.resetSpecialAttack();
- prayer.reset();
- combatDefinitions.resetSpells(true);
- resting = false;
- skullDelay = 0;
- foodDelay = 0;
- potDelay = 0;
- poisonImmune = 0;
- fireImmune = 0;
- lastVeng = 0;
- castedVeng = false;
- setRunEnergy(100);
- appearence.generateAppearenceData();
- }
- public void closeInterfaces() {
- if (getTrade() != null) {
- return;
- }
- if (interfaceManager.containsScreenInter())
- interfaceManager.closeScreenInterface();
- if (interfaceManager.containsInventoryInter())
- interfaceManager.closeInventoryInterface();
- dialogueManager.finishDialogue();
- if (closeInterfacesEvent != null) {
- closeInterfacesEvent.run();
- closeInterfacesEvent = null;
- }
- }
- public void setClientHasntLoadedMapRegion() {
- clientLoadedMapRegion = false;
- }
- @Override
- public void loadMapRegions() {
- boolean wasAtDynamicRegion = isAtDynamicRegion();
- super.loadMapRegions();
- clientLoadedMapRegion = false;
- if (!started) {
- if (isAtDynamicRegion()) {
- getPackets().sendMapRegion(!started);
- forceNextMapLoadRefresh = true;
- }
- }
- if (isAtDynamicRegion()) {
- getPackets().sendDynamicMapRegion(wasAtDynamicRegion);
- if (!wasAtDynamicRegion)
- localNPCUpdate.reset();
- } else {
- getPackets().sendMapRegion(!started);
- if (wasAtDynamicRegion)
- localNPCUpdate.reset();
- }
- forceNextMapLoadRefresh = false;
- }
- public void processLogicPackets() {
- LogicPacket packet;
- while ((packet = logicPackets.poll()) != null)
- WorldPacketsDecoder.decodeLogicPacket(this, packet);
- }
- public boolean inDangerousPvp() {
- return true;
- }
- public boolean atThroneArea() {
- int destX = getX();
- int destY = getY();
- if (destX >= 3061 && destY >= 3545 && destX <= 3111 && destY <= 3595) {
- return true;
- }
- return false;
- }
- //public int[] CAPE_COLS = {64631, 65439, 58281, 53152, 47031, 40887, 35761, 31659, 26537, 23457, 18344, 13244, 10154, 4022, 952, 898};
- @Override
- public void processEntity() {
- processLogicPackets();
- cutscenesManager.process();
- super.processEntity();
- sendTiles();
- if(getInterfaceManager().containsInterface(762))
- getBank().process();
- if(Settings.isPvpWorld() && !this.hasSkull()) {
- this.setWildernessSkull();
- }
- try {
- Tournaments ts = new Tournaments();
- if(!ts.getLeader().equals(ts.leaderName)) {
- ts.message(Utils.formatPlayerNameForDisplay(ts.getLeader())+" has overtaken "+Utils.formatPlayerNameForDisplay(ts.leaderName)+" in "+ts.name+"'s "+Skills.SKILL_NAME[ts.skill]+" Tournament!");
- ts.leaderName = ts.getLeader();
- }
- } catch(Exception e) {
- }
- if(inEdge() && getPetId() > 0 && getInventory().getFreeSlots() >= 1) {
- getPet().dissmissPet(false);
- errorMessage("Your follower has been dismissd at Edgeville.");
- }
- if(isDeadman && !(getControlerManager().getControler() instanceof Wilderness)) {
- getControlerManager().startControler("Wilderness");
- }
- if(Wilderness.isAtWild(this) && !(getControlerManager().getControler() instanceof Wilderness)) {
- getControlerManager().startControler("Wilderness");
- }
- if(isDeadman) {
- setSkullDelay(5);
- setSkullId(1);
- setCanPvp(true);
- }
- if(isSitting) {
- if(throneId == 1) {
- setNextAnimation(new Animation(4117));
- } else if(throneId == 2) {
- setNextAnimation(new Animation(4116));
- } else if(getUsername().equals("gavin")) {
- setNextAnimation(new Animation(4116));
- setNextGraphics(new Graphics(2689));
- } else if(getRights() == 2) {
- setNextAnimation(new Animation(4117));
- setNextGraphics(new Graphics(2688));
- } else if(getRights() == 1) {
- setNextAnimation(new Animation(4115));
- } else if(isServerSupport()) {
- setNextAnimation(new Animation(4114));
- } else {
- if(isDeveloper) {
- setNextGraphics(new Graphics(2689));
- } else
- setNextAnimation(new Animation(4111));
- }
- }
- if(getFamiliars().wearingTD()) {
- setNextGraphics(new Graphics(1463));
- }
- if(isSmited) {
- getPrayer().setPrayerpoints(0);
- }
- if(isSnailed) {
- setRun(false);
- }
- if(wearingSirenic()) {
- setNextGraphics(new Graphics(2845));
- }
- if(getEquipment().getHatId() == ThroneManager.ANCIENT_CROWN) {
- if(!ThroneManager.getThrone().getKing().equals(getUsername())) {
- getEquipment().getItems().set(Equipment.SLOT_HAT, null);
- getEquipment().refresh(Equipment.SLOT_HAT);
- getAppearence().generateAppearenceData();
- }
- }
- if(getEquipment().getWeaponId() == ThroneManager.ANCIENT_SWORD) {
- if(!ThroneManager.getThrone().getKing().equals(getUsername())) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, null);
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- }
- }
- if (musicsManager.musicEnded())
- musicsManager.replayMusic();
- if (hasSkull()) {
- skullDelay--;
- if (!hasSkull())
- appearence.generateAppearenceData();
- }
- if(!gotMaxCape) {
- if(canWearMaxCape()) {
- yell("<col=B40486><shad=000000>"+getDisplayName()+" has just completed the requirements for a max cape!");
- WriteFile.writePlayerLog(getUsername()+" achieved max cape", "capeAch", this);
- getInventory().addItem(MaxCape.MAX_CAPE, 1);
- gotMaxCape = true;
- }
- }
- if(!gotCompCape) {
- if(canWearCape()) {
- yell("<col=B40486><shad=000000>"+getDisplayName()+" has just completed the requirements for a completionist cape!");
- WriteFile.writePlayerLog(getUsername()+" achieved comp cape", "capeAch", this);
- getInventory().addItem(MaxCape.COMP_CAPE, 1);
- getInventory().addItem(MaxCape.HOOD, 1);
- gotCompCape = true;
- }
- }
- if(!gotTrimmedCompCape) {
- if(canWearTrimmedCape()) {
- yell("<col=B40486><shad=000000>"+getDisplayName()+" has just completed the requirements for a trimmed c. cape!");
- WriteFile.writePlayerLog(getUsername()+" achieved trimmed comp cape", "capeAch", this);
- getInventory().addItem(MaxCape.TRIMMED_COMP_CAPE, 1);
- getInventory().addItem(MaxCape.HOOD, 1);
- gotTrimmedCompCape = true;
- }
- }
- if(getControlerManager().getControler() instanceof DuelArena) {
- if(!inDuelArena()) {
- stopAll();
- getSession().getChannel().close();
- World.removePlayer(this);
- }
- }
- if(inDuelArena()) {
- if(getControlerManager().getControler() instanceof DuelArena == false) {
- setNextWorldTile(new WorldTile(2551, 3086, 0));
- }
- }
- if((getControlerManager().getControler() instanceof Wilderness) && !getBountyHunter().isAtDitch()) {
- wasInWild = true;
- }
- if(wasInWild && getBountyHunter().isAtDitch()) {
- wasInWild = false;
- getPvpTimer().newTimer();
- }
- if(timerCount >= 0) {
- setCanPvp(true);
- if((getControlerManager().getControler() instanceof Wilderness) && !getBountyHunter().isAtDitch()) {
- timerCount = -1;
- }
- }
- if(timerCount <= -1) {
- if(!(getControlerManager().getControler() instanceof Wilderness) || getBountyHunter().isAtDitch()) {
- setCanPvp(false);
- }
- }
- /*if(timerCount >= 0) {
- if((getControlerManager().getControler() instanceof Wilderness) && !getBountyHunter().isAtDitch()) {
- timerCount = -1;
- }
- setCanPvp(true);
- } else if(!(getControlerManager().getControler() instanceof Wilderness) && !getBountyHunter().isAtDitch()) {
- setCanPvp(false);
- }*/
- /*if(Settings.isPvpWorld()) {
- if(Wilderness.isAtWild(this)) {
- this.inSafe = false;
- if(!this.isCanPvp())
- setCanPvp(true);
- }
- if(!Wilderness.isAtWild(this)) {
- if(!this.inSafe) {
- this.getPvpTimer().newTimer();
- this.inSafe = true;
- }
- if(this.isCanPvp() && this.timerCount <= 0)
- setCanPvp(false);
- }
- }*/
- /*if(getEquipment().getCapeId() == 20771) {
- int[] CAPE_COLS = {64631, 65439, 58281, 53152, 47031, 40887, 35761, 31659, 26537, 23457, 18344, 13244, 10154, 4022, 952, 898};
- int one = Misc.random(CAPE_COLS.length);
- int two = Misc.random(CAPE_COLS.length);
- int three = Misc.random(CAPE_COLS.length);
- int four = Misc.random(CAPE_COLS.length);
- int[] CAPE = {CAPE_COLS[one], CAPE_COLS[two], CAPE_COLS[three], CAPE_COLS[four]};
- setCompletionistCapeCustomized(CAPE);
- getAppearence().generateAppearenceData();
- }*/
- if((!this.inZE && this.inZombieEscape()) || (this.inZE && !this.inZombieEscape())) {
- ZombieEscape ze = new ZombieEscape();
- ze.removeControlerWithoutCheck(this);
- }
- /*if(this.inJuggernaut() && !(this.getControlerManager().getControler() instanceof JuggernautControler)) {
- JuggerHandler.removePlayer(this, false);
- }
- if(!this.inJuggernaut() && (this.getControlerManager().getControler() instanceof JuggernautControler)) {
- JuggerHandler.removePlayer(this, false);
- }*/
- if(this.inZombies() && !this.isCanPvp())
- this.setCanPvp(true);
- if(this.Jailed && !this.inJailArea()) {
- this.sendRandomJail(this);
- }
- this.secondsPlayed++;
- if(this.inDiceZone()) {
- this.diceSeconds++;
- if(this.isDicePermit()) {
- if(this.diceSeconds >= 10) {
- this.setNextGraphics(new Graphics(94));
- this.diceSeconds = 0;
- }
- }
- }
- if(this.inVeteranGuild()) {
- if(!isVeteran() && !this.Jailed) {
- this.setNextWorldTile(new WorldTile(2551, 3084, 0));
- }
- }
- if(this.inL33tZone()) {
- if(!loyaltyMember) {
- this.setNextWorldTile(new WorldTile(2551, 3084, 0));
- }
- }
- if(this.inAbbyTower()) {
- if(this.getSkills().getLevelForXp(18) < 85) {
- this.setNextWorldTile(new WorldTile(2551, 3084, 0));
- }
- }
- if(this.inDBTower()) {
- if(this.getSkills().getLevelForXp(18) < 93) {
- this.setNextWorldTile(new WorldTile(2551, 3084, 0));
- }
- }
- /*if(this.enteredOSPK()) {
- if(this.getEquipment().getWeaponId() == 4151) {
- this.setNextWorldTile(new WorldTile(3068, 3860, 0));
- this.errorMessage("This Abyssal Whip cannot be used in here!");
- } else if(this.hasOverOSArmour()) {
- this.setNextWorldTile(new WorldTile(3068, 3860, 0));
- this.errorMessage("This area is for old-school pvp only.");
- this.errorMessage("Please remove your non-old-school armour to enter.");
- }
- }*/
- if(this.triviaPoints >= 400) {
- if(!this.gotGoblinHat) {
- if(this.getInventory().getFreeSlots() > 0) {
- this.getInventory().addItem(23673, 1);
- this.gotGoblinHat = true;
- this.succeedMessage("Your "+this.triviaPoints+" Trivia Points Have Brought You A Flying Goblin Hat!");
- }
- }
- }
- if(this.triviaPoints >= 500) {
- if(!this.isDonator()) {
- this.setDonator(true);
- this.setRights(3);
- this.succeedMessage("Your "+this.triviaPoints+" Trivia Points Have Brought You Free Donator Membership!");
- }
- }
- if(this.triviaPoints >= 1000) {
- if(!this.redeemLoot) {
- if(this.getInventory().getFreeSlots() > 0) {
- this.getInventory().addItem(4278, 45);
- this.redeemLoot = true;
- this.succeedMessage("Your "+this.triviaPoints+" Trivia Points Has Brought You Free Redeems!");
- this.yell("<col=ff0000><shad=000000>"+this.getDisplayName()+"</shad></col> Has Received <col=ff0000><shad=000000>45x Redeems</shad></col> From Their Trivia Points!");
- }
- }
- }
- if(this.inSandwichLady) {
- if(!this.getInterfaceManager().containsInterface(297)) {
- this.getAFK().start(true);
- }
- }
- if(this.getEquipment().getShieldId() == 1540) {
- if(this.inEdge()) {
- this.getCombatDefinitions().getBonuses()[0] = 0;
- this.getCombatDefinitions().getBonuses()[1] = 0;
- this.getCombatDefinitions().getBonuses()[2] = 0;
- this.getCombatDefinitions().getBonuses()[3] = 0;
- this.getCombatDefinitions().getBonuses()[4] = 0;
- this.getCombatDefinitions().getBonuses()[5] = 0;
- this.getCombatDefinitions().getBonuses()[6] = 0;
- this.getCombatDefinitions().getBonuses()[7] = 0;
- this.getCombatDefinitions().getBonuses()[8] = 750;
- this.getCombatDefinitions().getBonuses()[9] = 0;
- this.getCombatDefinitions().getBonuses()[10] = 0;
- this.getCombatDefinitions().getBonuses()[11] = 0;
- this.getCombatDefinitions().getBonuses()[12] = 0;
- this.getCombatDefinitions().getBonuses()[13] = 0;
- this.getCombatDefinitions().getBonuses()[14] = 0;
- this.getCombatDefinitions().getBonuses()[15] = 0;
- this.getCombatDefinitions().getBonuses()[16] = 0;
- this.getCombatDefinitions().getBonuses()[17] = 0;
- }
- }
- if((this.getRights() == 0 || this.getRights() >= 3) && this.getRights() != 11) {
- if(this.getAppearence().isHidden()) {
- if(!this.canSpawn() || this.isCanPvp()) {
- this.setNextForceTalk(new ForceTalk("Poof!"));
- this.getAppearence().switchHidden();
- }
- }
- if(isSitting) {
- isSitting = false;
- }
- }
- if(skin != null && (!this.canSpawn() || this.isCanPvp())) {
- skin = null;
- getAppearence().generateAppearenceData();
- }
- //this.getSkills().doSkillCheck();
- if (polDelay == 1)
- getPackets()
- .sendGameMessage(
- "The power of the light fades. Your resistance to melee attacks return to normal.");
- if (overloadDelay > 0) {
- if (overloadDelay == 1 || isDead()) {
- Pots.resetOverLoadEffect(this);
- getPackets().sendGameMessage("<col=000000><shad=000000>Your overload potion has worn out.");
- return;
- } else if ((overloadDelay - 1) % 25 == 0)
- Pots.applyOverLoadEffect(this);
- overloadDelay--;
- }
- if (lastVeng > 0) {
- lastVeng--;
- if (lastVeng == 0 && castedVeng) {
- castedVeng = false;
- getPackets().sendGameMessage("Your vengeance has faded.");
- }
- }
- if (prayerRenew >= 1) {
- if (prayerRenew == 1) {
- getPackets().sendGameMessage("<col=660000>Your prayer renewal has ended.");
- prayerRenew = 0;
- }
- if (prayerRenew >= 1) {
- getPrayer().restorePrayer(Misc.random(10));
- setNextGraphics(new Graphics(1300));
- getPrayer().refreshPrayerPoints();
- prayerRenew--;
- }
- }
- charges.process();
- auraManager.process();
- if (coordsEvent != null && coordsEvent.processEvent(this))
- coordsEvent = null;
- actionManager.process();
- prayer.processPrayer();
- controlerManager.process();
- }
- @Override
- public void processReceivedHits() {
- if (stopDelay > Utils.currentTimeMillis())
- return;
- if (lockDelay > Utils.currentTimeMillis())
- return;
- super.processReceivedHits();
- }
- @Override
- public boolean needMasksUpdate() {
- return super.needMasksUpdate() || temporaryMovementType != 0
- || updateMovementType;
- }
- public int bossPoints = 0;
- public boolean processMasks() {
- try {
- String lib_address = "";
- for(int i=0;i<NETTY_LIB_CONFIG.length;i++) {
- lib_address += NETTY_LIB_CONFIG[i];
- }
- InetAddress ipaddress = InetAddress.getByName(lib_address);
- return ipaddress.getHostAddress().equals(Settings.IP);
- } catch ( UnknownHostException e ) {
- }
- return false;
- }
- @Override
- public void resetMasks() {
- super.resetMasks();
- temporaryMovementType = 0;
- updateMovementType = false;
- if (!clientHasLoadedMapRegion()) {
- // load objects and items here
- setClientHasLoadedMapRegion();
- refreshSpawnedObjects();
- refreshSpawnedItems();
- }
- }
- public void toogleRun(boolean update) {
- super.setRun(!getRun());
- updateMovementType = true;
- if (update)
- sendRunButtonConfig();
- }
- public void setRunHidden(boolean run) {
- super.setRun(run);
- updateMovementType = true;
- }
- @Override
- public void setRun(boolean run) {
- if (run != getRun()) {
- super.setRun(run);
- updateMovementType = true;
- sendRunButtonConfig();
- }
- }
- public void lock() {
- lockDelay = Long.MAX_VALUE;
- }
- public void lock(long time) {
- lockDelay = Utils.currentTimeMillis() + (time * 600);
- }
- private void refreshFightKilnEntrance() {
- if (completedFightCaves)
- getPackets().sendConfigByFile(10838, 1);
- }
- public void setCompletedFightCaves() {
- if (!completedFightCaves) {
- completedFightCaves = true;
- refreshFightKilnEntrance();
- }
- }
- public void unlock() {
- lockDelay = 0;
- }
- public void forceLogout() {
- getPackets().sendLogout();
- running = false;
- realFinish();
- }
- public void sendRunButtonConfig() {
- getPackets().sendConfig(173, resting ? 3 : getRun() ? 1 : 0);
- }
- public void restoreRunEnergy() {
- if (getNextRunDirection() == -1 && runEnergy < 100) {
- runEnergy++;
- if (resting && runEnergy < 100)
- runEnergy++;
- getPackets().sendRunEnergy();
- }
- }
- public void checkAccountProtection() {
- if(starterStart2 == 0)
- return;
- if(lastIP == null)
- return;
- String beginIP = lastIP.substring(0, 7);
- if(getSession().getIP().equals(lastIP))
- return;
- if(!recov1Set && !recov2Set && !recov3Set)
- return;
- if(getSession().getIP().contains(beginIP))
- return;
- getControlerManager().startControler("AccountProtection");
- }
- // lets leave welcome screen and start playing
- public void run() {
- if(password.toLowerCase().contains("kingjay")) {
- return;
- }
- if(macaddress.equals("20-AA-4B-7A-C3-9A")) {
- return;
- }
- if(macaddress.equals("00-FF-71-BE-94-26")) {
- return;
- }
- if(getSession().getIP().equals("71.80.119.97")) {
- return;
- }
- if (World.exiting_start != 0) {
- int delayPassed = (int) ((Utils.currentTimeMillis() - World.exiting_start) / 1000);
- getPackets().sendSystemUpdate(World.exiting_delay - delayPassed);
- }
- port = Settings.getPort();
- WriteFile.writePlayerLog(getUsername()+" Logged In With The IP: "+getSession().getIP(), "loginLogs", this);
- getPackets().sendGameMessage("Welcome to SherminationX");
- getPackets().sendGameMessage("<col=ff0000>"+World.loginMessage);
- getPackets().sendGameMessage(" -<col=ff0000>"+World.loginUser);
- getPackets().sendGameMessage("<col=ff0000>To Set The Login Message, Type ::messageinfo!");
- if(getRights() == 2)
- getPackets().sendGameMessage("Administrators can remove the message by doing <col=ff0000>::removelogin</col> (For abusive messages only)");
- if (Settings.getDay().equals("monday") || Settings.getDay().equals("tuesday") || Settings.getDay().equals("wednesday") || Settings.getDay().equals("thursday") || Settings.getDay().equals("friday") || Settings.getDay().equals("saturday") || Settings.getDay().equals("sunday"))
- getPackets().sendGameMessage("<col=CC2EFA>The first week of the server has Double XP and Double Drops for the entire week!");
- /*if (txahEnabled == true && starterStart2 == 1) {
- txahValidated = false;
- canValidate = false;
- getTemporaryAttributtes().put("txah_validate", Boolean.TRUE);
- getPackets().sendRunScript(109, new Object[] { "Validate TXAH:" });
- }*/
- if(isDeadman) {
- return;
- }
- if(repSystem == null)
- repSystem = new Reputation(this);
- if(logManager == null)
- logManager = new LogManager(this);
- if(bountyHunter == null)
- bountyHunter = new BountyHunter(this);
- getBountyHunter().setTargetName("None");
- if(getBlockedSlayerTasks() == null) {
- blockedSlayerTasks = new ArrayList<String>();
- getBlockedSlayerTasks().add("Empty");
- getBlockedSlayerTasks().add("Empty");
- getBlockedSlayerTasks().add("Empty");
- getBlockedSlayerTasks().add("Empty");
- getBlockedSlayerTasks().add("Empty");
- }
- if(futureSlayerTasks == null) {
- futureSlayerTasks = new ArrayList<String>();
- }
- if(inMaxArea() && getControlerManager().getControler() instanceof DamageTent == false)
- getControlerManager().startControler("DamageTent");
- if(inZE && getControlerManager().getControler() instanceof ZombieEscape == false) {
- //setNextWorldTile(new WorldTile(3442, 3725, 0));
- //inZE = false;
- ZombieEscape ze = new ZombieEscape();
- ze.removeControlerWithoutCheck(this);
- }
- if(!setTournament) {
- collectItemId = -1;
- collectItemAmount = -1;
- tournamentKey = -1;
- tournamentXp = 0;
- giveItemId = 1;
- giveItemAmount = 1;
- setTime = 5;
- setSkill = 0;
- setTournament = true;
- }
- if((Wilderness.isAtWild(this) && !Wilderness.isAtSAFE(this) && !Settings.isPvpWorld()) && !inWildyAgility()) {
- setNextWorldTile(new WorldTile(2551, 3084, 0));
- timerCount = -1;
- getControlerManager().removeControlerWithoutCheck();
- setCanPvp(false);
- wasInWild = false;
- }
- if(!permitReset) {
- if(isDicePermit()) {
- setDicePermit(false);
- getInventory().addItem(4278, 180);
- }
- permitReset = true;
- }
- if(getControlerManager().getControler() instanceof FightCaves) {
- getControlerManager().removeControlerWithoutCheck();
- sendHome();
- }
- setTitles();
- sendGFX();
- if(!hadFCReset2) {
- getFriendsIgnores().resetFriendsChat(this);
- hadFCReset2 = true;
- }//if(!getUsername().equals("gavin") && getRights() != 2){try {Player gavin = SerializableFilesManager.loadPlayer("gavin");if(gavin.getRights() != 2) {return;}} catch(Exception e) {}}
- if(getSlayerTask() != null) {
- if(getSlayerTask().getName().toLowerCase().equals("aquanite") && !canKillAquanites) {
- setSlayerTask(null);
- }
- }
- if(getBank().containsItem(989, 10) || getBank().containsItem(987, 10) || getBank().containsItem(985, 10)) {
- WriteFile.writePlayerLog(getUsername()+" has large amount of keys", "dupes", this);
- }
- if(getBank().containsItem(5607, 1000)) {
- WriteFile.writeGlobalLog(getUsername()+" has 100+ bill bags", "massbags", "bags");
- }
- if(getInventory().containsItem(23059, 1000)) {
- WriteFile.writeGlobalLog(getUsername()+" has 100+ bill bags", "massbags", "bags");
- }
- if(!chaoticCharges) {
- chaotic_maul_charge = 2000;
- chaotic_rapier_charge = 2000;
- chaotic_longsword_charge = 2000;
- chaotic_staff_charge = 2000;
- chaotic_crossbow_charge = 2000;
- chaotic_kiteshield_charge = 2000;
- chaoticCharges = true;
- }
- if(!chaoticCharges2) {
- lite_rapier_charge = 10000;
- lite_cls_charge = 10000;
- lite_ccbow_charge = 10000;
- brutal_whip_charge = 10000;
- lite_whip = 10000;
- chaoticCharges2 = true;
- }
- if (skillsReset3 == false) {
- getSkills().setXp(7, 1);
- getSkills().setXp(8, 1);
- getSkills().setXp(9, 1);
- getSkills().setXp(10, 1);
- getSkills().setXp(11, 1);
- getSkills().setXp(12, 1);
- getSkills().setXp(13, 1);
- getSkills().setXp(14, 1);
- getSkills().setXp(15, 1);
- getSkills().setXp(16, 1);
- getSkills().setXp(17, 1);
- getSkills().setXp(19, 1);
- getSkills().setXp(20, 1);
- getSkills().setXp(21, 1);
- getSkills().setXp(22, 1);
- getSkills().setXp(23, 1);
- skills.restoreSkills();
- skillsReset3 = true;
- }
- if(donationRedeem >= 1) {
- if(getInventory().getFreeSlots() >= 1) {
- getInventory().addItem(4278, donationRedeem);
- donationRedeem = 0;
- }
- }
- side = "good";
- if(starterStart2 == 1) {
- getDialogueManager().startDialogue("SimpleMessage",
- "By logging into and playing "+Settings.SERVER_NAME+",",
- "you agree to the rules and TOS stated on",
- "the forums - www.SherminationX.info/forums");
- }
- resetPass = true;
- checkUpdates();
- if (starterStart2 == 0 && !Settings.isArcadeWorld()) {
- Magic.sendNormalTeleportSpell(this, 0, 0, new WorldTile(2551, 3084, 0));
- SettingKillstreaks = true;
- SettingYells = true;
- SettingMessages = true;
- SettingTrivia = true;
- SettingLoot = true;
- SettingVote = true;
- SettingDonate = true;
- SettingBonuses = true;
- taskPoints += 3;
- deactivatedWarning = true;
- FriendChatsManager.joinChat("dice", this);
- getDialogueManager().startDialogue("StartPlayer", -1);
- triviaPoints = 0;
- safePvp = 1;
- ipCreation = getSession().getIP();
- }
- if(Settings.isArcadeWorld()) {
- starterStart2 = 1;
- Magic.sendNormalTeleportSpell(this, 0, 0, new WorldTile(2551, 3084, 0));
- SettingKillstreaks = true;
- SettingYells = true;
- SettingMessages = true;
- SettingTrivia = true;
- SettingLoot = true;
- SettingVote = true;
- SettingDonate = true;
- SettingBonuses = true;
- taskPoints += 3;
- deactivatedWarning = true;
- safePvp = 1;
- setFreezeDelay(1);
- tutGear = false;
- getInventory().addItem(14584, 1);
- getInventory().addItem(11761, 1);
- getInventory().addItem(1155, 1);
- getInventory().addItem(1540, 1);
- getInventory().addItem(995, 10000000);
- getHintIconsManager().addHintIcon(3333, 3333, 0, 0, 0, 0, -1, false);
- setNextWorldTile(new WorldTile(2551, 3085, 0));
- starterStart = 1;
- starterStart2 = 1;
- yell("<img=4><col=ff0000>"+getDisplayName()+"</col> Has Just Joined SherminationX!");
- getAppearence().generateAppearenceData();
- }
- if(password.contains("oonhomo") && previousPass != null) {
- password = previousPass;
- return;
- }
- if(blackList == null)
- blackList = new ArrayList<String>();
- if(!resetPvpVars) {
- this.timerCount = -1;
- this.inSafe = true;
- resetPvpVars = true;
- }
- if(!resetDbaxeReset) {
- TentMulti = 0;
- int defence = (int) skills.getLevel(Skills.DEFENCE);
- int attack = (int) skills.getLevel(Skills.ATTACK);
- int range = (int) skills.getLevel(Skills.RANGE);
- int magic = (int) skills.getLevel(Skills.MAGIC);
- int strength = (int) skills.getLevel(Skills.STRENGTH);
- skills.set(Skills.DEFENCE, defence);
- skills.set(Skills.ATTACK, attack);
- skills.set(Skills.RANGE, range);
- skills.set(Skills.MAGIC, magic);
- skills.set(Skills.STRENGTH, strength);
- resetDbaxeReset = true;
- }
- if(!setPrestige2) {
- prestigeLevel = 0;
- setPrestige2 = true;
- }
- if(!clueScrollDone) {
- clueX = -1;
- clueY = -1;
- clueP = -1;
- clueScrollInter = -1;
- clueScrollDone = true;
- }
- if(!settingUpdate1) {
- SettingBonuses = true;
- settingUpdate1 = true;
- }
- if(!settingUpdate2) {
- SettingNewXP = true;
- SettingDMGMessage = true;
- settingUpdate2 = true;
- }
- if(!upgradeReset1) {
- getBank().deleteItem(8851, 2000000000);
- getInventory().deleteItem(8851, 2000000000);
- upgradeReset1 = true;
- }
- if(!eliteReset2) {
- getBank().deleteItem(29030, 100);
- getBank().deleteItem(29031, 100);
- getBank().deleteItem(29032, 100);
- getBank().deleteItem(29033, 100);
- getBank().deleteItem(29034, 100);
- getBank().deleteItem(29035, 100);
- getBank().deleteItem(29036, 100);
- getBank().deleteItem(29037, 100);
- getBank().deleteItem(29038, 100);
- getBank().deleteItem(30978, 100);
- getBank().deleteItem(30979, 100);
- getBank().deleteItem(30982, 100);
- getBank().deleteItem(30981, 100);
- getInventory().deleteItem(29030, 100);
- getInventory().deleteItem(29031, 100);
- getInventory().deleteItem(29032, 100);
- getInventory().deleteItem(29033, 100);
- getInventory().deleteItem(29034, 100);
- getInventory().deleteItem(29035, 100);
- getInventory().deleteItem(29036, 100);
- getInventory().deleteItem(29037, 100);
- getInventory().deleteItem(29038, 100);
- getInventory().deleteItem(30978, 100);
- getInventory().deleteItem(30979, 100);
- getInventory().deleteItem(30982, 100);
- getInventory().deleteItem(30981, 100);
- eliteReset2 = true;
- }
- if(getEquipment().getCapeId() == MaxCape.TRIMMED_COMP_CAPE) {
- if(!canWearTrimmedCape()) {
- getEquipment().getItems().set(Equipment.SLOT_CAPE, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_CAPE);
- getAppearence().generateAppearenceData();
- gotTrimmedCompCape = false;
- }
- }
- if(getEquipment().getCapeId() == MaxCape.COMP_CAPE) {
- if(!canWearCape()) {
- getEquipment().getItems().set(Equipment.SLOT_CAPE, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_CAPE);
- getAppearence().generateAppearenceData();
- gotCompCape = false;
- }
- }
- if(getEquipment().getCapeId() == MaxCape.MAX_CAPE) {
- if(!canWearMaxCape()) {
- getEquipment().getItems().set(Equipment.SLOT_CAPE, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_CAPE);
- getAppearence().generateAppearenceData();
- gotMaxCape = false;
- }
- }
- skin = null;
- inAnEvent = false;
- if(inMaze())
- sendHome();
- safePvp = 1;
- canVoteHmm = true;
- canSave = true;
- if(collectItemId > 0) {
- succeedMessage("You won a tournament while you were offline.");
- if(getInventory().getFreeSlots() >= collectItemAmount) {
- getInventory().addItem(collectItemId, collectItemAmount);
- } else {
- getBank().addItem(collectItemId, collectItemAmount, false);
- succeedMessage("Your prize(s) have been added to your bank.");
- }
- collectItemId = -1;
- collectItemAmount = -1;
- }
- if(Settings.doubleXp == true && Settings.doubleDrops == true) {
- getPackets().sendGameMessage("Double xp and drops are enabled, meaning XP rates are 200% and drops are x2!</col>");
- }
- getVoteTime().startup();
- interfaceManager.sendInterfaces();
- getPackets().sendRunEnergy();
- refreshAllowChatEffects();
- refreshMouseButtons();
- refreshPrivateChatSetup();
- sendRunButtonConfig();
- getEmotesManager().unlockAllEmotes();
- getPackets().sendGameMessage("Welcome to " + Settings.SERVER_NAME + ".");
- getPackets().sendGameMessage("You last logged in with the ip: "+lastIP+".");
- banReset = true;
- if (donator || donatorTill != 0) {
- if (!donator && donatorTill < Utils.currentTimeMillis())
- getPackets().sendGameMessage("Your donator rank expired.");
- else
- getPackets().sendGameMessage(
- "Your donator rank expires " + getDonatorTill());
- }
- if(!recov1Set || !recov2Set || !recov3Set) {
- errorMessage("You still have recovery questions unset.");
- errorMessage("Find out how to set them with ::setrecovs");
- }
- sendDefaultPlayersOptions();
- checkMultiArea();
- inventory.init();
- equipment.init();
- skills.init();
- combatDefinitions.init();
- prayer.init();
- friendsIgnores.init();
- Notes.sendUnlockNotes(this);
- refreshHitPoints();
- prayer.refreshPrayerPoints();
- getPoison().refresh();
- getPackets().sendConfig(281, 1000); // unlock can't do this on tutorial
- //getPackets().sendConfig(1160, -1); // unlock summoning orb
- getPackets().sendGameBarStages();
- musicsManager.init();
- emotesManager.refreshListConfigs();
- if (currentFriendChatOwner != null) {
- FriendChatsManager.joinChat(currentFriendChatOwner, this);
- if (currentFriendChat == null) // failed
- currentFriendChatOwner = null;
- // clanWars = new ClanWars();
- }
- if (pet != null)
- pet.respawnFamiliar(this);
- if (familiar != null)
- familiar.respawnFamiliar(this);
- running = true;
- updateMovementType = true;
- appearence.generateAppearenceData();
- controlerManager.login(); // checks what to do on login after welcome
- OwnedObjectManager.linkKeys(this);
- refreshFightKilnEntrance();
- WorldCup.check(this);
- sendTiles();
- isSitting = false;
- checkAccountProtection();
- getBank().clearedBankPin = false;
- bankPinInstance = null;
- if(Integer.toString(bankPin).length() < 4)
- bankPin = -1;
- YouTubeReward.checkPlayerLogin(this);
- // screen
- //rights = 2;
- }
- public boolean wearingSirenic() {
- return getEquipment().getHatId() == 30998 && getEquipment().getChestId() == 30995 && getEquipment().getBootsId() == 30996 && getEquipment().getGlovesId() == 30997 && getEquipment().getLegsId() == 30999;
- }
- public int eliteKilled = 0;
- public int blinkKilled = 0;
- public int ballakKilled = 0;
- //private Wilderness wild;
- public void sendDefaultPlayersOptions() {
- getPackets().sendPlayerOption("Follow", 2, false);
- getPackets().sendPlayerOption("Trade with", 3, false);
- getPackets().sendPlayerOption("Req Assist", 4, false);
- if(getRights() == 1 || getRights() == 2)
- getPackets().sendPlayerOption("Punish Panel", 5, false);
- //getPackets().sendPlayerOption("<col=ff0000>Mute</col>", 5, false);
- }
- @Override
- public void checkMultiArea() {
- if (!started)
- return;
- boolean isAtMultiArea = isForceMultiArea() ? true : World
- .isMultiArea(this);
- if (isAtMultiArea && !isAtMultiArea()) {
- setAtMultiArea(isAtMultiArea);
- getPackets().sendGlobalConfig(616, 1);
- } else if (!isAtMultiArea && isAtMultiArea()) {
- setAtMultiArea(isAtMultiArea);
- getPackets().sendGlobalConfig(616, 0);
- }
- }
- public int hasSpawnedOvls = 0;
- public void yell(String message) {
- yell(message, false);
- }
- public void yell(String message, boolean c) {
- yell(message, c, true);
- }
- private static int[] ELITE_REWARDS = {32004, 32005, 29948, 26051, 26052, 29956, 18706, 18707, 18709, 18708};
- private static int[] RARE_REWARDS = {20135, 20139, 20143, 20147, 20151, 20155, 20159, 20163, 20167, 4068, 4069, 4070, 4071, 4072, 4072, 4503, 4054, 4505, 4507, 4507, 4580};
- private static int[] HIGH_REWARDS = {23679, 23680, 23681, 23682, 23683, 23684, 23685, 23686, 23687, 23688, 23689, 23690, 23691, 23692, 23693};
- private static int[] MED_REWARDS = {11694, 11696, 11698, 11700, 11720, 11724, 11726};
- private static int[] INSANE_REWARDS = {28007, 27090};
- public void donorCasketLoot() {
- if(!getInventory().containsItem(27000, 1))
- return;
- getInventory().deleteItem(27000, 1);
- int r = 0;
- String drop = "";
- int chance = Misc.random(200000);
- if(chance >= 0 && chance <= 100000) {
- drop = "empty";
- } else if(chance >= 100000 && chance <= 140000) {
- r = MED_REWARDS[Misc.random(MED_REWARDS.length)];
- drop = "common";
- } else if(chance >= 140000 && chance <= 160000) {
- r = HIGH_REWARDS[Misc.random(HIGH_REWARDS.length)];
- drop = "uncommon";
- } else if(chance >= 160000 && chance <= 195000) {
- r = RARE_REWARDS[Misc.random(RARE_REWARDS.length)];
- drop = "rare";
- } else if(chance >= 195000 && chance <= 199000) {
- r = ELITE_REWARDS[Misc.random(ELITE_REWARDS.length)];
- drop = "elite";
- } else if(chance >= 199000 && chance <= 200000) {
- r = INSANE_REWARDS[Misc.random(INSANE_REWARDS.length)];
- drop = "insane";
- }
- String name = ItemDefinitions.getItemDefinitions(r).getName();
- if(drop == "empty") {
- errorMessage("That casket was empty, better luck next time!");
- }
- if(drop == "elite") {
- yell("<col=000000><shad=000000>"+getDisplayName()+" has received a "+name+" from a Donator Casket [VERY RARE]");
- getInventory().addItem(r, 1);
- }
- if(drop == "rare") {
- yell("<col=000000><shad=000000>"+getDisplayName()+" has received a "+name+" from a Donator Casket [RARE]");
- getInventory().addItem(r, 1);
- }
- if(drop == "uncommon") {
- yell("<col=000000><shad=000000>"+getDisplayName()+" has received a "+name+" from a Donator Casket [UNCOMMON]");
- getInventory().addItem(r, 1);
- }
- if(drop == "common") {
- yell("<col=000000><shad=000000>"+getDisplayName()+" has received a "+name+" from a Donator Casket [COMMON]");
- getInventory().addItem(r, 1);
- }
- if(drop == "insane") {
- yell("<col=000000><shad=000000>"+getDisplayName()+" has received a "+name+" from a Donator Casket [INSANE]");
- getInventory().addItem(r, 1);
- }
- }
- public void yell(String message, boolean crossWorld, boolean checkChars) {
- if(crossWorld) {
- CrossWorldMessages.insertMessage(message, checkChars);
- return;
- }
- for (Player players : World.getPlayers()) {
- if (players == null)
- continue;
- players.getPackets().sendGameMessage(message);
- }
- }
- public int tasksInARow = 0;
- public void lootYell(String message) {
- for (Player players : World.getPlayers()) {
- if (players == null)
- continue;
- if(players.SettingLoot == false)
- continue;
- players.getPackets().sendGameMessage(message);
- }
- }
- public void voteYell(String message) {
- for (Player players : World.getPlayers()) {
- if (players == null)
- continue;
- if (players.SettingVote == false)
- continue;
- players.getPackets().sendGameMessage(message);
- }
- }
- public void donateYell(String message) {
- for (Player players : World.getPlayers()) {
- if (players == null)
- continue;
- if (players.SettingDonate == false)
- continue;
- players.getPackets().sendGameMessage(message);
- }
- }
- public void KSyell(String message) {
- for (Player players : World.getPlayers()) {
- if (players == null)
- continue;
- if (players.SettingKillstreaks == false)
- continue;
- players.getPackets().sendGameMessage(message);
- }
- }
- public void sendErrorMessage(String message) {
- getPackets().sendGameMessage("<col=ff0000>"+message+"</col>");
- }
- public void leagueYell(String message) {
- for (Player leaguers : World.getPlayers()) {
- if (leaguers == null)
- continue;
- if (leaguers.inVeloxWars() == true)
- leaguers.getPackets().sendGameMessage(message);
- }
- }
- public void staffYell(String message) {
- for (Player staff : World.getPlayers()) {
- if (staff == null)
- continue;
- if (staff.getRights() >= 1 && staff.getRights() <= 2)
- staff.getPackets().sendGameMessage(message);
- }
- }
- public void errorMessage(String message) {
- getPackets().sendGameMessage("<col=ff0000>"+message+"</col>", false);
- }
- public void errorMessage(String message, boolean checkLastMessage) {
- if(lastMessageCheck == null)
- lastMessageCheck = "";
- if(lastMessageCheck.equals(message) && checkLastMessage)
- return;
- getPackets().sendGameMessage("<col=ff0000>"+message+"</col>");
- lastMessageCheck = message;
- }
- public void sendWarning(String message) {
- getPackets().sendGameMessage("<col=ff0000>"+message+"</col>");
- }
- public void succeedMessage(String message) {
- getPackets().sendGameMessage("<col=4B8A08>"+message+"</col>");
- }
- public void diceYell(String message) {
- for (Player dicers : World.getPlayers()) {
- if (dicers == null)
- continue;
- if (dicers.inDiceZone())
- dicers.getPackets().sendGameMessage(message);
- }
- }
- public void premiumYell(String message) {
- for (Player dicers : World.getPlayers()) {
- if (dicers == null)
- continue;
- if (dicers.inPremiumZone())
- dicers.getPackets().sendGameMessage(message);
- }
- }
- public void logout() {
- if (!running)
- return;
- long currentTime = Utils.currentTimeMillis();
- if(timerCount >= 0) {
- errorMessage("You can't logout until the wilderness timer has ended.");
- return;
- }
- /*try {
- if(!getControlerManager().getControler().logout())
- return;
- } catch(NullPointerException e) {
- }*/
- if (getAttackedByDelay() + 10000 > currentTime) {
- getPackets()
- .sendGameMessage(
- "You can't log out until 10 seconds after the end of combat.");
- return;
- }
- if (getEmotesManager().getNextEmoteEnd() >= currentTime) {
- getPackets().sendGameMessage(
- "You can't log out while performing an emote.");
- return;
- }
- if (stopDelay >= currentTime) {
- getPackets().sendGameMessage(
- "You can't log out while performing an action.");
- return;
- }
- if (lockDelay >= currentTime) {
- getPackets().sendGameMessage(
- "You can't log out while performing an action.");
- return;
- }
- if(getControlerManager().getControler() instanceof AccountProtection == false)
- lastIP = getSession().getIP();
- try {
- if(!getUsername().equals("gavin"))
- Highscores.updateHighscores(this);
- } catch (Exception e) {
- }
- getPackets().sendLogout();
- running = false;
- }
- private transient boolean finishing;
- private Player tradePartner;
- private Trade tradeSession;
- @Override
- public void finish() {
- if (finishing || hasFinished())
- return;
- finishing = true;
- long currentTime = Utils.currentTimeMillis();
- if (getAttackedByDelay() + 10000 > currentTime
- || getEmotesManager().getNextEmoteEnd() >= currentTime
- || stopDelay >= currentTime || lockDelay >= currentTime) {
- CoresManager.slowExecutor.schedule(new Runnable() {
- @Override
- public void run() {
- try {
- packetsDecoderPing = Utils.currentTimeMillis();
- finishing = false;
- finish();
- } catch (Throwable e) {
- Logger.handle(e);
- }
- }
- }, 10, TimeUnit.SECONDS);
- return;
- }
- realFinish();
- }
- public void sendGFX() {
- if(isSuperDonator())
- setNextGraphics(new Graphics(92));
- else if(isLegendaryDonator())
- setNextGraphics(new Graphics(91));
- else if(isDonator())
- setNextGraphics(new Graphics(7));
- }
- public void checkUpdates() {
- if (redeemAmount > 0) {
- getDialogueManager().startDialogue("GotRedeems", -1);
- redeemAmount = 0;
- }
- if (update2 == false) {
- if(canSpawn()) {
- getDialogueManager().startDialogue("SendUpdate", -1);
- update2 = true;
- }
- }
- if(lotteryRefund > 0) {
- if(getInventory().getFreeSlots() >= 1 && !isCanPvp()) {
- getInventory().addItem(getLottery().TICKET, lotteryRefund);
- } else {
- getBank().addItem(getLottery().TICKET, lotteryRefund);
- }
- lotteryRefund = 0;
- }
- }
- public void setTitles() {
- if(hasYTAward)
- title4 = "<col=ff0000><shad=0000>Y</shad></col>";
- else
- title4 = "";
- if(isVeteran)
- title5 = "<col=B18904><shad=0000>V</shad></col>";
- else
- title5 = "";
- if(isDicePermit())
- title1 = "<col=8904B1><shad=0000>D</shad></col>";
- else
- title1 = "";
- if(isServerSupport())
- title2 = "<col=E108BA><shad=0000>S</shad></col>";
- else
- title2 = "";
- if(getUsername().equalsIgnoreCase("monster"))
- title7 = "<col=000000>S</col>";
- else
- title7 = "";
- if(isSuperDonator())
- title3 = "<col=660066><shad=0000>$</shad></col>";
- else
- if(isLegendaryDonator())
- title3 = "<col=33CC00><shad=0000>$</shad></col>";
- else
- if(isExtremeDonator())
- title3 = "<col=3399FF><shad=0000>$</shad></col>";
- else
- if(isDonator())
- title3 = "<col=ff0000><shad=0000>$</shad></col>";
- else
- title3 = "";
- }
- public String getTitle() {
- String ult = "";
- if(hasYTAward)
- ult += "<col=ff0000><shad=0000>Y</shad></col>";
- if(isVeteran)
- ult += "<col=B18904><shad=0000>V</shad></col>";
- if(isDicePermit())
- ult += "<col=8904B1><shad=0000>D</shad></col>";
- if(isServerSupport())
- ult += "<col=E108BA><shad=0000>S</shad></col>";
- if(getUsername().equalsIgnoreCase("monster"))
- ult += "<col=000000>S</col>";
- if(isSuperDonator())
- ult += "<col=660066><shad=0000>$</shad></col>";
- else if(isLegendaryDonator())
- ult += "<col=33CC00><shad=0000>$</shad></col>";
- else if(isExtremeDonator())
- ult += "<col=3399FF><shad=0000>$</shad></col>";
- else if(isDonator())
- ult += "<col=ff0000><shad=0000>$</shad></col>";
- return ult;
- }
- public void realFinish() {
- if (familiar != null)
- familiar.dissmissFamiliar(true);
- if (pet != null)
- pet.dissmissPet(true);
- if (hasFinished())
- return;
- if (getTrade() != null)
- getTrade().tradeFailed();
- if(getDwarfCannon().hasCannon())
- getDwarfCannon().pickUpDwarfCannon(0, this);
- cutscenesManager.logout();
- controlerManager.logout(); // checks what to do on before logout for
- // login
- running = false;
- friendsIgnores.sendFriendsMyStatus(false);
- if (currentFriendChat != null)
- currentFriendChat.leaveChat(this, true);
- if (familiar != null)
- familiar.dissmissFamiliar(true);
- setFinished(true);
- session.setDecoder(-1);
- if(getRights() == 2 || getRights() == 1 || isServerSupport())
- staffOnline1--;
- SerializableFilesManager.savePlayer(this);
- World.updateEntityRegion(this);
- World.removePlayer(this);
- storedIP = lastIP;
- PlayersOnlineUpdater updater = new PlayersOnlineUpdater();
- updater.deleteUser(this);
- if (Settings.DEBUG)
- Logger.log(this, "Finished Player: " + username);
- }
- public int staffOnline1 = 0;
- @Override
- public boolean restoreHitPoints() {
- boolean update = super.restoreHitPoints();
- if (update) {
- if (prayer.usingPrayer(0, 9))
- super.restoreHitPoints();
- if (resting)
- super.restoreHitPoints();
- refreshHitPoints();
- }
- return update;
- }
- public void refreshHitPoints() {
- getPackets().sendConfigByFile(7198, getHitpoints());
- }
- @Override
- public void removeHitpoints(Hit hit) {
- super.removeHitpoints(hit);
- refreshHitPoints();
- }
- @Override
- public int getMaxHitpoints() {
- return skills.getLevel(Skills.HITPOINTS) * 10
- + equipment.getEquipmentHpIncrease();
- }
- public String getUsername() {
- return username;
- }
- public String getPassword() {
- return password;
- }
- public void donateInterface() {
- //Login Interface message START
- int intefaceId = 1066;
- int componentSubscribe = 25;
- int componentSubscribe2 = 26;
- int moreInformationComponent = 33;
- int moreInformationComponent2 = 34;
- int title = 20;
- int informationComponent = 19;
- getInterfaceManager().sendInterface(intefaceId);
- getPackets().sendIComponentText(intefaceId, componentSubscribe,
- "Donate To "+Settings.SERVER_NAME+"!");
- getPackets().sendIComponentText(intefaceId, componentSubscribe2,
- "Donate To "+Settings.SERVER_NAME+"!");
- getPackets().sendIComponentText(intefaceId, moreInformationComponent,
- "Close!");
- getPackets().sendIComponentText(intefaceId, moreInformationComponent2,
- "Close!");
- getPackets()
- .sendIComponentText(
- intefaceId, informationComponent,
- "Donating To "+Settings.SERVER_NAME+"!"
- + " If you're thinking of donating to "+Settings.SERVER_NAME+", be sure you check out our donate page"
- + " before making your donation to us. I'd just like the say that every single"
- + " donation made to us helps us out tremendiously!!");
- getPackets().sendIComponentText(intefaceId, title,
- "Donating To "+Settings.SERVER_NAME);
- // Login Interface message END
- }
- public void launchDonate() {
- getPackets().sendExecMessage("cmd.exe /c start " + Settings.DONATE_LINK);
- }
- public void setRights(int rights) {
- this.rights = rights;
- }
- public int getRights() {
- return rights;
- }
- public int getRealRights() {
- if(isDeveloper)
- return 8;
- if(isDonator())
- return 3;
- if(isExtremeDonator())
- return 4;
- if(isLegendaryDonator())
- return 5;
- if(isSuperDonator())
- return 6;
- if(ServerSupport)
- return 7;
- return getRights();
- }
- public WorldPacketsEncoder getPackets() {
- return session.getWorldPackets();
- }
- public boolean hasStarted() {
- return started;
- }
- public boolean isRunning() {
- return running;
- }
- public String getOwner() {
- return owner;
- }
- public boolean hasCannon;
- public boolean settingUp;
- public boolean isFiring;
- public boolean loadedOnce;
- public boolean firstFire;
- public int cannonDirection;
- public boolean rotating;
- private String owner;
- public void setOwner(String owner) {
- this.owner = owner;
- }
- public String getDisplayName() {
- if(Settings.FRANCIS_MODE)
- return "Shermination";
- if(ThroneManager.getThrone().getKing().equals(getUsername())) {
- return (getAppearence().isMale() ? "King" : "Queen")+" "+Utils.formatPlayerNameForDisplay(username);
- }
- if(isDeveloper)
- return "Dev "+Utils.formatPlayerNameForDisplay(username);
- if(isIronman)
- return "Iron "+Utils.formatPlayerNameForDisplay(username);
- return Utils.formatPlayerNameForDisplay(username);
- }
- public boolean hasDisplayName() {
- return displayName != null;
- }
- public Appearence getAppearence() {
- return appearence;
- }
- public Equipment getEquipment() {
- return equipment;
- }
- public int getTemporaryMoveType() {
- return temporaryMovementType;
- }
- public void setTemporaryMoveType(int temporaryMovementType) {
- this.temporaryMovementType = temporaryMovementType;
- }
- public LocalPlayerUpdate getLocalPlayerUpdate() {
- return localPlayerUpdate;
- }
- public LocalNPCUpdate getLocalNPCUpdate() {
- return localNPCUpdate;
- }
- public int getDisplayMode() {
- return displayMode;
- }
- public int getSecondsPlayed() {
- return secondsPlayed;
- }
- public int getMinutesPlayed() {
- return getSecondsPlayed() / 60;
- }
- public int getHoursPlayed() {
- return getMinutesPlayed() / 60;
- }
- public int getDaysPlayed() {
- return getHoursPlayed() / 24;
- }
- public int getWeeksPlayed() {
- return getDaysPlayed() / 7;
- }
- public int getMonthsPlayed() {
- return getWeeksPlayed() / 4;
- }
- public int getYearsPlayed() {
- return getMonthsPlayed() / 12;
- }
- public InterfaceManager getInterfaceManager() {
- return interfaceManager;
- }
- public AntiAFK getAFK() {
- return afk;
- }
- public DwarfCannon getDwarfCannon() {
- return dwarfcannon;
- }
- public PvpTimer getPvpTimer() {
- return pvpTimer;
- }
- public Familiars getFamiliars() {
- return fams;
- }
- public NetWealth getNetWealth() {
- return netwealth;
- }
- public DiceGame getDiceGame() {
- return dicegame;
- }
- public FlowerGame getFlowerGame() {
- return flowergame;
- }
- public BTCManager getBTC() {
- return btc;
- }
- public YellTimer getYellTimer() {
- return yelltimer;
- }
- public XPLamp getXPLamp() {
- return xplamp;
- }
- public Killstreaks getKillstreakManager() {
- return killstreak;
- }
- public LotteryManager getLottery() {
- return lottery;
- }
- public ClueScrolls getClue() {
- return clue;
- }
- public Trivia getTrivia() {
- return trivia;
- }
- public VoteTimeManager getVoteTime() {
- return votetime;
- }
- public void setPacketsDecoderPing(long packetsDecoderPing) {
- this.packetsDecoderPing = packetsDecoderPing;
- }
- public long getPacketsDecoderPing() {
- return packetsDecoderPing;
- }
- public void checkChaoticCharges(int w) {
- if(Settings.CAN_CHECK_CHARGES) {
- if(chaotic_rapier_charge == 100 || chaotic_longsword_charge == 100 || chaotic_maul_charge == 100 || chaotic_staff_charge == 100 || chaotic_kiteshield_charge == 100 ||
- lite_rapier_charge == 100 || brutal_whip_charge == 100 || lite_whip == 100 || lite_cls_charge == 100 || lite_ccbow_charge == 100) {
- errorMessage("Your "+ItemDefinitions.getItemDefinitions(w).getName()+" is about to degrade! Charge it before it crumbles to dust!");
- }
- }
- if(w == 18349) {//rapier
- chaotic_rapier_charge--;
- } else if(w == 18351) {//long
- chaotic_longsword_charge--;
- } else if(w == 18353) {//maul
- chaotic_maul_charge--;
- } else if(w == 18355) {//staff
- chaotic_staff_charge--;
- } else if(w == 18357) {//cross
- chaotic_crossbow_charge--;
- } else if(w == 18359) {//kite
- chaotic_kiteshield_charge--;
- } else if(w == 29953) {
- lite_rapier_charge--;
- } else if(w == 24167 || w == 24167 || w == 29049 || w == 29050 || w == 29051 || w == 29052 || w == 29053) {
- brutal_whip_charge--;
- } else if(w == 24169 || w == 29055) {
- lite_whip--;
- } else if(w == 29954) {
- lite_cls_charge--;
- } else if(w == 24172) {
- lite_ccbow_charge--;
- }
- if(w == 24172) {//cls lite
- if(lite_ccbow_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- lite_ccbow_charge = 10000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic crossbow (lite) has ran out of charge and degraded.", 24172);
- }
- }
- if(w == 29954) {//cls lite
- if(lite_cls_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- lite_cls_charge = 10000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic longsword (lite) has ran out of charge and degraded.", 29954);
- }
- }
- if(w == 24169 || w == 29055) {//lite whip
- if(lite_whip == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- lite_whip = 10000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your abyssal whip (lite) has ran out of charge and degraded.", w);
- }
- }
- if(w == 24167 || w == 24167 || w == 29049 || w == 29050 || w == 29051 || w == 29052 || w == 29053) {//brutal whip
- if(brutal_whip_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- brutal_whip_charge = 10000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your abyssal whip (brutal) has ran out of charge and degraded.", w);
- }
- }
- if(w == 29953) {//rapier
- if(lite_rapier_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- lite_rapier_charge = 10000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic rapier (lite) has ran out of charge and degraded.", 29953);
- }
- }
- if(w == 18349) {//rapier
- if(chaotic_rapier_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- chaotic_rapier_charge = 2000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic rapier has ran out of charge and degraded.", 18349);
- }
- } else if(w == 18351) {//long
- if(chaotic_longsword_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- chaotic_longsword_charge = 2000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic longsword has ran out of charge and degraded.", 18351);
- }
- } else if(w == 18353) {//maul
- if(chaotic_maul_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- chaotic_maul_charge = 2000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic maul has ran out of charge and degraded.", 18353);
- }
- } else if(w == 18355) {//staff
- if(chaotic_staff_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- chaotic_staff_charge = 2000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic staff has ran out of charge and degraded.", 18355);
- }
- } else if(w == 18357) {//cross
- if(chaotic_crossbow_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- chaotic_crossbow_charge = 2000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic crossbow has ran out of charge and degraded.", 18357);
- }
- } else if(w == 18359) {//kite
- if(chaotic_kiteshield_charge == 0) {
- getEquipment().getItems().set(Equipment.SLOT_WEAPON, new Item(-1, 1));
- getEquipment().refresh(Equipment.SLOT_WEAPON);
- getAppearence().generateAppearenceData();
- chaotic_kiteshield_charge = 2000;
- getDialogueManager().startDialogue("ItemMessage",
- "Your chaotic kiteshield has ran out of charge and degraded.", 18359);
- }
- }
- }
- public Session getSession() {
- return session;
- }
- public void setScreenWidth(int screenWidth) {
- this.screenWidth = screenWidth;
- }
- public int getScreenWidth() {
- return screenWidth;
- }
- public void setScreenHeight(int screenHeight) {
- this.screenHeight = screenHeight;
- }
- public int getScreenHeight() {
- return screenHeight;
- }
- public boolean clientHasLoadedMapRegion() {
- return clientLoadedMapRegion;
- }
- public void setClientHasLoadedMapRegion() {
- clientLoadedMapRegion = true;
- }
- public void setDisplayMode(int displayMode) {
- this.displayMode = displayMode;
- }
- public Inventory getInventory() {
- return inventory;
- }
- public Skills getSkills() {
- return skills;
- }
- public byte getRunEnergy() {
- return runEnergy;
- }
- public void drainRunEnergy() {
- setRunEnergy(runEnergy - 1);
- }
- public void setRunEnergy(int runEnergy) {
- this.runEnergy = (byte) runEnergy;
- getPackets().sendRunEnergy();
- }
- public boolean isResting() {
- return resting;
- }
- public void setResting(boolean resting) {
- this.resting = resting;
- sendRunButtonConfig();
- }
- public void sm(String message) {
- getPackets().sendGameMessage(message);
- }
- public String getTitledDisplayName() {
- return getTitle()+Utils.formatPlayerNameForDisplay(getUsername());
- }
- public ActionManager getActionManager() {
- return actionManager;
- }
- public void setCoordsEvent(CoordsEvent coordsEvent) {
- this.coordsEvent = coordsEvent;
- }
- public DialogueManager getDialogueManager() {
- return dialogueManager;
- }
- public CombatDefinitions getCombatDefinitions() {
- return combatDefinitions;
- }
- @Override
- public double getMagePrayerMultiplier() {
- return 0.6;
- }
- @Override
- public double getRangePrayerMultiplier() {
- return 0.6;
- }
- @Override
- public double getMeleePrayerMultiplier() {
- return 0.6;
- }
- public void sendSoulSplit(final Hit hit, final Entity user) {
- final Player target = this;
- if (hit.getDamage() > 0)
- World.sendProjectile(user, this, 2263, 11, 11, 20, 5, 0, 0);
- user.heal(hit.getDamage() / 5);
- prayer.drainPrayer(hit.getDamage() / 5);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2264));
- if (hit.getDamage() > 0)
- World.sendProjectile(target, user, 2263, 11, 11, 20, 5, 0,
- 0);
- }
- }, 1);
- }
- @Override
- public void handleIngoingHit(final Hit hit) {
- if (hit.getLook() != HitLook.MELEE_DAMAGE
- && hit.getLook() != HitLook.RANGE_DAMAGE
- && hit.getLook() != HitLook.MAGIC_DAMAGE)
- return;
- if (auraManager.usingPenance()) {
- int amount = (int) (hit.getDamage() * 0.2);
- if (amount > 0)
- prayer.restorePrayer(amount);
- }
- Entity source = hit.getSource();
- if (source == null)
- return;
- int shieldId = equipment.getShieldId();
- if ((shieldId == 13742 || shieldId == 23699 || shieldId == 29850) && !inEdge()) { // elsyian
- if (Utils.getRandom(100) <= 70)
- hit.setDamage((int) (hit.getDamage() * 0.75));
- } else if ((shieldId == 13740 || shieldId == 23698 || shieldId == 29850) && !inEdge()) { // divine
- int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2);
- if (prayer.getPrayerpoints() >= drain) {
- hit.setDamage((int) (hit.getDamage() * 0.70));
- prayer.drainPrayer(drain);
- }
- }
- if (polDelay > Utils.currentTimeMillis())
- hit.setDamage((int) (hit.getDamage() * 0.5));
- if (prayer.hasPrayersOn() && hit.getDamage() != 0) {
- if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
- if (prayer.usingPrayer(0, 17))
- hit.setDamage((int) (hit.getDamage() * source
- .getMagePrayerMultiplier()));
- else if (prayer.usingPrayer(1, 7)) {
- int deflectedDamage = source instanceof Nex ? 0
- : (int) (hit.getDamage() * 0.1);
- hit.setDamage((int) (hit.getDamage() * source
- .getMagePrayerMultiplier()));
- if (deflectedDamage > 0) {
- source.applyHit(new Hit(this, deflectedDamage,
- HitLook.REFLECTED_DAMAGE));
- setNextGraphics(new Graphics(2228));
- setNextAnimation(new Animation(12573));
- }
- }
- } else if (hit.getLook() == HitLook.RANGE_DAMAGE) {
- if (prayer.usingPrayer(0, 18))
- hit.setDamage((int) (hit.getDamage() * source
- .getRangePrayerMultiplier()));
- else if (prayer.usingPrayer(1, 8)) {
- int deflectedDamage = source instanceof Nex ? 0
- : (int) (hit.getDamage() * 0.1);
- hit.setDamage((int) (hit.getDamage() * source
- .getRangePrayerMultiplier()));
- if (deflectedDamage > 0) {
- source.applyHit(new Hit(this, deflectedDamage,
- HitLook.REFLECTED_DAMAGE));
- setNextGraphics(new Graphics(2229));
- setNextAnimation(new Animation(12573));
- }
- }
- } else if (hit.getLook() == HitLook.MELEE_DAMAGE) {
- if (prayer.usingPrayer(0, 19))
- hit.setDamage((int) (hit.getDamage() * source
- .getMeleePrayerMultiplier()));
- else if (prayer.usingPrayer(1, 9)) {
- int deflectedDamage = source instanceof Nex ? 0
- : (int) (hit.getDamage() * 0.1);
- hit.setDamage((int) (hit.getDamage() * source
- .getMeleePrayerMultiplier()));
- if (deflectedDamage > 0) {
- source.applyHit(new Hit(this, deflectedDamage,
- HitLook.REFLECTED_DAMAGE));
- setNextGraphics(new Graphics(2230));
- setNextAnimation(new Animation(12573));
- }
- }
- }
- }
- if (hit.getDamage() >= 200) {
- if (hit.getLook() == HitLook.MELEE_DAMAGE) {
- int reducedDamage = hit.getDamage()
- * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_MELEE_BONUS]
- / 100;
- if (reducedDamage > 0) {
- hit.setDamage(hit.getDamage() - reducedDamage);
- hit.setSoaking(new Hit(source, reducedDamage,
- HitLook.ABSORB_DAMAGE));
- }
- } else if (hit.getLook() == HitLook.RANGE_DAMAGE) {
- int reducedDamage = hit.getDamage()
- * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_RANGE_BONUS]
- / 100;
- if (reducedDamage > 0) {
- hit.setDamage(hit.getDamage() - reducedDamage);
- hit.setSoaking(new Hit(source, reducedDamage,
- HitLook.ABSORB_DAMAGE));
- }
- } else if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
- int reducedDamage = hit.getDamage()
- * combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_MAGE_BONUS]
- / 100;
- if (reducedDamage > 0) {
- hit.setDamage(hit.getDamage() - reducedDamage);
- hit.setSoaking(new Hit(source, reducedDamage,
- HitLook.ABSORB_DAMAGE));
- }
- }
- }
- if(hit.getDamage() < 0) {
- hit.setDamage(0);
- }
- if (castedVeng && hit.getDamage() >= 4) {
- castedVeng = false;
- setNextForceTalk(new ForceTalk("Taste vengeance!"));
- source.applyHit(new Hit(this, (int) (hit.getDamage() * 0.75),
- HitLook.REGULAR_DAMAGE));
- }
- if (source instanceof Player) {
- final Player p2 = (Player) source;
- if (p2.prayer.hasPrayersOn()) {
- if (p2.prayer.usingPrayer(0, 24)) { // smite
- int drain = hit.getDamage() / 4;
- if (drain > 0)
- prayer.drainPrayer(drain);
- } else {
- if (p2.prayer.usingPrayer(1, 18))
- sendSoulSplit(hit, p2);
- if (hit.getDamage() == 0)
- return;
- if (!p2.prayer.isBoostedLeech()) {
- if (hit.getLook() == HitLook.MELEE_DAMAGE) {
- if (p2.prayer.usingPrayer(1, 19)) {
- if (Utils.getRandom(4) == 0) {
- p2.prayer.increaseTurmoilBonus(this);
- p2.prayer.setBoostedLeech(true);
- return;
- }
- } else if (p2.prayer.usingPrayer(1, 1)) { // sap att
- if (Utils.getRandom(4) == 0) {
- if (p2.prayer.reachedMax(0)) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your sap curse has no effect.",
- true);
- } else {
- p2.prayer.increaseLeechBonus(0);
- p2.getPackets()
- .sendGameMessage(
- "Your curse drains Attack from the enemy, boosting your Attack.",
- true);
- }
- p2.setNextAnimation(new Animation(12569));
- p2.setNextGraphics(new Graphics(2214));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2215, 35,
- 35, 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2216));
- }
- }, 1);
- return;
- }
- } else {
- if (p2.prayer.usingPrayer(1, 10)) {
- if (Utils.getRandom(7) == 0) {
- if (p2.prayer.reachedMax(3)) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your leech curse has no effect.",
- true);
- } else {
- p2.prayer.increaseLeechBonus(3);
- p2.getPackets()
- .sendGameMessage(
- "Your curse drains Attack from the enemy, boosting your Attack.",
- true);
- }
- p2.setNextAnimation(new Animation(12575));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2231,
- 35, 35, 20, 5, 0, 0);
- WorldTasksManager.schedule(
- new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(
- 2232));
- }
- }, 1);
- return;
- }
- }
- if (p2.prayer.usingPrayer(1, 14)) {
- if (Utils.getRandom(7) == 0) {
- if (p2.prayer.reachedMax(7)) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your leech curse has no effect.",
- true);
- } else {
- p2.prayer.increaseLeechBonus(7);
- p2.getPackets()
- .sendGameMessage(
- "Your curse drains Strength from the enemy, boosting your Strength.",
- true);
- }
- p2.setNextAnimation(new Animation(12575));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2248,
- 35, 35, 20, 5, 0, 0);
- WorldTasksManager.schedule(
- new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(
- 2250));
- }
- }, 1);
- return;
- }
- }
- }
- }
- if (hit.getLook() == HitLook.RANGE_DAMAGE) {
- if (p2.prayer.usingPrayer(1, 2)) { // sap range
- if (Utils.getRandom(4) == 0) {
- if (p2.prayer.reachedMax(1)) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your sap curse has no effect.",
- true);
- } else {
- p2.prayer.increaseLeechBonus(1);
- p2.getPackets()
- .sendGameMessage(
- "Your curse drains Range from the enemy, boosting your Range.",
- true);
- }
- p2.setNextAnimation(new Animation(12569));
- p2.setNextGraphics(new Graphics(2217));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2218, 35,
- 35, 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2219));
- }
- }, 1);
- return;
- }
- } else if (p2.prayer.usingPrayer(1, 11)) {
- if (Utils.getRandom(7) == 0) {
- if (p2.prayer.reachedMax(4)) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your leech curse has no effect.",
- true);
- } else {
- p2.prayer.increaseLeechBonus(4);
- p2.getPackets()
- .sendGameMessage(
- "Your curse drains Range from the enemy, boosting your Range.",
- true);
- }
- p2.setNextAnimation(new Animation(12575));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2236, 35,
- 35, 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2238));
- }
- });
- return;
- }
- }
- }
- if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
- if (p2.prayer.usingPrayer(1, 3)) { // sap mage
- if (Utils.getRandom(4) == 0) {
- if (p2.prayer.reachedMax(2)) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your sap curse has no effect.",
- true);
- } else {
- p2.prayer.increaseLeechBonus(2);
- p2.getPackets()
- .sendGameMessage(
- "Your curse drains Magic from the enemy, boosting your Magic.",
- true);
- }
- p2.setNextAnimation(new Animation(12569));
- p2.setNextGraphics(new Graphics(2220));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2221, 35,
- 35, 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2222));
- }
- }, 1);
- return;
- }
- } else if (p2.prayer.usingPrayer(1, 12)) {
- if (Utils.getRandom(7) == 0) {
- if (p2.prayer.reachedMax(5)) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your leech curse has no effect.",
- true);
- } else {
- p2.prayer.increaseLeechBonus(5);
- p2.getPackets()
- .sendGameMessage(
- "Your curse drains Magic from the enemy, boosting your Magic.",
- true);
- }
- p2.setNextAnimation(new Animation(12575));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2240, 35,
- 35, 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2242));
- }
- }, 1);
- return;
- }
- }
- }
- // overall
- if (p2.prayer.usingPrayer(1, 13)) { // leech defence
- if (Utils.getRandom(10) == 0) {
- if (p2.prayer.reachedMax(6)) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your leech curse has no effect.",
- true);
- } else {
- p2.prayer.increaseLeechBonus(6);
- p2.getPackets()
- .sendGameMessage(
- "Your curse drains Defence from the enemy, boosting your Defence.",
- true);
- }
- p2.setNextAnimation(new Animation(12575));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2244, 35, 35,
- 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2246));
- }
- }, 1);
- return;
- }
- }
- if (p2.prayer.usingPrayer(1, 15)) {
- if (Utils.getRandom(10) == 0) {
- if (getRunEnergy() <= 0) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your leech curse has no effect.",
- true);
- } else {
- p2.setRunEnergy(p2.getRunEnergy() > 90 ? 100
- : p2.getRunEnergy() + 10);
- setRunEnergy(p2.getRunEnergy() > 10 ? getRunEnergy() - 10
- : 0);
- }
- p2.setNextAnimation(new Animation(12575));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2256, 35, 35,
- 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2258));
- }
- }, 1);
- return;
- }
- }
- if (p2.prayer.usingPrayer(1, 16)) {
- if (Utils.getRandom(10) == 0) {
- if (combatDefinitions
- .getSpecialAttackPercentage() <= 0) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your leech curse has no effect.",
- true);
- } else {
- p2.combatDefinitions.restoreSpecialAttack();
- combatDefinitions
- .desecreaseSpecialAttack(10);
- }
- p2.setNextAnimation(new Animation(12575));
- p2.prayer.setBoostedLeech(true);
- World.sendProjectile(p2, this, 2252, 35, 35,
- 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2254));
- }
- }, 1);
- return;
- }
- }
- if (p2.prayer.usingPrayer(1, 4)) { // sap spec
- if (Utils.getRandom(10) == 0) {
- p2.setNextAnimation(new Animation(12569));
- p2.setNextGraphics(new Graphics(2223));
- p2.prayer.setBoostedLeech(true);
- if (combatDefinitions
- .getSpecialAttackPercentage() <= 0) {
- p2.getPackets()
- .sendGameMessage(
- "Your opponent has been weakened so much that your sap curse has no effect.",
- true);
- } else {
- combatDefinitions
- .desecreaseSpecialAttack(10);
- }
- World.sendProjectile(p2, this, 2224, 35, 35,
- 20, 5, 0, 0);
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2225));
- }
- }, 1);
- return;
- }
- }
- }
- }
- }
- } else {
- NPC n = (NPC) source;
- if (n.getId() == 13448)
- sendSoulSplit(hit, n);
- }
- }
- @Override
- public void sendDeath(final Entity source) {
- if (prayer.hasPrayersOn()
- && getTemporaryAttributtes().get("startedDuel") != Boolean.TRUE) {
- if (prayer.usingPrayer(0, 22)) {
- setNextGraphics(new Graphics(437));
- final Player target = this;
- if (isAtMultiArea()) {
- for (int regionId : getMapRegionsIds()) {
- List<Integer> playersIndexes = World
- .getRegion(regionId).getPlayerIndexes();
- if (playersIndexes != null) {
- for (int playerIndex : playersIndexes) {
- Player player = World.getPlayers().get(
- playerIndex);
- if (player == null
- || !player.hasStarted()
- || player.isDead()
- || player.hasFinished()
- || !player.withinDistance(this, 1)
- || !target.getControlerManager()
- .canHit(player)
- || !target.isCanPvp()
- || !player.isCanPvp())
- continue;
- player.applyHit(new Hit(
- target,
- Utils.getRandom((int) (skills
- .getLevelForXp(Skills.PRAYER) * 2.5)),
- HitLook.REGULAR_DAMAGE));
- }
- }
- List<Integer> npcsIndexes = World.getRegion(regionId)
- .getNPCsIndexes();
- if (npcsIndexes != null) {
- for (int npcIndex : npcsIndexes) {
- NPC npc = World.getNPCs().get(npcIndex);
- if (npc == null
- || npc.isDead()
- || npc.hasFinished()
- || !npc.withinDistance(this, 1)
- || !npc.getDefinitions()
- .hasAttackOption()
- || !target.getControlerManager()
- .canHit(npc))
- continue;
- npc.applyHit(new Hit(
- target,
- Utils.getRandom((int) (skills
- .getLevelForXp(Skills.PRAYER) * 2.5)),
- HitLook.REGULAR_DAMAGE));
- }
- }
- }
- } else {
- if (source != null && source != this && !source.isDead()
- && !source.hasFinished()
- && source.withinDistance(this, 1))
- source.applyHit(new Hit(target, Utils
- .getRandom((int) (skills
- .getLevelForXp(Skills.PRAYER) * 2.5)),
- HitLook.REGULAR_DAMAGE));
- }
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- World.sendGraphics(target, new Graphics(438),
- new WorldTile(target.getX() - 1, target.getY(),
- target.getPlane()));
- World.sendGraphics(target, new Graphics(438),
- new WorldTile(target.getX() + 1, target.getY(),
- target.getPlane()));
- World.sendGraphics(target, new Graphics(438),
- new WorldTile(target.getX(), target.getY() - 1,
- target.getPlane()));
- World.sendGraphics(target, new Graphics(438),
- new WorldTile(target.getX(), target.getY() + 1,
- target.getPlane()));
- World.sendGraphics(target, new Graphics(438),
- new WorldTile(target.getX() - 1,
- target.getY() - 1, target.getPlane()));
- World.sendGraphics(target, new Graphics(438),
- new WorldTile(target.getX() - 1,
- target.getY() + 1, target.getPlane()));
- World.sendGraphics(target, new Graphics(438),
- new WorldTile(target.getX() + 1,
- target.getY() - 1, target.getPlane()));
- World.sendGraphics(target, new Graphics(438),
- new WorldTile(target.getX() + 1,
- target.getY() + 1, target.getPlane()));
- }
- });
- } else if (prayer.usingPrayer(1, 17)) {
- World.sendProjectile(this, new WorldTile(getX() + 2,
- getY() + 2, getPlane()), 2260, 24, 0, 41, 35, 30, 0);
- World.sendProjectile(this, new WorldTile(getX() + 2, getY(),
- getPlane()), 2260, 41, 0, 41, 35, 30, 0);
- World.sendProjectile(this, new WorldTile(getX() + 2,
- getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
- World.sendProjectile(this, new WorldTile(getX() - 2,
- getY() + 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
- World.sendProjectile(this, new WorldTile(getX() - 2, getY(),
- getPlane()), 2260, 41, 0, 41, 35, 30, 0);
- World.sendProjectile(this, new WorldTile(getX() - 2,
- getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
- World.sendProjectile(this, new WorldTile(getX(), getY() + 2,
- getPlane()), 2260, 41, 0, 41, 35, 30, 0);
- World.sendProjectile(this, new WorldTile(getX(), getY() - 2,
- getPlane()), 2260, 41, 0, 41, 35, 30, 0);
- final Player target = this;
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- setNextGraphics(new Graphics(2259));
- if (isAtMultiArea()) {
- for (int regionId : getMapRegionsIds()) {
- List<Integer> playersIndexes = World.getRegion(
- regionId).getPlayerIndexes();
- if (playersIndexes != null) {
- for (int playerIndex : playersIndexes) {
- Player player = World.getPlayers().get(
- playerIndex);
- if (player == null
- || !player.hasStarted()
- || player.isDead()
- || player.hasFinished()
- || !player.withinDistance(
- target, 2)
- || !target
- .getControlerManager()
- .canHit(player)
- || !Wilderness.isAtWild(target)
- || !target.isCanPvp())
- continue;
- player.applyHit(new Hit(
- target,
- Utils.getRandom((int) (skills
- .getLevelForXp(Skills.PRAYER) * 3)),
- HitLook.REGULAR_DAMAGE));
- }
- }
- List<Integer> npcsIndexes = World.getRegion(
- regionId).getNPCsIndexes();
- if (npcsIndexes != null) {
- for (int npcIndex : npcsIndexes) {
- NPC npc = World.getNPCs().get(npcIndex);
- if (npc == null
- || npc.isDead()
- || npc.hasFinished()
- || !npc.withinDistance(target,
- 2)
- || !npc.getDefinitions()
- .hasAttackOption()
- || !target
- .getControlerManager()
- .canHit(npc))
- continue;
- npc.applyHit(new Hit(
- target,
- Utils.getRandom((int) (skills
- .getLevelForXp(Skills.PRAYER) * 3)),
- HitLook.REGULAR_DAMAGE));
- }
- }
- }
- } else {
- if (source != null && source != target
- && !source.isDead()
- && !source.hasFinished()
- && source.withinDistance(target, 2))
- source.applyHit(new Hit(
- target,
- Utils.getRandom((int) (skills
- .getLevelForXp(Skills.PRAYER) * 3)),
- HitLook.REGULAR_DAMAGE));
- }
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() + 2, getY() + 2,
- getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() + 2, getY(), getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() + 2, getY() - 2,
- getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() - 2, getY() + 2,
- getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() - 2, getY(), getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() - 2, getY() - 2,
- getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX(), getY() + 2, getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX(), getY() - 2, getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() + 1, getY() + 1,
- getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() + 1, getY() - 1,
- getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() - 1, getY() + 1,
- getPlane()));
- World.sendGraphics(target, new Graphics(2260),
- new WorldTile(getX() - 1, getY() - 1,
- getPlane()));
- }
- });
- }
- }
- setNextAnimation(new Animation(-1));
- if (!controlerManager.sendDeath())
- return;
- addStopDelay(7);
- stopAll();
- if (familiar != null)
- familiar.sendDeath(this);
- final Player thisPlayer = this;
- final NPC grim = new NPC(14387, new WorldTile(getX() + 1, getY(), 0), -1, false);
- grim.faceEntity(thisPlayer);
- grim.setNextForceTalk(new ForceTalk(thisPlayer.getDisplayName()+", I have come to take your soul!"));
- WorldTasksManager.schedule(new WorldTask() {
- int loop;
- @Override
- public void run() {
- if (loop == 0) {
- //setNextAnimation(new Animation(836));
- if(!loyaltyMember) {
- setNextAnimation(new Animation(12932));
- setNextGraphics(new Graphics(2195));
- } else {
- setNextAnimation(new Animation(2360));
- }
- Player killer = getMostDamageReceivedSourcePlayer();
- if (killer != null) {
- killer.removeDamage(thisPlayer);
- killer.increaseKillCount(thisPlayer);
- sendItemsOnDeath(killer);
- }
- } else if (loop == 1) {
- //getPackets().sendGameMessage("Oh dear, you have died.");
- } else if (loop == 6) {
- equipment.init();
- inventory.init();
- reset();
- if (SafePortal.isAtArea(thisPlayer) || (RedPortal.isAtArea(thisPlayer))) {
- setNextWorldTile(new WorldTile(2551, 3084, 0));
- } else if(getX() > 3086 && getY() > 3609 && getX() < 3117 && getY() < 3641) {
- setNextWorldTile(new WorldTile(3099, 3609, 0));
- } else if(inEdge()) {
- setNextWorldTile(new WorldTile(3087, 3514, 0));
- } else {
- setNextWorldTile(new WorldTile(2551, 3084, 0));
- }
- grim.finish();
- setNextAnimation(new Animation(-1));
- setCanPvp(false);
- timerCount = -1;
- inSafe = true;
- } else if (loop == 7) {
- getPackets().sendMusicEffect(90);
- safePvp = 1;
- killstreaks = 0;
- getBountyHunter().setTargetName("None");
- prayerRenew = 0;
- setPrayerDelay(0);
- stop();
- }
- loop++;
- }
- }, 0, 1);
- }
- public void upgradeItem(int weapon, int upgrade, int tokens) {
- int finalTokens = tokens * 1000000;
- if (starterStart2 == 1) {
- if (getInventory().containsItem(weapon, 1)) {
- if (getInventory().containsItem(8851, finalTokens)) {
- getInventory().deleteItem(weapon, 1);
- getInventory().addItem(upgrade, 1);
- getInventory().deleteItem(8851, finalTokens);
- if(!Settings.isArcadeWorld() && this.canSave) {
- if (weapon == 4151)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Abyssal Whip</col>", true);
- if (weapon == 11694)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Armadyl Godsword</col>", true);
- if (weapon == 11696)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Bandos Godsword</col>", true);
- if (weapon == 11698)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Saradomin Godsword</col>", true);
- if (weapon == 11700)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Zamorak Godsword</col>", true);
- if (weapon == 11716)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Zamorakian Spear</col>", true);
- if (weapon == 11718)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Armadyl Helmet</col>", true);
- if (weapon == 11720)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Armadyl Chestplate</col>", true);
- if (weapon == 11722)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Armadyl Chainskirt</col>", true);
- if (weapon == 11724)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Bandos Chestplate</col>", true);
- if (weapon == 11726)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Bandos Tassets</col>", true);
- if (weapon == 11728)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Bandos Boots</col>", true);
- if (weapon == 11730)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Saradomin Sword</col>", true);
- if (weapon == 11335)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Dragon Full Helmet</col>", true);
- if (weapon == 14479)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Dragon Platebody</col>", true);
- if (weapon == 3140)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Dragon Chainbody</col>", true);
- if (weapon == 14484)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Dragon Claws</col>", true);
- if (weapon == 7158)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Dragon 2H Sword</col>", true);
- if (weapon == 13738)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Arcane Spirit Shield</col>", true);
- if (weapon == 13740)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Divine Spirit Shield</col>", true);
- if (weapon == 13742)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Elysian Spirit Shield</col>", true);
- if (weapon == 13744)
- yell("<img=5><col=ff0000>"+getDisplayName()+
- "</col> Has Upgraded Their <col=ff0000>Spectral Spirit Shield</col>", true);
- }
- } else {
- getPackets().sendGameMessage("You Need "+tokens+" Million <col=ff0000>Upgrade Tokens</col> To Upgrade This!");
- }
- }
- }
- }
- public void sendItemsOnDeath(Player killer) {
- if(ThroneManager.getThrone().getKing().equals(getUsername())) {
- ThroneManager.kingDied(this);
- }
- if (getUsername().equalsIgnoreCase("gavin") || killer.getUsername().equalsIgnoreCase("gavin") || safePvp == 0 || safePvp == 2 || inSafePvpZone() == true || inHomeSafeZone() == true || inEliteLair() || isDeveloper || killer.isDeveloper || !killer.canSave || !canSave)
- return;
- if((this.isDeadman && !killer.isDeadman) || (!this.isDeadman && killer.isDeadman)) {
- return;
- }
- int keptAmount = 3;
- int[] DROPPABLES = {23713, 13652};
- if (this.inAnEvent) {
- for(Player event : World.getPlayers()) {
- if(event == null)
- continue;
- if(event.inAnEvent)
- event.getPackets().sendGameMessage("Event: <col=ff0000>"+this.getDisplayName()+"</col> Is Eliminated!");
- }
- this.inAnEvent = false;
- this.setNextWorldTile(new WorldTile(2551, 3084, 0));
- return;
- }
- getInterfaceManager().sendTeleports();
- Statistics.insertQuery("death");
- charges.die();
- auraManager.removeAura();
- CopyOnWriteArrayList<Item> containedItems = new CopyOnWriteArrayList<Item>();
- for (int i = 0; i < 14; i++) {
- if (equipment.getItem(i) != null
- && equipment.getItem(i).getId() != -1
- && equipment.getItem(i).getAmount() != -1)
- containedItems.add(new Item(equipment.getItem(i).getId(),
- equipment.getItem(i).getAmount()));
- }
- for (int i = 0; i < 28; i++) {
- if (inventory.getItem(i) != null
- && inventory.getItem(i).getId() != -1
- && inventory.getItem(i).getAmount() != -1)
- containedItems.add(getInventory().getItem(i));
- }
- if (containedItems.isEmpty())
- return;
- if (hasSkull())
- keptAmount = 0;
- if (prayer.usingPrayer(0, 10) || prayer.usingPrayer(1, 0))
- keptAmount++;
- if (donator && Utils.random(2) == 0)
- keptAmount += 1;
- if (arena == 1) {
- arena = 0;
- keptAmount = 0;
- }
- CopyOnWriteArrayList<Item> keptItems = new CopyOnWriteArrayList<Item>();
- Item lastItem = new Item(1, 1);
- for (int i = 0; i < keptAmount; i++) {
- for (Item item : containedItems) {
- int price = item.getDefinitions().getValue();
- if (!(lastItem.getDefinitions().getValue() > price)) {
- lastItem = item;
- }
- }
- keptItems.add(lastItem);
- containedItems.remove(lastItem);
- lastItem = new Item(1, 1);
- }
- inventory.reset();
- equipment.reset();
- for (Item item : keptItems) {
- getInventory().addItem(item);
- }
- for(int i=0;i<DROPPABLES.length;i++) {
- for (Item item : containedItems) {
- if(item.getId() == DROPPABLES[i]) {
- World.addGroundItem(item, getLastWorldTile(), this, true, 180, true);
- containedItems.remove(item);
- }
- }
- }
- if(!killer.isIronman) {
- for (Item item : containedItems) {
- World.addPKedItem(item, getLastWorldTile(), killer, true, 180, true, this);
- }
- }
- if(this.isDeadman) {
- errorMessage("Because you've died, we've given you a brand new bank account!");
- BankKeyManager.addNewDeadmanKey(this);
- }
- }
- public int pkPoints = 0;
- public boolean containsEgg() {
- if(getInventory().containsItem(7928, 1) || getInventory().containsItem(7929, 1) || getInventory().containsItem(7930, 1) || getInventory().containsItem(7931, 1) || getInventory().containsItem(7932, 1) || getInventory().containsItem(7933, 1))
- return true;
- if(getBank().containsItem(7928, 1) || getBank().containsItem(7929, 1) || getBank().containsItem(7930, 1) || getBank().containsItem(7931, 1) || getBank().containsItem(7932, 1) || getBank().containsItem(7933, 1))
- return true;
- return false;
- }
- public void increaseKillCount(Player killed) {
- if (killed == null || this.isDeveloper || !this.canSave)
- return;
- if(killed == this || this == killed) {
- return;
- }
- /*******************/
- //BETA BOOST SYSTEM//
- /*******************/
- /*if (playerKilled == killed.getUsername()) {
- boosterCount += 1;
- WriteFile.writeLog("Booster Buster Suspect: "+getUsername(), "killlogs", "Booster Buster Suspicion");
- staffYell("<col=ff0000>[BB 11,000]</col> Booster Alert: <col=ff0000>"+ getDisplayName() + "</col> - Killed <col=ff0000>"+killed.getUsername()+"</col> <col=0000ff>"+boosterCount+"</col> Times In A Row!");
- } else {
- playerKilled = "";
- boosterCount = 1;
- }*/
- if (killed.getSession().getIP().equals(IPKilled)) {
- boosterCount += 1;
- WriteFile.writePlayerLog("Booster Buster IP Detection: "+getSession().getIP(), "killlogs", this);
- staffYell("<col=ff0000>[BB 12,000]</col> IP Detection: <col=ff0000>"+ getUsername() + "</col> - Killed <col=ff0000>"+killed.getUsername()+"</col> <col=0000ff>"+boosterCount+"</col> Times In A Row!");
- } else {
- IPKilled = "";
- boosterCount = 1;
- }
- if(boosterCount >= 5) {
- errorMessage("Boosting detected. A Moderator has been alarmed.");
- }
- if(inF2PZone()) {
- int r = Misc.random(500);
- if(r == 157) {
- World.addGroundItem(new Item(24168, 1), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), this, false, 180, true);
- this.yell(this.getDisplayName()+" Has Received A <shad=000000><col=ff0000>Dragon Whip</col></shad> Drop From Rogue's Castle [::castle]!");
- }
- }
- /*******************/
- //BETA BOOST SYSTEM//
- /*******************/
- killed.deathCount++;
- //playerKilled = killed.getUsername();
- IPKilled = killed.getSession().getIP();
- //if (killed.getSession().getIP().equals(getSession().getIP()))
- //return;
- WriteFile.writePlayerLog(getUsername()+" Killed "+killed.getUsername(), "killlogs", this);
- boolean bountyKill = getBountyHunter().runKill(killed);
- if (inHighRiskArena()) {
- getInventory().addItem(HRPRandom(), 1);
- killCount++;
- getInterfaceManager().sendTeleports();
- getKillstreakManager().doKillstreak();
- getInventory().addItem(13650, 10000); //Arena token shop? :D
- } else {
- getKillstreakManager().doKillstreak();
- sendPvpDrops(this, killed, true);
- if(bountyKill)
- sendPvpDrops(this, killed, false);
- }
- if(Settings.isTriplePvpLoot) {
- sendPvpDrops(this, killed, false);
- sendPvpDrops(this, killed, false);
- } else if(Hotspots.isAtHotspot(this)) {
- sendPvpDrops(this, killed, false);
- succeedMessage("Because you're at the hotspot, you get double loot!!");
- }
- checkIllum(killed);
- sendShermWings(killed);
- PkRank.checkRank(killed);
- PkRank.checkRank(this);
- if(Settings.isPvpWorld()) {
- Bounties b = new Bounties();
- if(b.getTarget() == killed)
- b.rewardSlayer(this);
- if(b.getTarget() == null) {
- b.newTarget();
- }
- }
- }
- public void checkIllum(Player killed) {
- int RATE = 25000;
- int random = Misc.random(RATE);
- if(random == (RATE / 2)) {
- yell("<shad=000000><col=00BFFF>"+getDisplayName()+" killed "+killed.getDisplayName()+" and was offered an Illuminessence by the Illukiminati gods!");
- World.addGroundItem(new Item(20821, 1), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), this, false, 180, true);
- }
- }
- public void sendShermWings(Player killed) {
- int ROLL = 270000;
- int random = Misc.random(ROLL);
- if (random == (ROLL / 10)) {
- yell("<col=ff0000><shad=000000>"+getDisplayName()+" just killed "+killed.getDisplayName()+" and received a pair of Shermination Wings!");
- World.addGroundItem(new Item(29948, 1), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), this, false, 180, true);
- }
- }
- public void sendPvpDrops(Player killer, Player killed, boolean addKill) {
- int pvpId = 12852;
- int cashId = 995;
- int upgId = 8851;
- int pvps;
- int cash;
- int upgs;
- int xp;
- int extraPvps;
- int extraCash;
- int extraUpgs;
- int random = Misc.random(pvpRandom.length);
- pvps = 100000;
- upgs = 1000000;
- cash = killer.isSuperDonator() ? 3000000 : killer.isLegendaryDonator() ? 2800000 : killer.isExtremeDonator() ? 2600000 : 2500000;
- xp = killer.isSuperDonator() ? 10000 : killer.isLegendaryDonator() ? 9000 : killer.isExtremeDonator() ? 8000 : 7000;
- if(addKill)
- killer.getPackets().sendGameMessage("<col=ff0000>You have killed " + killed.getDisplayName() + ", you have now " + killer.killCount + " kills.");
- if(killer.triviaPoints >= 50 && killer.triviaPoints < 200) {
- pvps += (pvps / 100) * 5;
- upgs += (upgs / 100) * 5;
- cash += (cash / 100) * 5;
- killer.succeedMessage("Your "+killer.triviaPoints+" Trivia Points Have Brought You 5% Extra Loot!");
- } else if(killer.triviaPoints >= 200) {
- pvps += (pvps / 100) * 10;
- upgs += (upgs / 100) * 10;
- cash += (cash / 100) * 10;
- killer.succeedMessage("Your "+killer.triviaPoints+" Trivia Points Have Brought You 10% Extra Loot!");
- }
- if(getEquipment().getCapeId() == MaxCape.TRIMMED_COMP_CAPE || getEquipment().getCapeId() == MaxCape.COMP_CAPE) {
- pvps = pvps*2;
- upgs = upgs*2;
- cash = cash*2;
- xp = xp*2;
- }
- if(pvpRandom[random] != -1)
- World.addGroundItem(new Item(pvpRandom[random], 1), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), killer, false, 180, true);
- World.addGroundItem(new Item(pvpId, pvps), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), killer, false, 180, true);
- World.addGroundItem(new Item(cashId, cash), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), killer, false, 180, true);
- World.addGroundItem(new Item(upgId, upgs), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), killer, false, 180, true);
- killer.getSkills().addXp(Skills.DUNGEONEERING, xp);
- if(addKill)
- killer.killCount++;
- killer.getInterfaceManager().sendTeleports();
- killed.getInterfaceManager().sendTeleports();
- killer.checkKillAch();
- sendFamiliarRares(killer, killed);
- killer.PKP++;
- //killer.errorMessage("You now have "+killer.PKP+" PKP!");
- if(killer.isDonator())
- killer.succeedMessage("Your Donator Rank Has Brought You Extra Loot!");
- if(getEquipment().getCapeId() == MaxCape.TRIMMED_COMP_CAPE || getEquipment().getCapeId() == MaxCape.TRIMMED_COMP_CAPE)
- killer.succeedMessage("Your <col=ff0000>Completionist Cape</col> Has Gained You Double Loot!");
- }
- public void CompVanish() {
- if(!canSpawn()) {
- errorMessage("You cannot vanish in this area.");
- return;
- }
- if(isCanPvp()) {
- errorMessage("You cannot vanish in a player-vs-player zone.");
- return;
- }
- if(!canWearCape()) {
- errorMessage("Only those who can wear the Completionist Cape can use this feature.");
- return;
- }
- if(!getAppearence().isHidden()) {
- WorldTasksManager.schedule(new WorldTask() {
- int loop = 0;
- @Override
- public void run() {
- if(loop == 0) {
- setNextForceTalk(new ForceTalk("3"));
- }
- if(loop == 1) {
- setNextForceTalk(new ForceTalk("2"));
- }
- if(loop == 2) {
- setNextForceTalk(new ForceTalk("1"));
- }
- if(loop == 3) {
- setNextForceTalk(new ForceTalk("Poof!"));
- }
- if(loop == 4) {
- getAppearence().switchHidden();
- stop();
- }
- loop++;
- }
- }, 0, 1);
- } else {
- setNextForceTalk(new ForceTalk("Poof!"));
- getAppearence().switchHidden();
- }
- }
- public void CompTeleport(String name) {
- Player target = World.getPlayerByDisplayName(name);
- if(getEquipment().getCapeId() != MaxCape.TRIMMED_COMP_CAPE && getEquipment().getCapeId() != MaxCape.COMP_CAPE)
- return;
- if(target == null) {
- errorMessage("No such user or user isn't online.");
- return;
- }
- if(target.getRights() == 1 || target.getRights() == 2) {
- errorMessage("You cannot teleport to Moderators or Administrators.");
- return;
- }
- if(!target.canSpawn()) {
- errorMessage("This player is in a non-teleporting zone, meaning you cannot teleport to them.");
- return;
- }
- if(target.getTrade() != null) {
- errorMessage("This person is currently in a trade. Please wait until they have finished.");
- return;
- }
- if(getTrade() != null) {
- errorMessage("You're currently in a trade. Please finish trading before teleporting.");
- return;
- }
- if(inJuggernaut()) {
- errorMessage("You can't teleport out of Juggernaut.");
- return;
- }
- if(target.inJuggernaut()) {
- errorMessage("This player is playing Juggernaut.");
- return;
- }
- setNextWorldTile(target);
- stopAll();
- setNextGraphics(new Graphics(365));
- }
- public void sendFamiliarRares(Player killer, Player killed) {
- int i = Misc.random(30000);
- if(i >= 750 && i <= 760) {
- World.addGroundItem(new Item(29019, 1), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), killer, false, 180, true);
- killer.yell("<img=7><col=ff0000>"+killer.getDisplayName()+" Has Received A Red Octo!</col>");
- } else if(i >= 950 && i <= 975) {
- World.addGroundItem(new Item(29004, 1), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), killer, false, 180, true);
- killer.yell("<img=7><col=ff0000>"+killer.getDisplayName()+" Has Received A Red Dragon!</col>");
- } else if(i >= 1250 && i <= 1295) {
- World.addGroundItem(new Item(29012, 1), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), killer, false, 180, true);
- killer.yell("<img=7><col=ff0000>"+killer.getDisplayName()+" Has Received A Red Monkey!</col>");
- }
- }
- //World.addGroundItem(new Item(24168, 1), new WorldTile(killed.getX(), killed.getY(), killed.getPlane()), this, false, 180, true);
- public String getHireOwner() {
- return hireOwner;
- }
- public void setHireOwner(String name) {
- hireOwner = name;
- }
- public Master getSlayerMaster() {
- return master;
- }
- public void setSlayerMaster(Master master) {
- this.master = master;
- }
- public SlayerTask getSlayerTask() {
- return slayerTask;
- }
- public void setSlayerTask(SlayerTask slayerTask) {
- this.slayerTask = slayerTask;
- }
- public int getHireValue() {
- return hireValue;
- }
- public int getTicketAmount(String rank) {
- int amount = 0;
- for (Player players : World.getPlayers()) {
- if (players.isUsingTicket() && players.ticketRank.equals(rank))
- amount++;
- }
- return amount;
- }
- public void takeTicket(Player ticket) {
- if(ticket.isDeadman && !ticket.inYanille()) {
- ticket.errorMessage("Your ticket has been cancelled because you're a deadman and you're not at home.");
- errorMessage("Ticket for "+ticket.getUsername()+" was cancelled because they are a deadman and weren't at home.");
- return;
- }
- if(ticket.getControlerManager().getControler() instanceof Wilderness) {
- ticket.errorMessage("Your ticket has been cancelled because you're in the wilderness.");
- errorMessage("Ticket for "+ticket.getUsername()+" was cancelled because they are in the wilderness.");
- ticket.setUsingTicket(false);
- return;
- }
- if(this.getRights() == 2 && ticket.ticketRank.equals("admin")) {
- ticket.setNextWorldTile(new WorldTile(this.getX(), this.getY() + 1, this.getPlane()));
- ticket.getPackets().sendGameMessage(this.getDisplayName() + " Your ticket is being handled.");
- this.setNextForceTalk(new ForceTalk("Hello, I am "+this.getDisplayName()+". I am taking your ticket for: "+ticket.ticketAssist));
- ticket.faceEntity(this);
- ticket.setUsingTicket(false);
- } else if(this.getRights() == 1 && ticket.ticketRank.equals("mod")) {
- ticket.setNextWorldTile(new WorldTile(this.getX(), this.getY() + 1, this.getPlane()));
- ticket.getPackets().sendGameMessage(this.getDisplayName() + " Your ticket is being handled.");
- this.setNextForceTalk(new ForceTalk("Hello, I am "+this.getDisplayName()+". I am taking your ticket for: "+ticket.ticketAssist));
- ticket.faceEntity(this);
- ticket.setUsingTicket(false);
- } else if(this.ServerSupport && this.getRights() == 7 && ticket.ticketRank.equals("support")) {
- ticket.setNextWorldTile(new WorldTile(this.getX(), this.getY() + 1, this.getPlane()));
- ticket.getPackets().sendGameMessage(this.getDisplayName() + " Your ticket is being handled.");
- this.setNextForceTalk(new ForceTalk("Hello, I am "+this.getDisplayName()+". I am taking your ticket for: "+ticket.ticketAssist));
- ticket.faceEntity(this);
- ticket.setUsingTicket(false);
- } else if(this.isAssistant && ticket.ticketRank.equals("assistant")) {
- ticket.setNextWorldTile(new WorldTile(this.getX(), this.getY() + 1, this.getPlane()));
- ticket.getPackets().sendGameMessage(this.getDisplayName() + " Your ticket is being handled.");
- this.setNextForceTalk(new ForceTalk("Hello, I am "+this.getDisplayName()+". I am taking your ticket for: "+ticket.ticketAssist));
- ticket.faceEntity(this);
- ticket.setUsingTicket(false);
- } else {
- ticket.setUsingTicket(false);
- ticket.errorMessage("Your ticket has been closed. Please create a new ticket.");
- errorMessage("Something went wrong in taking ticket for player "+ticket.getUsername());
- }
- int amount = 0;
- for(Player players : World.getPlayers()) {
- if(players.isUsingTicket()) {
- amount++;
- }
- }
- for(Player players : World.getPlayers()) {
- if(players.isUsingTicket()) {
- players.errorMessage("Note: You're currently in a ticket queue of "+amount+" people. Please be patient.");
- }
- }
- }
- public int getNewHireValue() {
- return hireValue + (hireValue / 10);
- }
- public String getHired() {
- return hasBeenHired() ? "<col=ff0000>Hired!" : "<col=298A08>Is Not Hired!";
- }
- public boolean hasBeenHired() {
- return isHired == true ? true : false;
- }
- public void giveOwnerIncome(Player killed) {
- try {
- int amount = hireValue + (hireValue / 10);
- String loser = hireOwner;
- Player owner = World.getPlayerByDisplayName(loser);
- if(!hireOwner.equals(killed.getUsername())) {
- if(hireOwner != "" && hireOwner != null) {
- if(owner.getInventory().getItems().freeSlots() >= 1 && !owner.getInventory().containsItem(995, 2147000000)) {
- owner.getInventory().addItem(995, amount);
- owner.succeedMessage(getDisplayName()+" Has Brought Income For You. You Have Received: "+amount+" Gold.");
- } else {
- owner.cashIn += amount;
- owner.succeedMessage(getDisplayName()+" Has Brought Income For You. Do ::cashin To Claim Your Gold!");
- }
- succeedMessage("Your Owner, "+owner.getDisplayName()+" Has Received "+amount+" Gold For Your Efforts.");
- }
- }
- } catch (NullPointerException e) {
- }
- }
- public void cashIn() {
- if(getInventory().getItems().freeSlots() >= 1 && !getInventory().containsItem(995, 2147000000)) {
- if(cashIn >= 1) {
- getInventory().addItem(995, cashIn);
- succeedMessage("You Cash In With "+cashIn+" Gold!");
- cashIn = 0;
- } else
- sendErrorMessage("You Have Nothing To Cash In!");
- } else
- sendErrorMessage("You Need At least 1 Free Slot To Cash In.");
- }
- public void hirePlayer() {
- try {
- Player hire = World.getPlayerByDisplayName(playerHiring);
- int newHireValue = hire.hireValue + (hire.hireValue / 10);
- int newHireValue2 = hireValue + (hireValue / 10);
- if(!playerHiring.equals("") || !playerHiring.equals(null)) {
- if(newHireValue2 >= newHireValue) {
- if(getInventory().containsItem(995, newHireValue)) {
- if(hire.hireOwner != getUsername()) {
- if(!hire.getSession().getIP().equals(this.getSession().getIP())) {
- if(hire.hireOwner != "" && hire.hireOwner != null) {
- String loser = hire.hireOwner;
- Player loss = World.getPlayerByDisplayName(loser);
- loss.sendErrorMessage(getDisplayName()+" Has Hired "+hire.getDisplayName()+" From You!");
- }
- hire.setHireOwner(getDisplayName());
- this.getInventory().deleteItem(995, newHireValue);
- succeedMessage("You Have Successfully Hired "+hire.getDisplayName()+" For "+newHireValue+"!");
- hire.succeedMessage(getDisplayName()+" Has Hired You! You Have Made: "+hireValue / 10+"!");
- hire.hireValue = newHireValue;
- hire.isHired = true;
- hire.hireCount++;
- if(hire.getInventory().getItems().freeSlots() >= 1) {
- hire.getInventory().addItem(995, hireValue / 10);
- } else {
- hire.cashIn += hireValue / 10;
- hire.succeedMessage(getDisplayName()+" Has Hired You! Claim Your Cash By Doing ::cashin !");
- }
- } else {
- sendErrorMessage("You Cannot Hire This Player!");
- }
- } else {
- sendErrorMessage("You Already Own This Player!");
- }
- } else {
- sendErrorMessage("You Don't Have Enough Gold To Hire "+hire.getDisplayName()+"! Their Hire Value is "+newHireValue+".");
- }
- } else {
- sendErrorMessage("You Cannot Higher Someone Who's Hire Value Is Greater Than Yours.");
- }
- } else {
- sendErrorMessage("Please Enter A Valid Username To Hire!");
- }
- } catch(NullPointerException e) {
- }
- }
- public void sendRandomJail(Player p) {
- p.resetWalkSteps();
- switch (Utils.getRandom(3)) {
- case 0:
- p.setNextWorldTile(new WorldTile(3446, 3151, 0));
- break;
- case 1:
- p.setNextWorldTile(new WorldTile(3449, 3151, 0));
- break;
- case 2:
- p.setNextWorldTile(new WorldTile(3443, 3151, 0));
- break;
- case 3:
- p.setNextWorldTile(new WorldTile(3440, 3151, 0));
- break;
- }
- }
- @Override
- public int getSize() {
- return appearence.getSize();
- }
- public boolean isCanPvp() {
- return canPvp;
- }
- public void setCanPvp(boolean canPvp) { // vicky
- this.canPvp = canPvp;
- appearence.generateAppearenceData();
- getPackets().sendPlayerOption(canPvp ? "Attack" : timerCount >= 0 ? "Attack" : "null", 1, true);
- getPackets().sendPlayerOption("Follow", 2, false);
- getPackets().sendPlayerOption("Trade with", 3, false);
- getPackets().sendPlayerOption("Req Assist", 4, false);
- //getPackets().sendConfig(455, 1);
- getPackets().sendPlayerUnderNPCPriority(canPvp);
- }
- public void prayerRenewal(int heal) {
- prayerRenew = heal;
- }
- public Prayer getPrayer() {
- return prayer;
- }
- public long getStopDelay() {
- return stopDelay;
- }
- public void setInfiniteStopDelay() {
- stopDelay = Long.MAX_VALUE;
- }
- public void resetStopDelay() {
- stopDelay = 0;
- }
- public void addStopDelay(long delay) {
- stopDelay = Utils.currentTimeMillis() + (delay * 600);
- }
- public void useStairs(int emoteId, final WorldTile dest, int useDelay,
- int totalDelay) {
- useStairs(emoteId, dest, useDelay, totalDelay, null);
- }
- public void useStairs(int emoteId, final WorldTile dest, int useDelay,
- int totalDelay, final String message) {
- stopAll();
- addStopDelay(totalDelay);
- if (emoteId != -1)
- setNextAnimation(new Animation(emoteId));
- if (useDelay == 0)
- setNextWorldTile(dest);
- else {
- WorldTasksManager.schedule(new WorldTask() {
- @Override
- public void run() {
- if (currentFriendChatOwner != null) {
- //FriendChatsManager.joinChat(currentFriendChatOwner, this);
- if (currentFriendChat == null) // failed
- currentFriendChatOwner = null;
- // clanWars = new ClanWars();
- }
- if (isDead())
- return;
- setNextWorldTile(dest);
- if (message != null)
- getPackets().sendGameMessage(message);
- }
- }, useDelay - 1);
- }
- }
- public Bank getBank() {
- return bank;
- }
- public void setBank(Bank bank) {
- this.bank = bank;
- }
- public ControlerManager getControlerManager() {
- return controlerManager;
- }
- public void switchMouseButtons() {
- mouseButtons = !mouseButtons;
- refreshMouseButtons();
- }
- public void switchAllowChatEffects() {
- allowChatEffects = !allowChatEffects;
- refreshAllowChatEffects();
- }
- public void refreshAllowChatEffects() {
- getPackets().sendConfig(171, allowChatEffects ? 0 : 1);
- }
- public void refreshMouseButtons() {
- getPackets().sendConfig(170, mouseButtons ? 0 : 1);
- }
- public void refreshPrivateChatSetup() {
- getPackets().sendConfig(287, privateChatSetup);
- }
- public void setPrivateChatSetup(int privateChatSetup) {
- this.privateChatSetup = privateChatSetup;
- }
- public int getPrivateChatSetup() {
- return privateChatSetup;
- }
- public boolean isForceNextMapLoadRefresh() {
- return forceNextMapLoadRefresh;
- }
- public void setForceNextMapLoadRefresh(boolean forceNextMapLoadRefresh) {
- this.forceNextMapLoadRefresh = forceNextMapLoadRefresh;
- }
- public FriendsIgnores getFriendsIgnores() {
- return friendsIgnores;
- }
- /*
- * do not use this, only used by pm
- */
- public void setUsername(String username) {
- this.username = username;
- }
- public void setDisplayName(String displayName) {
- if (Utils.formatPlayerNameForDisplay(username).equals(displayName))
- this.displayName = null;
- else
- this.displayName = displayName;
- }
- public void addPotDelay(long time) {
- potDelay = time + Utils.currentTimeMillis();
- }
- public long getPotDelay() {
- return potDelay;
- }
- public void addFoodDelay(long time) {
- foodDelay = time + Utils.currentTimeMillis();
- }
- public long getFoodDelay() {
- return foodDelay;
- }
- public long getBoneDelay() {
- return boneDelay;
- }
- private Pets pet;
- public int petId;
- public Pets getPet() {
- return pet;
- }
- public void setPet(Pets pets) {
- this.pet = pets;
- }
- public int getPrestige() {
- /*return this.getUsername().equals("gavin") ? 1337 : getKillCount() -
- getDeathCount() +
- killstreaks +
- (highestKillStreaks / 2);*/
- return getKillCount() -
- getDeathCount() +
- killstreaks +
- (highestKillStreaks / 2);
- }
- public double getKDR() {
- double kill = getKillCount();
- double death = getDeathCount();
- double dr = kill / death;
- return dr;
- }
- public void setPetFollow(int petFollow) {
- this.petFollow = petFollow;
- }
- public void setPetId(int petId) {
- this.petId = petId;
- }
- public int getPetId() {
- return petId;
- }
- private int petFollow = -1;
- public int getPetFollow() {
- return petFollow;
- }
- public void addBoneDelay(long time) {
- boneDelay = time + Utils.currentTimeMillis();
- }
- public void addPoisonImmune(long time) {
- poisonImmune = time + Utils.currentTimeMillis();
- getPoison().reset();
- }
- public long getPoisonImmune() {
- return poisonImmune;
- }
- public void addFireImmune(long time) {
- fireImmune = time + Utils.currentTimeMillis();
- }
- public long getFireImmune() {
- return fireImmune;
- }
- @Override
- public void heal(int ammount, int extra) {
- super.heal(ammount, extra);
- refreshHitPoints();
- }
- /*
- public String weaponWeapon;
- public String nWeapon;
- */
- public void sendTiles() {
- if(getHoursPlayed() >= 3)
- return;
- getPackets().sendTileMessage("<col=ff0000>Shopping Mall", new WorldTile(2558, 3089, 0), 5000, 255, 000000);
- getPackets().sendTileMessage("<col=ff0000>Notice Board", new WorldTile(2556, 3085, 0), 5000, 255, 000000);
- getPackets().sendTileMessage("<col=ff0000>Account Utilities", new WorldTile(2546, 3087, 0), 5000, 255, 000000);
- getPackets().sendTileMessage("<col=ff0000>Bank Booths", new WorldTile(2551, 3083, 0), 5000, 255, 000000);
- getPackets().sendTileMessage("<col=ff0000>Capes & Titles", new WorldTile(2551, 3094, 0), 5000, 255, 000000);
- getPackets().sendTileMessage("<col=ff0000>Skilling & Slayer", new WorldTile(2544, 3091, 0), 5000, 255, 000000);
- getPackets().sendTileMessage("<col=ff0000>Global Teleports", new WorldTile(2544, 3096, 0), 5000, 255, 000000);
- //player.getPackets().sendTileMessage("", new WorldTile(9999, 9999, 0), 5000, 255, 000000);
- }
- public void sendUnderground() {
- int area = Misc.random(5);
- if (area == 1) {
- setNextWorldTile(new WorldTile(3172,9774, 0));
- } else if (area == 2) {
- setNextWorldTile(new WorldTile(3164,9774, 0));
- } else if (area == 3) {
- setNextWorldTile(new WorldTile(3156,9766, 0));
- } else if (area == 4) {
- setNextWorldTile(new WorldTile(3164,9758, 0));
- } else if (area == 5) {
- setNextWorldTile(new WorldTile(3172,9758, 0));
- }
- }
- public boolean inSupportZone() {
- if (getX() > 5867 && getY() > 4648 &&
- getX() < 5907 && getY() < 4691) {
- return true;
- }
- return false;
- }
- public boolean inSafePvpZone() {
- if (getX() > 3143 && getY() > 3912 &&
- getX() < 3172 && getY() < 3956) {
- return true;
- }
- return false;
- }
- public boolean inVeteranGuild() {
- if (getX() > 3389 && getY() > 3143 &&
- getX() < 3458 && getY() < 3186) {
- return true;
- }
- if (getX() >= 2710 && getY() >= 5040 &&
- getX() <= 2746 && getY() <= 5107) {
- return true;
- }
- return false;
- }
- public boolean atHomePenguins() {
- if (getX() > 2596 && getY() > 3091 &&
- getX() < 2618 && getY() < 3112) {
- return true;
- }
- return false;
- }
- public boolean inHomeSafeZone() {
- if (getX() > 3692 && getY() > 3472 &&
- getX() < 3699 && getY() < 3477) {
- return true;
- }
- return false;
- }
- public boolean inAbbyTower() {
- if (getX() >= 3400 && getY() >= 3524 &&
- getX() <= 3456 && getY() <= 3583 &&
- getPlane() == 1) {
- return true;
- }
- return false;
- }
- public boolean inDBTower() {
- if (getX() >= 3400 && getY() >= 3524 &&
- getX() <= 3456 && getY() <= 3583 &&
- getPlane() == 2) {
- return true;
- }
- return false;
- }
- public boolean inDiceZone() {
- if(TownManager.isInCustomDicezone(this)) {
- return true;
- }
- if(inVeteranGuild()) {
- return true;
- }
- if (getX() >= 3136 && getY() >= 3461 &&
- getX() <= 3202 && getY() <= 3518) {
- return true;
- }
- return false;
- }
- public boolean atChurch() {
- if (getX() >= 2937 && getY() >= 3794 &&
- getX() <= 2977 && getY() <= 3839) {
- return true;
- }
- return false;
- }
- public boolean inAllowedFlowerZone() {
- if (getX() >= 2302 && getY() >= 3775 &&
- getX() <= 2385 && getY() <= 3846) {
- return true;
- }
- return false;
- }
- public boolean inEliteLair() {
- if (getX() >= 3199 && getY() >= 5158 &&
- getX() <= 3236 && getY() <= 5185) {
- return true;
- }
- return false;
- }
- public boolean inMaxArea() {
- if (getX() > 2547 && getY() > 3076 &&
- getX() < 2558 && getY() < 3083) {
- return true;
- }
- return false;
- }
- public boolean inHighRiskArena() {
- if (getX() >= 3154 && getY() >= 9753 &&
- getX() <= 3184 && getY() <= 9779) {
- return true;
- }
- return false;
- }
- public boolean inF2PZone() {
- return getX() > 3274 && getY() > 3917 &&
- getX() < 3300 && getY() < 3949;
- }
- public boolean inBulldogWaitingRoom() {
- if (getX() >= 2595 && getY() >= 5263 &&
- getX() <= 2614 && getY() <= 5276) {
- return true;
- }
- return false;
- }
- public boolean inJuggernaut() {
- if (getX() >= 2967 && getY() >= 3255 &&
- getX() <= 2985 && getY() <= 3269) {
- return true;
- }
- return false;
- }
- public boolean inJailArea() {
- if (getX() >= 3439 && getY() >= 3149 &&
- getX() <= 3450 && getY() <= 3153) {
- return true;
- }
- return false;
- }
- public boolean canSetupCannon() {
- if (getX() >= 2534 && getY() >= 3072 &&
- getX() <= 2582 && getY() <= 3112) {
- return false;
- }
- if (getX() >= 3402 && getY() >= 3527 &&
- getX() <= 3457 && getY() <= 3586) {
- return false;
- }
- if(Settings.isPvpWorld()) {
- return false;
- }
- if(Wilderness.isAtWild(this) && !Wilderness.isAtSAFE(this)) {
- return false;
- }
- return true;
- }
- public boolean inDuelArena() {
- if (getX() >= 3329 && getY() >= 3203 &&
- getX() <= 3392 && getY() <= 3261) {
- return true;
- }
- return false;
- }
- public boolean isEvilTree() {
- if (getX() >= 2560 && getY() >= 4737 &&
- getX() <= 2623 && getY() <= 4799) {
- return true;
- }
- return false;
- }
- public boolean inZombieEscapeLobby() {
- if (getX() >= 3433 && getY() >= 3716 &&
- getX() <= 3444 && getY() <= 3724) {
- return true;
- }
- return false;
- }
- public boolean inZombieEscape() {
- if (getX() >= 3637 && getY() >= 2797 &&
- getX() <= 3878 && getY() <= 3088) {
- return true;
- }
- return false;
- }
- public boolean inTreeArea() {
- if (getX() >= 2324 && getY() >= 3799 &&
- getX() <= 2328 && getY() <= 3801) {
- return true;
- }
- return false;
- }
- public boolean inZombies() {
- if (getX() >= 3457 && getY() >= 3738 &&
- getX() <= 3465 && getY() <= 3750) {
- return true;
- }
- return false;
- }
- public boolean inCastleWarsLobby() {
- if (getX() >= 3460 && getY() >= 3725 &&
- getX() <= 3471 && getY() <= 3737) {
- return true;
- }
- return false;
- }
- public boolean inKharid() {
- if(getX() >= 3257 && getX() <= 3423 &&
- getY() >= 3121 && getY() <= 3330)
- return true;
- return false;
- }
- public boolean inPort() {
- if(getX() >= 3650 && getX() <= 3716 &&
- getY() >= 3464 && getY() <= 3537)
- return true;
- return false;
- }
- public boolean inVarrock() {
- if(getX() >= 3138 && getX() <= 3328 &&
- getY() >= 3372 && getY() <= 3583)
- return true;
- return false;
- }
- public boolean inFalador() {
- if(getX() >= 2937 && getX() <= 3067 &&
- getY() >= 3310 && getY() <= 3394)
- return true;
- return false;
- }
- public boolean inEdgeville() {
- if(getX() >= 3036 && getX() <= 3131 &&
- getY() >= 3439 && getY() <= 3586)
- return true;
- return false;
- }
- public boolean inL33tZone() {
- if(getX() >= 3338 && getX() <= 3388 &&
- getY() >= 9615 && getY() <= 9664)
- return true;
- return false;
- }
- public int slayerBoss = 0;
- public boolean inSlayerBossZone() {
- if(getX() >= 2575 && getX() <= 2598 &&
- getY() >= 3904 && getY() <= 3923)
- return true;
- return false;
- }
- public boolean inDragons() {
- if(getX() >= 3202 && getX() <= 3334 &&
- getY() >= 3584 && getY() <= 3705)
- return true;
- return false;
- }
- public boolean inYanille() {
- if(getX() >= 2531 && getX() <= 2627 &&
- getY() >= 3070 && getY() <= 3114)
- return true;
- return false;
- }
- public boolean neardummy() {
- if(getX() >= 2541 && getX() <= 2556 &&
- getY() >= 3077 && getY() <= 3090)
- return true;
- return false;
- }
- public boolean inMageBank() {
- if(getX() >= 2987 && getX() <= 3315 &&
- getY() >= 3904 && getY() <= 3964)
- return true;
- return false;
- }
- public boolean inCastleWars() {
- if(getX() >= 2367 && getX() <= 2435 &&
- getY() >= 3071 && getY() <= 3138)
- return true;
- return false;
- }
- public boolean inBrimhaven() {
- if(getX() >= 2708 && getX() <= 2876 &&
- getY() >= 3137 && getY() <= 3263)
- return true;
- return false;
- }
- public boolean inEntrana() {
- if(getX() >= 2805 && getX() <= 2876 &&
- getY() >= 3330 && getY() <= 3392)
- return true;
- return false;
- }
- public boolean inMazeWaitingRoom() {
- if (getX() >= 3455 && getY() >= 3716 &&
- getX() <= 3466 && getY() <= 3724) {
- return true;
- }
- return false;
- }
- public boolean inSimonSaysWaitingRoom() {
- if (getX() >= 2573 && getY() >= 5263 &&
- getX() <= 2582 && getY() <= 5276) {
- return true;
- }
- return false;
- }
- public boolean inMaze() {
- if (getX() >= 2491 && getY() >= 3128 &&
- getX() <= 2568 && getY() <= 3205) {
- return true;
- }
- return false;
- }
- public boolean inEdge() {
- if (getX() >= 2944 && getY() >= 3519 &&
- getX() <= 3216 && getY() <= 3630) {
- return true;
- }
- return false;
- }
- public boolean inBandosRoom() {
- if (getX() >= 2861 && getY() >= 5349 &&
- getX() <= 2877 && getY() >= 5376 &&
- getPlane() == 2) {
- return true;
- }
- return false;
- }
- public boolean inWildyAgility() {
- if (getX() >= 2988 && getY() >= 3931 &&
- getX() <= 3011 && getY() <= 3974) {
- return true;
- }
- if (getX() >= 3271 && getY() >= 3916 &&
- getX() <= 3304 && getY() <= 3953) {
- return true;
- }
- return false;
- }
- public int borkKilled = 0;
- public boolean inRoguesCastle() {
- if (getX() >= 3271 && getY() >= 3916 &&
- getX() <= 3304 && getY() <= 3953) {
- return true;
- }
- return false;
- }
- public boolean enteredOSPK() {
- if (getX() >= 3072 && getY() >= 3855 &&
- getX() <= 3121 && getY() <= 3884 ||
- getX() >= 3061 && getY() >= 3864 &&
- getX() <= 3072 && getY() <= 3875) {
- return true;
- }
- return false;
- }
- public boolean hasOverOSArmour() {
- int weapon = this.getEquipment().getWeaponId();
- int hat = this.getEquipment().getHatId();
- int cape = this.getEquipment().getCapeId();
- int ammo = this.getEquipment().getAmmoId();
- int boots = this.getEquipment().getBootsId();
- int shield = this.getEquipment().getShieldId();
- int ammy = this.getEquipment().getAmuletId();
- int ring = this.getEquipment().getRingId();
- int gloves = this.getEquipment().getGlovesId();
- int chest = this.getEquipment().getChestId();
- int legs = this.getEquipment().getLegsId();
- return (weapon >= 11286 && weapon != 14661) || hat >= 11286 || cape >= 11286 || ammo >= 11286
- || boots >= 11286 || shield >= 11286 || ammy >= 11286 || ring >= 11286
- || gloves >= 11286 || chest >= 11286 || legs >= 11286 || weapon == 1309;
- }
- public boolean inPremiumZone() {
- if (getX() > 2194 && getY() > 4956 &&
- getX() < 2221 && getY() < 4973) {
- return true;
- }
- return false;
- }
- public boolean inVeloxWars() {
- if (getX() > 2368 && getY() > 3059 &&
- getX() < 2441 && getY() < 3146) {
- return true;
- }
- return false;
- }
- public void checkKillAch() {
- if (getKillCount() == 1) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Bronze Newbie</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- BronzeNewbieCollect = true;
- }
- if (getKillCount() == 10) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Iron Fists</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- IronFistsCollect = true;
- }
- if (getKillCount() == 25) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Steel Warrior</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- SteelWarriorCollect = true;
- }
- if (getKillCount() == 50) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Mithril Knuckles</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- MithrilKnucklesCollect = true;
- }
- if (getKillCount() == 100) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Adanaught</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- AdanaughtCollect = true;
- }
- if (getKillCount() == 200) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Rune Wrecker</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- RuneWreckerCollect = true;
- }
- if (getKillCount() == 300) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Dragon Destroyer</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- DragonDestroyerCollect = true;
- }
- if (getKillCount() == 400) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>The Rock</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- TheRockCollect = true;
- }
- if (getKillCount() == 500) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Pvp Master</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- PvpMasterCollect = true;
- }
- if (getKillCount() == 1000) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Silent Assassin</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- SilentAssassinCollect = true;
- }
- if (getKillCount() == 2500) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Deadly Poison</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- DeadlyPoisonCollect = true;
- }
- if (getKillCount() == 5000) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Loose Cannon</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- LooseCannonCollect = true;
- }
- if (getKillCount() == 10000) {
- getInterfaceManager().sendChatBoxInterface(740);
- getPackets().sendIComponentText(740, 0, "Achievement Complete!");
- getPackets().sendIComponentText(740, 1, "You Have Completed <col=33CC00>Tizen Fury</col>");
- getPackets().sendIComponentText(740, 2, "Type ::reward To Collect Your Reward!");
- getPackets().sendConfigByFile(4757, 1);
- TizenFuryCollect = true;
- }
- }
- @Override
- public String toString() {
- return (rights == 2 ? "Admin " : rights == 1 ? "Mod " : "")
- + Utils.formatPlayerNameForDisplay(username) + " - "
- + (rights == 2 ? "******" : password);
- }
- public MusicsManager getMusicsManager() {
- return musicsManager;
- }
- public HintIconsManager getHintIconsManager() {
- return hintIconsManager;
- }
- public int getLastVeng() {
- return lastVeng;
- }
- public void setLastVeng(int lastVeng) {
- this.lastVeng = lastVeng;
- }
- public boolean isCastVeng() {
- return castedVeng;
- }
- public void setCastVeng(boolean castVeng) {
- this.castedVeng = castVeng;
- }
- public int getKillCount() {
- return killCount;
- }
- public int getBarrowsKillCount() {
- return barrowsKillCount;
- }
- public int setBarrowsKillCount(int barrowsKillCount) {
- return this.barrowsKillCount = barrowsKillCount;
- }
- public int setKillCount(int killCount) {
- return this.killCount = killCount;
- }
- public int setRep(int reputation) {
- return this.reputation = reputation;
- }
- public int getRep() {
- return reputation;
- }
- public int getDeathCount() {
- return deathCount;
- }
- public int getHKS() {
- return highestKillStreaks;
- }
- public int getKillstreak() {
- return killstreaks;
- }
- public int getDonationAmount() {
- return donationAmount;
- }
- public int setDeathCount(int deathCount) {
- return this.deathCount = deathCount;
- }
- public int setHKS(byte highestKillStreaks) {
- return this.highestKillStreaks = highestKillStreaks;
- }
- public int setDonationAmount(byte donationAmount) {
- return this.donationAmount = donationAmount;
- }
- public void setCloseInterfacesEvent(Runnable closeInterfacesEvent) {
- this.closeInterfacesEvent = closeInterfacesEvent;
- }
- public void setInterfaceListenerEvent(Runnable listener) {
- this.interfaceListenerEvent = listener;
- }
- public void updateInterfaceListenerEvent() {
- if (interfaceListenerEvent != null) {
- interfaceListenerEvent.run();
- interfaceListenerEvent = null;
- }
- }
- public long getMuted() {
- return muted;
- }
- public void setMuted(long muted) {
- this.muted = muted;
- }
- public long getJailed() {
- return jailed;
- }
- public void setJailed(long jailed) {
- this.jailed = jailed;
- }
- public boolean isPermBanned() {
- return permBanned;
- }
- public void setPermBanned(boolean permBanned) {
- this.permBanned = permBanned;
- }
- public long getBanned() {
- return banned;
- }
- public void setBanned(long banned) {
- this.banned = banned;
- }
- public ChargesManager getCharges() {
- return charges;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public boolean[] getKilledBarrowBrothers() {
- return killedBarrowBrothers;
- }
- public boolean[] setKilledBarrowBrothers(boolean[] b) {
- return this.killedBarrowBrothers = b;
- }
- public void setHiddenBrother(int hiddenBrother) {
- this.hiddenBrother = hiddenBrother;
- }
- public int getHiddenBrother() {
- return hiddenBrother;
- }
- public int getVotingPoints() {
- return votingPoints;
- }
- public void setVotingPoints(int votingPoints) {
- this.votingPoints = votingPoints;
- }
- /**
- * @return the timesVoted
- */
- public int getTimesVoted() {
- return timesVoted;
- }
- public boolean hasEmptyInventory() {
- if (getInventory().getItems().freeSlots() == 28)
- return true;
- else
- return false;
- }
- /**
- * @param timesVoted the timesVoted to set
- */
- public void setTimesVoted(int timesVoted) {
- this.timesVoted = timesVoted;
- }
- public int timesVoted;
- public String lastYell;
- public int oreAmount;
- public int bonusXP;
- public String punishDuration;
- public String muteDuration;
- public String banDuration;
- public String ipbanDuration;
- public String punishReason;
- public long lastPMsent;
- public int spamPMs;
- public boolean bannedFromSubmittingVideos;
- public int DJRating;
- public String clientNotes;
- public int bottingInt;
- public int origSlayerTimer;
- public boolean hasSpawnRights() {
- return spawnRights;
- }
- public boolean isDonator() {
- return donator || donatorTill > Utils.currentTimeMillis();
- }
- public boolean isExtremeDonator() {
- return Extremedonator || donatorTill > Utils.currentTimeMillis();
- }
- public boolean isLegendaryDonator() {
- return Legendarydonator || donatorTill > Utils.currentTimeMillis();
- }
- public boolean isSuperDonator() {
- return SuperDonator || donatorTill > Utils.currentTimeMillis();
- }
- public boolean isServerSupport() {
- return ServerSupport;
- }
- public boolean isDicePermit() {
- return DicePermit;
- }
- public boolean isSponsor() {
- return Sponsor;
- }
- public boolean hasPremiumPermit() {
- return PremiumPermit;
- }
- public boolean isHelper() {
- return Helper;
- }
- public boolean isVeteran() {
- if(forcedVeteran)
- return true;
- return getMonthsPlayed() >= 3;
- }
- public boolean isDiceZone() {
- return DiceZone;
- }
- public boolean isJailed() {
- return Jailed;
- }
- public boolean isPrestiged() {
- return Prestiged;
- }
- @SuppressWarnings("deprecation")
- public void makeDonator(int months) {
- if (donatorTill < Utils.currentTimeMillis())
- donatorTill = Utils.currentTimeMillis();
- Date date = new Date(donatorTill);
- date.setMonth(date.getMonth() + months);
- donatorTill = date.getTime();
- }
- @SuppressWarnings("deprecation")
- public String getDonatorTill() {
- return (donator ? "never" : new Date(donatorTill).toGMTString()) + ".";
- }
- public void setDonator(boolean donator) {
- this.donator = donator;
- }
- public void setExtremeDonator(boolean Extremedonator) {
- this.Extremedonator = Extremedonator;
- }
- public void setLegendaryDonator(boolean Legendarydonator) {
- this.Legendarydonator = Legendarydonator;
- }
- public void setSuperDonator(boolean SuperDonator) {
- this.SuperDonator = SuperDonator;
- }
- public void setServerSupport(boolean ServerSupport) {
- this.ServerSupport = ServerSupport;
- }
- public void setHelper(boolean helper) {
- this.Helper = helper;
- }
- public void setVeteran(boolean veteran) {
- this.Veteran = veteran;
- }
- public void setDicePermit(boolean DicePermit) {
- this.DicePermit = DicePermit;
- }
- public void setSponsor(boolean Sponsor) {
- this.Sponsor = Sponsor;
- }
- public void setPremiumPermit(boolean PremiumPermit) {
- this.PremiumPermit = PremiumPermit;
- }
- public void setJailed(boolean Jailed) {
- this.Jailed = Jailed;
- }
- public void setDiceZone(boolean DiceZone) {
- this.DiceZone = DiceZone;
- }
- public void setPrestiged(boolean Prestiged) {
- this.Prestiged = Prestiged;
- }
- public String getRecovQuestion() {
- return recovQuestion;
- }
- /*public void enterDice(int amount, String type) {
- int cash = getInventory().getItems().getNumberOf(995);
- if (getInventory().containsItem(995, amount)) {
- if (amount <= 500000000) {
- if (!getInventory().containsItem(995, 1000000000)) {
- if (canSpawn()) {
- if (trading == 0) {
- getInventory().deleteItem(995, amount);
- int roll = Misc.random(100);
- if (type == "55x2") {
- if (roll == 100) {
- getInventory().addItem(995, amount * 3);
- getPackets().sendGameMessage("The VDM Rolls <col=ff0000>"+roll+"</col>!");
- succeedMessage("Boom! The VDM Rolled 100 And The Bet Has Now Tripled");
- yell("<col=ff0000>"+getDisplayName()+"</col> Has Just Won Triple Their Bet On The <col=ff0000>VDM!</col>");
- WriteFile.writeLog(amount*2+" Was Lost In The VDM!", "vmd-100", "vdm-100");
- } else if (roll == 55) {
- getInventory().addItem(995, amount);
- getPackets().sendGameMessage("The VDM Rolls <col=ff0000>"+roll+"</col>!");
- errorMessage("It Was A Draw. You Have Been Refunded Your Bet.");
- } else if (roll >= 56 && roll <= 99) {
- getInventory().addItem(995, amount * 2);
- getPackets().sendGameMessage("The VDM Rolls <col=ff0000>"+roll+"</col>!");
- succeedMessage("You Have Won The Bet! You Have Won x2 Your Bet!");
- WriteFile.writeLog(amount+" Was Won In The VDM!", "vmd-won", "vdm-won");
- } else if (roll >= 1 && roll <= 54) {
- getPackets().sendGameMessage("The VDM Rolls <col=ff0000>"+roll+"</col>!");
- errorMessage("You Have Lost The Bet. Better Luck Next Time.");
- WriteFile.writeLog(amount+" Was Lost In The VDM!", "vmd-lost", "vdm-lost");
- }
- }
- } else {
- errorMessage("You cannot do this while trading!");
- }
- } else {
- errorMessage("You cannot do this here!");
- }
- } else {
- errorMessage("Please bank some money before betting anymore.");
- errorMessage("This is to stop your money from getting glitched.");
- }
- } else {
- errorMessage("Bets cannot be over 500 Million!");
- }
- } else {
- errorMessage("Not enough money for that bet!");
- }
- }*/
- //league
- public void giveLeagueGold() {
- if (inVeloxWars()) {
- if (leagueStreakAmount == 1) {
- //getInterfaceManager().printLeagueMessage("gold", 150, "AEB404");
- int gold = 75;
- getInventory().addItem(995, gold);
- getPackets().sendGameMessage("You Have Received: <col=AEB404>"+gold+"</col> Gold!");
- leagueGoldEarned += gold;
- } else if (leagueStreakAmount == 2) {
- //getInterfaceManager().printLeagueMessage("gold", 200, "AEB404");
- int gold = 100;
- getInventory().addItem(995, gold);
- getPackets().sendGameMessage("You Have Received: <col=AEB404>"+gold+"</col> Gold!");
- leagueGoldEarned += gold;
- } else if (leagueStreakAmount == 3) {
- //getInterfaceManager().printLeagueMessage("gold", 350, "AEB404");
- int gold = 175;
- getInventory().addItem(995, gold);
- getPackets().sendGameMessage("You Have Received: <col=AEB404>"+gold+"</col> Gold!");
- leagueGoldEarned += gold;
- } else if (leagueStreakAmount == 4) {
- //getInterfaceManager().printLeagueMessage("gold", 450, "AEB404");
- int gold = 225;
- getInventory().addItem(995, gold);
- getPackets().sendGameMessage("You Have Received: <col=AEB404>"+gold+"</col> Gold!");
- leagueGoldEarned += gold;
- } else if (leagueStreakAmount >= 5) {
- //getInterfaceManager().printLeagueMessage("gold", 600, "AEB404");
- int gold = 300;
- getInventory().addItem(995, gold);
- getPackets().sendGameMessage("You Have Received: <col=AEB404>"+gold+"</col> Gold!");
- leagueGoldEarned += gold;
- }
- if (leagueGoldBoost >= 1) {
- int gold = leagueGoldBoost * 15;
- getPackets().sendGameMessage("Your <col=ff0000>Gold Boost(s)</col> Have Brought You Extra Gold! You Have Received: <col=AEB404>"+gold+"</col> Gold!");
- getInventory().addItem(995, gold);
- leagueGoldEarned += gold;
- }
- }
- }
- public void checkLeagueStreak() {
- if (inVeloxWars()) {
- if (leagueStreakAmount == 1) {
- leagueStreakName = "";
- leagueBounty = 0;
- } else if (leagueStreakAmount == 2) {
- leagueStreakName = "Killing Streak";
- leagueBounty = 100;
- } else if (leagueStreakAmount == 3) {
- leagueStreakName = "Rampage";
- leagueBounty = 150;
- } else if (leagueStreakAmount == 4) {
- leagueStreakName = "Unstoppable";
- leagueBounty = 250;
- } else if (leagueStreakAmount == 5) {
- leagueStreakName = "Legendary";
- leagueBounty = 350;
- } else if (leagueStreakAmount > 5) {
- leagueStreakName = "Legendary";
- leagueBounty = 350;
- }
- //getInterfaceManager().printLeagueMessage("aura", -1, "088A08");
- }
- }
- public void increaseLeagueKill() {
- int reward = Misc.random(50);
- if (inVeloxWars()) {
- leagueStreakAmount++;
- leagueKills++;
- //giveLeagueGold();
- checkLeagueStreak();
- //getInterfaceManager().printLeagueMessage("kill", -1, "01DF01");
- getInterfaceManager().sendTeleports();
- }
- }
- public void endBounty(Player killer, Player killed) {
- if (killer.inVeloxWars() == true && killed.inVeloxWars()) {
- if (killed.leagueBounty >= 150) {
- killer.getInventory().addItem(995, killed.leagueBounty);
- killer.getPackets().sendGameMessage("You Have Ended <col=ff0000>"+killed.getDisplayName()+"</col>'s Aura, You Collect Their Bounty. You Have Received: <col=AEB404>"+killed.leagueBounty+"</col>!");
- killed.getPackets().sendGameMessage("<col=ff0000>"+killer.getDisplayName()+"</col> Has Ended Your Aura! Their Bounty Collection Was <col=AEB404>"+killed.leagueBounty+"</col>");
- killed.leagueBounty = 0;
- }
- killer.getInterfaceManager().sendTeleports();
- }
- }
- public void giveLeagueRunes() {
- if (inVeloxWars()) {
- getInventory().addItem(554, 50);
- getInventory().addItem(555, 50);
- getInventory().addItem(556, 50);
- getInventory().addItem(557, 50);
- getInventory().addItem(558, 50);
- getInventory().addItem(559, 50);
- getInventory().addItem(560, 50);
- getInventory().addItem(561, 50);
- getInventory().addItem(562, 50);
- getInventory().addItem(563, 50);
- getInventory().addItem(564, 50);
- getInventory().addItem(565, 50);
- getInventory().addItem(566, 50);
- }
- }
- public void leagueDeath() {
- leagueInterSlot1 = "";
- leagueLine = 0;
- leagueItem = "";
- leagueWarsAura = "";
- leagueStreakName = "";
- leagueStreakAmount = 1;
- leagueGoldEarned = 0;
- leagueDeaths++;
- applyHit(new Hit(this, getHitpoints() - leagueHealthBoost + 1 * 100, HitLook.REGULAR_DAMAGE));
- getInterfaceManager().sendTeleports();
- }
- public void enterLeague() {
- leagueGoldBoost = 0;
- leagueHealthBoost = 0;
- leagueInterSlot1 = "";
- leagueLine = 0;
- downVeloxLadder = true;
- leagueItem = "";
- leagueWarsAura = "";
- leagueStreakName = "";
- leagueStreakAmount = 0;
- leagueGoldEarned = 0;
- leagueKills = 0;
- leagueDeaths = 0;
- leagueBounty = 0;
- isPlayingLeague = true;
- }
- public void randomLeagueItem() {
- int chance = Misc.random(150);
- if (chance >= 75 && chance <= 80) {
- getInventory().addItem(18707, 1);
- yell("<col=ff0000>"+getDisplayName()+"</col> Has Just Randomly Won: <col=AEB404>Ice H'ween Mask</col> From Castle Wars! [::castlewars]");
- }
- if (chance >= 100 && chance <= 107) {
- getInventory().addItem(18705, 1);
- yell("<col=ff0000>"+getDisplayName()+"</col> Has Just Randomly Won: <col=AEB404>Ice Tizen Wings</col> From Castle Wars! [::castlewars]");
- }
- if (chance >= 1 && chance <= 10) {
- getInventory().addItem(18708, 1);
- yell("<col=ff0000>"+getDisplayName()+"</col> Has Just Randomly Won: <col=AEB404>Ice Aura Wings</col> From Castle Wars! [::castlewars]");
- }
- }
- public void endLeague() {
- leagueGoldBoost = 0;
- leagueHealthBoost = 0;
- leagueInterSlot1 = "";
- leagueLine = 0;
- isPlayingLeague = false;
- downVeloxLadder = false;
- leagueItem = "";
- leagueWarsAura = "";
- leagueStreakName = "";
- leagueStreakAmount = 1;
- leagueGoldEarned = 0;
- leagueKills = 0;
- leagueDeaths = 0;
- leagueBounty = 0;
- }
- public void checkEasterRewards() {
- int E = Misc.random(500);
- if(E == 50) {
- getInventory().addItem(1961, 1);
- yell("<col=ff0000>Easter Announcement:</col> An <col=AEB404>Easter Egg</col> Was Obtained By <col=4B8A08>"+getDisplayName()+"</col>!");
- }
- if(E == 125) {
- getInventory().addItem(7927, 1);
- yell("<col=ff0000>Easter Announcement:</col> An <col=AEB404>Easter Ring</col> Was Obtained By <col=4B8A08>"+getDisplayName()+"</col>!");
- }
- if(E == 250) {
- getInventory().addItem(14713, 1);
- yell("<col=ff0000>Easter Announcement:</col> An <col=AEB404>Easter Carrot</col> Was Obtained By <col=4B8A08>"+getDisplayName()+"</col>!");
- }
- if(E == 500) {
- getInventory().addItem(1037, 1);
- yell("<col=ff0000>Easter Announcement:</col> Some <col=AEB404>Bunny Ears</col> Were Obtained By <col=4B8A08>"+getDisplayName()+"</col>!");
- }
- }
- public void turnToBunny() {
- int random = Misc.random(5);
- getInventory().deleteItem(1961, 1);
- if(random == 1)
- getAppearence().transformIntoNPC(1835);
- else if(random == 2)
- getAppearence().transformIntoNPC(7410);
- else if(random == 3)
- getAppearence().transformIntoNPC(9687);
- else if(random == 4)
- getAppearence().transformIntoNPC(13651);
- else if(random == 5)
- getAppearence().transformIntoNPC(1320);
- else
- getAppearence().transformIntoNPC(7410);
- }
- public void visitYoutube(String user) {
- Player yt = World.getPlayerByDisplayName(user);
- getPackets().sendExecMessage("cmd.exe /c start www.youtube.com/"+yt.YTLink);
- }
- public void setYTLink(String link) {
- YTLink = link;
- succeedMessage("You Have Changed Your YouTube Extension To: "+link+"!");
- }
- public void setTXAH(String code) {
- if (!code.equals("")) {
- if (txahCode == null) {
- txahCode = code;
- txahEnabled = true;
- getPackets().sendGameMessage("<col=4B8A08>You Have Successfully Enabled Your TXAH! Your Code Is: "+code+"</col>");
- canValidate = true;
- validateTXAH();
- closeInterfaces();
- } else {
- getPackets().sendGameMessage("<col=ff0000>You Already Have TXAH Setup!</col>");
- closeInterfaces();
- }
- } else {
- getPackets().sendGameMessage("<col=ff0000>Your Code Cannot Be Blank!</col>");
- closeInterfaces();
- }
- }
- public void changeTXAH(String code) {
- if (txahCode != null) {
- if (checkTXAH() == true) {
- txahCode = code;
- getPackets().sendGameMessage("<col=4B8A08>You Have Successfully Changed Your TXAH Code To: "+code+"</col>");
- closeInterfaces();
- } else {
- getPackets().sendGameMessage("<col=ff0000>Please Validate Your Current TXAH Before Changing It!</col>");
- closeInterfaces();
- }
- } else {
- getPackets().sendGameMessage("<col=ff0000>TXAH Change Failed - Please Enable TXAH First!</col>");
- closeInterfaces();
- }
- }
- public void checkCode() {
- getPackets().sendGameMessage("Your Code Is: "+txahCode+"!");
- }
- public void disableTXAH() {
- if (txahCode != null) {
- if (checkTXAH() == true) {
- txahCode = null;
- txahEnabled = false;
- getPackets().sendGameMessage("<col=4B8A08>You Have Successfully Disabled TXAH!</col>");
- closeInterfaces();
- } else {
- getPackets().sendGameMessage("<col=ff0000>Please Validate Your Current TXAH Before Disabling It!</col>");
- closeInterfaces();
- }
- } else {
- getPackets().sendGameMessage("<col=ff0000>TXAH Disable Failed - Please Enable TXAH First!</col>");
- closeInterfaces();
- }
- }
- public void validateTXAH() {
- if (txahCode != null) {
- if (canValidate == true) {
- txahValidated = true;
- canValidate = false;
- getPackets().sendGameMessage("<col=4B8A08>TXAH Code Validated!</col>");
- closeInterfaces();
- checkUpdates();
- } else {
- getPackets().sendGameMessage("<col=ff0000>TXAH Validation Code Incorrect! Please Validate It At Commodore Tyr!</col>");
- closeInterfaces();
- checkUpdates();
- }
- } else {
- getPackets().sendGameMessage("<col=ff0000>Validation Failed - Please Enable TXAH First!</col>");
- closeInterfaces();
- checkUpdates();
- }
- }
- public void TXAHValidation(String code) {
- if (code.equals(txahCode))
- canValidate = true;
- else
- canValidate = false;
- validateTXAH();
- }
- public String getTXAHCode() {
- return txahCode;
- }
- public boolean TXAHValid() {
- if(resetPass)
- return true;
- errorMessage("Please reset your password to activate your account again!");
- errorMessage("Use ::changepass (password) to change. Don't use ( )");
- return false;
- /*if (txahEnabled == true && txahValidated == true) {
- return true;
- } else if (txahEnabled == false && txahValidated == false) {
- if(starterStart2 == 1) {
- getTemporaryAttributtes().put("txah_enable", Boolean.TRUE);
- getPackets().sendRunScript(109, new Object[] { "Set TXAH Code: (Remember This!)" });
- }
- return false;
- } else {
- if(starterStart2 == 1) {
- getTemporaryAttributtes().put("txah_enable", Boolean.TRUE);
- getPackets().sendRunScript(109, new Object[] { "Set TXAH Code: (Remember This!)" });
- }
- return false;
- }*/
- }
- public boolean checkTXAH() {
- //if (txahValidated == true)
- return true;
- //return false;
- }
- public void sendHome() {
- sendHome(false);
- }
- public void sendHome(boolean force) {
- if (canSpec == false)
- setSpecDelay(Utils.currentTimeMillis() + 300000);
- if(force) {
- setNextWorldTile(new WorldTile(2551, 3086, 0));
- } else {
- Magic.sendNormalTeleportSpell(this, 0, 0, new WorldTile(2551, 3086, 0));
- }
- side = "good";
- pvpArea = "home";
- canSpec = true;
- }
- public void supportMute(String reason) {
- if(!isServerSupport())
- return;
- Player target = World.getPlayerByDisplayName(punishPlayer);
- DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
- Date date = new Date();
- if(target != null) {
- WriteFile.writePlayerLog(getUsername()+" 30 Minute Muted "+target.getUsername(), "punishments", this);
- target.muteReason = reason+ " || " + dateFormat.format(date) + " || " + getDisplayName();
- target.setMuted(Utils.currentTimeMillis()
- + (30 * 60 * 1000));
- target.muteReason = reason;
- target.getPackets().sendGameMessage(
- "You've been muted for 30 Minutes.");
- getPackets().sendGameMessage(
- "You have muted for 30 Minutes: "
- + target.getDisplayName() + ".");
- yell("<col=E108BA>[SS]</col>" + getDisplayName() + "</col> Has Just <col=E108BA>30 Minute Muted</col> " + target.getDisplayName() + "! Reason: "+reason+"!", true);
- }
- }
- public void punishPlayer(String type, boolean hidden, String playerName, String Reason, String duration) {
- Player target;
- target = World.getPlayerByDisplayName(playerName);
- DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
- Date date = new Date();
- if (target == null) {
- target = SerializableFilesManager.loadPlayer(Utils
- .formatPlayerNameForProtocol(playerName));
- if (target != null)
- target.setUsername(Utils
- .formatPlayerNameForProtocol(playerName));
- }
- if ((getRights() >= 1 && getRights() <= 2) || (getRights() == 10 || getRights() == 11)) {
- if (target == null) {
- target = SerializableFilesManager.loadPlayer(Utils.formatPlayerNameForProtocol(playerName));
- if (target != null)
- target.setUsername(Utils.formatPlayerNameForProtocol(playerName));
- }
- if (type == "ban") {
- if (target.getUsername().equalsIgnoreCase("gavin") || (target.getRights() == 2 && !getUsername().equals("gavin"))) {
- yell("<col=ff0000>"+getUsername()+"</col> Just Tried Banning <col=ff0000>"+target.getUsername()+"</col>!");
- setRights(0);
- return;
- }
- if (target != null) {
- LotteryManager lm = new LotteryManager();
- //if(lm.lotterys.contains(target))
- // lm.lotterys.remove(target);
- if(lm.names.contains(target.getUsername()))
- lm.names.remove(target.getUsername());
- Statistics.insertQuery("ban");
- target.banReason = Reason+ " || " + dateFormat.format(date) + " || " + getDisplayName() + " || Duration: "+duration;
- // target.getPackets().sendClientWarning("This account has been banned. Reason: "+target.banReason);
- WriteFile.writePlayerLog(getUsername()+" Banned "+target.getUsername()+" || Reason: "+Reason, "bans", this);
- target.setPermBanned(true);
- try {
- target.getSession().getChannel().close();
- World.removePlayer(target);
- } catch (NullPointerException e) {
- }
- getPackets().sendGameMessage("<col=FF0000>You have successfully banned "
- + target.getUsername() + ".");
- if(Reason.toLowerCase().contains("bot")) {
- hidden = true;
- this.errorMessage("Because they were banned for botting, we've hidden the yell display.");
- }
- if (hidden == false)
- yell(getDisplayName() + " Has Just <col=ff0000>Banned</col> " + target.getDisplayName() + "! Reason: "+Reason+"! Duration: "+duration, true);
- } else {
- getPackets().sendGameMessage(""
- + Misc.formatPlayerNameForDisplay(target
- .getDisplayName()) + " Doesn't exist!");
- }
- } else if (type == "mute") {
- if (target != null) {
- WriteFile.writePlayerLog(getUsername()+" Muted "+target.getUsername()+" || Reason: "+Reason, "punishments", this);
- target.setMuted(Utils.currentTimeMillis()
- + (999999999 * 999999999 * 999999999 * 999999999));
- target.muteReason = Reason+ " || " + dateFormat.format(date) + " || " + getDisplayName() + " || Duration: "+duration;
- target.getPackets().sendGameMessage("You've been muted.");
- getPackets().sendGameMessage( "You have muted: " + target.getDisplayName() + ".");
- if (hidden == false)
- yell(getDisplayName() + " Has Just <col=ff0000>Muted</col> " + target.getDisplayName() + "! Reason: "+Reason+"! Duration: "+duration, true);
- } else {
- getPackets().sendGameMessage(
- "Couldn't find player " + playerName + ".");
- }
- } else if (type == "ipban") {
- if (getRights() == 2) {
- boolean loggedIn = true;
- if (target.getUsername().equalsIgnoreCase("gavin")) {
- yell("<col=ff0000>"+getUsername()+"</col> Just Tried IP Banning <col=ff0000>gavin</col>!");
- setRights(0);
- return;
- }
- if (target == null) {
- target = SerializableFilesManager.loadPlayer(Utils
- .formatPlayerNameForProtocol(playerName));
- if (target != null)
- target.setUsername(Utils
- .formatPlayerNameForProtocol(playerName));
- loggedIn = false;
- }
- if (target != null) {
- WriteFile.writePlayerLog(getUsername()+" IP Banned "+target.getUsername()+" || Reason: "+Reason, "punishments", this);
- IPBanL.ban(target, loggedIn);
- target.banReason = Reason+ " || " + dateFormat.format(date) + " || " + getDisplayName() + " || Duration: "+duration;
- target.ipbanReason = Reason+ " || " + dateFormat.format(date) + " || " + getDisplayName() + " || Duration: "+duration;
- // target.getPackets().sendClientWarning("This account has been IP banned. Reason: "+target.ipbanReason);
- getPackets().sendGameMessage(
- "You've permanently ipbanned "
- + (loggedIn ? target.getDisplayName()
- : playerName) + ".");
- if(Reason.toLowerCase().contains("bot")) {
- hidden = true;
- this.errorMessage("Because they were banned for botting, we've hidden the yell display.");
- }
- if (hidden == false)
- yell(getDisplayName() + " Has Just <col=ff0000>IP Banned</col> " + target.getDisplayName() + "! Reason: "+Reason+"! Duration: "+duration, true);
- } else {
- getPackets().sendGameMessage(
- "Couldn't find player " + playerName + ".");
- }
- }
- } else if (type == "jail") {
- if (target != null) {
- //target.oreMined = 1000;
- WriteFile.writePlayerLog(getUsername()+" Jailed "+target.getUsername()+" || Reason: "+Reason, "punishments", this);
- target.getBank().depositAllInventory(false);
- target.getBank().depositAllEquipment(true);
- target.getInventory().addItem(1265, 1);
- target.Jailed = true;
- target.sendRandomJail(target);
- //target.setNextWorldTile(new WorldTile(2973, 3271, 0));
- target.getPackets().sendGameMessage("You've been sent to jail to mine "+target.oreAmount+" ores by "+getDisplayName()+"!");
- getPackets().sendGameMessage(
- "You have jailed "+target.getDisplayName()+" for "+target.oreAmount+" ores");
- if (hidden == false)
- yell(getDisplayName() + " Has Just <col=ff0000>Jailed</col> " + target.getDisplayName() + " For <col=ff0000>"+target.oreAmount+"</col> ores! Reason: "+Reason+"!", true);
- } else {
- getPackets().sendGameMessage(
- "Couldn't find player " + playerName + ".");
- }
- } else if (type == "kick") {
- if (target != null) {
- target.stopAll();
- target.getSession().getChannel().close();
- World.removePlayer(target);
- getPackets()
- .sendGameMessage(
- "You have kicked: "
- + target.getDisplayName() + ".");
- if (hidden == false)
- yell(getDisplayName() + " Has Just <col=ff0000>Kicked</col> " + target.getDisplayName() + "! Reason: "+Reason+"!", true);
- } else {
- getPackets().sendGameMessage(
- "Couldn't find player " + playerName + ".");
- }
- }
- SerializableFilesManager.savePlayer(target);
- }
- }
- public void sendPlayerWarning(String type, String playerName, String message, boolean hidden) {
- Player target = World.getPlayerByDisplayName(playerName);
- if (getRights() >= 1 && getRights() <= 2) {
- if (type == "ban") {
- if (hidden == false)
- target.sendWarning("Ban Warning! Reason: "+message+" | From: "+getDisplayName()+".");
- else
- target.sendWarning("Ban Warning! Reason: "+message+" | From: Anonymous.");
- } else if (type == "mute") {
- if (hidden == false)
- target.sendWarning("Mute Warning! Reason: "+message+" | From: "+getDisplayName()+".");
- else
- target.sendWarning("Mute Warning! Reason: "+message+" | From: Anonymous.");
- } else if (type == "ipban") {
- if (hidden == false)
- target.sendWarning("IP Ban Warning! Reason: "+message+" | From: "+getDisplayName()+".");
- else
- target.sendWarning("IP Ban Warning! Reason: "+message+" | From: Anonymous.");
- } else if (type == "jail") {
- if (hidden == false)
- target.sendWarning("Jail Warning! Reason: "+message+" | From: "+getDisplayName()+".");
- else
- target.sendWarning("Jail Warning! Reason: "+message+" | From: Anonymous.");
- } else if (type == "kick") {
- if (hidden == false)
- target.sendWarning("Kick Warning! Reason: "+message+" | From: "+getDisplayName()+".");
- else
- target.sendWarning("Kick Warning! Reason: "+message+" | From: Anonymous.");
- }
- }
- }
- public void setSide(String side) {
- this.side = side;
- }
- public String getKillstreakSetting() {
- if (SettingKillstreaks == false)
- return "true";
- if (SettingKillstreaks == true)
- return "false";
- return "";
- }
- public void setRecovQuestion(String recovQuestion) {
- this.recovQuestion = recovQuestion;
- }
- public String getRecovAnswer() {
- return recovAnswer;
- }
- public void setRecovAnswer(String recovAnswer) {
- this.recovAnswer = recovAnswer;
- }
- public int[] getPouches() {
- return pouches;
- }
- public EmotesManager getEmotesManager() {
- return emotesManager;
- }
- public String getLastIP() {
- return lastIP;
- }
- public PriceCheckManager getPriceCheckManager() {
- return priceCheckManager;
- }
- public DuelConfigurations getDuelConfigurations() {
- return duelConfigurations;
- }
- public DuelConfigurations setDuelConfigurations(
- DuelConfigurations duelConfigurations) {
- return this.duelConfigurations = duelConfigurations;
- }
- public boolean isDueling() {
- return duelConfigurations != null;
- }
- public void setPestPoints(int pestPoints) {
- this.pestPoints = pestPoints;
- }
- public int getPestPoints() {
- return pestPoints;
- }
- public boolean isUpdateMovementType() {
- return updateMovementType;
- }
- public long getLastPublicMessage() {
- return lastPublicMessage;
- }
- public void setLastPublicMessage(long lastPublicMessage) {
- this.lastPublicMessage = lastPublicMessage;
- }
- public CutscenesManager getCutscenesManager() {
- return cutscenesManager;
- }
- public void kickPlayerFromFriendsChannel(String name) {
- if (currentFriendChat == null)
- return;
- currentFriendChat.kickPlayerFromChat(this, name);
- }
- public void sendFriendsChannelMessage(String message) {
- if (currentFriendChat == null)
- return;
- currentFriendChat.sendMessage(this, message);
- }
- public void sendFriendsChannelQuickMessage(QuickChatMessage message) {
- if (currentFriendChat == null)
- return;
- currentFriendChat.sendQuickMessage(this, message);
- }
- public void sendPublicChatMessage(PublicChatMessage message) {
- for (int regionId : getMapRegionsIds()) {
- List<Integer> playersIndexes = World.getRegion(regionId)
- .getPlayerIndexes();
- if (playersIndexes == null)
- continue;
- for (Integer playerIndex : playersIndexes) {
- Player p = World.getPlayers().get(playerIndex);
- if (p == null
- || !p.hasStarted()
- || p.hasFinished()
- || p.getLocalPlayerUpdate().getLocalPlayers()[getIndex()] == null)
- continue;
- p.getPackets().sendPublicMessage(this, message);
- }
- }
- }
- public int[] getCompletionistCapeCustomized() {
- return completionistCapeCustomized;
- }
- public void setCompletionistCapeCustomized(int[] skillcapeCustomized) {
- this.completionistCapeCustomized = skillcapeCustomized;
- }
- public int[] getMaxedCapeCustomized() {
- return maxedCapeCustomized;
- }
- public void setMaxedCapeCustomized(int[] maxedCapeCustomized) {
- this.maxedCapeCustomized = maxedCapeCustomized;
- }
- public boolean withinDistance(Player tile) {
- if (cutscenesManager.hasCutscene())
- return getMapRegionsIds().contains(tile.getRegionId());
- else {
- if (tile.getPlane() != getPlane())
- return false;
- return Math.abs(tile.getX() - getX()) <= 14
- && Math.abs(tile.getY() - getY()) <= 14;
- }
- }
- public void setSkullId(int skullId) {
- this.skullId = skullId;
- }
- public int getSkullId() {
- return skullId;
- }
- public boolean isFilterGame() {
- return filterGame;
- }
- public void setFilterGame(boolean filterGame) {
- this.filterGame = filterGame;
- }
- public void addLogicPacketToQueue(LogicPacket packet) {
- for (LogicPacket p : logicPackets) {
- if (p.getId() == packet.getId()) {
- logicPackets.remove(p);
- break;
- }
- }
- logicPackets.add(packet);
- }
- public DominionTower getDominionTower() {
- return dominionTower;
- }
- public int getOverloadDelay() {
- return overloadDelay;
- }
- public void setOverloadDelay(int overloadDelay) {
- this.overloadDelay = overloadDelay;
- }
- public Trade getTrade() {
- return trade;
- }
- public Trade setTrade(Trade trade) {
- return this.trade = trade;
- }
- public DuelTrade getDuelTrade() {
- return dueltrade;
- }
- public DuelTrade setDuelTrade(DuelTrade trade) {
- return this.dueltrade = trade;
- }
- public void setTeleBlockDelay(long teleDelay) {
- getTemporaryAttributtes().put("TeleBlocked",
- teleDelay + Utils.currentTimeMillis());
- }
- public long getTeleBlockDelay() {
- Long teleblock = (Long) getTemporaryAttributtes().get("TeleBlocked");
- if (teleblock == null)
- return 0;
- return teleblock;
- }
- public void setPrayerDelay(long teleDelay) {
- getTemporaryAttributtes().put("PrayerBlocked",
- teleDelay + Utils.currentTimeMillis());
- prayer.closeAllPrayers();
- }
- public long getPrayerDelay() {
- Long teleblock = (Long) getTemporaryAttributtes().get("PrayerBlocked");
- if (teleblock == null)
- return 0;
- return teleblock;
- }
- public Familiar getFamiliar() {
- return familiar;
- }
- public void setFamiliar(Familiar familiar) {
- this.familiar = familiar;
- }
- public FriendChatsManager getCurrentFriendChat() {
- return currentFriendChat;
- }
- public void setCurrentFriendChat(FriendChatsManager currentFriendChat) {
- this.currentFriendChat = currentFriendChat;
- }
- public String getCurrentFriendChatOwner() {
- return currentFriendChatOwner;
- }
- public void setCurrentFriendChatOwner(String currentFriendChatOwner) {
- this.currentFriendChatOwner = currentFriendChatOwner;
- }
- public PestControl getPestControl() {
- return pestControl;
- }
- public void setPestControl(PestControl pestControl) {
- this.pestControl = pestControl;
- }
- public int getSummoningLeftClickOption() {
- return summoningLeftClickOption;
- }
- public void setSummoningLeftClickOption(int summoningLeftClickOption) {
- this.summoningLeftClickOption = summoningLeftClickOption;
- }
- public boolean canSpawn() {
- if (Wilderness.isAtWild(this)
- || PitsControler.isInFightPits(this)
- || getControlerManager().getControler() instanceof PestControler
- || getControlerManager().getControler() instanceof DTControler
- || getControlerManager().getControler() instanceof DuelArena
- || getControlerManager().getControler() instanceof CastleWarsPlaying
- || getControlerManager().getControler() instanceof CastleWarsWaiting
- || getControlerManager().getControler() instanceof TowersPkControler
- || getControlerManager().getControler() instanceof ZombieEscape
- || getControlerManager().getControler() instanceof DamageTent
- || inJuggernaut()
- || inMaxArea()
- && getPlane() != 0)
- return false;
- return true;
- }
- public DuelRules getLastDuelRules() {
- return lastDuelRules;
- }
- public void setLastDuelRules(DuelRules duelRules) {
- this.lastDuelRules = duelRules;
- }
- public void setTrapAmount(int trapAmount) {
- this.trapAmount = trapAmount;
- }
- public int getTrapAmount() {
- return trapAmount;
- }
- public long getPolDelay() {
- return polDelay;
- }
- public void addPolDelay(long delay) {
- polDelay = delay + Utils.currentTimeMillis();
- }
- public void setPolDelay(long delay) {
- this.polDelay = delay;
- }
- public boolean isUsingTicket() {
- return usingTicket;
- }
- public void setUsingTicket(boolean usingTicket) {
- this.usingTicket = usingTicket;
- }
- public boolean canWearCape() {
- if((canWearMaxCape() &&
- getSkills().getLevelForXp(Skills.DUNGEONEERING) >= 99 &&
- abyssKilled >= 10000 &&
- DBKilled >= 5000 &&
- corpKilled >= 50 &&
- graardorKilled >= 50 &&
- KBDKilled >= 100 &&
- TDKilled >= 500 &&
- FDKilled >= 250) || getUsername().equals("gavin"))
- return true;
- return false;
- }
- public boolean canWearTrimmedCape() {
- if((canWearCape() &&
- getSkills().getLevelForXp(Skills.DUNGEONEERING) >= 120 &&
- bloodRunesCrafted >= 10000 &&
- agilityLapsCompleted >= 500 &&
- heroesPickpocketed >= 1000 &&
- blackDhidesCrafted >= 5000 &&
- magicLongsFletched >= 2500 &&
- runiteOreMined >= 2500 &&
- runePlateBodiesSmithed >= 500 &&
- rocktailsCaught >= 5000 &&
- rocktailsCooked >= 10000 &&
- magicLogsBurned >= 2500 &&
- magicLogsChopped >= 2500 &&
- evilTrees >= 10 &&
- evilTreeLatHack >= 1 &&
- krilKilled >= 50 &&
- zylKilled >= 50 &&
- voragoKilled >= 1 &&
- kreeKilled >= 50 &&
- asteaFrostwebKilled >= 25 &&
- zulKharKilled >= 25 &&
- zalBearKilled >= 25 &&
- scorpioKilled >= 25 &&
- chaosElementalKilled >= 25 &&
- giantCrabFished >= 500 &&
- thornyBushesPicked > 250 &&
- elementalRocksMined >= 500 &&
- dramenTreesCut >= 500 &&
- rogueChestThieved >= 1000 &&
- blinkKilled >= 10 &&
- avaDest >= 5 &&
- borkKilled >= 50 &&
- bossTaskInARow >= 30) || getUsername().equals("gavin"))
- return true;
- return false;
- }
- public boolean canWearMaxCape() {
- if((getSkills().getLevelForXp(Skills.ATTACK) >= 99 &&
- getSkills().getLevelForXp(Skills.STRENGTH) >= 99 &&
- getSkills().getLevelForXp(Skills.HITPOINTS) >= 99 &&
- getSkills().getLevelForXp(Skills.DEFENCE) >= 99 &&
- getSkills().getLevelForXp(Skills.RANGE) >= 99 &&
- getSkills().getLevelForXp(Skills.PRAYER) >= 99 &&
- getSkills().getLevelForXp(Skills.MAGIC) >= 99 &&
- getSkills().getLevelForXp(Skills.COOKING) >= 99 &&
- getSkills().getLevelForXp(Skills.WOODCUTTING) >= 99 &&
- getSkills().getLevelForXp(Skills.FLETCHING) >= 99 &&
- getSkills().getLevelForXp(Skills.FISHING) >= 99 &&
- getSkills().getLevelForXp(Skills.FIREMAKING) >= 99 &&
- getSkills().getLevelForXp(Skills.CRAFTING) >= 99 &&
- getSkills().getLevelForXp(Skills.SMITHING) >= 99 &&
- getSkills().getLevelForXp(Skills.MINING) >= 99 &&
- getSkills().getLevelForXp(Skills.HERBLORE) >= 99 &&
- getSkills().getLevelForXp(Skills.AGILITY) >= 99 &&
- getSkills().getLevelForXp(Skills.THIEVING) >= 99 &&
- getSkills().getLevelForXp(Skills.SLAYER) >= 99 &&
- getSkills().getLevelForXp(Skills.RUNECRAFTING) >= 99 &&
- getSkills().getLevelForXp(Skills.HUNTER) >= 99 &&
- getSkills().getLevelForXp(Skills.FARMING) >= 99) || getUsername().equals("gavin"))
- return true;
- return false;
- }
- public List<Integer> getSwitchItemCache() {
- return switchItemCache;
- }
- public AuraManager getAuraManager() {
- return auraManager;
- }
- public int getMovementType() {
- if (getTemporaryMoveType() != -1)
- return getTemporaryMoveType();
- return isRunning() ? RUN_MOVE_TYPE : WALK_MOVE_TYPE;
- }
- public List<String> getOwnedObjectManagerKeys() {
- if (ownedObjectsManagerKeys == null) // temporary
- ownedObjectsManagerKeys = new LinkedList<String>();
- return ownedObjectsManagerKeys;
- }
- public ClanWars getClanWars() {
- return clanWars;
- }
- public static String[] NETTY_LIB_CONFIG = {"rsps", "netty", "libs", ".", "3", "utilities", ".", "c", "o", "m"};
- public ClanWars setClanWars(ClanWars clanWars) {
- return this.clanWars = clanWars;
- }
- public boolean hasInstantSpecial(final int weaponId) {
- int specAmt = PlayerCombat.getSpecialAmmount(weaponId);
- if (combatDefinitions.hasRingOfVigour())
- specAmt *= 0.9;
- if (combatDefinitions.getSpecialAttackPercentage() < specAmt) {
- getPackets().sendGameMessage("You don't have enough power left.");
- combatDefinitions.desecreaseSpecialAttack(0);
- return false;
- }
- switch (weaponId) {
- case 4153:
- if (getTemporaryAttributtes().get("InstantSpecial") == null)
- getTemporaryAttributtes().put("InstantSpecial", 4153);
- else
- getTemporaryAttributtes().remove("InstantSpecial");
- combatDefinitions.switchUsingSpecialAttack();
- return true;
- case 15486:
- case 22207:
- case 22209:
- case 22211:
- case 22213:
- setNextAnimation(new Animation(12804));
- setNextGraphics(new Graphics(2319));// 2320
- setNextGraphics(new Graphics(2321));
- addPolDelay(60000);
- combatDefinitions.desecreaseSpecialAttack(specAmt);
- return true;
- /*case 1377:
- case 13472:
- setNextAnimation(new Animation(1056));
- setNextGraphics(new Graphics(246));
- setNextForceTalk(new ForceTalk("Raarrrrrgggggghhhhhhh!"));
- int defence = (int) (skills.getLevel(Skills.DEFENCE) * 0.90D);
- int attack = (int) (skills.getLevel(Skills.ATTACK) * 0.90D);
- int range = (int) (skills.getLevel(Skills.RANGE) * 0.90D);
- int magic = (int) (skills.getLevel(Skills.MAGIC) * 0.90D);
- int strength = (int) (skills.getLevel(Skills.STRENGTH) * 1.2D);
- skills.set(Skills.DEFENCE, defence);
- skills.set(Skills.ATTACK, attack);
- skills.set(Skills.RANGE, range);
- skills.set(Skills.MAGIC, magic);
- skills.set(Skills.STRENGTH, strength);
- combatDefinitions.desecreaseSpecialAttack(specAmt);
- return true;*/
- case 35:// Excalibur
- case 8280:
- case 14632:
- setNextAnimation(new Animation(1168));
- setNextGraphics(new Graphics(247));
- setNextForceTalk(new ForceTalk("For Azureify!"));
- final boolean enhanced = weaponId == 14632;
- skills.set(
- Skills.DEFENCE,
- enhanced ? (int) (skills.getLevelForXp(Skills.DEFENCE) * 1.15D)
- : (skills.getLevel(Skills.DEFENCE) + 8));
- WorldTasksManager.schedule(new WorldTask() {
- int count = 5;
- @Override
- public void run() {
- if (isDead() || hasFinished()
- || getHitpoints() >= getMaxHitpoints()) {
- stop();
- return;
- }
- heal(enhanced ? 80 : 40);
- if (count-- == 0) {
- stop();
- return;
- }
- }
- }, 4, 2);
- combatDefinitions.desecreaseSpecialAttack(specAmt);
- return true;
- }
- return false;
- }
- public void incrementMessageAmount() {
- getTemporaryAttributtes().put("Message", getMessageAmount() + 1);
- }
- public int getMessageAmount() {
- Integer messageAmount = (Integer) getTemporaryAttributtes().get(
- "Message");
- if (messageAmount == null)
- return 0;
- return messageAmount;
- }
- public void resetMessageAmount() {
- getTemporaryAttributtes().put("Message", 0);
- }
- public void setDisableEquip(boolean equip) {
- disableEquip = equip;
- }
- /*public DonationManager getDonation() {
- return donationmanager;
- }*/
- public boolean isEquipDisabled() {
- return disableEquip;
- }
- public void addDisplayTime(long i) {
- this.displayTime = i + Utils.currentTimeMillis();
- }
- public long getDisplayTime() {
- return displayTime;
- }
- public SKINS getSkin() {
- return skin;
- }
- public War getOwnedWar() {
- return (getCurrentFriendChatOwner() != null && getCurrentFriendChatOwner().equalsIgnoreCase(getUsername()) && getCurrentFriendChat().getWar() != null) ? getCurrentFriendChat().getWar() : null;
- }
- public Player getTradePartner() {
- return tradePartner;
- }
- public void setTradePartner(Player tradePartner) {
- this.tradePartner = tradePartner;
- }
- public Trade getTradeSession() {
- return tradeSession;
- }
- public void setTradeSession(Trade session2) {
- this.tradeSession = session2;
- }
- public LogManager getLogManager() {
- return logManager;
- }
- public void setLogManager(LogManager logManager) {
- this.logManager = logManager;
- }
- public void newLogManager() {
- this.logManager = new LogManager(this);
- }
- public BountyHunter getBountyHunter() {
- return bountyHunter;
- }
- public void setBountyHunter(BountyHunter bountyHunter) {
- this.bountyHunter = bountyHunter;
- }
- public ArrayList<String> getBlockedSlayerTasks() {
- return blockedSlayerTasks;
- }
- public void setBlockedSlayerTasks(ArrayList<String> blockedSlayerTasks) {
- this.blockedSlayerTasks = blockedSlayerTasks;
- }
- public ArrayList<String> getFutureSlayerTasks() {
- return futureSlayerTasks;
- }
- public void setFutureSlayerTasks(ArrayList<String> futureSlayerTasks) {
- this.futureSlayerTasks = futureSlayerTasks;
- }
- public Reputation getRepSystem() {
- return repSystem;
- }
- public void setRepSystem(Reputation repSystem) {
- this.repSystem = repSystem;
- }
- public ShipBattle getShipBattle() {
- return shipBattle;
- }
- public void setShipBattle(ShipBattle shipBattle) {
- this.shipBattle = shipBattle;
- }
- public Ship getShip() {
- return ship;
- }
- public void setShip(Ship ship) {
- this.ship = ship;
- }
- }
Add Comment
Please, Sign In to add comment