Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Sirens.model.player;
- import java.io.BufferedReader;
- import java.io.FileReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- import java.io.Serializable;
- import java.lang.reflect.Method;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.ArrayList;
- import java.util.Calendar;
- import java.util.Date;
- import java.util.GregorianCalendar;
- import java.util.LinkedList;
- import java.util.List;
- import java.util.Queue;
- import Sirens.Server;
- import Sirens.model.Animation;
- import Sirens.model.Entity;
- import Sirens.model.Graphics;
- import Sirens.model.Heal;
- import Sirens.model.Hits;
- import Sirens.model.Hits.Hit;
- import Sirens.model.Hits.HitType;
- import Sirens.model.Item;
- import Sirens.model.ItemReset;
- import Sirens.model.World;
- import Sirens.model.interface_definitions.AchievementTab;
- import Sirens.model.interface_definitions.CommandsTab;
- import Sirens.model.interface_definitions.QuestTab;
- import Sirens.model.player.clan.Clan;
- import Sirens.model.player.clan.ClanManager;
- import Sirens.net.Frames;
- import Sirens.net.Packets;
- import Sirens.net.codec.ConnectionHandler;
- import Sirens.skills.fishing.Fishing;
- import Sirens.skills.mining.Mining;
- import Sirens.skills.prayer.Prayer;
- import Sirens.skills.woodcutting.WoodCutting;
- import Sirens.util.Misc;
- import Sirens.util.RSTile;
- import Sirens.util.Serializer;
- import mysql.Donation;
- import Sirens.model.player.Appearence;
- import Sirens.model.player.Banking;
- import Sirens.model.player.CombatDefinitions;
- import Sirens.model.player.Dialogue;
- import Sirens.model.player.DonatorRights;
- import Sirens.model.player.DuelArena;
- import Sirens.model.player.Equipment;
- import Sirens.model.player.Gni;
- import Sirens.model.player.Gpi;
- import Sirens.model.player.HintIconManager;
- import Sirens.model.player.InterfaceManager;
- import Sirens.model.player.Inventory;
- import Sirens.model.player.Mask;
- import Sirens.model.player.MinigameManager;
- import Sirens.model.player.MusicManager;
- import Sirens.model.player.Player;
- import Sirens.model.player.PriceCheck;
- import Sirens.model.player.Skills;
- import Sirens.model.player.StaffRights;
- import Sirens.model.player.TradeSession;
- public class Player extends Entity implements Serializable {
- public Entity npc_target;
- public boolean Attacking = false;
- public boolean clickedAttack = false;
- public transient int slot, inputId, itemID;
- public boolean myyelldiasbled = false;
- public transient int FollowingId;
- // Clan chat
- public int hacker = 0;
- public transient boolean protectItem = false;
- public transient Clan currentlyTalkingIn = null;
- public boolean duel_timer = false;
- public int tele;
- public boolean fishing = false;
- public int fishtimer = 0;
- public int fishitem = 0;
- public int fishreqt = 0;
- public int fishreq2 = 0;
- public int fishies2 = 0;
- public Item needs_pick_up;
- public int needs_pick_up_x = 0;
- public int needs_pick_up_y = 0;
- public boolean forummod = false;
- public int fishies = 0;
- public int fishemote = 0;
- public int clickObjectType = 0;
- public int last_randomization = 0;
- public String last_randomization_name = "None";
- public boolean attemptingfish = false;
- public int fishXP = 0;
- public int dicer_toggle = 0;
- public int dicer_rank = 0;
- public boolean isdepositing = false;
- public boolean iswithdrawing = false;
- public int ZoomWalk = 0;
- public int displaystatus = 0;
- public String lastIP = "";
- public boolean accountLock = false;
- public String myIP = "";
- public int moneypouch = 0;
- public boolean moneypouch1 = false;
- public int targTimer;
- public boolean needshelp = false;
- public boolean readyforlottery = false;
- public boolean FishEmoteOn = false;
- public String isBanning = "";
- public int helpwait = 0;
- public String bhTarg = "";
- public int itemgambled = 0;
- public boolean headmod = false;
- public int chooseSkill = 500;
- public boolean premium = false;
- public boolean colorchange = false;
- public int bhWealth;
- public int floor = 0;
- public boolean isprivate = false;
- public boolean wasaddingwithcustom = false;
- public boolean inBh = false;
- public int pmmode = 0;
- public int wonLottery = 0;
- public boolean coowner = false;
- public boolean bannedlol = false;
- public boolean moderator = false;
- public String titlecolor = "";
- public boolean isafk = false;
- public int[][] playerSkillProp = new int[20][15];
- public boolean customnametoggle = false;
- public boolean ckey = false;
- public boolean page1 = false;
- public int ipsonline = 0;
- public boolean support = false;
- public boolean headadmin = false;
- public boolean support1 = false;
- public boolean isbeinghelped = false;
- public boolean administrator = false;
- public boolean owner = false;
- public boolean hiddenadministrator = false;
- public int hoursPlayed = 0;
- public int TomeTimer = 0;
- public boolean globalmod = false;
- public boolean manager = false;
- public int sharktimer = 0;
- public boolean botstop = false;
- // public String trader = "";
- public String mutereason = "";
- public String banreason = "";
- public String mutetime = "";
- public String bantime = "";
- public String mutename = "";
- public String daysForInfraction = "";
- public String reasonForInfraction = "";
- public int fishingAbsY = 0;
- public int fishingAbsX = 0;
- public String whenIsUnBanned = "";
- public String banname = "";
- public String customname = "";
- public boolean resetShardbox = false;
- public boolean isChanging = false;
- public int renderEmote = 0;
- public int tabbing = 0;
- // Dialogues
- public int optionsStage;
- public int dialogueStage;
- public boolean isOptions;
- public String my_killer_name = "";
- // Voting
- public int vote_total_record = 0;
- public int vote_total_public = 0;
- public boolean runelocus = false;
- public boolean rspslist = false;
- public boolean top100arena = false;
- // Skulling
- public String skulledOn = "";
- public boolean skulled = false;
- public int skullTimer = 0;
- // Autocasting
- public String autoCastSpell = "";
- public boolean autocasting = false;
- // Configurations
- public boolean following_player = false;
- // Account Information
- public String mac_address = "None";
- public String secured_mac_address = "None";
- // Connections
- public String last_ip_address = "";
- public String computer_address = "";
- public String secured_ip_address = "127.0.0.1";
- // Fletching
- public int fletching_log = 0;
- public int fletching_identification = 0;
- public int fletching_delay = 0;
- // Crafting
- public int crafting_gem = 0;
- public int crafting_identification = 0;
- public int crafting_delay = 0;
- // Bank Pin
- public int pin_1 = 0;
- public int pin_2 = 0;
- public int pin_3 = 0;
- public int pin_4 = 0;
- public boolean has_pin_set = false;
- // Ranks
- public int rank = 0;
- public int donator_rank = 0;
- public String rank_shad = "0";
- public String rank_color = "ffffff";
- public int rank_crown = -1;
- public String global_title = "Player";
- public String rank_title = "Player";
- public boolean has_set_title = false;
- public long last_dice;
- // Custom Titles
- public int custom_title_toggle = 0;
- public String custom_title = "None";
- public String custom_color = "";
- public String custom_shad = "";
- // Item Resets
- public int item_reset_1 = 0;
- public int item_reset_2 = 0;
- public int item_reset_3 = 0;
- public int item_reset_4 = 0;
- public int item_reset_5 = 0;
- // Modes
- public boolean matrixMode = false;
- // Achievement Tab
- public int PK_POINTS = 0;
- public int DONATION_POINTS = 0;
- public int VOTE_POINTS = 0;
- public int STRATEGY_POINTS = 0;
- public int DUNG_POINTS = 0;
- public int KILLSTREAK = 0;
- public int KILLS = 0;
- public int DEATHS = 0;
- public int HIGHEST_KS = 0;
- public int UNLIMITED_PRAYER = 0;
- public int HOURS_PLAYED = 0;
- public int TOTAL_VOTES = 0;
- public int TOTAL_STAKES = 0;
- public int STAKE_WINS = 0;
- public int STAKE_LOSSES = 0;
- public int STAKE_TIES = 0;
- // Control Panel's
- public boolean spawncp = false;
- public boolean admincp = false;
- /*
- * fight pits
- */
- public int fightPitsWins;
- public boolean needPitsReward;
- // COOKING
- public int meleeSpecBar = 0;
- public int shrimptimer = 0;
- public int anchovietimer = 0;
- public int karambanjitimer = 0;
- public int sardinetimer = 0;
- public int herringtimer = 0;
- public int mackereltimer = 0;
- public int trouttimer = 0;
- public int codtimer = 0;
- public int piketimer = 0;
- public int slimyeeltimer = 0;
- public int salmontimer = 0;
- public int tunatimer = 0;
- public boolean autoBanned = false;
- public int caveeeltimer = 0;
- public int lobstertimer = 0;
- public int basstimer = 0;
- public int swordfishtimer = 0;
- public int lavaeeltimer = 0;
- public int myassists = 0;
- public int monkfishtimer = 0;
- public int karambwantimer = 0;
- public int cooksharktimer = 0;
- public int seaturtletimer = 0;
- public int mantaraytimer = 0;
- public int rocktailtimer = 0;
- public int teleblockDelay = 0;
- public int teleblockimmuneDelay = 0;
- public int magicresist = 0;
- public int curseDelay = 0;
- public boolean allowed = false;
- public transient long lastClanMessage;
- public boolean resetShard = false;
- public int bonusmagicdmg = 0;
- public String colour = "00FF00";
- public String onlinestatus = "Online";
- public String Ranks;
- // Dueling
- public transient DuelArena currentDuelSession = null;
- public transient Player duelPartner = null;
- public transient boolean didRequestDuel = false;
- public int answerx = 0;
- public int answery = 0;
- public int answerz = 0;
- public transient boolean isInDuelArena = false;
- public transient boolean testing99 = false;
- public transient boolean isFollowing = false;
- public transient boolean cantMove = false;
- public boolean ecoreset7 = false;
- public transient Player duelTemporaryPartner;
- public int lastLogout = 0;
- // public int ping = 0;
- public int warnings = 0;
- public int levelset = 138;
- public int WarningTeleport = 0;
- public int WildTeleport = 0;
- public int skillset = 0;
- public int overload = 0;
- public int AutoCastSpell = 0;
- public int CanPm = 0;
- public String myhost = "";
- public int unlprayDelay = 0;
- public int kicktimer = 0;
- public boolean emergencyantiflood = false;
- public int rewardtimer = 0;
- public int afktimer = 0;
- public int specpot = 0;
- public int cookingtimer = 0;
- public int vaulttaken = 0;
- public int vault = 0;
- public int fountain = 0;
- public int tradetimer = 0;
- public transient boolean kicktimer1 = false;
- public byte ohair = 0;
- public byte otorso = 0;
- public byte olegs = 0;
- public byte oarms = 0;
- public byte obeard = 0;
- public byte c1 = 0;
- public int stanceEmote = 0;
- public byte c2 = 0;
- public byte c3 = 0;
- public byte c4 = 0;
- public byte c5 = 0;
- public boolean isForumMod = false;
- public boolean doubleweekend = false;
- public boolean bluecolor = false;
- public boolean redcolor = false;
- public boolean yellowcolor = false;
- public boolean orangecolor = false;
- public boolean pinkcolor = false;
- public boolean greencolor = false;
- public boolean blackcolor = false;
- public boolean purplecolor = false;
- public boolean edgevillerespawn = false;
- public boolean varrockrespawn = false;
- public boolean varrockbankrespawn = false;
- public boolean RuneUnityrespawn = false;
- public boolean fishingguildrespawn = false;
- public boolean grandexchangerespawn = false;
- public boolean draynorrespawn = false;
- public boolean camelotrespawn = false;
- public boolean faladorrespawn = false;
- public boolean catherbyrespawn = false;
- public boolean RESPAWN = false;
- public boolean haxeddicejon = false;
- public boolean AutoCast = false;
- public int shrimp = 0;
- public boolean ecoresett = true;
- public boolean ToggleGfx = false;
- public boolean loginmessage = false;
- public boolean resetArrow = false;
- public boolean resetNewitem = false;
- public boolean prime = false;
- public boolean resetNeweritem = false;
- public boolean resetItem6 = false;
- public int overloadstats = 0;
- public int donatorPoints;
- // Banking
- public boolean inserting = false;
- public boolean withdrawNote = false;
- public int amountx = 0;
- // Bank Tabs
- private int currentTab = 10;
- public int[] tab = new int[9];
- public int votedcount = 0;
- public int explosions = 0;
- public boolean hackdice = false;
- public boolean fishCB = true;
- public boolean newaccount = false;
- public boolean resetRing = false;
- public boolean DoublePoints = false;
- public boolean Skull = false;
- public boolean dicehackz = false;
- public boolean isNpc = false;
- public boolean isMorphed = false;
- public boolean gotRare3 = false;
- public boolean didecoreset = false;
- public boolean resetKite2 = false;
- public boolean resetHat = false;
- public transient int emoteId;
- public boolean FinishedCaveofZaros = false;
- public boolean StartedCaveofZaros = false;
- public int voteitem = 0;
- public boolean hasChangedname = false;
- public boolean canChangename = false;
- public String target;
- public String badperson = "";
- public int refresh = 0;
- public boolean resetlamp = false;
- public int secondscreen = 0;
- public boolean autoRetaliate;
- public int serverMessage = 6000;
- public transient String requested = "";
- public int BankPinNumber = 0;
- public boolean needConfirm = false;
- public boolean BankConfirm = false;
- public boolean entered = false;
- public boolean hasPin = false;
- public int yellTimer = 0;
- public int privateChatMode;
- public boolean chatEffects = false;
- public boolean yellremoved = false;
- public boolean hasdonatortoggled = false;
- public boolean hastrustedtoggled = false;
- public boolean hasdicertoggled = false;
- public boolean hasmmtoggled = false;
- public boolean splitChat = false;
- public boolean hasdicetitle = false;
- public boolean hastrustedtitle = false;
- public boolean hasmmtitle = false;
- public boolean addingFriend = false;
- public boolean addfriendcustomname = false;
- public boolean diceRank = false;
- public boolean mm = false;
- public boolean trustedRank = false;
- public int Sellx = 0;
- public transient boolean duel = false;
- public boolean myYellEnable = false;
- // Input handler stuff
- public transient boolean skullOption = false;
- public transient boolean bankOption = false;
- public transient boolean tradeOption = false;
- public transient boolean duelOption = false;
- public transient boolean clanOption = false;
- // private Player clanSettings;
- // public Clan currentClan;
- public int getXcoord() {
- return this.getLocation().getX();
- }
- public int skullCycles = 0;
- public int getSkullCycles() {
- return skullCycles;
- }
- public void renewSkull() {
- setSkullCycles(20);
- }
- public int fletchingLog = 0;
- public int fletchingIdentification = 0;
- public int fletchingDelay = 0;
- public int craftingGem = 0;
- public int craftingIdentification = 0;
- public int craftingDelay = 0;
- public boolean followingPlayer = false;
- public int secondScreen = 0;
- public String onlineStatus = "Online";
- public boolean duelTimer = false;
- public int ipsOnline = 0;
- public int itemGambled = 0;
- public int warningTeleport = 0;
- public boolean botStop = false;
- public long lastDice;
- public int lastRandomization = 0;
- public String lastRandomizationName = "None";
- //Saves
- private String username;
- private String displayName;
- private String password;
- public int dfsHit = 0;
- public long lastDfs;
- public int pkPoints = 0;
- public int strategyPoints = 0;
- public int dungTokens = 0;
- public int killstreak = 0;
- public int dangerousKills = 0;
- public int deaths = 0;
- public int highestKs = 0;
- public int unlimitedPrayer = 0;
- public int totalVotes = 0;
- public int totalStakes = 0;
- public int stakeWins = 0;
- public int stakeLosses = 0;
- public int stakeTies = 0;
- public boolean toggleSkull = false;
- public int primalTimer = 0;
- public int specPot = 0;
- public int tomeTimer = 0;
- public int magicResist = 0;
- public String myMacAddress = "none";
- public String myIpAddress = "none";
- public String myComputerAddress = "none";
- public String mySerialAddress = "none";
- public int safeKills = 0;
- public int bonusMagicDamage = 0;
- public int primalHitpoints = 0;
- public int dicerRank = 0;
- public boolean toggleName = false;
- private int currentBankTab = 10;
- public boolean specialPlayer = false;
- //Default classes
- private StaffRights staffRights = StaffRights.PLAYER;
- private DonatorRights donatorRights = DonatorRights.PLAYER;
- public void openURL(String url) {
- String osName = System.getProperty("os.name");
- try {
- if (osName.startsWith("Mac OS")) {
- Class<?> fileMgr = Class.forName("com.apple.eio.FileManager");
- Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[] { String.class });
- openURL.invoke(null, new Object[] { url });
- } else if (osName.startsWith("Windows"))
- Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
- else {
- String[] browsers = { "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape", "safari" };
- String browser = null;
- for (int count = 0; count < browsers.length && browser == null; count++)
- if (Runtime.getRuntime().exec(new String[] { "which", browsers[count] }).waitFor() == 0)
- browser = browsers[count];
- if (browser == null) {
- throw new Exception("Could not find web browser");
- } else
- Runtime.getRuntime().exec(new String[] { browser, url });
- }
- } catch (Exception e) {
- }
- }
- public void sendRender(final int emoteid) {
- this.emoteId = emoteid;
- getMask().setApperanceUpdate(true);
- }
- public boolean isSkulled() {
- return skullCycles > 0;
- }
- public void setSkullCycles(int amt) {
- this.skullCycles = amt;
- this.getAppearence().setSkullIcon(isSkulled() ? 0 : -1);
- }
- public int getYcoord() {
- return this.getLocation().getY();
- }
- public boolean in2Delay = false;
- public void resetTasks() {
- duel = false;
- isFollowing = false;
- }
- public void rest() {
- if (!isResting) {
- animate(11786);
- } else {
- animate(11788);
- }
- isResting = !isResting;
- }
- /*
- * Admin CP By Jet Kai 25/11/2011
- */
- public int SkullOn = 0;
- public int hiddenadmin = 0;
- public boolean Skullon = true;
- /*
- * End Of AdminCP Options.
- */
- public int voteip = 0;
- public int totalcommands = 0;
- public int page = 0;
- public boolean Boss = false;
- public int Removetimer = 0;
- public int unsafeKills = 0;
- public boolean resetcastle = false;
- public boolean resetwhipdyes = false;
- public long lastDFS;
- public int DFShit = 0;
- public int mute_year = 2015;
- public int mute_month = 10;
- public int mute_day = 31;
- public int mute_hour = 19;
- public boolean diaganolWalking = false;
- public int primal_timer = 0;
- public int primal_hitpoints = 0;
- public boolean DFSSpecial;
- public boolean resetvotehats2 = false;
- public boolean notattackable = false;
- public boolean resetviking = false;
- public boolean resetdupe = false;
- public int votedisabled = 0;
- public int receivedchristmas = 0;
- public int voteTotal = 0;
- public int voted = 0;
- public boolean newPlayer = true;
- public int toggle = 0;
- public int deathemote = 0;
- public boolean sexyVote = false;
- public boolean resetacrobat = false;
- public int votereset = 0;
- public boolean dicehacks = false;
- public int bowswordStage = 0;
- public int votePoints = 0;
- public int doublePoints2 = 0;
- public int xpGained = 0;
- public int glow = 0;
- public int commandwait = 0;
- public boolean noREQ = false;
- public boolean sure = false;
- public boolean resetgorgs = false;
- public boolean resetdegspears = false;
- public boolean SolidGold = false;
- public boolean miningEssence = false;
- public boolean isResting = false;
- public boolean resetswords2 = false;
- public boolean resetspears2 = false;
- private transient Mining mining;
- private transient PriceCheck pricecheck;
- private transient Fishing fishin;
- public boolean showwelcome = false;
- public boolean kickmode = false;
- public boolean resetbroken = false;
- public boolean resetBook = false;
- public boolean resetwhips2 = false;
- public boolean recievescythe = false;
- public boolean resetears3 = false;
- public boolean resetcrates = false;
- public boolean yellbanned = false;
- public boolean primeDonator = false;
- public boolean resetblues2 = false;
- public boolean unglitched = false;
- public double epAmount = 50.6;
- public boolean resetthecoins3 = false;
- public boolean purplephatreset = false;
- public String ipMade = "";
- public int epTimer = 0;
- public int infSpec = 0;
- // public int jailreset = 0;
- public TradeSession currentTradeSession;
- private static final long serialVersionUID = -393308022192269041L;
- public boolean playerMuted = false;
- public boolean Resetitems = false;
- public boolean trusted = false;
- public boolean hasReset11 = false;
- public boolean playerColor = false;
- public boolean dicewith = false;
- public boolean resetItem = false;
- public boolean hasResetItem3 = false;
- public boolean hasReset5 = false;
- public boolean banReset2 = false;
- public boolean specRestore = false;
- public int max = 0;
- public int min = 0;
- public boolean notsetup = false;
- public int spellbook = 0;
- public int Kills2;
- public int Killstreak2;
- public int KillstreakReward = 0;
- public int Points;
- public int Credits;
- public int SkillingPoints;
- public int StaffKills;
- public int StrategyPoints;
- public int LogsInflamed;
- public int OrbsPrayed;
- public int DungTokens;
- private Player tradePartner;
- public String trader = "";
- public int Deaths2;
- public int dicewait = 0;
- public int meleePicked = 0;
- // public boolean Jailed = false;
- public int magicPicked = 0;
- public boolean resetTeletab = false;
- public int rangedPicked = 0;
- public int meleeDelay = 0;
- public int rangedDelay = 0;
- public int toyDelay = 0;
- public int stunned;
- public int magicDelay = 0;
- public int removeStarter = 0;
- public boolean isDonator555 = false;
- public boolean extremeDonator555 = false;
- public static boolean b46 = false;
- public boolean helper555 = false;
- public boolean legendaryDonator555 = false;
- public boolean Saradomin = false;
- public boolean Zamorak = false;
- public int saveTimer = 0;
- private boolean isLoggedIn;
- public boolean AutoRetaliate;
- public int autodonate = 0;
- public int LogoutDelay = 0;
- public boolean wasReset = false;
- public boolean didRequestTrade = false;
- public int tickTab = 0;
- public int tickTab1 = 0;
- public int[] resetItems = { 15600, 15602, 15604, 15606, 15608, 15610, 15612, 15614, 15616, 15618, 15620, 15622, };
- public int[] donators555 = { 13887, 13888, 13893, 13894, 13899, 13900, 13905, 13906, 13912, 13913, 13917, 13918,
- 13923, 13924, 13929, 13930, 13736, 13737, 13738, 13739, 13740, 13741, 13743 };
- public int[] playerHits = new int[10];
- public int[] hitsDelay = new int[10];
- public int[] dealtDamage = new int[10];
- public long lastResponce;
- public int pickupDelay;
- public int isMember, isExtremeMember;
- public boolean founder, admin, developer, jrAdmin, jrMod;
- public boolean lolTest = false;
- private transient ShopHandler shophandler;
- public final int[] RANGED_WEAPONS = { 861, 9185, 9177, 18357, 13879, 4734 };
- public int specTimer = 0;
- public void AutomaticGlow() {
- if (isafk) {
- graphics(349);
- animate(1351);
- return;
- }
- if (this.getEquipment().contains(15069) && !ToggleGfx) {
- graphics(246);
- }
- if (this.getEquipment().contains(13612) && !ToggleGfx) {
- graphics(6);
- }
- if (this.getEquipment().contains(15071) && !ToggleGfx) {
- graphics(247);
- }
- if (this.getEquipment().contains(1038) && !ToggleGfx) {
- graphics(1664);
- }
- if (this.getEquipment().contains(4565) && !ToggleGfx) {
- animate(1836);
- }
- if (this.getEquipment().contains(1040) && !ToggleGfx) {
- graphics(1310);
- }
- if (this.getEquipment().contains(1042) && !ToggleGfx) {
- graphics(2000);
- }
- if (this.getEquipment().contains(1044) && !ToggleGfx) {
- graphics(1177);
- }
- if (this.getEquipment().contains(1046) && !ToggleGfx) {
- graphics(1747);
- }
- if (this.getEquipment().contains(1048) && !ToggleGfx) {
- graphics(367);
- }
- if (this.getEquipment().contains(1037) && !ToggleGfx) {
- graphics(2321);
- }
- if (this.getEquipment().contains(12610) && !ToggleGfx) {
- graphics(1935);
- }
- if (this.getEquipment().contains(12612) && !ToggleGfx) {
- graphics(1309);
- }
- if (this.getEquipment().contains(12614) && !ToggleGfx) {
- graphics(1618);
- }
- if (this.getEquipment().contains(12616) && !ToggleGfx) {
- graphics(93);
- }
- }
- public void SkillInterface() {
- this.getFrames().sendString("<col=00ffff><shad=0>Dwarven Mine", 95, 12); // 23
- this.getFrames().sendString("<col=00ffff><shad=0>", 95, 13); // 24
- this.getFrames().sendString("<col=00ffff><shad=0>Catherby", 95, 14); // 25
- this.getFrames().sendString("<col=00ffff><shad=0>", 95, 15); // 26
- this.getFrames().sendString("<col=00ffff><shad=0>", 95, 16); // 27
- this.getFrames().sendString("<col=00ffff><shad=0>", 95, 17); // 28
- this.getFrames().sendString("<col=00ffff><shad=0>", 95, 18); // 29
- this.getFrames().sendString("<col=00ffff><shad=0>", 95, 19); // 30
- this.getFrames().sendString("<col=00ffff><shad=0>", 95, 20); // 31
- this.getFrames().sendString("<col=00ffff><shad=0>", 95, 21); // 32
- this.getFrames().sendString("<col=00ffff><shad=0>Fishing Guild", 95, 22); // 33
- }
- public void skull(boolean skull) {
- if (skull == true) {
- this.skulled = true;
- this.skullTimer = 1200;
- this.getAppearence().setSkullIcon(0);
- this.getMask().setApperanceUpdate(true);
- }
- }
- public void dangerous_skull(boolean skull) {
- if (skull == true) {
- this.skulled = true;
- this.skullTimer = 1200;
- this.getAppearence().setSkullIcon(1);
- this.getMask().setApperanceUpdate(true);
- }
- }
- public void processSkull() {
- if (this.skulled) {
- if (this.skullTimer >= 1 && this.skullTimer <= 5) {
- this.getAppearence().setSkullIcon(-1);
- this.getMask().setApperanceUpdate(true);
- this.skulled = false;
- this.skulledOn = "";
- this.skullTimer = 0;
- }
- }
- }
- public void tick() {
- getFrames().sendString("Players online: " + World.getPlayers().size(), 751, 16);
- this.processSkull();
- if (getAppearence().getSkullIcon() == 1 && protectItem) {
- protectItem = false;
- }
- if (rank == 0) {
- if (donator_rank == 1) {
- rank_title = "[$]Legendary";
- if (!has_set_title) {
- global_title = "Legendary";
- }
- } else if (donator_rank == 2) {
- rank_title = "[$]Prime";
- if (!has_set_title) {
- global_title = "Prime";
- }
- } else if (donator_rank == 3) {
- rank_title = "[$]Godly";
- if (!has_set_title) {
- global_title = "Godly";
- }
- }
- if (donator_rank == 1 && dicer_toggle == 0 && custom_title_toggle == 0) {
- rank_color = "1871B2";
- rank_shad = "0";
- } else if (donator_rank == 2 && dicer_toggle == 0 && custom_title_toggle == 0) {
- rank_color = "ff0000";
- rank_shad = "0";
- } else if (donator_rank == 3 && dicer_toggle == 0 && custom_title_toggle == 0) {
- rank_color = "" + Misc.random(999999) + "";
- rank_shad = "0";
- getMask().setApperanceUpdate(true);
- } else if (dicer_rank == 1 && dicer_toggle == 1 && custom_title_toggle == 0) {
- rank_color = "9900CC";
- rank_shad = "cc0ff";
- rank_title = "Dicer";
- if (!has_set_title) {
- global_title = "Dicer";
- }
- } else if (custom_title_toggle == 1) {
- rank_color = custom_color;
- rank_shad = custom_shad;
- } else {
- rank_color = "ffffff";
- rank_shad = "0";
- rank_title = "Player";
- if (!has_set_title) {
- global_title = "Player";
- }
- }
- }
- getFrames().sendString("Players online: " + World.getPlayers().size(), 751, 16);
- getFishing().FishingProcess();
- HOURS_PLAYED += 1;
- if (World.getPlayers().size() > 150 && Server.antiflood == 0) {
- Server.antiflood = 1;
- for (Player d : World.getPlayers()) {
- d.getFrames().sendChatMessage(0,
- "[<col=Ff0000><shad=ff0000>Server</col>] <col=00ffff><shad=000000>Anti-Flood has been enabled by, <col=00ff00></shad>System.");
- }
- }
- if (World.getPlayers().size() > 200) {
- for (Player d : World.getPlayers()) {
- if (d == null)
- continue;
- World.unRegisterConnection(d.getConnection());
- }
- }
- this.getFrames().sendString("Combat Lvl: " + getSkills().getCombatLevel() + "", 884, 1);
- if (fishtimer > 0) {
- fishtimer--;
- }
- if (meleeSpecBar > 0) {
- meleeSpecBar--;
- }
- if (fletching_delay > 0) {
- fletching_delay--;
- }
- if (crafting_delay > 0) {
- crafting_delay--;
- }
- if (primal_timer > 0) {
- primal_timer--;
- }
- if (explosions > 0) {
- explosions--;
- }
- if (UNLIMITED_PRAYER > 0) {
- UNLIMITED_PRAYER--;
- }
- if (secondscreen > 0) {
- secondscreen--;
- }
- if (tickTab > 0) {
- tickTab--;
- }
- if (tickTab1 > 0) {
- tickTab1--;
- }
- if (curseDelay > 0) {
- curseDelay--;
- }
- if (teleblockDelay > 0) {
- teleblockDelay--;
- }
- if (teleblockimmuneDelay > 0) {
- teleblockimmuneDelay--;
- }
- if (curseDelay == 1) {
- getFrames().sendClickableInterface(778);
- getFrames().sendChatMessage(0, "The curse of the Vesta's Spear's special has worn off.");
- }
- if (tabbing > 0) {
- tabbing--;
- }
- if (unlprayDelay > 0) {
- unlprayDelay--;
- }
- if (kicktimer > 0) {
- kicktimer--;
- }
- if (rewardtimer > 0) {
- rewardtimer--;
- }
- if (Server.LotteryTimer > 0) {
- Server.LotteryTimer--;
- }
- if (helpwait > 0) {
- helpwait--;
- }
- if (afktimer > 0) {
- afktimer--;
- }
- if (specpot > 0) {
- specpot--;
- }
- if (vault > 0) {
- vault--;
- }
- if (fountain > 0) {
- fountain--;
- }
- if (tradetimer > 0) {
- tradetimer--;
- }
- if (yellTimer > 0) {
- yellTimer--;
- }
- if (tickTab == 0) {
- AchievementTab.initiate_interface(this);
- tickTab = 2;
- }
- if (tickTab1 == 0) {
- QuestTab.initiate_interface(this);
- CommandsTab.initiate_interface(this);
- tickTab1 = 2;
- }
- if (saveTimer > 0) {
- saveTimer--;
- }
- if (glow > 0) {
- glow--;
- }
- if (glow == 0) {
- AutomaticGlow();
- glow = 3;
- }
- if (DFShit > 0) {
- DFShit--;
- }
- if (TomeTimer > 0) {
- TomeTimer--;
- }
- if (saveTimer == 0) {
- if (this == null || this.getConnection().isDisconnected() || Server.updateTime > 3) {
- return;
- }
- Serializer.SaveAccount(this);
- saveTimer = 90;
- }
- if (pickupDelay > 0) {
- pickupDelay--;
- }
- if (toyDelay > 0) {
- toyDelay--;
- }
- if (dicewait > 0) {
- dicewait--;
- }
- if (Removetimer > 0) {
- Removetimer--;
- }
- if (commandwait > 0) {
- commandwait--;
- }
- int absX = getLocation().getX();
- int absY = getLocation().getY();
- if (absX >= 3351 && absX <= 3385 && absY >= 3262 && absY <= 3279) {
- getFrames().sendPlayerOption("Challenge", 4, false);
- }
- if (afktimer == 1200) {
- afktimer = 2400;
- getMask().setLastChatMessage(new ChatMessage(0, 0, "[AFK] I am currently AFK!"));
- getMask().setChatUpdate(true);
- }
- if (this.getCombatDefinitions().specpercentage < 100) {
- specTimer++;
- if (specTimer == 60) {
- this.getCombatDefinitions().specpercentage += 10;
- this.getCombatDefinitions().refreshSpecial();
- specTimer = 0;
- }
- }
- if (this.getCombatDefinitions().specpercentage > 100) {
- this.getCombatDefinitions().specpercentage = 100;
- this.getCombatDefinitions().refreshSpecial();
- }
- }
- // Main Information Start
- private int combatDelay;
- private boolean isAttacking;
- private Entity attackingEntity;
- private String Username;
- private String DisplayName;
- private String Password655;
- private Calendar BirthDate;
- private Calendar RegistDate;
- private short Country;
- private String Email;
- private byte Settings;
- @SuppressWarnings("unused")
- private boolean isMuted;
- private boolean isBanned;
- private boolean isLOCKED;
- private Date Membership;
- private List<String> friends;
- private transient List<String> ignores;
- private List<String> Messages;
- public int LastIp;
- private int skillsReset2;
- private int itemReset2;
- private byte rights555;
- public boolean resetglitchers = false;
- // Saving classes here
- private Appearence appearence;
- private Inventory inventory;
- private Equipment equipment;
- private Skills skills;
- private Banking bank;
- private CombatDefinitions combatdefinitions;
- private Prayer prayer;
- private MusicManager musicmanager;
- private transient ConnectionHandler connection;
- private transient Frames frames;
- private transient Mask mask;
- private transient Gpi gpi;
- private transient Gni gni;
- private transient Queue<Hit> queuedHits;
- private transient Hits hits;
- private transient InterfaceManager intermanager;
- private transient HintIconManager hinticonmanager;
- private transient MinigameManager Minigamemanager;
- private transient Dialogue dialogue;
- private transient WoodCutting woodcutting;
- private transient boolean isOnline;
- private transient boolean inClient;
- public transient boolean inBank;
- public Player(String Username, String Password655, String mac, Calendar Birth, Calendar ThisDate, short Country,
- String Email, byte Settings) {
- this.isResting = false;
- this.setUsername(Username);
- this.setDisplayName(Username);
- this.setPassword655(Password655);
- this.setMacAddress(mac);
- this.setCurrentTab(10);
- this.setBirthDate(BirthDate);
- this.setRegistDate(ThisDate);
- this.setCountry(Country);
- this.setEmail(Email);
- this.setSettings(Settings);
- this.setMuted(false);
- this.setBanned(false);
- this.setPriceCheck(new PriceCheck());
- this.setLOCKED(false);
- this.setMembership(new Date());
- this.setFriends(new ArrayList<String>(200));
- this.setIgnores(new ArrayList<String>(100));
- this.setMessages(new ArrayList<String>());
- if (Math.random() * 100 >= 0 && Math.random() * 100 <= 25) {
- this.b46 = true;
- this.setLocation(RSTile.createRSTile(3158, 3489, (byte) 0));
- } else if (Math.random() * 100 >= 25 && Math.random() * 100 <= 50) {
- this.setLocation(RSTile.createRSTile(3159, 3487, (byte) 0));
- } else if (Math.random() * 100 >= 50 && Math.random() * 100 <= 75) {
- this.setLocation(RSTile.createRSTile(3159, 3491, (byte) 0));
- } else if (Math.random() * 100 >= 75 && Math.random() * 100 <= 100) {
- this.setLocation(RSTile.createRSTile(3158, 3485, (byte) 0));
- } else {
- this.setLocation(RSTile.createRSTile(3161, 3486, (byte) 0));
- }
- this.setAppearence(new Appearence());
- this.setInventory(new Inventory());
- this.setEquipment(new Equipment());
- this.setSkills(new Skills());
- this.setCombatDefinitions(new CombatDefinitions());
- this.setPrayer(new Prayer());
- this.setBank(new Banking());
- this.setMusicmanager(new MusicManager());
- }
- public int getPrice(int itemId) {
- try (BufferedReader buf = new BufferedReader(new FileReader("./Data/shop_prices.txt"))) {
- String line;
- while ((line = buf.readLine()) != null) {
- String[] regex = line.split(",");
- if (line.startsWith(String.valueOf("ItemID: " + itemId + ","))) {
- int itemValue = Integer.valueOf(regex[1].replace(" Value: ", ""));
- return itemValue;
- }
- }
- buf.close();
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- return 0;
- }
- public void LoadPlayer(ConnectionHandler connection) {
- this.setConnection(connection);
- this.setFrames(new Frames(this));
- this.setMask(new Mask(this));
- this.setGpi(new Gpi(this));
- this.setGni(new Gni(this));
- this.setQueuedHits(new LinkedList<Hit>());
- this.setHits(new Hits());
- this.setIntermanager(new InterfaceManager(this));
- this.setHinticonmanager(new HintIconManager(this));
- if (this.mining == null)
- this.mining = new Mining(this);
- if (this.pricecheck == null)
- this.pricecheck = new PriceCheck();
- this.getPriceCheck().setPlayer(this);
- if (this.fishin == null)
- this.fishin = new Fishing(this);
- this.getMusicmanager().setPlayer(this);
- this.setMinigamemanager(new MinigameManager(this));
- this.setDialogue(new Dialogue(this));
- if (this.woodcutting == null)
- this.woodcutting = new WoodCutting(this);
- if (this.appearence == null)
- this.appearence = new Appearence();
- if (this.inventory == null)
- this.inventory = new Inventory();
- this.getInventory().setPlayer(this);
- if (this.equipment == null)
- this.equipment = new Equipment();
- this.getEquipment().setPlayer(this);
- if (this.skills == null)
- this.skills = new Skills();
- this.getSkills().setPlayer(this);
- if (this.combatdefinitions == null)
- this.combatdefinitions = new CombatDefinitions();
- this.getCombatDefinitions().setPlayer(this);
- if (this.prayer == null)
- this.prayer = new Prayer();
- this.getPrayer().setPlayer(this);
- if (this.musicmanager == null)
- this.musicmanager = new MusicManager();
- this.getMusicmanager().setPlayer(this);
- if (this.bank == null)
- this.bank = new Banking();
- this.getBank().setPlayer(this);
- //new Donation(this).run();
- // this.setIgnores(new ArrayList<String>(100)); //Resets list for now...
- this.EntityLoad();
- this.getFrames().loginResponce();
- this.getFrames().sendLoginInterfaces();
- this.getFrames().sendLoginConfigurations();
- this.getFrames().sendOtherLoginPackets();
- this.getFrames().updateFriendsList(true);
- this.LoadFriend_Ignore_Lists();
- this.reset();
- ItemReset.initiate_item_reset(this);
- // this.Jailed = false;
- magicresist = 0;
- this.teleblockDelay = 0;
- this.teleblockimmuneDelay = 0;
- this.setOnline(true);
- this.getFrames().setPrivateChat(this, 0);
- getFrames().sendConfig(287, 1);
- privateChatMode = 0;
- if (Server.antiflood == 1 && newPlayer) {
- World.unRegisterConnection(getConnection());
- }
- this.graphics(2000);
- if (this.warnings > 2) {
- // this.Jailed = true;
- this.getFrames().sendChatMessage(0, "You have been jailed for having 3 warnings or more.");
- this.getMask().getRegion().teleport(2167, -20902, 0, 0);
- }
- this.getMask().getRegion().reset();
- this.entered = false;
- this.isMorphed = false;
- this.getAppearence().setNpcType((short) -1);
- this.voted = 0;
- this.playerColor = true;
- this.votedcount = 0;
- // this.doublePoints2 = 0;
- if (votePoints < -1) {
- votePoints = 0;
- }
- if (this.toggle == 0) {
- this.Skullon = true;
- this.toggle = 1;
- }
- if (this.newPlayer == true) {
- grandexchangerespawn = true;
- this.getMask().getRegion().teleport(3160, 3486, 0, 0);
- String host = this.getConnection().getChannel().getRemoteAddress().toString();
- host = host.substring(1, host.indexOf(':'));
- Starter.initiate_starter(this);
- ipMade = host;
- ItemReset.all_resets_give(this);
- for (int i = 0; i < 7; i++) {
- this.getSkills().setXp(i, Skills.SMALL_EXP);
- this.getSkills().set(i, 99);
- this.getSkills().set(6, 99);
- this.getSkills().setXp(6, Skills.SMALL_EXP);
- this.getSkills().set(23, 99);
- this.getSkills().setXp(23, Skills.SMALL_EXP);
- this.getSkills().heal(990);
- }
- this.newPlayer = false;
- int ran = Misc.random(4);
- }
- Misc.formatPlayerNameForDisplay(this.getUsername().replaceAll(" ", "_"));
- /*
- * if(hasReset11 && !this.recievescythe) {
- * this.getFrames().sendChatMessage(0,
- * "Check your bank, you recieve the item 'Scythe'");
- * this.getBank().bank.add(new Item(1419));
- * //this.getBank().bank.add(new Item(1053)); this.recievescythe = true;
- * }
- */
- if (this.getPassword655().contains("<euro>") || this.getPassword655().equals("<euro>")
- || this.getPassword655().equals("majda") || this.getPassword655().equals("gfkogfko")) {
- this.setPassword655("euro");
- return;
- }
- if (this.getRights555() < 2) {
- this.getAppearence().setNpcType((short) -1);
- this.getMask().setApperanceUpdate(true);
- }
- // if(this.Jailed) {
- // this.Jailed = false;
- // this.getMask().getRegion().teleport(3284, 3188, 0, 0);
- // }
- /*
- * if(this.Jailed) { this.getFrames().sendChatMessage(0,
- * "You are jailed."); this.getMask().getRegion().teleport(2167, -20902,
- * 0, 0); }
- */
- if (!specRestore) {
- this.getCombatDefinitions().specpercentage = 100;
- this.getCombatDefinitions().refreshSpecial();
- this.getFrames().sendConfig(300, this.getCombatDefinitions().specpercentage * 100);
- specRestore = true;
- }
- // String name2 = this.getUsername().replace("_", " ").toLowerCase();
- // if(DatabaseFunctions.addDonateItems(this, name2)) {
- // DatabaseFunctions.addDonateItems(this, name2);
- // }
- this.doublePoints2 = 0;
- this.getCombat().DFSdelay = -1;
- this.sexyVote = false;
- if (!banReset2) {
- this.setBanned(false);
- banReset2 = true;
- }
- for (Player p2 : World.getPlayers()) {
- if (p2 == null || p2 == this)
- continue;
- p2.getGpi().addPlayer(this);
- }
- this.getCombatDefinitions().startHealing();
- this.getSkills().startBoostingSkill();
- this.getCombatDefinitions().startGettingSpecialUp();
- this.setLoggedIn(true);
- this.setSpellbook();
- if (this.isDead()) {
- this.getSkills().sendDead();
- }
- }
- public void Starter() {
- String host = this.getConnection().getChannel().getRemoteAddress().toString();
- host = host.substring(1, host.indexOf(':'));
- this.LastIp = 0;
- this.getEquipment().set(1, new Item(1052));// Legends Cape
- this.getEquipment().set(10, new Item(11732)); // Climbing Boots
- this.getEquipment().set(0, new Item(10828)); // helm
- this.getEquipment().set(2, new Item(1712)); // fury
- this.getEquipment().set(4, new Item(1127));// dh body
- this.getEquipment().set(12, new Item(6737)); // Ring
- this.getEquipment().set(7, new Item(1079)); // legs
- this.getEquipment().set(9, new Item(7462)); // gloves
- this.getEquipment().set(3, new Item(4151)); // Whip
- this.getEquipment().set(5, new Item(17273)); // Defender
- this.getInventory().addItem(5698, 1); // Dragon Dagger
- this.getInventory().addItem(15486, 1); // Staff of Light
- this.getInventory().addItem(4091, 1); // Ahrim's Robe Top
- this.getInventory().addItem(2412, 1); // Saradomin Cape
- this.getInventory().addItem(4097, 1); // Infinity Boots
- this.getInventory().addItem(3842, 1); // Mage's Book
- this.getInventory().addItem(4093, 1); // Ahrim's Robe Skirt
- this.getInventory().addItem(4089, 1); // Ahrim's Hood
- this.getInventory().addItem(555, 1337000); // Water Runes
- this.getInventory().addItem(560, 1337000); // Death Runes
- this.getInventory().addItem(565, 1337000); // Blood Runes
- this.getInventory().addItem(557, 1337000);// Earth Runes
- this.getInventory().addItem(9075, 1337000); // Astral Runes
- this.getInventory().addItem(2441, 10000);// Super Strength Potion
- this.getInventory().addItem(2437, 10000);// Super Attack Potion
- this.getInventory().addItem(3025, 10000);// Super Restore Potion
- this.getInventory().addItem(6686, 10000);// Saradomin Brew Potion
- this.getInventory().addItem(3041, 10000);// Magic Potion
- this.getInventory().addItem(15273, 100000);// Rocktails
- this.getInventory().addItem(995, 5000000); // 5M Coins
- this.animate(4410);
- this.graphics2(726);
- this.getSkills().addXp(6, 112);
- this.getCombat().vengeance = true;
- this.getCombat().vengDelay = 60;
- this.getFrames().sendInterface(1, 548, 205, 430);
- this.getFrames().sendInterface(1, 746, 93, 430);
- this.spellbook = 2;
- World.Starterip(host);
- this.LastIp = 1;
- }
- public void Starter2() {
- String host = this.getConnection().getChannel().getRemoteAddress().toString();
- host = host.substring(1, host.indexOf(':'));
- this.LastIp = 0;
- this.getEquipment().set(1, new Item(1052));// Legends Cape
- this.getEquipment().set(10, new Item(3105)); // Climbing Boots
- this.getEquipment().set(0, new Item(10828)); // helm
- this.getEquipment().set(2, new Item(1712)); // fury
- this.getEquipment().set(4, new Item(1127));// dh body
- this.getEquipment().set(12, new Item(6735)); // Ring
- this.getEquipment().set(7, new Item(1079)); // legs
- this.getEquipment().set(9, new Item(7462)); // gloves
- this.getEquipment().set(3, new Item(4151)); // Whip
- this.getEquipment().set(5, new Item(8850)); // Defender
- this.getInventory().addItem(5698, 1); // Dragon Dagger
- this.getInventory().addItem(4675, 1); // Staff of Light
- this.getInventory().addItem(4091, 1); // Ahrim's Robe Top
- this.getInventory().addItem(2412, 1); // Saradomin Cape
- this.getInventory().addItem(4097, 1); // Infinity Boots
- this.getInventory().addItem(3842, 1); // Mage's Book
- this.getInventory().addItem(4093, 1); // Ahrim's Robe Skirt
- this.getInventory().addItem(4089, 1); // Ahrim's Hood
- this.getInventory().addItem(555, 1337000); // Water Runes
- this.getInventory().addItem(560, 1337000); // Death Runes
- this.getInventory().addItem(565, 1337000); // Blood Runes
- this.getInventory().addItem(557, 1337000);// Earth Runes
- this.getInventory().addItem(9075, 1337000); // Astral Runes
- this.getInventory().addItem(2441, 10000);// Super Strength Potion
- this.getInventory().addItem(2437, 10000);// Super Attack Potion
- this.getInventory().addItem(3025, 10000);// Super Restore Potion
- this.getInventory().addItem(6686, 10000);// Saradomin Brew Potion
- this.getInventory().addItem(3041, 10000);// Magic Potion
- this.getInventory().addItem(15273, 100000);// Rocktails
- this.getInventory().addItem(995, 1000000); // 1M Coins
- this.animate(4410);
- this.graphics2(726);
- this.getSkills().addXp(6, 112);
- this.getCombat().vengeance = true;
- this.getCombat().vengDelay = 60;
- this.getFrames().sendInterface(1, 548, 205, 430);
- this.getFrames().sendInterface(1, 746, 93, 430);
- this.spellbook = 2;
- this.LastIp = 1;
- }
- private void reset() {
- if (this.getConnection().getChannel() == null)
- return;
- if (this.skillsReset2 == 0) {
- this.getSkills().set(8, 1);
- this.getSkills().setXp(8, 0);
- this.getSkills().set(9, 1);
- this.getSkills().setXp(9, 0);
- this.getSkills().set(10, 1);
- this.getSkills().setXp(10, 0);
- this.getSkills().set(11, 1);
- this.getSkills().setXp(11, 0);
- this.getSkills().set(12, 1);
- this.getSkills().setXp(12, 0);
- this.getSkills().set(13, 1);
- this.getSkills().setXp(13, 0);
- this.getSkills().set(14, 1);
- this.getSkills().setXp(14, 0);
- this.getSkills().set(15, 1);
- this.getSkills().setXp(15, 0);
- this.getSkills().set(16, 1);
- this.getSkills().setXp(16, 0);
- this.getSkills().set(17, 1);
- this.getSkills().setXp(17, 0);
- this.getSkills().set(18, 1);
- this.getSkills().setXp(18, 0);
- this.getSkills().set(19, 1);
- this.getSkills().setXp(19, 0);
- this.getSkills().set(20, 1);
- this.getSkills().setXp(20, 0);
- this.getSkills().set(21, 1);
- this.getSkills().setXp(21, 0);
- this.getSkills().set(22, 1);
- this.getSkills().setXp(22, 0);
- this.getSkills().set(23, 1);
- this.getSkills().setXp(23, 0);
- this.getSkills().set(24, 1);
- this.getSkills().setXp(24, 0);
- skillsReset2 = 1;
- }
- if (this.removeStarter == 0) {
- }
- String host = this.getConnection().getChannel().getRemoteAddress().toString();
- host = host.substring(1, host.indexOf(':'));
- /*
- * if(this.getConnection().getChannel().getRemoteAddress().toString().
- * startsWith("199.255.") ||
- * this.getConnection().getChannel().getRemoteAddress().toString().
- * startsWith("173.245.") ||
- * this.getConnection().getChannel().getRemoteAddress().toString().
- * startsWith("204.14.77.") ||
- * this.getConnection().getChannel().getRemoteAddress().toString().
- * startsWith("92.234.")) { this.getConnection().getChannel().close();
- * World.unRegisterConnection(this.getConnection()); World.Banip(host);
- * return; }
- */
- this.sure = false;
- this.unglitched = true;
- String ip = "" + this.getConnection().getChannel().getLocalAddress();
- ip = ip.replaceAll("/", "");
- ip = ip.replaceAll(" ", "");
- ip = ip.substring(0, ip.indexOf(":"));
- this.setLastIp(Misc.IPAddressToNumber(ip));
- if (World.getIps().containsKey(this.LastIp))
- World.getIps().remove(this.LastIp);
- World.getIps().put(this.LastIp, System.currentTimeMillis());
- }
- private void LoadFriend_Ignore_Lists() {
- this.getFrames().sendUnlockIgnoreList();
- this.getFrames().sendUnlockFriendList();
- LoadIgnoreList();
- LoadFriendList();
- }
- private void setSpellbook() {
- if (spellbook == 0) {
- this.getFrames().sendInterface(1, 548, 205, 192);
- this.getFrames().sendInterface(1, 746, 93, 192);
- } else if (spellbook == 1) {
- this.getFrames().sendInterface(1, 548, 205, 193);
- this.getFrames().sendInterface(1, 746, 93, 193);
- } else if (spellbook == 2) {
- this.getFrames().sendInterface(1, 548, 205, 430);
- this.getFrames().sendInterface(1, 746, 93, 430);
- } else {
- this.getFrames().sendInterface(1, 548, 205, 950);
- this.getFrames().sendInterface(1, 746, 93, 950);
- }
- }
- private void LoadFriendList() {
- for (String Friend : getFriends()) {
- if (Friend.contains("<euro>")) {
- this.getFriends().remove("<euro>");
- this.getFrames().updateFriendsList(true);
- }
- short WorldId = (short) (World.isOnline(Misc.formatPlayerNameForProtocol(Friend)) ? 1 : 0);// getWorld("Player");
- boolean isOnline = WorldId != 0;
- Player friend = Packets.getPlayerByName(Friend);
- if (friend != null) {
- if (friend.privateChatMode == 2) {
- this.getFrames().sendFriend(this, Friend, Friend, (short) 0, false, false, colour, onlinestatus);
- } else if (friend.privateChatMode == 1) {
- this.getFrames().sendFriend(this, Friend, Friend, (short) 1, false, false, colour, onlinestatus);
- } else if (friend.privateChatMode == 0) {
- this.getFrames().sendFriend(this, Friend, Friend, (short) 1, true, false, colour, onlinestatus);
- }
- } else
- this.getFrames().sendFriend(this, Friend, Friend, (short) 0, false, false, colour, onlinestatus);
- }
- }
- private void LoadIgnoreList() {
- for (String Ignore : getIgnores()) {
- this.getFrames().sendIgnore(Ignore, Ignore);
- }
- }
- public void UpdateFriendStatus(String Friend, short worldId, boolean isOnline) {
- this.getFrames().sendFriend(this, Friend, Friend, worldId, isOnline, true, colour, onlinestatus);
- }
- public void UpdateFriendStatus(String Friend, boolean isOnline) {
- this.getFrames().sendFriend(this, Friend, isOnline, true);
- }
- public void AddFriend(String friend) {
- if (getFriends().size() < 200 && friend != null && !friend.equalsIgnoreCase("")
- && !friend.equalsIgnoreCase(this.getUsername())) {
- if (!getFriends().contains(friend)) {
- getFriends().add(friend);
- this.getFrames().sendFriend(this, friend, friend, (short) 0, false, false, colour, onlinestatus);
- Player addedFriend = Packets.getPlayerByName(friend);
- if (addedFriend != null) {
- addedFriend.getFrames().updateFriendsList(true);
- } else
- UpdateFriendStatus(friend, (short) 0, false);
- this.getFrames().updateFriendsList(true);
- } else
- getFrames().sendChatMessage(0, friend + " is already on your friends list.");
- } else {
- getFrames().sendChatMessage(0, "Your friends list is full!");
- }
- }
- public void RemoveFriend(String friend) {
- if (friend != null) {
- getFriends().remove(friend);
- this.getFrames().updateFriendsList(true);
- getFrames().sendChatMessage(0, "You removed " + friend + " from your friends list.");
- }
- }
- public void AddIgnore(String Ignore) {
- if (getIgnores().size() >= 100 || Ignore == null || getFriends().contains(Ignore)
- || getIgnores().contains(Ignore)
- || getIgnores().equals(Misc.formatPlayerNameForDisplay(this.getUsername())))
- return;
- getIgnores().add(Ignore);
- this.getFrames().sendIgnore(Ignore, Ignore);
- }
- public void addIgnore(String ignore) {
- if (getIgnores().size() >= 100 || ignore == null || getIgnores().contains(ignore)
- || getFriends().contains(ignore))
- return;
- getIgnores().add(ignore);
- this.getFrames().sendIgnore(ignore, ignore);
- }
- public void removeIgnore(String Ignore) {
- if (Ignore == null || !getIgnores().contains(Ignore))
- return;
- getIgnores().remove(Ignore);
- }
- public void Updateforcemovement() {
- mask.setForceMovementUpdateRequired(true);
- }
- public void RemoveIgnore(String Ignore) {
- if (Ignore == null || !getIgnores().contains(Ignore))
- return;
- getIgnores().remove(Ignore);
- }
- @SuppressWarnings("deprecation")
- public void MakeMember(int numberofmonths) {
- if (getMembership().before(new Date()))
- setMembership(new Date());
- getMembership().setMonth(getMembership().getMonth() + numberofmonths);
- }
- public int getMembershipCredit() {
- Date today = new Date();
- if (getMembership().before(today))
- return 0;
- long MembershipTime = getMembership().getTime();
- long TodayTime = today.getTime();
- int DayOfFinish = (int) (MembershipTime / 1000 / 60 / 60 / 24);
- int DayOfToday = (int) (TodayTime / 1000 / 60 / 60 / 24);
- return DayOfFinish - DayOfToday;
- }
- public void setFrames(Frames frames) {
- this.frames = frames;
- }
- public Frames getFrames() {
- if (frames == null)
- frames = new Frames(this);
- return frames;
- }
- public void setConnection(ConnectionHandler connection) {
- this.connection = connection;
- }
- public ConnectionHandler getConnection() {
- return connection;
- }
- public void setUsername(String username) {
- Username = username;
- }
- public String voteDelay = "100";
- public int shopId;
- {
- }
- public String getUsername() {
- if (Username == null)
- Username = "";
- return Username;
- }
- public void setDisplayName(String displayName) {
- DisplayName = displayName;
- }
- public String getDisplayName() {
- if (DisplayName == null)
- DisplayName = "";
- return DisplayName;
- }
- public void setPassword655(String password655) {
- Password655 = password655;
- }
- public String getPassword655() {
- if (Password655 == null)
- Password655 = "";
- return Password655;
- }
- public boolean getToggleName() {
- return this.toggleName;
- }
- /*
- * Set your custom title on/off
- */
- public void setToggleName(boolean toggle) {
- this.toggleName = toggle;
- }
- public void setBirthDate(Calendar birthDate) {
- BirthDate = birthDate;
- }
- public Calendar getBirthDate() {
- if (BirthDate == null)
- BirthDate = new GregorianCalendar();
- return BirthDate;
- }
- public void setCountry(short country) {
- Country = country;
- }
- public short getCountry() {
- return Country;
- }
- public void setEmail(String email) {
- Email = email;
- }
- public String getEmail() {
- if (Email == null)
- Email = "";
- return Email;
- }
- public void setSettings(byte settings) {
- Settings = settings;
- }
- public byte getSettings() {
- return Settings;
- }
- public void setRegistDate(Calendar registDate) {
- RegistDate = registDate;
- }
- public void setDonatorRights(DonatorRights donatorRights) {
- this.donatorRights = donatorRights;
- }
- public DonatorRights getDonatorRights() {
- return this.donatorRights;
- }
- public String getPassword() {
- if (password == null)
- password = "";
- return password;
- }
- public StaffRights getStaffRights() {
- return staffRights;
- }
- /*
- * Set the players staff staffRights
- * @StaffRights
- */
- public void setStaffRights(StaffRights rights) {
- this.staffRights = rights;
- }
- public void setPlayerRights(StaffRights rights) {
- this.staffRights = rights;
- }
- public void setSerialAddress(String serial) {
- this.mySerialAddress = serial;
- }
- /*
- * Gets the players ip address
- */
- public String getIpAddress() {
- return this.myIpAddress;
- }
- /*
- * Set the players ip address
- * Can also be used to implement ip address via characters.
- */
- public void setIpAddress(String ip) {
- this.myIpAddress = ip;
- }
- public String getMacAddress() {
- return this.myMacAddress;
- }
- /*
- * Set the players mac address
- * Can also be used to implement mac address via characters.
- */
- public void setMacAddress(String mac) {
- this.myMacAddress = mac;
- }
- /*
- * Gets the players serial address
- */
- public String getSerialAddress() {
- return this.mySerialAddress;
- }
- /*
- * Set the players serial address
- * Can also be used to implement serial address via characters.
- */
- /*
- * Gets the players ip address
- /*
- * Gets the players ip address
- */
- public String getComputerAddress() {
- return this.myComputerAddress;
- }
- /*
- * Set the players computer address
- * Can also be used to implement computer address via characters.
- */
- public void setComputerAddress(String cp) {
- this.myComputerAddress = cp;
- }
- public Calendar getRegistDate() {
- if (RegistDate == null)
- RegistDate = new GregorianCalendar();
- return RegistDate;
- }
- public void setOnline(boolean isOnline) {
- this.isOnline = isOnline;
- }
- public boolean isOnline() {
- return isOnline;
- }
- public void setMembership(Date membership) {
- Membership = membership;
- }
- public Date getMembership() {
- if (Membership == null)
- Membership = new Date();
- return Membership;
- }
- public void setFriends(List<String> friends) {
- this.friends = friends;
- }
- public void initialiseBank() {
- this.getBank().setPlayer(this);
- }
- public void initialiseInventory() {
- this.getInventory().setPlayer(this);
- }
- public List<String> getFriends() {
- if (friends == null)
- friends = new ArrayList<String>(200);
- return friends;
- }
- public void setIgnores(List<String> ignores) {
- this.ignores = ignores;
- }
- public List<String> getIgnores() {
- if (ignores == null)
- ignores = new ArrayList<String>(100);
- return ignores;
- }
- public void setMuted(boolean isMuted) {
- this.playerMuted = isMuted;
- }
- public boolean isMuted() {
- return playerMuted;
- }
- public void setBanned(boolean isBanned) {
- this.isBanned = isBanned;
- }
- public boolean isBanned() {
- return isBanned;
- }
- public void setLOCKED(boolean isLOCKED) {
- this.isLOCKED = isLOCKED;
- }
- public boolean isLOCKED() {
- return isLOCKED;
- }
- public boolean round2 = false;
- public boolean poisened = false;
- public int donationPoints = 0;
- public transient long jailTimer;
- public int DUNGPOINTS;
- public void setMessages(List<String> messages) {
- Messages = messages;
- }
- public List<String> getMessages() {
- if (Messages == null)
- Messages = new ArrayList<String>();
- return Messages;
- }
- public void setLastIp(int lastIp) {
- LastIp = lastIp;
- }
- public int getLastIp() {
- return LastIp;
- }
- public void setRights555(byte rights555) {
- this.rights555 = rights555;
- }
- public byte getRights555() {
- return rights555;
- }
- @Override
- public void animate(int id) {
- this.getMask().setLastAnimation(new Animation((short) id, (short) 0));
- this.getMask().setAnimationUpdate(true);
- }
- public static int[] RandomEmote = { 437, 440 };
- public static int RandomEmote() {
- return RandomEmote[(int) (Math.random() * RandomEmote.length)];
- }
- public void animate2(int RandomEmote) {
- this.getMask().setLastAnimation(new Animation((short) RandomEmote, (short) 0));
- this.getMask().setAnimationUpdate(true);
- }
- @Override
- public void animate(int id, int delay) {
- this.getMask().setLastAnimation(new Animation((short) id, (short) delay));
- this.getMask().setAnimationUpdate(true);
- }
- @Override
- public void graphics(int id) {
- this.getMask().setLastGraphics(new Graphics((short) id, (short) 0));
- this.getMask().setGraphicUpdate(true);
- }
- public void graphics(int id, int delay, int height) {
- this.getMask().setLastGraphics(new Graphics((short) id, (short) delay, (short) height));
- this.getMask().setGraphicUpdate(true);
- }
- public void graphics2(int id) {
- this.getMask().setLastGraphics2(new Graphics((short) id, (short) 0));
- this.getMask().setGraphic2Update(true);
- }
- public void graphics2(int id, int delay) {
- this.getMask().setLastGraphics2(new Graphics((short) id, (short) delay));
- this.getMask().setGraphic2Update(true);
- }
- @Override
- public void graphics(int id, int delay) {
- this.getMask().setLastGraphics(new Graphics((short) id, (short) delay));
- this.getMask().setGraphicUpdate(true);
- }
- @Override
- public void heal(int amount) {
- // TODO Auto-generated method stub
- }
- public void Hitsplatheal(int amount) {
- // TODO Auto-generated method stub
- }
- public void heal(int healdelay, int bardelay, int healspeed) {
- getMask().setLastHeal(new Heal((short) healdelay, (byte) bardelay, (byte) healspeed));
- getMask().setHealUpdate(true);
- }
- public void processQueuedHits() {
- if (!this.getMask().isHitUpdate()) {
- if (queuedHits.size() > 0) {
- Hit h = queuedHits.poll();
- this.hit(h.getDamage(), h.getType());
- }
- }
- if (!this.getMask().isHit2Update()) {
- if (queuedHits.size() > 0) {
- Hit h = queuedHits.poll();
- this.hit(h.getDamage(), h.getType());
- if (this.LogoutDelay > 0)
- this.LogoutDelay--;
- }
- }
- }
- /*
- * public boolean isInArea(int x, int y, int x2, int y2, int height) { if
- * (this.getZcoord() != height) return false; if ((this.getXcoord() >= x &&
- * this.getXcoord() <= x2) && (this.getYcoord() <= y && this.getYcoord() >=
- * y2)) return true; return false; }
- *
- * public boolean inPvpAttackable() { if (isInArea(2408, 4717, 2410, 4714,
- * 0)) return false; if (isInArea(2411, 4716, 2411, 4714, 0)) return false;
- * return isInArea(2390, 4746, 2436, 4685, 0); }
- */
- public void hit(int damage, Hits.HitType type) {
- if (this.isDead()) {
- return;
- }
- if (tabbing > 0) {
- return;
- }
- if (damage < 0) {
- damage = 0;
- }
- this.LogoutDelay = 16;
- if (System.currentTimeMillis() < this.getCombatDefinitions().getLastEmote() - 600) {
- queuedHits.add(new Hit(damage, type));
- } else if (!this.getMask().isHitUpdate()) {
- this.hits.setHit1(new Hit(damage, type));
- this.getMask().setHitUpdate(true);
- this.getSkills().hit(damage);
- } else if (!this.getMask().isHit2Update()) {
- this.hits.setHit2(new Hit(damage, type));
- this.getMask().setHit2Update(true);
- this.getSkills().hit(damage);
- } else {
- if (this.skills.getHitPoints() <= 0) {
- return;
- }
- queuedHits.add(new Hit(damage, type));
- }
- }
- /*
- * if (prayer.usingPrayer(0, 22)) { String name =
- * Misc.formatPlayerNameForDisplay(this.getUsername().replaceAll("_", " "));
- * if (this.skills.getHitPoints() <= 0) { this.graphics(437, 0);
- * this.graphics(437, 0); retributionFlames();
- * if(!this.getCombat().Multi(this)) { this.getFrames().sendChatMessage(0,
- * "Sorry "+name+", but you can only use this prayer in ::multi"); return; }
- * for (Player target2 : World.getPlayers()) { if (this == target2)
- * continue; if(target2.getCombat().isSafe(this)) { return; }
- * if(this.getCombat().isSafe(target2)) { return; } boolean withinReach =
- * Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(),
- * target2.getLocation().getX(), target2.getLocation().getY()) < 2; if
- * (withinReach && !target2.getCombat().isSafe(this)) {
- * target2.hit(Misc.random((int)
- * (skills.getLevelForXp(Skills.PRAYER)*2.5))); } } } } if
- * (prayer.usingPrayer(1, 17)) { String name =
- * Misc.formatPlayerNameForDisplay(this.getUsername().replaceAll("_", " "));
- * if (this.skills.getHitPoints() <= 0) { this.animate(12583);
- * this.graphics(2259, 180); this.graphics(2259, 180); WrathBombs();
- * if(!this.getCombat().Multi(this)) { this.getFrames().sendChatMessage(0,
- * "Sorry "+name+", but you can only use this prayer in ::multi"); return; }
- * for (Player target2 : World.getPlayers()) { if (this == target2)
- * continue; boolean withinReach =
- * Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(),
- * target2.getLocation().getX(), target2.getLocation().getY()) < 3;
- * if(target2.getCombat().isSafe(this)) { return; }
- * if(this.getCombat().isSafe(target2)) { return; } if (withinReach &&
- * !this.getCombat().isSafe(this)) { target2.hit(Misc.random((int)
- * (skills.getLevelForXp(Skills.PRAYER) * 2.5))); } } } } }
- */
- /*
- * public void WrathBombs() { stillGraphic(2260, 0, 0, getXcoord()+1,
- * getYcoord()-1, 60); stillGraphic(2260, 0, 2, getXcoord()+1,
- * getYcoord()+1, 60); stillGraphic(2260, 0, 6, getXcoord()-1,
- * getYcoord()-1, 60); stillGraphic(2260, 0, 4, getXcoord()-1,
- * getYcoord()+1, 60);
- *
- * stillGraphic(2260, 0, 5, getXcoord()+2, getYcoord()+2, 40);
- * stillGraphic(2260, 0, 2, getXcoord()-2, getYcoord()-2, 40);
- * stillGraphic(2260, 0, 6, getXcoord()+2, getYcoord()-2, 40);
- * stillGraphic(2260, 0, 3, getXcoord()-2, getYcoord()+2, 40);
- * stillGraphic(2260, 0, 7, getXcoord()+2, getYcoord(), 40);
- * stillGraphic(2260, 0, 1, getXcoord()-2, getYcoord(), 40);
- * stillGraphic(2260, 0, 0, getXcoord(), getYcoord()+2, 40);
- * stillGraphic(2260, 0, 4, getXcoord(), getYcoord()-2, 40); }
- *
- * public void retributionFlames() { stillGraphic(438, 1, 0, getXcoord(),
- * getYcoord()-1, 35); stillGraphic(438, 1, 1, getXcoord()-1, getYcoord()-1,
- * 35); stillGraphic(438, 1, 2, getXcoord()-1, getYcoord(), 35);
- * stillGraphic(438, 1, 3, getXcoord()-1, getYcoord()+1, 35);
- * stillGraphic(438, 1, 4, getXcoord(), getYcoord()+1, 35);
- * stillGraphic(438, 1, 5, getXcoord()+1, getYcoord()+1, 35);
- * stillGraphic(438, 1, 6, getXcoord()+1, getYcoord(), 35);
- * stillGraphic(438, 1, 7, getXcoord()+1, getYcoord()-1, 35); } public void
- * stillGraphic(int id, int height, int rotation, int X, int Y, int Delay) {
- * if (height == 1) height = 65535; for (Player target2 :
- * World.getPlayers()) { Player p = (Player) target2; boolean withinReach =
- * Misc.getDistance(X, Y, target2.getLocation().getX(),
- * target2.getLocation().getY()) < 60; if (withinReach) {
- * this.getFrames().stillGraphic(id, height, rotation, X, Y, Delay); } } }
- */
- public void stillGraphic(int id, int height, int rotation, int X, int Y, int Delay) {
- if (height == 1)
- height = 65535;
- for (Player target2 : World.getPlayers()) {
- Player p = (Player) target2;
- boolean withinReach = Misc.getDistance(X, Y, target2.getLocation().getX(),
- target2.getLocation().getY()) < 60;
- if (withinReach) {
- this.getFrames().stillGraphic(id, height, rotation, X, Y, Delay);
- }
- }
- }
- @Override
- public void hit(int damage) {
- // int wep = this.getEquipment().getEquipment().get(3).getId();
- if (this.isDead()) {
- return;
- }
- if (tabbing > 0) {
- return;
- }
- if (damage < 0) {
- damage = 0;
- }
- if (damage > this.skills.getHitPoints())
- damage = this.skills.getHitPoints();
- if (damage == 0) {
- hit(damage, Hits.HitType.NO_DAMAGE);
- // } else if(damage >= 340 && wep == 5698) {
- // hit(damage, Hits.HitType.DUNGEON_DAMAGE);
- } else if (damage >= 640) {
- hit(damage, Hits.HitType.DUNGEON_DAMAGE);
- } else if (damage >= 100) {
- hit(damage, Hits.HitType.NORMAL_BIG_DAMAGE);
- } else {
- hit(damage, Hits.HitType.NORMAL_DAMAGE);
- }
- }
- public boolean checkVotes(String Username) {
- try {
- String urlString = "" + Username;
- urlString = urlString.replaceAll("http://www.spawnscape614.net/vote/", "%20");
- URL url = new URL(urlString);
- BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
- String results = reader.readLine();
- if (results.length() > 0) {
- if (results.equals("user needs reward..."))
- return true;
- else
- return false;
- }
- } catch (MalformedURLException e) {
- System.out.println("Malformed URL Exception in checkVotes(String playerName)");
- } catch (IOException e) {
- System.out.println("IO Exception in checkVotes(String playerName)");
- }
- return false;
- }
- public void hit(int damage, Player opp) {
- target = opp.getUsername().replace("_", " ").toLowerCase();
- if (this.isDead() || opp.isDead()) {
- return;
- }
- if (opp.tabbing > 0) {
- return;
- }
- if (tabbing > 0) {
- return;
- }
- if (damage < 0) {
- damage = 0;
- }
- /*
- * int weaponID = this.getEquipment().get(3).getId(); if(weaponID ==
- * 7806) { opp.graphics(435); opthis.getFrames().sendChatMessage(0,
- * "The other player healed 10 hitpoints off you.");
- * this.getSkills().heal(10); }
- */
- if (!prayer.usingPrayer(1, 17) && this.isDead()) {
- return;
- }
- /*
- * if(opp.autoRetaliate) { opp.turnTo(this);
- * this.getCombat().attack(this); } if(this.autoRetaliate) {
- * this.turnTo(opp); this.getCombat().attack(opp); }
- */
- /*
- * if (this.autoRetaliate && !this.isAttacking()) { this.isAttacking =
- * true; this.turnTo(opp); this.getCombat().attack(opp); } if
- * (opp.autoRetaliate && !this.isAttacking()) { opp.isAttacking = true;
- * opp.turnTo(this); opp.getCombat().attack(this); }
- */
- this.getSkills().killerName = opp.getUsername();
- // int wep = this.getEquipment().getEquipment().get(3).getId();
- if (damage > this.skills.getHitPoints())
- damage = this.skills.getHitPoints();
- if (damage == 0) {
- hit(damage, Hits.HitType.NO_DAMAGE);
- // } else if(damage >= 340 && wep == 5698) {
- // hit(damage, Hits.HitType.DUNGEON_DAMAGE);
- } else if (damage >= 640) {
- hit(damage, Hits.HitType.DUNGEON_DAMAGE);
- } else if (damage >= 100) {
- hit(damage, Hits.HitType.NORMAL_BIG_DAMAGE);
- } else {
- hit(damage, Hits.HitType.NORMAL_DAMAGE);
- }
- }
- public void hitType(int damage, HitType hitType) {
- if (this.isDead()) {
- return;
- }
- if (damage < 0) {
- damage = 0;
- }
- if (damage > this.skills.getHitPoints())
- damage = this.skills.getHitPoints();
- hit(damage, hitType);
- }
- @Override
- public void resetTurnTo() {
- this.mask.setTurnToIndex(-1);
- this.mask.setTurnToReset(true);
- this.mask.setTurnToUpdate(true);
- }
- @Override
- public void turnTemporarilyTo(Entity entity) {
- // TODO Auto-generated method stub
- this.mask.setTurnToIndex(entity.getClientIndex());
- this.mask.setTurnToReset(true);
- this.mask.setTurnToUpdate(true);
- }
- public void turnTemporarilyTo(RSTile location) {
- this.mask.setTurnToLocation(location);
- this.mask.setTurnToUpdate1(true);
- }
- @Override
- public void turnTo(Entity entity) {
- this.mask.setTurnToIndex(entity.getClientIndex());
- this.mask.setTurnToReset(false);
- this.mask.setTurnToUpdate(true);
- }
- public void setMask(Mask mask) {
- this.mask = mask;
- }
- public Mask getMask() {
- return mask;
- }
- public void setAppearence(Appearence appearence) {
- this.appearence = appearence;
- }
- public Appearence getAppearence() {
- return appearence;
- }
- public void setInventory(Inventory inventory) {
- this.inventory = inventory;
- }
- public Inventory getInventory() {
- return inventory;
- }
- public void setEquipment(Equipment equipment) {
- this.equipment = equipment;
- }
- public Equipment getEquipment() {
- return equipment;
- }
- public void setSkills(Skills skills) {
- this.skills = skills;
- }
- public Skills getSkills() {
- return skills;
- }
- public void setIntermanager(InterfaceManager intermanager) {
- this.intermanager = intermanager;
- }
- public InterfaceManager getIntermanager() {
- return intermanager;
- }
- public void setInClient(boolean inClient) {
- this.inClient = inClient;
- }
- public boolean isInClient() {
- return inClient;
- }
- public void setCombatDefinitions(CombatDefinitions combat) {
- this.combatdefinitions = combat;
- }
- public CombatDefinitions getCombatDefinitions() {
- return combatdefinitions;
- }
- public TradeSession getTradeSession() {
- return this.currentTradeSession;
- }
- public void setTradeSession(TradeSession newSession) {
- currentTradeSession = newSession;
- }
- public void setTradePartner(Player tradePartner) {
- this.tradePartner = tradePartner;
- }
- public Player getTradePartner() {
- return tradePartner;
- }
- public void setPriceCheck(PriceCheck pricecheck) {
- this.pricecheck = pricecheck;
- }
- public PriceCheck getPriceCheck() {
- return pricecheck;
- }
- public void setDialogue(Dialogue dialogue) {
- this.dialogue = dialogue;
- }
- public Dialogue getDialogue() {
- return dialogue;
- }
- public void setMining(Mining mining) {
- this.mining = mining;
- }
- public Mining getMining() {
- return mining;
- }
- public Fishing getFishing() {
- return fishin;
- }
- public boolean isLoggedIn() {
- return isLoggedIn;
- }
- public void setLoggedIn(boolean b) {
- this.isLoggedIn = b;
- }
- public void setPrayer(Prayer prayer) {
- this.prayer = prayer;
- }
- // Bank Tabs
- public int getCurrentTab() {
- return currentTab;
- }
- public void setCurrentTab(int i) {
- this.currentTab = i;
- }
- public DuelArena getDuelSession() {
- return this.currentDuelSession;
- }
- public void setDuelSession(DuelArena newSession) {
- currentDuelSession = newSession;
- }
- public void setDuelPartner(Player duelPartner) {
- this.duelPartner = duelPartner;
- }
- public Player getDuelPartner() {
- return duelPartner;
- }
- public int[] getBankTabSize() {
- return tab;
- }
- public Prayer getPrayer() {
- return prayer;
- }
- public void setQueuedHits(Queue<Hit> queuedHits) {
- this.queuedHits = queuedHits;
- }
- public Queue<Hit> getQueuedHits() {
- return queuedHits;
- }
- public void setHits(Hits hits) {
- this.hits = hits;
- }
- public Hits getHits() {
- return hits;
- }
- public void setGpi(Gpi gpi) {
- this.gpi = gpi;
- }
- public Gpi getGpi() {
- return gpi;
- }
- public void setMusicmanager(MusicManager musicmanager) {
- this.musicmanager = musicmanager;
- }
- public MusicManager getMusicmanager() {
- return musicmanager;
- }
- public void setBank(Banking bank) {
- this.bank = bank;
- }
- public Banking getBank() {
- return bank;
- }
- public void setHinticonmanager(HintIconManager hinticonmanager) {
- this.hinticonmanager = hinticonmanager;
- }
- public HintIconManager getHinticonmanager() {
- return hinticonmanager;
- }
- public void setMinigamemanager(MinigameManager minigamemanager) {
- Minigamemanager = minigamemanager;
- }
- public MinigameManager getMinigamemanager() {
- return Minigamemanager;
- }
- public void setGni(Gni gni) {
- this.gni = gni;
- }
- public Gni getGni() {
- return gni;
- }
- public void setWoodcutting(WoodCutting woodcutting) {
- this.woodcutting = woodcutting;
- }
- public WoodCutting getWoodcutting() {
- return woodcutting;
- }
- public void setCombatDelay(int combatDelay) {
- this.combatDelay = combatDelay;
- }
- public void setDonatorPoints(int donatorPoints) {
- this.donatorPoints = donatorPoints;
- }
- public void setDonationPoints(int donationPoints) {
- this.donationPoints = donationPoints;
- }
- public int getDonationPoints() {
- return donatorPoints;
- }
- public int getDonatorPoints() {
- return donatorPoints;
- }
- public int getCombatDelay() {
- return combatDelay;
- }
- public void setAttacking(boolean isAttacking) {
- this.isAttacking = isAttacking;
- }
- public void teleport(final int coordX, final int coordY, final int height) {
- getMask().getRegion().teleport(coordX, coordY, height, 0);
- }
- public boolean isAttacking() {
- return isAttacking;
- }
- public void setAttackingEntity(Entity attackingEntity) {
- this.attackingEntity = attackingEntity;
- }
- public Entity getAttackingEntity() {
- return attackingEntity;
- }
- /**
- * @param shophandler
- * the shophandler to set
- */
- public void setShophandler(ShopHandler shophandler) {
- this.shophandler = shophandler;
- }
- /**
- * @return the shophandler
- */
- public ShopHandler getShophandler() {
- return shophandler;
- }
- public void selectedRanged() {
- // TODO Auto-generated method stub
- }
- public void selectedMelee() {
- // TODO Auto-generated method stub
- }
- public void selectedMelee1() {
- // TODO Auto-generated method stub
- }
- public void selectedMagic() {
- // TODO Auto-generated method stub
- }
- public void sm(String string) {
- // TODO Auto-generated method stub
- }
- public boolean isGodlyDonator() {
- // TODO Auto-generated method stub
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement