SilabGarza - RS Private Server  
Home Forum Play Register Store Market Highscores Mark Forums Read
Go Back   SilabGarza - RS Private Server > SilGar Media > Computers > Programming
Reload this Page [562] Compiler Error


[562] Compiler Error
Old
  (#1 (permalink))
Igor Dubik is Offline
Junior Member
image
 
Igor Dubik's Avatar
 
Posts: 3
Cookies Given: 0
Cookies Received: 0
Time Online: 2 h 31 m
   
Default [562] Compiler Error - 02-25-2011, 01:44 AM

Heyy i've been trying to compile my server but when i compile this comes up:

Code:
src\com\rs2hd\model\Player.java:1026: class, interface, or enum expected
        public void setTemporaryAttribute(String attribute, Object value) {
               ^
src\com\rs2hd\model\Player.java:1029: class, interface, or enum expected
                }
                ^
src\com\rs2hd\model\Player.java:1034: class, interface, or enum expected
        public Object getTemporaryAttribute(String attribute) {
               ^
src\com\rs2hd\model\Player.java:1036: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1038: class, interface, or enum expected
        public void removeTemporaryAttribute(String attribute) {
               ^
src\com\rs2hd\model\Player.java:1041: class, interface, or enum expected
                } catch(Exception e) {
                ^
src\com\rs2hd\model\Player.java:1045: class, interface, or enum expected
        public Settings getSettings() {
               ^
src\com\rs2hd\model\Player.java:1047: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1049: class, interface, or enum expected
        public PlayerDetails getPlayerDetails() {
               ^
src\com\rs2hd\model\Player.java:1051: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1053: class, interface, or enum expected
        public ActionSender getActionSender() {
               ^
src\com\rs2hd\model\Player.java:1055: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1057: class, interface, or enum expected
        public IoSession getSession() {
               ^
src\com\rs2hd\model\Player.java:1059: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1061: class, interface, or enum expected
        public String getUsername() {
               ^
src\com\rs2hd\model\Player.java:1063: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1065: class, interface, or enum expected
        public int getRights() {
               ^
src\com\rs2hd\model\Player.java:1067: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1068: class, interface, or enum expected
        public void setRights(int rights) {
               ^
src\com\rs2hd\model\Player.java:1070: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1071: class, interface, or enum expected
        public int donator() {
               ^
src\com\rs2hd\model\Player.java:1073: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1075: class, interface, or enum expected
        public void processQueuedPackets() {
               ^
src\com\rs2hd\model\Player.java:1079: class, interface, or enum expected
                        while((p = queuedPackets.poll()) != null) {
                        ^
src\com\rs2hd\model\Player.java:1081: class, interface, or enum expected
                        }
                        ^
src\com\rs2hd\model\Player.java:1087: class, interface, or enum expected
        public void addPacketToQueue(Packet p) {
               ^
src\com\rs2hd\model\Player.java:1091: class, interface, or enum expected
                }
                ^
src\com\rs2hd\model\Player.java:1096: class, interface, or enum expected
        public PlayerUpdateFlags getUpdateFlags() {
               ^
src\com\rs2hd\model\Player.java:1098: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1100: class, interface, or enum expected
        public Appearance getAppearance() {
               ^
src\com\rs2hd\model\Player.java:1102: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1104: class, interface, or enum expected
        public HeadIcons getHeadIcons() {
               ^
src\com\rs2hd\model\Player.java:1106: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1108: class, interface, or enum expected
        public Equipment getEquipment() {
               ^
src\com\rs2hd\model\Player.java:1110: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1112: class, interface, or enum expected
        public WalkingQueue getWalkingQueue() {
               ^
src\com\rs2hd\model\Player.java:1114: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1116: class, interface, or enum expected
        public Skills getSkills() {
               ^
src\com\rs2hd\model\Player.java:1118: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1120: class, interface, or enum expected
        public boolean isDisconnected() {
               ^
src\com\rs2hd\model\Player.java:1122: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1124: class, interface, or enum expected
        public void setPlayerListSize(int playerListSize) {
               ^
src\com\rs2hd\model\Player.java:1127: class, interface, or enum expected
                } catch(Exception e) {
                ^
src\com\rs2hd\model\Player.java:1131: class, interface, or enum expected
        public int getPlayerListSize() {
               ^
src\com\rs2hd\model\Player.java:1133: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1135: class, interface, or enum expected
        public void setPlayerList(Player[] playerList) {
               ^
src\com\rs2hd\model\Player.java:1138: class, interface, or enum expected
                } catch(Exception e) {
                ^
src\com\rs2hd\model\Player.java:1142: class, interface, or enum expected
        public Player[] getPlayerList() {
               ^
src\com\rs2hd\model\Player.java:1144: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1146: class, interface, or enum expected
        public void setPlayersInList(byte[] playersInList) {
               ^
src\com\rs2hd\model\Player.java:1149: class, interface, or enum expected
                } catch(Exception e) {
                ^
src\com\rs2hd\model\Player.java:1153: class, interface, or enum expected
        public byte[] getPlayersInList() {
               ^
src\com\rs2hd\model\Player.java:1155: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1159: class, interface, or enum expected
        public void setNpcListSize(int npcListSize) {
               ^
src\com\rs2hd\model\Player.java:1162: class, interface, or enum expected
                } catch(Exception e) {
                ^
src\com\rs2hd\model\Player.java:1166: class, interface, or enum expected
        public int getNpcListSize() {
               ^
src\com\rs2hd\model\Player.java:1168: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1170: class, interface, or enum expected
        public void setNpcList(NPC[] npcList) {
               ^
src\com\rs2hd\model\Player.java:1173: class, interface, or enum expected
                } catch(Exception e) {
                ^
src\com\rs2hd\model\Player.java:1177: class, interface, or enum expected
        public NPC[] getNpcList() {
               ^
src\com\rs2hd\model\Player.java:1179: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1181: class, interface, or enum expected
        public void setNpcsInList(byte[]npcsInList) {
               ^
src\com\rs2hd\model\Player.java:1184: class, interface, or enum expected
                } catch(Exception e) {
                ^
src\com\rs2hd\model\Player.java:1188: class, interface, or enum expected
        public byte[] getNpcsInList() {
               ^
src\com\rs2hd\model\Player.java:1190: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1192: class, interface, or enum expected
        public Inventory getInventory() {
               ^
src\com\rs2hd\model\Player.java:1194: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1195: class, interface, or enum expected
        public PriceCheck getPriceCheck() {
               ^
src\com\rs2hd\model\Player.java:1197: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1198: class, interface, or enum expected
        public SummonTrain getSummonTrain() {
               ^
src\com\rs2hd\model\Player.java:1200: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1201: class, interface, or enum expected
        public AutoCast getAutoCast() {
               ^
src\com\rs2hd\model\Player.java:1203: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1204: class, interface, or enum expected
        public RequestAssist RequestAssist() {
               ^
src\com\rs2hd\model\Player.java:1206: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1207: class, interface, or enum expected
        public WalkTo WalkTo() {
               ^
src\com\rs2hd\model\Player.java:1209: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1210: class, interface, or enum expected
        public FamiliarInventory getFamiliarInventory() {
               ^
src\com\rs2hd\model\Player.java:1212: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1213: class, interface, or enum expected
        public FamiliarNpc getFamiliarNpc() {
               ^
src\com\rs2hd\model\Player.java:1215: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1216: class, interface, or enum expected
        public MagicCombat getMagicCombat() {
               ^
src\com\rs2hd\model\Player.java:1218: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1219: class, interface, or enum expected
        public NpcMagicCombat getNpcMagicCombat() {
               ^
src\com\rs2hd\model\Player.java:1221: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1222: class, interface, or enum expected
        public PlayerVsNpc pvn() {
               ^
src\com\rs2hd\model\Player.java:1224: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1225: class, interface, or enum expected
        public PlayerVsPlayer pvp() {
               ^
src\com\rs2hd\model\Player.java:1227: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1228: class, interface, or enum expected
        public ItemInformation getItemInformation() {
               ^
src\com\rs2hd\model\Player.java:1230: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1231: class, interface, or enum expected
        public ChatMessage getLastChatMessage() {
               ^
src\com\rs2hd\model\Player.java:1233: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1235: class, interface, or enum expected
        public void setLastChatMessage(ChatMessage msg) {
               ^
src\com\rs2hd\model\Player.java:1238: class, interface, or enum expected
                } catch(Exception e) {
                ^
src\com\rs2hd\model\Player.java:1242: class, interface, or enum expected
        public int getWorld() {
               ^
src\com\rs2hd\model\Player.java:1244: class, interface, or enum expected
        }
        ^
src\com\rs2hd\model\Player.java:1246: class, interface, or enum expected
        public Friends getFriends() {
               ^
Note: src\com\rs2hd\packethandler\CommandPacketHandler.java uses unchecked or un
safe operations.
Note: Recompile with -Xlint:unchecked for details.
100 errors
Complete.
Press any key to continue . . .
I know that im missing bracket/s but i can't find it, when i open this in Eclipse, it doesn't find any errors.

If anyone could please give me an updated version of my player.java or tell me where to add bracket id be very thankfull

this is my player.java:

Code:
package com.rs2hd.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;

import org.apache.mina.common.IoSession;

import com.rs2hd.GameEngine;
import com.rs2hd.content.DeathEvent;
import com.rs2hd.content.PlayerDrops;
import com.rs2hd.content.Combat.CombatType;
import com.rs2hd.content.skills.combat.AutoCast;
import com.rs2hd.content.skills.combat.MagicCombat;
import com.rs2hd.content.skills.combat.NpcMagicCombat;
import com.rs2hd.content.skills.combat.PlayerVsNpc;
import com.rs2hd.content.skills.combat.PlayerVsPlayer;
import com.rs2hd.content.skills.fishing.fish;
import com.rs2hd.content.skills.mining.Mining;
import com.rs2hd.content.skills.summoning.SummonTrain;
import com.rs2hd.content.skills.thief.StealStall;
import com.rs2hd.content.skills.woodcutting.Woodcutting;
import com.rs2hd.content.skills.farming.Farming;
import com.rs2hd.content.skills.smithing.Smithing;
import com.rs2hd.content.skills.hunter.Hunter;
import com.rs2hd.content.skills.cooking.Cooking;
import com.rs2hd.content.skills.slayer.Slayer;
import com.rs2hd.content.skills.prayer.Altar;
import com.rs2hd.content.Teleport;
import com.rs2hd.event.Event;
import com.rs2hd.content.minigames.soulwars.*;
//import com.rs2hd.content.grandexchange.*;
import com.rs2hd.model.Hits.Hit;
import com.rs2hd.net.ActionSender;
import com.rs2hd.model.InputHandler;
import com.rs2hd.net.Packet;
import com.rs2hd.packethandler.PacketHandlers;
import com.rs2hd.content.PestControl;
import com.rs2hd.content.pvp.*;
import com.rs2hd.util.Misc;

/**
 * Represents a connected player.
 * @author Graham
 *
 */
public class Player extends Entity {
public boolean coding = false;
public int startedd = 0;
public int soul;
/*hunter*/
	public transient Hunter hunter;
/*trimming capes :P*/
	public int hasCapes;

/*shopId*/
public int shopId;
public int skillcapetalk;
public int DT;
  public int oldGuyTalking;
  public int[] speech = new int[10];
/*DefenderId*/
public int DefenderId;
/*jailtimer*/
public int jailtimer = -1;
public int PcIngame = -1;

/*Timers*/
public int PcBoat = -1;
/*temporary xlog fix til i workout a better way*/
	public int xlog;
/*teleblock*/
	public boolean isTeleBlocked = false;
	public int tbTicks = 0;
/*pickupitem*/
	public int takingitem = 0;
/*Ep*/
	public int playerEp;
	public int giveDrop = 0;
	PvpDrops pvpDrops = new PvpDrops();
/*Bank Tab Variables and banking variables*/
    	public int toId = -1;
    	public boolean swap = true;
   	public int setUpDelay = -1;
    	public int testIcon = -2;
   	public int[] tab = new int[9];
    	public int fromId = -1;
	public int[] tabAmounts = {1,0,0,0,0,0,0,0,0};
	public int selectedBankTab = 0;
	public boolean checked = false;
	public int checkid = 0;
	public int servmessage = (int) (600/0.6);
/*godwars*/
    	public int[] godWarsKills = new int[5];
		public int tokenupdatef2 = -1;
		public boolean needtokenupdate = false;
/*npc dialogue*/
	public int chatstage;
	public int slayerMaster;
/*fornpcvsnpc*/
	private Specials specials;
/*altar prayer*/
	public transient Altar altar;
/*inputhandler*/
	public transient InputHandler inputHandler;
/*lending*/
	public int Lendtimer;
	public int lendeditem;
	public int lenditem;
	public int lenditem1;
	public int lenditem2;
	public Player LendingPerson;
	public Player LendedPerson;
	public int dig = -1;
/*points*/
	public int PkPoints;
	public int PcPoints = 0;
/*resting*/
	public int resttimer;
	public boolean resting;
/*barrows*/
	public int torag = 0;
	public int ahrim = 0;
	public int dh = 0;
	public int verac = 0;
	public int karil = 0;
	public int guthan = 0;
	public int chest;
public int stage;
/*starter*/
	public int starter = 0;
/*ge variable*/
    	public int currentSlot = 0;
   //public GrandExchange GE;
/*
*Pest control
*/
    	public boolean inBoat;
    	public boolean inGame;
    	public int pPoints;
/*
*Slayer
*/
	private transient Slayer slayer;
	public int slayerNPC;
	public int slayerAmount;
	public boolean hasTask;
/*
*autocasting ints/booleans
*/
	public int autoCastAncient;
	public int autoCast;
	public boolean autoCasting;
	public int magicType = 192;
	public transient boolean isAlching = false;
	public transient int frozen = 0;
	public transient boolean veng = false;
	public transient int vengTimer = 0;
	public transient int MiasmicDelay = -1;
/*
*server message ints
*/
        public int serverMess = 180;
        public int serverMess1 = 0;
/*
*trimming info started
*/
	public int maxedSkills;
/*
* DFS stuff
*/
	public int DFSCharges;
	public transient int dfs = 0;
/*
*dialouge/quests
*/
	public int FatherAereck;
	public int startMessage;
	public int ZamorakMage;
	public boolean DemonSlayerDone;
	public int DemonSlayer;
	public int wDialouge;
/*
*muted/ban
*/
	public boolean muted;
	public int banned;
/*
*delays/ticks
*/
	public int potDelay;
	public int poisonTicks;
	public int homeTele;
	public int ditch;
	public int jump;
/*
*clan chat stuffs
*/
	public boolean inChat = true;


	public int KC;
	public int DC;
/*
*notes
*/
	public String []Notes = new String[30];
	public int []NoteColor = new int[30];
/*
*combat related stuff
*/	
	
	public int followIndex = -1;
	public boolean following = false;
	public transient boolean isSkulled = false;
	public transient int skullCyclesRemaining = 0;
	public transient int Nid = 0;
	public transient boolean  AttackingNpc = false;
	public transient int id = 0;
	public transient int combatWith = 0;
	public transient int combatResetWith = -1;
	public transient int MagicId = 0;
	public transient boolean Attacking = false;
	public transient boolean cantPk = false;
	public transient boolean cantWalk = false;
	public transient boolean cantEat = false;
	public transient int AttackSpeed = 1;
	public int specialAmount = 100;
	public transient int combatDelay = 0;
	public transient boolean usingSpecial = false;
	public transient int RecoilRing = 40;
/*
*starter stuff
*/
	public int Starterpoints = 0;
	public int BuyWhat = 0;
/*
*killcount
*/
	public int deathCount;
	public int killCount;
	public int TargetkillCount;
/*
*emote stuff
*/
	public transient int Render = 0;
	public transient boolean RenderRunning = false;
/*
*music
*/
	public static int Music[] = {0,2,3,46,64,76,85,127,145,151,163,327};

	public static int randomMusic(){
		return Music[(int)(Math.random()*Music.length)];
	}

	public transient int MusicTimer = 0;
	public transient int musicId = 0;

/*
*following/summoning
*/
	public  transient boolean IsFollowing = false;
	public  transient int FollowingId = 0;
	public  transient boolean CallSummoning = false;
	public  boolean Summoning = false;
	public  int SummoningItemId = 0;
	public  transient int FamiliarSpec = 0;
	public  transient int  FamiliarInvSize = 0;
	public transient FamiliarNpc familiarnpc;
/*
*pricechecker
*/
	public transient int itemPrice = 0;
/*
*prayer
*/
	public transient boolean PrayerON = false;
	public transient boolean QuickPrayer = false;
    	public transient int prayerDrain = 100;
    	public transient int drainRate = 0;
	public transient boolean THICKSKIN = false;
	public transient boolean BURSTOFSTRENGHT = false;
	public transient boolean CLARITYOFTHOUGHT = false;
	public transient boolean SHARPEYE = false;
	public transient boolean MYSTICWILL = false;
	public transient boolean ROCKSKIN = false;
	public transient boolean SUPERHUMANSTRENGHT = false;
	public transient boolean IMPROVEDREFLEXES = false;
	public transient boolean RAPIDRESTORE = false;
	public transient boolean RAPIDHEAL = false;
	public transient boolean PROTECTITEM = false;
	public transient boolean HAWKEYE = false;
	public transient boolean MYSTICLORE = false;
	public transient boolean STEELSKIN = false;
	public transient boolean ULTIMATESTRENGHT = false;
	public transient boolean INCREDIBLEREFLEXES = false;
	public transient boolean PROTECTFROMSUMMONING = false;
	public transient boolean PROTECTFROMMAGIC = false;
	public transient boolean PROTECTFROMMISSELES = false;
	public transient boolean PROTECTFROMMELEE = false;
	public transient boolean EAGLEEYE = false;
	public transient boolean MYSTICMIGHT = false;
	public transient boolean RETRIBUTION = false;
	public transient boolean REDEMPTION = false;
	public transient boolean SMITE = false;
	public transient boolean CHILVALRY = false;
	public transient boolean PIETY = false;
	public  boolean QuickTHICKSKIN = false;
	public  boolean QuickBURSTOFSTRENGHT = false;
	public  boolean QuickCLARITYOFTHOUGHT = false;
	public  boolean QuickSHARPEYE = false;
	public  boolean QuickMYSTICWILL = false;
	public  boolean QuickROCKSKIN = false;
	public  boolean QuickSUPERHUMANSTRENGHT = false;
	public  boolean QuickIMPROVEDREFLEXES = false;
	public  boolean QuickRAPIDRESTORE = false;
	public  boolean QuickRAPIDHEAL = false;
	public  boolean QuickPROTECTITEM = false;
	public  boolean QuickHAWKEYE = false;
	public  boolean QuickMYSTICLORE = false;
	public  boolean QuickSTEELSKIN = false;
	public  boolean QuickULTIMATESTRENGHT = false;
	public  boolean QuickINCREDIBLEREFLEXES = false;
	public  boolean QuickPROTECTFROMSUMMONING = false;
	public  boolean QuickPROTECTFROMMAGIC = false;
	public  boolean QuickPROTECTFROMMISSELES = false;
	public  boolean QuickPROTECTFROMMELEE = false;
	public  boolean QuickEAGLEEYE = false;
	public  boolean QuickMYSTICMIGHT = false;
	public  boolean QuickRETRIBUTION = false;
	public  boolean QuickREDEMPTION = false;
	public  boolean QuickSMITE = false;
	public  boolean QuickCHILVALRY = false;
	public  boolean QuickPIETY = false;
	public transient int buryDelay = 0;
/*
*content
*/
	private transient Teleport tele;
	private transient Farming farm;
	private transient Smithing smith;
	private transient Cooking cook;
/*
*resizing
*/
	private transient InterfaceSwitches interfaceswitches;
	private boolean onLogin;
	private int displayMode;
	private boolean fullScreen;
	public void sm(String Msg) {
		try {
		getActionSender().sendMessage(""+Msg);
		} catch(Exception e) {
		}
	}

	public int getNpcRender() {
		switch(Nid) {
		case 2745:
			return 9273;
		default:
			return 808;
		}
	}


	public void addHitExp(Player p, int hit) {
	int skill = 0;
				if(getEquipment().getAttStyle().equals("Attack"))
					skill = 0;
				else if(getEquipment().getAttStyle().equals("Strength"))
					skill = 2;
				else if(getEquipment().getAttStyle().equals("Defence"))
					skill = 1;
				else if(getEquipment().getAttStyle().equals("Ranged"))
					skill = 4;
				else if(getEquipment().getAttStyle().equals("Shared")) {
					p.getSkills().addXp(Skills.ATTACK, hit);
					p.getSkills().addXp(Skills.DEFENCE, hit);
					p.getSkills().addXp(Skills.STRENGTH, hit);
					p.getSkills().addXp(Skills.HITPOINTS, hit);
					return;
				}else if(getEquipment().getAttStyle().equals("RangedDefence")) {
					double exp = (double) (1500 * hit), hpExp = (double) (1250 * hit);
					p.getSkills().addXp(Skills.DEFENCE, exp);
					p.getSkills().addXp(Skills.RANGE, exp);
					p.getSkills().addXp(Skills.HITPOINTS, hpExp);
					return;
				}
					double exp = (double) (4800 * hit), hpExp = (double) (2300 * hit);
					p.getSkills().addXp(skill, exp);
					p.getSkills().addXp(Skills.HITPOINTS, hpExp);
				}

		public void thief(int item, int delay, int lvl, int xp, String string) {
		try {
		if(combatDelay > 0) {
			return;
}
		if(getSkills().getLevelForXp(17) < lvl) {
			getActionSender().sendMessage("You need"+lvl+"Thief to can steal this stall.");
			return;
}
		animate(881, 0);
		combatDelay += delay;
		getActionSender().sendMessage(string);
		getInventory().addItem(item, 1);
		getSkills().addXp(17, xp);
		} catch(Exception e) {
		}
	}
				public void statSpy(Player other) {
				int[] strings = {1, 25, 13, 5, 37, 49, 61, 45, 69, 65, 33, 57, 53, 21, 9, 29, 17, 41, 77, 81, 73, 85, 89, 93};
				getActionSender().sendString(other.getUsername().substring(0, 1).toUpperCase() + other.getUsername().substring(1), 523, 99);
				for (int i = 0; i < strings.length; i++) {
				getActionSender().sendString(""+other.getSkills(). getLevel(i), 523, strings[i]);
				getActionSender().sendString(""+other.getSkills(). getLevelForXp(i), 523, strings[i] + 1);
				}
				getActionSender().sendInventoryInterface(523);
				animate(6293, 0);
				graphics(1060, 0);
				} 
    /**
     * Force chat text.
     */
	public void setForceText(ForceText forceText) {
		try {
		this.forceText = forceText;
		updateFlags.setForceTextUpdateRequired(true);
		} catch(Exception e) {
		}
	}

	public ForceText getForceText() {
		return forceText;
	}
	public void forceChat(String message) {
		try {
		setForceText(new ForceText(message));
		updateFlags.setForceTextUpdateRequired(true);
		} catch(Exception e) {
		}
	}

	private PlayerDetails details;
	private transient Request request;
	private transient ActionSender actionSender;
	private transient Queue<Packet> queuedPackets;
	private transient PlayerUpdateFlags updateFlags;
	private transient WalkingQueue walkingQueue;
	private transient RouteFinder RouteFinder;
	private transient LocalEntityList localEntities;
	private transient ChatMessage lastChatMessage;
	private transient ForceText forceText;
	private transient int world;
	private transient Map<String, Object> temporaryAttributes;
	private transient Queue<Hit> queuedHits;
	private transient Bonuses bonuses;
	private transient boolean hd;
	private transient boolean noting;
	private Bank bank;
	private Settings settings;
	private Appearance appearance;
	private HeadIcons headIcons;
	private Equipment equipment;
	private Skills skills;
	private Inventory inventory;
	private PriceCheck pricecheck;
	private NpcDialogue NpcDialogue;
	private Woodcutting wc;
	private  Mining mn;
	private  StealStall SS;
	private  fish fish;
	private transient SummonTrain summontrain;
	private transient WalkTo walkto;
	private transient RequestAssist RequestAssist;
	private transient ItemInformation iteminformation;
	private FamiliarInventory familiarinventory;
	private PlayerVsNpc playervsnpc;
	private AutoCast autocast;
	private PlayerVsPlayer playervsplayer;
	private MagicCombat magiccombat;
	private NpcMagicCombat npcmagiccombat;
	private Friends friends;
	public transient boolean busy;
	public transient int turkeydelay = -1;
	public int rights = 0;
	public int donator = 0;
	private int runEnergy = 100;

	public void resetAttack() {
		try {
	this.IsFollowing = false;
	this.FollowingId = 0;
	this.Attacking = false;
	this.AttackingNpc = false;
	this.id = 0;
	this.Nid = 0;
	resetFaceId();
		} catch(Exception e) {
		}
}

	public boolean wearingGMAUL() {
		return getEquipment().get(3) != null && getEquipment().get(3).getDefinition().getId() == 4153;
	}
    public boolean DFS() {
	if((getEquipment().get(5).getDefinition().getId() == 11284) || (getEquipment().get(3).getDefinition().getId() == 11283))
		return true;
		else
		return false;
    }
    public boolean ADS() {
	if((getEquipment().get(5).getDefinition().getId() == 1540))
		return true;
		else
		return false;
    }
public void resetFaceId() {
	this.turnTo(this);
}
public Item dropId(int id) {
	return new Item(id);
}
    public void PvPDrop(Player player){
		try {
        Item LowItem = dropId(PlayerDrops.PvPLowDrop());
        Item MediumItem = dropId(PlayerDrops.PvPMediumDrop());
 	Item HighItem = dropId(PlayerDrops.PvPHighDrop());
 	Item RareItem = dropId(PlayerDrops.PvPRareDrop());
 	Item LuckyItem = dropId(PlayerDrops.PvPLuckyDrop());
 	Item FoodItem = dropId(PlayerDrops.PvPFoodDrop());

World.getInstance().getItemManager().createDropGroundItem(this.getKiller() instanceof Player ? (Player) this.getKiller() : null, this.getLocation(), FoodItem);

World.getInstance().getItemManager().createDropGroundItem(this.getKiller() instanceof Player ? (Player) this.getKiller() : null, this.getLocation(), LowItem);

if (player.getSkills().getCombatLevel() >= 45)
World.getInstance().getItemManager().createDropGroundItem(this.getKiller() instanceof Player ? (Player) this.getKiller() : null, this.getLocation(), MediumItem);

if (player.getIndex() == this.bhTarget) {

if (player.getSkills().getCombatLevel() >= 85)
World.getInstance().getItemManager().createDropGroundItem(this.getKiller() instanceof Player ? (Player) this.getKiller() : null, this.getLocation(), HighItem);

}

int Rare = Misc.random(29);
if (player.getIndex() == this.bhTarget)
Rare = Misc.random(14);


if (player.getSkills().getCombatLevel() >= 100 & Rare == 0)
World.getInstance().getItemManager().createDropGroundItem(this.getKiller() instanceof Player ? (Player) this.getKiller() : null, this.getLocation(), RareItem);

int Lucky = Misc.random(49);
if (player.getIndex() == this.bhTarget)
Lucky = Misc.random(24);

if (Lucky == 0)
World.getInstance().getItemManager().createDropGroundItem(this.getKiller() instanceof Player ? (Player) this.getKiller() : null, this.getLocation(), LuckyItem);


		} catch(Exception e) {
		}
}

	public Player(PlayerDetails details) {
		this.details = details;
		this.appearance = new Appearance();
		this.headIcons = new HeadIcons();
		this.equipment = new Equipment();
		this.skills = new Skills();
		this.inventory = new Inventory();
		this.friends = new Friends();
		this.settings = new Settings();
		this.bank = new Bank();
		this.pricecheck = new PriceCheck();
		this.familiarinventory = new FamiliarInventory();
		this.playervsnpc = new PlayerVsNpc();
		this.playervsplayer = new PlayerVsPlayer();
		this.magiccombat = new MagicCombat();
		this.npcmagiccombat = new NpcMagicCombat();
		this.settings.setDefaultSettings();
	}
	
	/**
	 * Called when XStream loads us.
	 * 
	 * NOTE: other loaders should call this also.
	 */
	public Object readResolve() {
		super.readResolve();
		wc = new Woodcutting(this);
		NpcDialogue = new NpcDialogue(this);
		mn = new Mining(this);
		SS = new StealStall(this);
		fish = new fish(this);
		request = new Request(this);
		actionSender = new ActionSender(this);
		queuedPackets = new LinkedList<Packet>();
		updateFlags = new PlayerUpdateFlags();
		walkingQueue = new WalkingQueue(this);
		skills.setPlayer(this);
		inventory.setPlayer(this);
		bank.setPlayer(this);
		pricecheck.setPlayer(this);
		RouteFinder = new RouteFinder(this);
		familiarinventory.setPlayer(this);
		playervsnpc.setPlayer(this);
		playervsplayer.setPlayer(this);
		magiccombat.setPlayer(this);
		npcmagiccombat.setPlayer(this);
		summontrain = new SummonTrain(this);
		smith = new Smithing(this);
		cook = new Cooking(this);
		autocast = new AutoCast(this);
		iteminformation = new ItemInformation(this);
		walkto = new WalkTo(this);
		RequestAssist = new RequestAssist(this);
		equipment.setPlayer(this);
		friends.setPlayer(this);
		localEntities = new LocalEntityList();
		settings.setPlayer(this);
		temporaryAttributes = new HashMap<String, Object>();
		lastChatMessage = null;
		world = 1;
		details.refreshLongName();
		queuedHits = new LinkedList<Hit>();
		bonuses = new Bonuses(this);
		interfaceswitches = new InterfaceSwitches(this);
		slayer = new Slayer(this);
		//GE = new GrandExchange(this);
		inputHandler = new InputHandler(this);
		hunter = new Hunter(this);
		noting = false;
		hd = false;
		busy = false;
		forceText = null;
		return this;
	}
	public Woodcutting wc() {
		return wc;
	}
	public Hunter getHunter() {
		return hunter;
	}	
	public RouteFinder RouteFinder() {
		return RouteFinder;
	}	
	public NpcDialogue NpcDialogue() {
		return NpcDialogue;
	}
	public Mining mn() {
		return mn;
	}	
	public StealStall SS() {
		return SS;
	}	
	public fish fish() {
		return fish;
	}	
	public void resetSkills() {
		getCooking().setCooking(false);
		getSmithing().setSmithing(false);
		resetAttack();
		wc().cancelWC();
		mn().cancelMN();
		NpcDialogue().resetTalk();
		fish().StopFishing();
		getRequests().closeTrade();
		getActionSender().sendCloseChatboxInterface();
		getActionSender().sendCloseInventoryInterface();
		getActionSender().sendCloseInterface();
	}
	
	public void shop(Player player) {
		player.getActionSender().sendInterface(491);
		player.getActionSender().sendString("<col=ffffff>200k Attack EXP", 491, 83);
		player.getActionSender().sendString("<col=ffffff>200k STRENGTH EXP", 491, 92);
		player.getActionSender().sendString("<col=ffffff>200k DEFENCE EXP", 491, 99);
		player.getActionSender().sendString("<col=ffffff>200k HITPOINTS EXP", 491, 106);
		}
	
	public Request getRequests() {
		return request;
	}
	/*public GrandExchange getGE() {
		return GE;
	}*/
	public Teleport getTele() {
	resetAttack();
		return tele;
	}
	@Override
	public int getMaxHit() {
		double maxHit = 0;
		if(this.getCombatType().equals(CombatType.MELEE)) {
			int strBonus = bonuses.getBonus(10);
			int strength = skills.getLevel(Skills.STRENGTH);
			int fightType = this.getAttackStyle();
			if(fightType == 1 || fightType == 4) {
				maxHit += (double) (1.05 + (double) ((double) (strBonus * strength) * 0.00175));
			} else if(fightType == 2) {
				maxHit += (double) (1.35 + (double) ((double) (strBonus) * 0.00525));
			} else if(fightType == 3){
				maxHit += (double) (1.15 + (double) ((double) (strBonus) * 0.00175));
			}
			maxHit += (double)(strength * 0.1);
		} else if(this.getCombatType().equals(CombatType.RANGE)) {
			int range = skills.getLevel(Skills.RANGE);
			int rangeBonus = bonuses.getBonus(4);
			double d = ((double) (rangeBonus * 0.00175D) + 0.1D);
			maxHit += d * (double) range + 2.05D;
		} else {
			// todo mage
		}
		return ((int) (Math.ceil(maxHit)) + 1);
	}
	public Altar getAltar() {
		return altar;
	}
	public Smithing getSmithing() {
		return smith;
	}		
	public Farming getFarming() {
		return farm;
	}	
	public Cooking getCooking() {
		return cook;
	}
	public Slayer getSlayer() {
		return slayer;
	}
	public InputHandler getInputHandler() {
		return inputHandler;
	}	
	public boolean isBusy() {
		return busy;
	}
	
	public void setBusy(boolean b) {
		try {
		this.busy = b;
		if(busy) {
			this.setAttacking(false);
		}
		} catch(Exception e) {
		}
	}

	/**
	 * Called roughly every 600ms.
	 */
	public static int[] rares = {11702,11703,11704,11705,11706,11707,11708,11709};
	public void tick() {//gotta be FUCKIN me.
		try {
		
}
		if(checkid == 0) {
			checkid = 1;
			for(int i = 0; i < rares.length; i++) {
				if(getInventory().contains(rares[i])) {
					getInventory().getContainer().removeAll(new Item(rares[i]));
					getInventory().refresh(); 
				}
			}
		}
		if(checkid == 1) {
			checkid = 2;
			for(int i = 0; i < rares.length; i++) {
				if(getBank().contains(rares[i])) {
					getBank().getContainer().removeAll(new Item(rares[i])); 
					getBank().refresh();
				}
			}
		}
		if(checkid == 2) {
			checkid = 3;
			for(int i = 0; i < rares.length; i++) {
					if(getEquipment().get(0).getDefinition().getId() == rares[i]) {
						getEquipment().set(0, null);
					}
					if(getEquipment().get(1).getDefinition().getId() == rares[i]) {
						getEquipment().set(1, null);
					}
					if(getEquipment().get(3).getDefinition().getId() == rares[i]) {
						getEquipment().set(3, null);
					}
					if(getEquipment().get(4).getDefinition().getId() == rares[i]) {
						getEquipment().set(4, null);
					}
					if(getEquipment().get(5).getDefinition().getId() == rares[i]) {
						getEquipment().set(5, null);
					}
					if(getEquipment().get(7).getDefinition().getId() == rares[i]) {
						getEquipment().set(7, null);
					}
			}
		}
		if(!getInventory().contains(8844)) {
		DefenderId = 1;
		}
		if(!getInventory().contains(8845)) {
		DefenderId = 2;
		}
		if(!getInventory().contains(8846)) {
		DefenderId = 3;
		}
		if(!getInventory().contains(8847)) {
		DefenderId = 4;
		}
		if(!getInventory().contains(8848)) {
		DefenderId = 5;
		}
		if(!getInventory().contains(8849)) {
		DefenderId = 6;
		}
		if(!getInventory().contains(8850)) {
		DefenderId = 7;
		}
		if(servmessage == 500) {
			sm("<shad=0066ff>[SERVER]:<shad=ff0033>Join us at WorldScape562.tk");
		}
		if(servmessage == 500) {
			sm("<shad=0066ff>[SERVER]:<shad=ff0033>Vote at WorldScape562.tk");
			servmessage = (int) (600/0.6);
		}
		if(servmessage > 0) {
			servmessage--;
		}			
		if(tokenupdatef2 > 0) {
			tokenupdatef2--;
		}
		if(tokenupdatef2 == 0) {
		if(getInventory().contains(8851, 10)) {
		getInventory().deleteItem(8851, 10);
		tokenupdatef2 = (int) (300/0.6);
		} else {
		getInventory().deleteItem(8851, getInventory().numberOf(8851));
		sm("You have run out of token.");
		tokenupdatef2 = -1;
		tele(2846, 3541, 2);
		}
		}
				if(torag == 3 && dh == 3 && verac == 3 && guthan == 3 && karil == 3 && ahrim == 3) {
		chest = 2;
		torag = 4;
		dh = 4;
		guthan = 4;
		verac = 4;
		karil = 4;
		ahrim = 4;
		getActionSender().sendMessage("Congratulations! You've killed all the Barrows Brothers!");
		getActionSender().sendMessage("Dig anywhere in the Barrows Graveyard to get to the Crypts!");
		}
		if(dig > 0) {
		dig--;
		}
		if(dig == 5) {
		animate(831, 0);
		}
		if(dig == 0) {
		animate(-1, 0);
		dig = -1;
		}
		if(inPestControl()) {
		getActionSender().sendTab(1,408);
		}
		if(inWGroom2() && needtokenupdate == false) {
		tokenupdatef2 = (int) (300/0.6);
		needtokenupdate = true;
		} else if(!inWGroom2() && needtokenupdate == true) {
		tokenupdatef2 = -1;
		needtokenupdate = false;
		}
		if (jailtimer > 0) {
		jailtimer--;
		getActionSender().sendMessage("You will be free in "+jailtimer+" seconds.");
		this.busy = true;
		this.muted = true;
		} else if (jailtimer == 0) {
		getActionSender().sendMessage("You have been unjailed, next it's a Ban.");
		this.busy = false;
		this.muted = false;
		jailtimer = -1;
		teleport(Location.location(2848, 3235, 0));
		}
		if (PcIngame > 0) {
		PcIngame--;
		}else if (PcIngame == 0) {
		PcIngame = -1;
		tele(2657,2639, 0);
		}
		if (PcBoat > 0) {
		PcBoat--;
		getActionSender().sendString("Next Departure:"+PcBoat+"seconds.", 407, 13);
				getActionSender().sendString("Points:"+PcPoints+"",407, 16);
		}else if (PcBoat == 0) {
		PcBoat = -1;
		tele(2658, 2610, 0);
		getActionSender().sendCloseInterface();
		}
		if (takingitem > 0) {
			takingitem--;
		}
		if (potDelay > 0) {
			potDelay--;
		}
		if (MiasmicDelay > 0) {
			MiasmicDelay--;
		AttackSpeed = 2;
		}
		if (MiasmicDelay == 0) {
		MiasmicDelay--;
	        AttackSpeed = 1;
		}

if (PrayerON) {
int drain = (drainRate - bonuses.getBonus(11));

if (drain <= 0)
drain = 1;

prayerDrain -= (drain);
if(prayerDrain <= 0 && getSkills().getLevel(5) > 0) {
getSkills().DrainPray(1);
prayerDrain = 100;
}
if(getSkills().getLevel(5) <= 0) {
GameEngine.prayer.PrayerOff(this);
sm("You have run out of prayer points.");
prayerDrain = 100;
}

}
if (dfs > 0)
dfs--;


	if (MusicTimer > 0) {
	    MusicTimer--;
getActionSender().getMusicName(this);
	}

	if (MusicTimer == 0) {
	    MusicTimer = 180;
	    musicId = randomMusic();
getActionSender().PlayMusic(musicId);
	}
if(usingSpecial == false) {
getActionSender().sendConfig2(301, 0);
}
if(usingSpecial == true) {
getActionSender().sendConfig2(301, 1);
}
if(specialAmount < 100 || specialAmount == 100) {
getActionSender().sendConfig2(300, specialAmount*10);
}
		if(frozen > 0){
			frozen--;
		}
		if(vengTimer > 0){
			vengTimer--;
		}
		if(vengTimer == 0 && veng == true) {
			getActionSender().sendMessage("Your Vengeance has faded away.");
			veng = false;
		}	
	if (Attacking == true) {
final Player p2 = World.getInstance().getPlayerList().get(id);
if (p2 == null || p2 == this) {
this.Attacking = false;
return;
}
pvp().Attack(p2);
}
	if (AttackingNpc == true) {
final NPC n = World.getInstance().getNpcList().get(Nid);
if (n == null) {
this.AttackingNpc = false;
return;
}
pvn().Attack(n);
}
	if (combatDelay > 0) {
combatDelay--;
}	
	if (combatResetWith > 0) {
	combatResetWith--;
	}else if (combatResetWith == 0){
	combatResetWith--;
	combatWith = 0;
	resetFaceId();
	}

	if (turkeydelay == 28) {
	animate(10994, 0); 
}
if (turkeydelay == 26) {
	animate(10996, 0);
	getAppearance().npcId = 8499;
	getAppearance().asNpc = true;
	getUpdateFlags().setAppearanceUpdateRequired(true);
}
if (turkeydelay == 14) {
	animate(10995, 0);
	graphics(1714, 0);
	getAppearance().npcId = -1;
	getAppearance().asNpc = false;
	getUpdateFlags().setAppearanceUpdateRequired(true);
	turkeydelay = -1;
}
if(turkeydelay > 0){
	turkeydelay--;
}
		} catch(Exception e) {
		}
	}
	
	public void setTemporaryAttribute(String attribute, Object value) {
		try {
		temporaryAttributes.put(attribute, value);
		}
		} catch(Exception e) {
		}
	}
	
	public Object getTemporaryAttribute(String attribute) {
		return temporaryAttributes.get(attribute);
	}
	
	public void removeTemporaryAttribute(String attribute) {
		try {
		temporaryAttributes.remove(attribute);
		} catch(Exception e) {
		}
	}
	
	public Settings getSettings() {
		return this.settings;
	}
	
	public PlayerDetails getPlayerDetails() {
		return this.details;
	}
	
	public ActionSender getActionSender() {
		return this.actionSender;
	}
	
	public IoSession getSession() {
		return this.details.getSession();
	}
	
	public String getUsername() {
		return this.details.getUsername();
	}
	
	public int getRights() {
		return this.rights;
	}
	public void setRights(int rights) {
		this.rights = rights;
	}
	public int donator() {
		return this.donator;
	}
	
	public void processQueuedPackets() {
		try {
		synchronized(queuedPackets) {
			Packet p = null;
			while((p = queuedPackets.poll()) != null) {
				PacketHandlers.handlePacket(getSession(), p);
			}
		}
		} catch(Exception e) {
		}
	}
	
	public void addPacketToQueue(Packet p) {
		try {
		synchronized(queuedPackets) {
			queuedPackets.add(p);
		}
		} catch(Exception e) {
		}
	}
	
	public PlayerUpdateFlags getUpdateFlags() {
		return updateFlags;
	}
	
	public Appearance getAppearance() {
		return appearance;
	}
	
	public HeadIcons getHeadIcons() {
		return headIcons;
	}
	
	public Equipment getEquipment() {
		return equipment;
	}
	
	public WalkingQueue getWalkingQueue() {
		return walkingQueue;
	}
	
	public Skills getSkills() {
		return skills;
	}

	public boolean isDisconnected() {
		return !getSession().isConnected();
	}

	public void setPlayerListSize(int playerListSize) {
		try {
		localEntities.playerListSize = playerListSize;
		} catch(Exception e) {
		}
	}

	public int getPlayerListSize() {
		return localEntities.playerListSize;
	}

	public void setPlayerList(Player[] playerList) {
		try {
		localEntities.playerList = playerList;
		} catch(Exception e) {
		}
	}

	public Player[] getPlayerList() {
		return localEntities.playerList;
	}
	
	public void setPlayersInList(byte[] playersInList) {
		try {
		localEntities.playersInList = playersInList;
		} catch(Exception e) {
		}
	}

	public byte[] getPlayersInList() {
		return localEntities.playersInList;
	}
	


	public void setNpcListSize(int npcListSize) {
		try {
		localEntities.npcListSize = npcListSize;
		} catch(Exception e) {
		}
	}

	public int getNpcListSize() {
		return localEntities.npcListSize;
	}

	public void setNpcList(NPC[] npcList) {
		try {
		localEntities.npcList = npcList;
		} catch(Exception e) {
		}
	}

	public NPC[] getNpcList() {
		return localEntities.npcList;
	}
	
	public void setNpcsInList(byte[]npcsInList) {
		try {
		localEntities.npcsInList = npcsInList;
		} catch(Exception e) {
		}
	}

	public byte[] getNpcsInList() {
		return localEntities.npcsInList;
	}

	public Inventory getInventory() {
		return inventory;
	}
	public PriceCheck getPriceCheck() {
		return pricecheck;
	}
	public SummonTrain getSummonTrain() {
		return summontrain;
	}
	public AutoCast getAutoCast() {
		return autocast;
	}
	public RequestAssist RequestAssist() {
	return RequestAssist;
	}
	public WalkTo WalkTo() {
		return walkto;
	}
	public FamiliarInventory getFamiliarInventory() {
		return familiarinventory;
	}
	public FamiliarNpc getFamiliarNpc() {
		return familiarnpc;
	}
	public MagicCombat getMagicCombat() {
		return magiccombat;
	}
	public NpcMagicCombat getNpcMagicCombat() {
		return npcmagiccombat;
	}
	public PlayerVsNpc pvn() {
		return playervsnpc;
	}
	public PlayerVsPlayer pvp() {
		return playervsplayer;
	}
	public ItemInformation getItemInformation() {
		return iteminformation;
	}
	public ChatMessage getLastChatMessage() {
		return lastChatMessage;
	}
	
	public void setLastChatMessage(ChatMessage msg) {
		try {
		lastChatMessage = msg;
		} catch(Exception e) {
		}
	}
	
	public int getWorld() {
		return world;
	}

	public Friends getFriends() {
		return friends;
	}

	public boolean isRebuildNpcList() {
		return localEntities.rebuildNpcList;
	}
	
	public boolean isNoting() {
		return noting;
	}

	public void setNoting(boolean n) {
		this.noting = n;
	}
	
	public void graphics(int id) {
		try {
		graphics(id, 0);
		} catch(Exception e) {
		}
	}
	
	public void graphics(int id, int delay) {
		try {
		this.setLastGraphics(new Graphics(id, delay));
		updateFlags.setGraphicsUpdateRequired(true);
		} catch(Exception e) {
		}
	}
	
	public void animate(int id) {
		try {
		animate(id, 0);
		} catch(Exception e) {
		}
	}
	
	public void animate(int id, int delay) {
		try {
		this.setLastAnimation(new Animation(id, delay));
		updateFlags.setAnimationUpdateRequired(true);
		} catch(Exception e) {
		}
	}

	public void setRebuildNpcList(boolean b) {
		try {
		this.localEntities.rebuildNpcList = true;
		} catch(Exception e) {
		}
	}
	
	public void processQueuedHits() {
		try {
		if(!updateFlags.isHitUpdateRequired()) {
			if(queuedHits.size() > 0) {
				Hit h = queuedHits.poll();
				hit(h.getDamage(), h.getType());
			}
		}
		if(!updateFlags.isHit2UpdateRequired()) {
			if(queuedHits.size() > 0) {
				Hit h = queuedHits.poll();
				hit(h.getDamage(), h.getType());
			}
		}
		} catch(Exception e) {
		}
	}
	{
	public void heal(int amount) {
		try {
		skills.heal(amount);
		} catch(Exception e) {
		}
	}
	
	public void hit(int damage) {
		try {
		if(damage > getSkills().getLevel(3)) {
			damage = getSkills().getLevel(3);
		}
		if(getSkills().getLevel(3) <= 0) {
			damage = 0;
		}
		if(damage == 0) {
			hit(damage, Hits.HitType.NO_DAMAGE);
		} else {
			hit(damage, Hits.HitType.NORMAL_DAMAGE);
		}
		} catch(Exception e) {
		}
	}
	
	public void hit(int damage, Hits.HitType type) {
		try {
		int hp = this.getSkills().getLevelForXp(Skills.HITPOINTS);
		if(damage > hp) {
			damage = hp;
		}
		if(!updateFlags.isHitUpdateRequired()) {
			getHits().setHit1(new Hit(damage, type));
			updateFlags.setHitUpdateRequired(true);
		} else {
			if(!updateFlags.isHit2UpdateRequired()) {
				getHits().setHit2(new Hit(damage, type));
				updateFlags.setHit2UpdateRequired(true);
			} else {
				queuedHits.add(new Hit(damage, type));
			}
		}
		skills.hit(damage);
		if(skills.getLevel(Skills.HITPOINTS) <= 0) {
			if(!this.isDead()) {
				World.getInstance().registerEvent(new DeathEvent(this));
			}
			if(inClanWars()) {
			} else {
			dropLoot();
			}
			this.setDead(true);
		}
		} catch(Exception e) {
		}
	}
	public void tele(int x, int y, int h) {
		Location tele = null;
		try {
			tele = Location.location(x, y, h);
		} catch (Exception e) {
			tele = Location.location(x, y, 0);
		}
		teleport(tele);
	}
	
	public Bank getBank() {
		return bank;
	}
	
	public void setRunEnergy(int runEnergy) {
		try {
		this.runEnergy = runEnergy;
		actionSender.sendEnergy();
		} catch(Exception e) {
		}
	}
	
	public int getRunEnergy() {
		return this.runEnergy;
	}
	
	public Bonuses getBonuses() {
		return this.bonuses;
	}

	public void setHd(boolean b) {
		try {
		this.hd = b;
		if(b) {
			this.getActionSender().sendHdLogin();
		}
		} catch(Exception e) {
		}
	}
	
	public boolean isHd() {
		return hd;
	}

	public void turnTo(Entity entity) {
		try {
		this.getUpdateFlags().setFaceToUpdateRequired(true, entity.getClientIndex());
		} catch(Exception e) {
		}
	}
	public void turnTo(int toturn) {
		try {
		this.getUpdateFlags().setFaceToUpdateRequired(true, toturn);
		} catch(Exception e) {
		}
	}
	public void turnTemporarilyTo(Entity entity) {
		try {
		this.getUpdateFlags().setFaceToUpdateRequired(true, entity.getClientIndex());
		this.getUpdateFlags().setClearFaceTo(true);
		} catch(Exception e) {
		}
	}


	public void resetTurnTo() {
		try {
		this.getUpdateFlags().setFaceToUpdateRequired(true, 0);
		} catch(Exception e) {
		}
	}


	public int getAttackAnimation() {
		return !this.appearance.isNpc() ? equipment.getAttackAnimation() : NPCDefinition.forId(this.appearance.getNpcId()).getAttackAnimation();
	}


	public int getAttackSpeed() {
		return equipment.getAttackSpeed();
	}
//Max.HitStart


    public int BestAttackBonus() {
        if(bonuses.getBonus(0) > bonuses.getBonus(1) && bonuses.getBonus(0) > bonuses.getBonus(2)) {
            return 0;
	}
        if(bonuses.getBonus(1) > bonuses.getBonus(0) && bonuses.getBonus(1) > bonuses.getBonus(2)) {
            return 1;
	}
	if(bonuses.getBonus(2) > bonuses.getBonus(1) ||  bonuses.getBonus(2) > bonuses.getBonus(0)) {
	    return 2;
	}
	return 1;
    }

    public int DefenceBonus(int BestAttackBonus) {
        if(BestAttackBonus == 0)
	return 5;
        if(BestAttackBonus == 1)
	return 6;
        if(BestAttackBonus == 2)
	return 7;
	return 5;
    }

    public boolean Defence(double probhit) {
final Player p2 = World.getInstance().getPlayerList().get(id);
if (p2 == null) {
return true;
}
	int att_def =  BestAttackBonus();
	int def_att = DefenceBonus(att_def);

	double attackBonus = (double) bonuses.getBonus(att_def);
	double attack = (double) getSkills().getLevel(0);

		if (CLARITYOFTHOUGHT == true)
			attack *= 1.05;
		if (IMPROVEDREFLEXES == true)
			attack *= 1.10;
		if (INCREDIBLEREFLEXES == true)
			attack *= 1.15;
		if (CHILVALRY == true)
			attack *= 1.15;
		if (PIETY == true)
			attack *= 1.20;
		


	double BestAttack = attackBonus + attack + (double)Misc.random(50);

	double defenceBonus = (double) p2.bonuses.getBonus(def_att);
	double defence = (double) p2.getSkills().getLevel(1);

		if (p2.THICKSKIN == true)
			defence *= 1.05;
		if (p2.ROCKSKIN == true)
			defence *= 1.10;
		if (p2.STEELSKIN == true)
			defence *= 1.15;
		if (p2.CHILVALRY == true)
			defence *= 1.23;
		if (p2.PIETY == true)
			defence *= 1.25;
		if (p2.PROTECTFROMMELEE == true)
			defenceBonus *= 1.50;

	double BestDefence = defenceBonus + defence;


        if ((Misc.random(BestAttack)*probhit) > Misc.random(BestDefence)){
   return true;
}
   return false;
}


	public double rangeAccuracy(Player opp) {
if (opp == null || this == null) {
return 0;
}
		double range = getSkills().getLevel(4);
		double defence = opp.getSkills().getLevel(1);
		double rangeBonus = bonuses.getBonus(4);
		double defenceBonus = opp.bonuses.getBonus(9);
		if (SHARPEYE== true) {
			range *= 1.05;
		}

		if (HAWKEYE == true) {
			range *= 1.10;
		}

		if (EAGLEEYE == true) {
			range *= 1.15;
		}
		if (opp.THICKSKIN == true) {
			defence *= 1.05;
		}
		if (opp.ROCKSKIN == true) {
			defence *= 1.10;
		}
		if (opp.STEELSKIN == true) {
			defence *= 1.15;
		}
		if (opp.CHILVALRY == true) {
			defence *= 1.23;
		}
		if (opp.PIETY == true) {
			defence *= 1.25;
		}
		if (opp.PROTECTFROMMISSELES == true) {
			defenceBonus *= 1.50;
		}
		double offensiveAttribute = range + rangeBonus;
		double defensiveAttribute = defence + defenceBonus;
		double difference = Math.abs(offensiveAttribute - defensiveAttribute);
		boolean positive = offensiveAttribute > defensiveAttribute;
		double interval = difference * 0.00175;
		double percentage = 0.50;
		if (!positive) {
			percentage -= interval;
		}
		if (positive) {
			percentage += interval;
		}
		return percentage;
	}

	public boolean RDefence(){	
final Player opp = World.getInstance().getPlayerList().get(id);
if (opp == null) {
return true;
}
		return Math.random() <= rangeAccuracy(opp);
	}


	public boolean Defence() {
		final Player opp = World.getInstance().getPlayerList().get(id);
		if (opp == null) {
			return true;
			}
			return Math.random() <= meleeAccuracy(opp);
		}
	public double meleeAccuracy(Player opp) {
		if (opp == null || this == null) {
			return 0;
			}
			double attack = getSkills().getLevel(0);
			double defence = opp.getSkills().getLevel(1);
			int activeAttackBonus = BestAttackBonus();
			int activeDefenceBonus = DefenceBonus(activeAttackBonus);
			double attackBonus = bonuses.getBonus(activeAttackBonus);
			double defenceBonus = opp.bonuses.getBonus(activeDefenceBonus);
			if (CLARITYOFTHOUGHT == true)
				attack *= 1.05;
			if (IMPROVEDREFLEXES == true)
				attack *= 1.10;
			if (INCREDIBLEREFLEXES == true)
				attack *= 1.15;
			if (CHILVALRY == true)
				attack *= 1.15;
			if (PIETY == true)
				attack *= 1.20;
			if (opp.THICKSKIN == true)
				defence *= 1.05;
			if (opp.ROCKSKIN == true)
				defence *= 1.10;
			if (opp.STEELSKIN == true)
				defence *= 1.15;
			if (opp.CHILVALRY == true)
				defence *= 1.23;
			if (opp.PIETY == true)
				defence *= 1.25;
			if (opp.PROTECTFROMMELEE == true)
				defenceBonus *= 1.50;
			double offensiveAttribute = (attack * 1.5) + attackBonus;
			double defensiveAttribute = (defence * 1.5) + defenceBonus;
			double difference = Math.abs(offensiveAttribute - defensiveAttribute);
			boolean positive = offensiveAttribute > defensiveAttribute;
			double interval = difference * 0.0015;
			double percentage = 0.55;
			if (!positive) {
				percentage -= interval;
			}
			if (positive) {
				percentage += interval;
			}
			return percentage;
		}
    public int MaxHitMelee(double probhit) {
		int a = getSkills().getLevel(2);
		int b = bonuses.getBonus(10);
		double c = (double)a;
		double d = (double)b;
		double f = 0;
		double h = 0;
		f = (d*0.00175)+0.1;
		h = Math.floor(c*f+2.05);
		return(int)h;
	}
    public int MaxHitMelee() {
		double probhit = 1;
		int a = getSkills().getLevel(2);
		int b = bonuses.getBonus(10);
		double c = (double)a;
		double d = (double)b;
		double f = 0;
		double h = 0;
		f = (d*0.00175)+0.1;
		h = Math.floor(c*f+2.05);
		return(int)h;	
	}

    public boolean RDefence(double probhit) {
	final Player p2 = World.getInstance().getPlayerList().get(id);
		if (p2 == null) {
			return true;
			}
			int att_def =  4;
			double attackBonus = (double) bonuses.getBonus(att_def);
			double attack = (double) getSkills().getLevel(4);

		if (SHARPEYE== true) {
			attack *= 1.05;
		}

		if (HAWKEYE == true) {
			attack *= 1.10;
		}

		if (EAGLEEYE == true) {
			attack *= 1.15;
		}



	double BestAttack = attackBonus + attack + (double)Misc.random(50);

	double defenceBonus = (double) p2.bonuses.getBonus(9);
	double defence = (double) p2.getSkills().getLevel(2);

		if (p2.THICKSKIN == true) {
			defence *= 1.05;
		}
		if (p2.ROCKSKIN == true) {
			defence *= 1.10;
		}
		if (p2.STEELSKIN == true) {
			defence *= 1.15;
		}
		if (p2.CHILVALRY == true) {
			defence *= 1.23;
		}
		if (p2.PIETY == true) {
			defence *= 1.25;
		}
		if (p2.PROTECTFROMMISSELES == true) {
			defenceBonus *= 1.50;
		}

	double BestDefence = defenceBonus + defence;


        if ((Misc.random(BestAttack)*probhit) > Misc.random(BestDefence)){
   return true;
}
   return false;
}


	public int MaxHitRange() {
		double probhit = 1;
		int a = getSkills().getLevel(4);
		int b = bonuses.getBonus(12);
		double c = (double)a;
		double d = (double)b;
		double f = 0;
		double h = 0;
		f = (d*0.00195)+0.1;
		h = Math.floor(c*f+2.05);
		return(int)h;
	}

	public int MaxHitRange(double probhit) {
		int a = getSkills().getLevel(4);
		int b = bonuses.getBonus(12);
		double c = (double)a;
		double d = (double)b;
		double f = 0;
		double h = 0;
		f = (d*0.00195)+0.1;
		h = Math.floor(c*f+2.05);
		return(int)h;
	}
    public void setEquipmentBonus() {
		try {
		int a = bonuses.getBonus(0);
		int b = bonuses.getBonus(1);
		int c = bonuses.getBonus(2);
		int d = bonuses.getBonus(5);
		int dc = bonuses.getBonus(6);
		int ds = bonuses.getBonus(7);
		int m = bonuses.getBonus(8);
		int mm = bonuses.getBonus(3);
		int e = bonuses.getBonus(10);
		int p = bonuses.getBonus(11);
		int s = bonuses.getBonus(12);
		int f = bonuses.getBonus(4);
		int g = bonuses.getBonus(9);
	getActionSender().sendString("Stab: "+a, 667, 36);
	getActionSender().sendString("Slash: "+b, 667, 37);
	getActionSender().sendString("Crush: "+c, 667, 38);
	getActionSender().sendString("Magic: "+mm, 667, 39);
	getActionSender().sendString("Ranged: "+f, 667, 40);
	getActionSender().sendString("Stab: "+d, 667, 41);
	getActionSender().sendString("Slash: "+dc, 667, 42);
	getActionSender().sendString("Crush: "+ds, 667, 43);
	getActionSender().sendString("Magic: "+m, 667, 44);
	getActionSender().sendString("Ranged: "+g, 667, 45);
	getActionSender().sendString("Strenght: +"+e, 667, 48);
	getActionSender().sendString("Ranged Str: +"+s, 667, 50);
	getActionSender().sendString("Prayer: +"+p, 667, 49);
        getActionSender().sendString("Summoning: "+0, 667, 46);
        getActionSender().sendString(bonuses.weight[0]+"kg", 667, 32);
		} catch (Exception e) {
		}
}
	public boolean FullVeracEquipped() {
		try {
	if(getEquipment().get(0).getDefinition().getId() == 4753 && getEquipment().get(4).getDefinition().getId() == 4757 && getEquipment().get(7).getDefinition().getId() == 4759  && getEquipment().get(3).getDefinition().getId() == 4755)
                {
		return true;
                }
		return false;	
		} catch (Exception e) {
		return false;
		}
        } 
	public int getNpcMeleeDefence() {
		final NPC n = World.getInstance().getNpcList().get(Nid);
		switch (n.getId()) {
		case 1158:
			return 400;
		case 1160:
			if(FullVeracEquipped())
			return 400;
			else
			return 600;
		case 8324:
		case 8326:
		case 8327:
		return 150;
		case 8325: return 100000;
		case 8352: if (!n.UsingThis)return 1100; else return 550;
		case 8351: if (!n.UsingThis)return 700; else return 366;	
		case 8350: if (!n.UsingThis)return 700; else return 366;
			case 1:
			case 2:
			case 3:
			case 4:
			case 5:
			case 6:
				return 3;

			case 134: return 90;
			case 1615: return 140;
			case 2614: return 230;
			case 5902: return 280;
			case 5253: return 190;
			case 6223: return 195;
			case 6225: return 210;
			case 6227: return 200;
			case 6222: return 190;
			case 6260: return 340;
			case 8133: return 500; //corp
			case 6261: return 230;
			case 6263: return 250;
			case 3847: return 230;
			case 1472: return 240;
			case 2745: return 130;
			case 2746: return 10;
			case 4284: return 150;
			case 4291: return 90;
			case 4292: return 95;
			case 6265: return 240;
			case 6625: return 150;
			case 6729: return 170;
			case 6247: return 290;
			case 6691: return 190;
			case 6998: return 180;	
			case 6999: return 160;
			case 7770: return 180;
			case 7771: return 420;

			default:
				return 20;
		}
	}
	public int getNpcRangeDefence() {
		final NPC n = World.getInstance().getNpcList().get(Nid);
				switch (n.getId()) {
				case 1158:
					return 450;
				case 1160:
					return 675;
				case 8324:
				case 8325:
				case 8327:
				return 200;
				case 8326: return 100000;
				case 8351: if (!n.UsingThis)return 1200; else return 600;
				case 8352: if (!n.UsingThis)return 800; else return 400;	
				case 8350: if (!n.UsingThis)return 800; else return 400;
					case 1:
					case 2:
					case 3:
					case 4:
					case 5:
					case 6:
						return 0;

					case 134: return 90;
					case 1615: return 140;
					case 2614: return 230;
					case 5902: return 280;
					case 5253: return 190;
					case 6223: return 195;
					case 6225: return 210;
					case 6227: return 200;
					case 6222: return 190;
					case 6260: return 340;
					case 8133: return 550; //corp
					case 6261: return 230;
					case 6263: return 250;
					case 3847: return 230;
					case 1472: return 240;
					case 2745: return 130;
					case 2746: return 10;
					case 4284: return 150;
					case 4291: return 90;
					case 4292: return 95;
					case 6265: return 240;
					case 6625: return 150;
					case 6729: return 170;
					case 6247: return 290;
					case 6691: return 190;
					case 6998: return 180;	
					case 6999: return 160;
					case 7770: return 180;
					case 7771: return 420;

					default:
						return 0;
				}
			}
    	public int getRandom(int range) {
        	return (int)(Math.random() * (range + 1));
    	}

	public int NPCMaxHitMelee() {
		int a = getSkills().getLevel(2);
		int b = bonuses.getBonus(10);
		double c = (double)a;
		double d = (double)b;
		double f = 0;
		double h = 0;
		f = (d*0.00175)+0.1;
		h = Math.floor(c*f+2.05);
		return(int)h;
	}
	public int NPCMaxHitRange() {
		double probhit = 1;
		int a = getSkills().getLevel(4);
		int b = bonuses.getBonus(12);
		double c = (double)a;
		double d = (double)b;
		double f = 0;
		double h = 0;
		f = (d*0.00195)+0.1;
		h = Math.floor(c*f+2.05);
		return(int)h;
	}
	

public int getSpecialAmount() {
	if(getEquipment().get(3) == null) {
		return 25;
	}
	switch(getEquipment().get(3).getDefinition().getId()) {
		case 15241: return 50;
		case 11235: return 55;
		case 13899: return 25;
		case 13905: return 50;
		case 13902: return 50;
		case 14484: return 50;
		case 14684: return 50;
		case 11694: return 50;
		case 11696: return 50;
		case 11698: return 50;
		case 11700: return 50;
		case 10887: return 50;
		case 11730: return 100;
		case 5698: return 25;
		case 4151: return 50;
		case 7158: return 50;
		case 3204: return 50;
		case 4587: return 50;
		case 1434: return 25;
		case 1305: return 25;
		case 4153: return 100;
		case 35: return 75;
		default: return 25;
	}
}


	public int getDefenceAnimation() {
		return !this.appearance.isNpc() ? equipment.getDefenceAnimation() : NPCDefinition.forId(this.appearance.getNpcId()).getDefenceAnimation();
	}


	public boolean isAnimating() {
		return this.getUpdateFlags().isAnimationUpdateRequired();
	}


	public boolean isDestroyed() {
		return !World.getInstance().getPlayerList().contains(this);
	}

	public Specials getSpecials() {
		return specials;
	}

	public int getDeathAnimation() {
		return !this.appearance.isNpc() ? 7197 : NPCDefinition.forId(this.appearance.getNpcId()).getDeathAnimation();
	}

/*public boolean SafeZone(){
	if((getLocation().getX() >= 2508 && getLocation().getX() <= 2525 && getLocation().getY() >= 3851 && getLocation().getY() <=3874 || getLocation().getX() >= 3228 && getLocation().getX() <= 3257 && getLocation().getY() >= 3523 && getLocation().getY() <=3523 || getLocation().getX() >= 2438 && getLocation().getX() <= 2446 && getLocation().getY() >= 3082 && getLocation().getY() <=3098 || getLocation().getX() >= 2394 && getLocation().getX() <= 2408 && getLocation().getY() >= 5168 && getLocation().getY() <=5175 || getLocation().getX() >= 3200 && getLocation().getX() <= 3229 && getLocation().getY() >= 3200 && getLocation().getY() <=3233|| getLocation().getX() >= 3135 && getLocation().getX() <= 3204 && getLocation().getY() >= 3652 && getLocation().getY() <=3663 || getLocation().getX() >= 3147 && getLocation().getX() <= 3199 && getLocation().getY() >= 3663 && getLocation().getY() <=3681 || getLocation().getX() >= 3158 && getLocation().getX() <= 3199 && getLocation().getY() >= 3681 && getLocation().getY() <=3693 || getLocation().getX() >= 3176 && getLocation().getX() <= 3191 && getLocation().getY() >= 3693 && getLocation().getY() <=3703 || getLocation().getX() >= 2948 && getLocation().getX() <= 2949 && getLocation().getY() >= 3368 && getLocation().getY() <= 3369 || getLocation().getX() >= 3221 && getLocation().getX() <= 3224 && getLocation().getY() >= 3223 && getLocation().getY() <=3225 || getLocation().getX() >= 2526 && getLocation().getX() <= 2554 && getLocation().getY() >= 4707 && getLocation().getY() <=4725 || getLocation().getX() >= 3250 && getLocation().getX() <= 3257 && getLocation().getY() >= 3419 && getLocation().getY() <=3423 || getLocation().getX() >= 3179 && getLocation().getX() <= 3194 && getLocation().getY() >= 3432 && getLocation().getY() <=3446 || getLocation().getX() >= 2943 && getLocation().getX() <= 2947 && getLocation().getY() >= 3368 && getLocation().getY() <=3373 || getLocation().getX() >= 3009 && getLocation().getX() <= 3018 && getLocation().getY() >= 3353 && getLocation().getY() <=3358 || getLocation().getX() >= 3091 && getLocation().getX() <= 3098 && getLocation().getY() >= 3488 && getLocation().getY() <=3499 || getLocation().getX() >= 3065 && getLocation().getX() <= 3112 && getLocation().getY() >= 3520 && getLocation().getY() <=3523 || getLocation().getX() >= 3264 && getLocation().getX() <= 3279 && getLocation().getY() >= 3672 && getLocation().getY() <=3695 /*|| getLocation().getX() >= 2498 && getLocation().getX() <= 3841 && getLocation().getY() >= 2526 && getLocation().getY() <= 3878))
		return true;
			else
		return false;
}*/
    public boolean godWarsDung() {
	if(getLocation().getX() >= 2819 && getLocation().getX() <= 2946 && getLocation().getY() >= 5254 && getLocation().getY() <= 5362)
		return true;
			else
		return false;
    	}

    public boolean saraChamber() {
	return getLocation().getX() >= 2889 && getLocation().getX() <= 2907 && getLocation().getX() >= 5258 && getLocation().getX() <= 5276;
    	}

    public boolean zammyChamber() {
	return getLocation().getX() >= 2919 && getLocation().getX() <= 2935 && getLocation().getX() >= 5319 && getLocation().getX() <= 5330;
    	}

    public boolean graardorChamber() {
	return getLocation().getX() >= 2864 && getLocation().getX() <= 2876 && getLocation().getX() >= 5351 && getLocation().getX() <= 5369;
    	}

    public boolean armadylChamber() {
	return getLocation().getX() >= 2823 && getLocation().getX() <= 2843 && getLocation().getX() >= 5295 && getLocation().getX() <= 5310;
    	}

    public boolean armadylChamber1() {
	return getLocation().getX() >= 2825 && getLocation().getX() <= 2841 && getLocation().getX() >= 5297 && getLocation().getX() <= 5307;
    	}
	public boolean IsAtCorporeal(){
	if(getLocation().getX() >= 2852 && getLocation().getX() <= 2880 && getLocation().getY() >= 9932 && getLocation().getY() <=9968)
		return true;
			else
		return false;
	}
	public boolean IsAtTormented(){
		if(getLocation().getX() >= 2902 && getLocation().getX() <= 2916 && getLocation().getY() >= 9798 && getLocation().getY() <=9807)
			return true;
				else
			return false;
	}
	public boolean IsAtBlackCastle(){
		if(getLocation().getX() >= 3001 && getLocation().getX() <= 3037 && getLocation().getY() >= 3497 && getLocation().getY() <=3523)
			return true;
				else
			return false;
	}
	public boolean inClanWars() {
		if(getLocation().getX() >= 2754 && getLocation().getX() <= 2880 && getLocation().getY() >= 5512 && getLocation().getY() <= 5629 || getLocation().getX() >= 2885 && getLocation().getX() <= 2733 && getLocation().getY() >= 5465 && getLocation().getY() <= 5511 || getLocation().getX() >= 3038 && getLocation().getX() <= 3044 && getLocation().getY() >= 3959 && getLocation().getY() <= 3949) {
			actionSender.sendPlayerOption("Attack", 1, false);
			return true;
				} else {
			return false;
		}
    	}
		public boolean AtSoulWars() {
			if(getLocation().getX() >= 1790 && getLocation().getY() >= 3200 && getLocation().getX() <= 1985 && getLocation().getY() <= 3265) {
			return true;
		} else {
		return false;
		}
		}
		
				public boolean inPestControl() {
		if(getLocation().getX() >= 2680 && getLocation().getX() <= 2631 && getLocation().getY() >= 2613 && getLocation().getY() <= 2568 && getLocation().getZ() == 0) {
		return true;
		} else {
		return false;
		}
		}
	public boolean inWGroom2() {
		if(getLocation().getX() >= 2847 && getLocation().getX() <= 2876 && getLocation().getY() >= 3536 && getLocation().getY() <= 3556 && getLocation().getZ() == 2
|| getLocation().getX() >= 2849 && getLocation().getX() <= 2859 && getLocation().getY() >= 3534 && getLocation().getY() <= 3535 && getLocation().getZ() == 2
|| getLocation().getX() >= 2838 && getLocation().getX() <= 2846 && getLocation().getY() >= 3543 && getLocation().getY() <= 3555 && getLocation().getZ() == 2) {
			return true;
		} else {
			return false;
		}
	}
	
/*public boolean SafeZone(){
if ((getLocation().getX() >= 2940 && getLocation().getX() <= 3395 && getLocation().getY() >= 3524 && getLocation().getY() <= 4000))
		return false;
			else
		return true;
    }
    public boolean multiZone() {
        return getLocation().getX() >= 3316 && getLocation().getX() <= 3369 && getLocation().getY() >= 3636 && getLocation().getY() <= 3738 || getLocation().getX() >= 3287 && getLocation().getX() <= 3298 && getLocation().getY() >= 3167 && getLocation().getY() <= 3178 || getLocation().getX() >= 3070 && getLocation().getX() <= 3095 && getLocation().getY() >= 3405 && getLocation().getY() <= 3448 || getLocation().getX() >= 2961 && getLocation().getX() <= 2981 && getLocation().getY() >= 3330 && getLocation().getY() <= 3354 || getLocation().getX() >= 2510 && getLocation().getX() <= 2537 && getLocation().getY() >= 4632 && getLocation().getY() <= 4660 || getLocation().getX() >= 3012 && getLocation().getX() <= 3066 && getLocation().getY() >= 4805 && getLocation().getY() <= 4858 || getLocation().getX() >= 2794 && getLocation().getX() <= 2813 && getLocation().getY() >= 9281 && getLocation().getY() <= 9305 || getLocation().getX() >= 3546 && getLocation().getX() <= 3557 && getLocation().getY() >= 9689 && getLocation().getY() <= 9700 || getLocation().getX() >= 2708 && getLocation().getX() <= 2729 && getLocation().getY() >= 9801 && getLocation().getY() <= 9829 || getLocation().getX() >= 3450 && getLocation().getX() <= 3525 && getLocation().getY() >= 9470 && getLocation().getY() <= 9535 || getLocation().getX() >= 3207 && getLocation().getX() <= 3395 && getLocation().getY() >= 3904 && getLocation().getY() <= 3903 || getLocation().getX() >= 3006 && getLocation().getX() <= 3072 && getLocation().getY() >= 3611 && getLocation().getY() <= 3712 || getLocation().getX() >= 3149 && getLocation().getX() <= 3395 && getLocation().getY() >= 3520 && getLocation().getY() <= 4000 || getLocation().getX() >= 2365 && getLocation().getX() <= 2420 && getLocation().getY() >= 5065 && getLocation().getY() <= 5120 || getLocation().getX() >= 2890 && getLocation().getX() <= 2935 && getLocation().getY() >= 4425 && getLocation().getY() <= 4470 || getLocation().getX() >= 2250 && getLocation().getX() <= 2290 && getLocation().getY() >= 4675 && getLocation().getY() <= 4715 || getLocation().getX() >= 2690 && getLocation().getX() <= 2825 && getLocation().getY() >= 2680 && getLocation().getY() <= 2810 || inClanWars();
    }*/
	}
		

	public int getHp() {
		return this.getSkills().getLevel(Skills.HITPOINTS);
	}


	public int getMaxHp() {
		return this.getSkills().getLevelForXp(Skills.HITPOINTS);
	}


	public void setHp(int val) {
		try {
		this.getSkills().set(Skills.HITPOINTS, val);
		} catch (Exception e) {
		}
	}


	@Override
	public void dropLoot() {
	return;
	}
		if(this.inClanWars()) {
			return;
		}
		if(this.getLocation().getY() >= 4680 && this.getLocation().getY() <= 4730 && this.getLocation().getX() >= 2495 && this.getLocation().getX() <= 2520) {
		return;
		}
		if(this.getRights() == 2) {
			return;
		}
		if(this.giveDrop == 0) {
			System.out.println("Npc Killed him, so no drop");
			return;
		}
		final Player p2 = World.getInstance().getPlayerList().get(this.giveDrop);
		List<Item> itemsInHand = new ArrayList<Item>();
		for(int i = 0; i < Inventory.SIZE; i++) {
			Item item = this.getInventory().getContainer().get(i);
			if(item != null) {
				itemsInHand.add(item);
			}
		}
		for(int i = 0; i < Equipment.SIZE; i++) {
			Item item = this.getEquipment().getContainer().get(i);
			if(item != null) {
				itemsInHand.add(item);
			}
		}
		this.getInventory().reset();
		this.getEquipment().reset();
		int keep = 3;
		if(this.PROTECTITEM == true) {
			keep = 4;
		}
		if(this.getHeadIcons().isSkulled()) {
		keep = 0;
		if(this.PROTECTITEM == true) {
		keep = 1;
		}
		}
		if(keep > 0) {
			Collections.sort(itemsInHand, new Comparator<Item>() {
				@Override
				public int compare(Item arg0, Item arg1) {
                    int a0 = arg0.getDefinition().getPrice().getNormalPrice();
                    int a1 = arg1.getDefinition().getPrice().getNormalPrice();
					return a1 - a0;
				}
			});
			List<Item> toRemove = new ArrayList<Item>();
			for(int i = 0; i < itemsInHand.size(); i++) {
				Item item = itemsInHand.get(i);
				if(item.getDefinition().isStackable() || item.getDefinition().isNoted()) {
					continue;
				}
				if(keep > 0) {
					toRemove.add(item);
					keep--;
				} else {
					break;
				}
			}
			for(Item i : toRemove) {
				itemsInHand.remove(i);
				this.getInventory().addItem(i.getId(), 1);
			}
		}
		for(Item i : itemsInHand) {
			World.getInstance().getItemManager().createDropGroundItem(p2, this.getLocation(), new Item(i.getId(), i.getAmount()));
		}
	}

	public void dropLoot2() {
		
	return;
	}
		if(getLocation().getY() >= 4680 && getLocation().getY() <= 4730 && getLocation().getX() >= 2495 && getLocation().getX() <= 2520) {
		return;
		}
		if(this.inClanWars()) {
			return;
		}
		if(this.giveDrop == 0) {
			System.out.println("Npc Killed him, so no drop");
			return;
		}
		final Player p2 = World.getInstance().getPlayerList().get(this.giveDrop);
 		Item Food = dropId(pvpDrops.Foods());
        	Item Low = dropId(pvpDrops.OtherItems());
 		Item Medium = dropId(pvpDrops.OtherItems2());
 		Item High = dropId(pvpDrops.OtherItems3());
 		Item PvpItems = dropId(pvpDrops.PvPItems());
 		Item PvpItems2 = dropId(pvpDrops.PvPItems());
 		Item TargetDrop = dropId(pvpDrops.TargetDrop());

		List<Item> itemsInHand = new ArrayList<Item>();
		List<Item> itemsInHand2 = new ArrayList<Item>();
		List<Item> itemsInHand3 = new ArrayList<Item>();
		List<Item> itemsInHand4 = new ArrayList<Item>();
		List<Item> itemsInHand5 = new ArrayList<Item>();
		List<Item> itemsInHand6 = new ArrayList<Item>();
		List<Item> itemsInHand7 = new ArrayList<Item>();
		if(Food != null || Low != null || Medium != null || High != null ||  PvpItems != null ||  TargetDrop != null) {
			itemsInHand.add(Food);
			itemsInHand2.add(Low);
			itemsInHand3.add(Medium);
			itemsInHand4.add(High);
			itemsInHand5.add(PvpItems);
			itemsInHand6.add(TargetDrop);
			itemsInHand7.add(PvpItems2);
		}

		for(Item food : itemsInHand) {
		for(Item low : itemsInHand2) {
		for(Item medium : itemsInHand3) {
		for(Item high : itemsInHand4) {
		for(Item pvpitems : itemsInHand5) {
		for(Item targetdrop : itemsInHand6) {
		for(Item pvpitems2 : itemsInHand7) {

		//if(p2.giveDrop == p2.bhTarget) {
		if(p2.bhTarget == p2.giveDrop) {
			p2.playerEp = p2.playerEp - Misc.random(5);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), targetdrop);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your target.");
			p2.giveDrop = 0;
		}

		if(p2.playerEp <= 10) {
			p2.playerEp = p2.playerEp - Misc.random(5);
			World.getInstance().getItemManager().createDropGroundItem(p2
				, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
				, this.getLocation(), low);
			actionSender.sendString("EP: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}


		if(p2.playerEp >= 11 && p2.playerEp <= 21) {
			p2.playerEp = p2.playerEp - Misc.random(10);
			World.getInstance().getItemManager().createDropGroundItem(p2
				, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
				, this.getLocation(), low);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}


		if(p2.playerEp >= 22 && p2.playerEp <= 32) {
			p2.playerEp = p2.playerEp - Misc.random(15);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), low);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), medium);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}


		if(p2.playerEp >= 33 && p2.playerEp <= 44) {
			p2.playerEp = p2.playerEp - Misc.random(20);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), low);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), medium);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), pvpitems);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}


		if(p2.playerEp >= 45 && p2.playerEp <= 55) {
			p2.playerEp = p2.playerEp - Misc.random(30);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), low);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), medium);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), pvpitems);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}


		if(p2.playerEp >= 56 && p2.playerEp <= 66) {
			p2.playerEp = p2.playerEp - Misc.random(40);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), medium);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), pvpitems);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}


		if(p2.playerEp >= 67 && p2.playerEp <= 77) {
			p2.playerEp = p2.playerEp - Misc.random(50);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), medium);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), pvpitems);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), high);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}


		if(p2.playerEp >= 78 && p2.playerEp <= 88) {
			p2.playerEp = p2.playerEp - Misc.random(60);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), medium);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), pvpitems2);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), high);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}


		if(p2.playerEp >= 89 && p2.playerEp <= 100) {
			p2.playerEp = p2.playerEp - Misc.random(70);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), food);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), pvpitems2);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), high);
			World.getInstance().getItemManager().createDropGroundItem(p2
					, this.getLocation(), medium);
			actionSender.sendString("Drop Potential: "+playerEp+"%", 591, 9);
			actionSender.sendMessage("You killed your opponent.");
			p2.giveDrop = 0;
		}

		}}}}}}}
	}

	public boolean isAutoRetaliating() {
		return settings.isAutoRetaliate();
	}



	public int getDrawBackGraphics() {
		return equipment.getDrawBackGraphics();
	}


	public int getProjectileId() {
		return equipment.getProjectileId();
	}

		public void setOnLogin(boolean onLogin) {
			this.onLogin = onLogin;
		}

		public boolean isOnLogin() {
			return onLogin;
		}
		public InterfaceSwitches getInterfaceswitches() {
			return interfaceswitches;
		}
		public void setDisplayMode(int displayMode) {
			this.displayMode = displayMode;
		}

		public int getDisplayMode() {
			return displayMode;
		}
		public void setFullScreen(boolean fullScreen) {
			this.fullScreen = fullScreen;
		}

		public boolean isFullScreen() {
			return fullScreen;
		}
	@Override
	public CombatType getCombatType() {
		if(equipment.isWieldindBow() || equipment.isWieldingKnives()) {
			return CombatType.RANGE;
		}
		return CombatType.MELEE;
	}
	public boolean hasAmmo() {
		return equipment.hasAmmo();
	}
	public void npcswitch(int id) {
		try {
		} catch(Exception e) {
		}
	}
}
  
Old
  (#2 (permalink))
ha ha is Offline
★♛ℵѦJℑℳṲℜ♛★
image
 
ha ha's Avatar
 
Posts: 1,556
Cookies Given: 0
Cookies Received: 1
Time Online: 11 d 8 h 12 m
Clan: Imperium
   
Default 03-27-2011, 08:12 AM

just restore what it had there before, its because u added something to interface


You are now manually breathing.


★ نجمة ★
  
Old
  (#3 (permalink))
VFX is Offline
Video FX and Editing
image
 
VFX's Avatar
 
Posts: 22
Cookies Given: 0
Cookies Received: 0
Time Online: 4 h 40 m
   
Default 06-20-2011, 03:23 AM

You have added a bracket or symbol somewhere you weren't supposed to. :\


I VFX, you Jelly bro?

Thats the Promo Link Below, I made that.

  
Old
  (#4 (permalink))
phl0w is Offline
ARE YOU MAD?
image
 
phl0w's Avatar
 
Posts: 59
Cookies Given: 0
Cookies Received: 0
Time Online: 20 h 55 m
   
Default 06-27-2011, 07:02 AM

You're missing a bracket ( the '}') in your tick().
  
Old
  (#5 (permalink))
Sao Godo is Offline
<span style="color: lavender">Nomen est omen</span>
image
 
Sao Godo's Avatar
 
Posts: 4,574
Cookies Given: 15
Cookies Received: 50
Time Online: 40 d 23 h 34 m
Clan: Win
   
Default 06-27-2011, 07:19 AM

WE SHOULD NOT BE ANSWERING THAT

/reported



Trusted Helper


  
adsense code2.3
Closed Thread

Bookmarks

[562] Compiler Error

Programming




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
adsense2.6
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 06:31 PM.





Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.