Thread: Help With Duel and Pest

Results 1 to 7 of 7
  1. #1 Help With Duel and Pest 
    Registered Member
    Join Date
    Jul 2013
    Posts
    18
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Sorry you guys im just trying to learn and ive tried everything to fix this issue and that is why i am here my Pest control is not spawning any npcs and also getting an error code in player.java please refer to the dropbox link at the bottom Here is my pestcontrol
    Code:
    package com.rs.game.player.controlers.pestcontrol;
    
    import com.rs.game.World;
    import com.rs.game.WorldTile;
    import com.rs.game.npc.NPC;
    import com.rs.game.player.Player;
    import com.rs.game.player.controlers.Controler;
    
    public class PestControler extends Controler {
    	/*
    	 * pest control portals 6142 - 2628 2591 0 6143 - 2680 2588 0 6144 - 2669
    	 * 2570 0 6145 - 2645 2569 0
    	 */
    	NPC voidKnight;
    
    	/**
    	 * Timer for spawning of monsters.
    	 */
    	private int spawnMonster;
    
    	/**
    	 * Timer to unlock portal shield.
    	 */
    	private int portalShield;
    
    	@Override
    	public void start() {
    		player.setNextWorldTile(new WorldTile(2658, 2612, 0));
    		voidKnight = new NPC(3785, new WorldTile(2656, 2592, 0), 0, false, true);
    		sendInterfaces();
    	}
    
    	@Override
    	public void sendInterfaces() {
    		player.getPackets().sendIComponentText(408, 1,
    				"" + voidKnight.getHitpoints());
    		player.getPackets().sendIComponentText(408, 11, "");
    		player.getInterfaceManager().sendTab(
    				player.getInterfaceManager().hasRezizableScreen() ? 10 : 19,
    				408);
    	}
    
    	@Override
    	public void process() {
    		if (spawnMonster > 0)
    			spawnMonster--;
    		if (spawnMonster == 0) {
    			player.getPestControl().spawnMonsters();
    			spawnMonster = 15;
    		}
    		if (portalShield > 0)
    			portalShield--;
    		// uhh **** this..
    		if (portalShield == 0) {
    			for (NPC n : World.getNPCs()) {
    				if (n.getId() == 6146)
    					n.transformIntoNPC(6144);
    			}
    		}
    	}
    
    	@Override
    	public boolean processMagicTeleport(WorldTile toTile) {
    		player.getDialogueManager().startDialogue("SimpleMessage",
    				"You can't leave the pest control area like this.");
    		return false;
    	}
    
    	@Override
    	public boolean processItemTeleport(WorldTile toTile) {
    		player.getDialogueManager().startDialogue("SimpleMessage",
    				"You can't leave the pest control area like this.");
    		return false;
    	}
    
    }
    and my player.java
    Code:
    package com.rs.game.player;
    
    import java.net.InetAddress;
    import java.net.UnknownHostException;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Date;
    import java.util.LinkedList;
    import java.util.List;
    import java.util.concurrent.ConcurrentLinkedQueue;
    import java.util.concurrent.CopyOnWriteArrayList;
    import java.util.concurrent.TimeUnit;
    import java.io.*;
    import java.util.Calendar;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.io.BufferedWriter;
    
    
    
    
    
    
    import com.rs.Settings;
    import com.rs.cores.CoresManager;
    import com.rs.game.Animation;
    import com.rs.game.Entity;
    import com.rs.game.ForceTalk;
    import com.rs.game.Graphics;
    import com.rs.game.Hit;
    import com.rs.game.Hit.HitLook;
    import com.rs.game.World;
    import com.rs.game.WorldObject;
    import com.rs.game.WorldTile;
    import com.rs.game.item.FloorItem;
    import com.rs.game.item.Item;
    import com.rs.game.item.ItemsContainer;
    import com.rs.game.minigames.clanwars.FfaZone;
    import com.rs.game.minigames.clanwars.WarControler;
    import com.rs.game.minigames.duel.DuelArena;
    import com.rs.game.minigames.duel.DuelRules;
    import com.rs.game.minigames.rfd.RecipeforDisaster;
    import com.rs.game.npc.NPC;
    import com.rs.game.npc.familiar.Familiar;
    import com.rs.game.npc.godwars.zaros.Nex;
    import com.rs.game.npc.pet.Pet;
    import com.rs.game.player.actions.PlayerCombat;
    import com.rs.game.player.content.FriendChatsManager;
    import com.rs.game.player.content.Notes;
    import com.rs.game.player.content.Pots;
    import com.rs.game.player.content.SkillCapeCustomizer;
    import com.rs.game.player.content.pet.PetManager;
    import com.rs.game.player.content.GildedAltar.bonestoOffer;
    import com.rs.game.player.content.DwarfCannon;
    import com.rs.game.player.controlers.CorpBeastControler;
    import com.rs.game.player.controlers.CrucibleControler;
    import com.rs.game.player.controlers.DTControler;
    import com.rs.game.player.controlers.FightCaves;
    import com.rs.game.player.controlers.FightKiln;
    import com.rs.game.player.controlers.GodWars;
    import com.rs.game.player.controlers.NomadsRequiem;
    //import com.rs.game.player.controlers.PestControler;
    import com.rs.game.player.controlers.QueenBlackDragonController;
    import com.rs.game.player.controlers.Wilderness;
    import com.rs.game.player.controlers.ZGDControler;
    import com.rs.game.player.controlers.castlewars.CastleWarsPlaying;
    import com.rs.game.player.controlers.castlewars.CastleWarsWaiting;
    import com.rs.game.player.controlers.fightpits.FightPitsArena;
    import com.rs.game.player.controlers.pestcontrol.PestControlGame;
    import com.rs.game.player.controlers.pestcontrol.PestControlLobby;
    import com.rs.game.player.controlers.pestcontrol.PestControler;
    import com.rs.game.player.SpinsManager;
    import com.rs.game.tasks.WorldTask;
    import com.rs.game.tasks.WorldTasksManager;
    import com.rs.net.Session;
    import com.rs.net.decoders.WorldPacketsDecoder;
    import com.rs.net.decoders.handlers.ButtonHandler;
    import com.rs.net.encoders.WorldPacketsEncoder;
    import com.rs.utils.IsaacKeyPair;
    import com.rs.utils.Logger;
    import com.rs.utils.MachineInformation;
    import com.rs.utils.PkRank;
    import com.rs.utils.SerializableFilesManager;
    import com.rs.utils.Text;
    import com.rs.utils.Utils;
    import com.rs.game.player.content.*;
    
    public class Player extends Entity {
    	public static final int TELE_MOVE_TYPE = 127, WALK_MOVE_TYPE = 1,
    			RUN_MOVE_TYPE = 2;
    	private static final long serialVersionUID = 2011932556974180375L;
        public static int boxWon = -1;
        public int isspining;
        public int Rewards;
        public int spins;
        
    	private static final int lastlogged = 0;
    	private transient String username;
    	private transient Session session;
    	private transient boolean clientLoadedMapRegion;
    	private transient int displayMode;
    	private transient int screenWidth;
    	public boolean trustedflower = true;
    	private transient int screenHeight;
    	private transient InterfaceManager interfaceManager;
    	private transient DialogueManager dialogueManager;
    	private transient ConstructFurniture con;
    	private transient Mission mission;
    	public int MiningPoints = 0;
    	private transient SpinsManager spinsManager;
    	private transient DwarfCannon dwarfCannon;
    	private transient HintIconsManager hintIconsManager;
    	private transient ActionManager actionManager;
    	private transient CutscenesManager cutscenesManager;
    	private transient PriceCheckManager priceCheckManager;
    	private transient CoordsEvent coordsEvent;
    	private transient FriendChatsManager currentFriendChat;
    	private transient Trade trade;
    	private transient DuelRules lastDuelRules;
    	private transient IsaacKeyPair isaacKeyPair;
    	private transient Pet pet;
    	public static ItemsContainer<Item> items = new ItemsContainer<Item>(13, true);
    
    	// Money Pouch
    	public int coinAmount;
    	public int money = 0;
    	public boolean moneyPouch;
    	
    	//Rfd
    	public boolean
    	rfd1
    	,rfd2
    	,rfd3
    	,rfd4
    	,rfd5
    	= false;
    	//Completionist cape requirements
    		public int minedore;
    		public int slayertask;
    		public int cookedmeat;
    		public int siphon;
    		public int ranlaps;
    		public int ivyadze;
    		public int rangepoints;
    		public int burntmagiclogs;
    		//public int isCompletionist;
    	//Comp Req
    	public static int MAGIC_LOGS_BURNT;
    	public static int MAGIC_LOGS_CHOPPED;
    	public static int RUNITE_ORE_MINED;
    	public static int RAW_ROCKTAILS_COOKED;
    	public static int RUNITE_ITEMS_SMITHED;
    	public static int ONYX_GEMS_CUT;
    	public static int FROST_BONES_BURIED;
    	public static int RAW_ROCKTAILS_FISHED;
    	
    	//Squeal
    	
    	public void refreshSqueal() {
    		getPackets().sendConfigByFile(11026, getSpins() + 1);
    	}
    
    	public void setSpins(int spins) {
    		this.spins = spins;
    	}
    	
    	public int getSpins() {
    		return spins;
    	}
    
    	 public Item getBox() {
    		 Item[] box = items.getItems();
    	 	return box[Rewards];
    	}
    
    	 //PkPoints
    	 public int getPlayerPoints() {
    		 return playerpoints;
    		 }
    	 
    	// Just for removing Maxcape on login
    	public int maxCape = 0;
    
    	// used for packets logic
    	private transient ConcurrentLinkedQueue<LogicPacket> logicPackets;
    
    	// used for update
    	private transient LocalPlayerUpdate localPlayerUpdate;
    	private transient LocalNPCUpdate localNPCUpdate;
    
    	private int temporaryMovementType;
    	private boolean updateMovementType;
    
    	// player stages
    	private transient boolean started;
    	private transient boolean running;
    	
    	//Used For HomeTeleports
    	public final boolean Ass = false;
    	public final boolean Gnome = true;
    	public final boolean Demon = false;
    	public final boolean Pony = false;
    	public final boolean SuperJump = false;
    
    	// Kuradal
    	private boolean talkedWithKuradal;
    
    	private transient long packetsDecoderPing;
    	private transient boolean resting;
    	private transient boolean canPvp;
    	private transient boolean cantTrade;
    	private transient long lockDelay; // used for doors and stuff like that
    	private transient long foodDelay;
    	private transient long potDelay;
    	private transient long boneDelay;
    	private transient Runnable closeInterfacesEvent;
    	private transient long lastPublicMessage;
    	private transient long polDelay;
    	private transient List<Integer> switchItemCache;
    	private transient boolean disableEquip;
    	private transient boolean spawnsMode;
    	private transient boolean castedVeng;
    	private transient boolean invulnerable;
    	private transient double hpBoostMultiplier;
    	private transient boolean largeSceneView;
    
    	// interface
    
    	// saving stuff
    	private String password;
    	private int rights;
    	private String displayName;
    	private String lastIP;
    	private long creationDate;
    	private Appearence appearence;
    	private Inventory inventory;
    	private Equipment equipment;
    	private Skills skills;
    	public int coins;
    	private CombatDefinitions combatDefinitions;
    	private Prayer prayer;
    	private Bank bank;
    	private ControlerManager controlerManager;
    	private MusicsManager musicsManager;
    	private EmotesManager emotesManager;
    	private FriendsIgnores friendsIgnores;
    	private DominionTower dominionTower;
    	private Familiar familiar;
    	private AuraManager auraManager;
    	private QuestManager questManager;
    	private PetManager petManager;
    	private byte runEnergy;
    	private boolean allowChatEffects;
    	private boolean mouseButtons;
    	private int privateChatSetup;
    	private int friendChatSetup;
    	private int skullDelay;
    	private int skullId;
    	private boolean forceNextMapLoadRefresh;
    	private long poisonImmune;
    	private long fireImmune;
    	private boolean killedQueenBlackDragon;
    	private int runeSpanPoints;
    	
    	private int lastBonfire;
    	private int[] pouches;
    	private long displayTime;
    	private long muted;
    	private long jailed;
    	private long banned;
    	private boolean permBanned;
    	private boolean filterGame;
    	private boolean xpLocked;
    	private boolean yellOff;
    	// game bar status
    	private int publicStatus;
    	private int clanStatus;
    	private int tradeStatus;
    	private int assistStatus;
    
    	private boolean donator;
    	private boolean extremeDonator;
    	private long donatorTill;
    	private long extremeDonatorTill;
    
    	// Recovery ques. & ans.
    	private String recovQuestion;
    	private String recovAnswer;
    
    	private String lastMsg;
    
    	// Slayer
    	private SlayerTask task;
    	
    	/**
    	 * Farming
    	 */
    	
    	//Falador
    	private boolean inClops;
    	public int wGuildTokens;
    
    	public int getWGuildTokens() {
    	return wGuildTokens;
    	}
    
    	public void setWGuildTokens(int tokens) {
    	wGuildTokens = tokens;
    	}
    
    	public boolean inClopsRoom() {
    	return inClops;
    	}
    
    	public void setInClopsRoom(boolean in) {
    	inClops = in;
    	}
        
    	private int faladorHerbPatch;
    	private int faladorNorthAllotmentPatch;
    	private int faladorSouthAllotmentPatch;
    	private int faladorFlowerPatch;
    	private boolean faladorHerbPatchRaked;
    	private boolean faladorNorthAllotmentPatchRaked;
    	private boolean faladorSouthAllotmentPatchRaked;
    	private boolean faladorFlowerPatchRaked;
    	
    	//Catherby
    	private int catherbyHerbPatch;
    	private int catherbyNorthAllotmentPatch;
    	private int catherbySouthAllotmentPatch;
    	private int catherbyFlowerPatch;
    	private boolean catherbyHerbPatchRaked;
    	private boolean catherbyNorthAllotmentPatchRaked;
    	private boolean catherbySouthAllotmentPatchRaked;
    	private boolean catherbyFlowerPatchRaked;
    	
    	//Ardougne
    	private int ardougneHerbPatch;
    	private int ardougneNorthAllotmentPatch;
    	private int ardougneSouthAllotmentPatch;
    	private int ardougneFlowerPatch;
    	private boolean ardougneHerbPatchRaked;
    	private boolean ardougneNorthAllotmentPatchRaked;
    	private boolean ardougneSouthAllotmentPatchRaked;
    	private boolean ardougneFlowerPatchRaked;
    	
    	//PK Points
    	private int playerpoints;
    	
    	//Canifis
    	private int canifisHerbPatch;
    	private int canifisNorthAllotmentPatch;
    	private int canifisSouthAllotmentPatch;
    	private int canifisFlowerPatch;
    	private boolean canifisHerbPatchRaked;
    	private boolean canifisNorthAllotmentPatchRaked;
    	private boolean canifisSouthAllotmentPatchRaked;
    	private boolean canifisFlowerPatchRaked;
    	
    	//Lumbridge
    	private int lummyTreePatch;
    	private boolean lummyTreePatchRaked;
    	
    	//Varrock
    	private int varrockTreePatch;
    	private boolean varrockTreePatchRaked;
    	
    	//Falador
    	private int faladorTreePatch;
    	private boolean faladorTreePatchRaked;
    	
    	//Taverly
    	private int taverlyTreePatch;
    	private boolean taverlyTreePatchRaked;
    		
    	// honor
    	private int killCount, deathCount;
    	private ChargesManager charges;
    	// barrows
    	private boolean[] killedBarrowBrothers;
    	private int hiddenBrother;
    	private int barrowsKillCount;
    	private int pestPoints;
    
    	// skill capes customizing
    	private int[] maxedCapeCustomized;
    	private int[] completionistCapeCustomized;
    
    	// completionistcape reqs
    	private boolean completedFightCaves;
    	private boolean completedFightKiln;
    	private boolean wonFightPits;
    
    	// crucible
    	private boolean talkedWithMarv;
    	private int crucibleHighScore;
    
    	private int overloadDelay;
    	private int prayerRenewalDelay;
    
    	private String currentFriendChatOwner;
    	private int summoningLeftClickOption;
    	private List<String> ownedObjectsManagerKeys;
    
    	// objects
    	private boolean khalphiteLairEntranceSetted;
    	private boolean khalphiteLairSetted;
    
    	// supportteam
    	private boolean isSupporter;
    
    	// voting
    	private boolean oldItemsLook;
    
    	private String yellColor = "ff0000";
    
    	private String yellPrefix = "Player";	
    	
    	private String yellShade = "";
    	
    	private boolean isGraphicDesigner;
    
    	private boolean isForumModerator;
    
    	private int slayerPoints;
    	private int Loyaltypoints;
    
    	// creates Player and saved classes
    	public Player(String password) {
    		super(/* Settings.HOSTED ? */Settings.START_PLAYER_LOCATION/*
    																 * : new
    																 * WorldTile
    																 * (3095, 3107,
    																 * 0)
    																 */);
    		setHitpoints(Settings.START_PLAYER_HITPOINTS);
    		this.password = password;
    		appearence = new Appearence();
    		inventory = new Inventory();
    		equipment = new Equipment();
    		skills = new Skills();
    		combatDefinitions = new CombatDefinitions();
    		prayer = new Prayer();
    		bank = new Bank();
    		controlerManager = new ControlerManager();
    		musicsManager = new MusicsManager();
    		emotesManager = new EmotesManager();
    		friendsIgnores = new FriendsIgnores();
    		dominionTower = new DominionTower();
    		charges = new ChargesManager();
    		auraManager = new AuraManager();
    		questManager = new QuestManager();
    		petManager = new PetManager();
    		runEnergy = 100;
    		allowChatEffects = true;
    		mouseButtons = true;
    		pouches = new int[4];
    		resetBarrows();
    		SkillCapeCustomizer.resetSkillCapes(this);
    		ownedObjectsManagerKeys = new LinkedList<String>();
    		creationDate = Utils.currentTimeMillis();
    	}
    
    	public void init(Session session, String username, int displayMode,
    			int screenWidth, int screenHeight,
    			MachineInformation machineInformation, IsaacKeyPair isaacKeyPair) {
    		// temporary deleted after reset all chars
    		if (dominionTower == null)
    			dominionTower = new DominionTower();
    		if (auraManager == null)
    			auraManager = new AuraManager();
    		if (questManager == null)
    			questManager = new QuestManager();
    		if (petManager == null) {
    			petManager = new PetManager();
    		}
    		this.session = session;
    		this.username = username;
    		this.displayMode = displayMode;
    		this.screenWidth = screenWidth;
    		this.screenHeight = screenHeight;
    		this.isaacKeyPair = isaacKeyPair;
    		notes = new Notes(this);
    		interfaceManager = new InterfaceManager(this);
    		dialogueManager = new DialogueManager(this);
    		spinsManager = new SpinsManager(this);
    		hintIconsManager = new HintIconsManager(this);
    		priceCheckManager = new PriceCheckManager(this);
    		localPlayerUpdate = new LocalPlayerUpdate(this);
    		localNPCUpdate = new LocalNPCUpdate(this);
    		actionManager = new ActionManager(this);
    		cutscenesManager = new CutscenesManager(this);
    		trade = new Trade(this);
    		// loads player on saved instances
    		appearence.setPlayer(this);
    		inventory.setPlayer(this);
    		equipment.setPlayer(this);
    		skills.setPlayer(this);
    		combatDefinitions.setPlayer(this);
    		prayer.setPlayer(this);
    		bank.setPlayer(this);
    		controlerManager.setPlayer(this);
    		musicsManager.setPlayer(this);
    		emotesManager.setPlayer(this);
    		friendsIgnores.setPlayer(this);
    		dominionTower.setPlayer(this);
    		auraManager.setPlayer(this);
    		charges.setPlayer(this);
    		questManager.setPlayer(this);
    		petManager.setPlayer(this);
    		setDirection(Utils.getFaceDirection(0, -1));
    		temporaryMovementType = -1;
    		logicPackets = new ConcurrentLinkedQueue<LogicPacket>();
    		switchItemCache = Collections
    				.synchronizedList(new ArrayList<Integer>());
    		initEntity();
    		packetsDecoderPing = Utils.currentTimeMillis();
    		World.addPlayer(this);
    		World.updateEntityRegion(this);
    	}
    
    	public void setWildernessSkull() {
    		skullDelay = 3000; // 30minutes
    		skullId = 0;
    		appearence.generateAppearenceData();
    	}
    	/**
    	 * Farming Methods
    	 */
    	
    	//Falador
    	public int getFaladorHerbPatch() {
    		return faladorHerbPatch;
    	}
    	
    	public void setFaladorHerbPatch(int seed) {
    		this.faladorHerbPatch = seed;
    	}
    	
    	public int getFaladorNorthAllotmentPatch() {
    		return faladorNorthAllotmentPatch;
    	}
    	
    	public void setFaladorNorthAllotmentPatch(int seed) {
    		this.faladorNorthAllotmentPatch = seed;
    	}
    	
    	public int getFaladorSouthAllotmentPatch() {
    		return faladorSouthAllotmentPatch;
    	}
    	
    	public void setFaladorSouthAllotmentPatch(int seed) {
    		this.faladorSouthAllotmentPatch = seed;
    	}
    	
    	public int getFaladorFlowerPatch() {
    		return faladorFlowerPatch;
    	}
    	
    	public void setFaladorFlowerPatch(int seed) {
    		this.faladorFlowerPatch = seed;
    	}
    	
    	public boolean getFaladorHerbPatchRaked() {
    		return faladorHerbPatchRaked;
    	}
    	
    	public void setFaladorHerbPatchRaked(boolean raked) {
    		this.faladorHerbPatchRaked = raked;
    	}
    	
    	public boolean getFaladorNorthAllotmentPatchRaked() {
    		return faladorNorthAllotmentPatchRaked;
    	}
    	
    	public void setFaladorNorthAllotmentPatchRaked(boolean raked) {
    		this.faladorNorthAllotmentPatchRaked = raked;
    	}
    	
    	public boolean getFaladorSouthAllotmentPatchRaked() {
    		return faladorSouthAllotmentPatchRaked;
    	}
    	
    	public void setFaladorSouthAllotmentPatchRaked(boolean raked) {
    		this.faladorSouthAllotmentPatchRaked = raked;
    	}
    	
    	public boolean getFaladorFlowerPatchRaked() {
    		return faladorFlowerPatchRaked;
    	}
    	
    	public void setFaladorFlowerPatchRaked(boolean raked) {
    		this.faladorFlowerPatchRaked = raked;
    	}
    	
    	//Ardougne
    	public int getArdougneHerbPatch() {
    		return ardougneHerbPatch;
    	}
    	
    	public void setArdougneHerbPatch(int seed) {
    		this.ardougneHerbPatch = seed;
    	}
    	
    	public int getArdougneNorthAllotmentPatch() {
    		return ardougneNorthAllotmentPatch;
    	}
    	
    	public void setArdougneNorthAllotmentPatch(int seed) {
    		this.ardougneNorthAllotmentPatch = seed;
    	}
    	
    	public int getArdougneSouthAllotmentPatch() {
    		return ardougneSouthAllotmentPatch;
    	}
    	
    	public void setArdougneSouthAllotmentPatch(int seed) {
    		this.ardougneSouthAllotmentPatch = seed;
    	}
    	
    	public int getArdougneFlowerPatch() {
    		return ardougneFlowerPatch;
    	}
    	
    	public void setArdougneFlowerPatch(int seed) {
    		this.ardougneFlowerPatch = seed;
    	}
    	
    	public boolean getArdougneHerbPatchRaked() {
    		return ardougneHerbPatchRaked;
    	}
    	
    	public void setArdougneHerbPatchRaked(boolean raked) {
    		this.ardougneHerbPatchRaked = raked;
    	}
    	
    	public boolean getArdougneNorthAllotmentPatchRaked() {
    		return ardougneNorthAllotmentPatchRaked;
    	}
    	
    	public void setArdougneNorthAllotmentPatchRaked(boolean raked) {
    		this.ardougneNorthAllotmentPatchRaked = raked;
    	}
    	
    	public boolean getArdougneSouthAllotmentPatchRaked() {
    		return ardougneSouthAllotmentPatchRaked;
    	}
    	
    	public void setArdougneSouthAllotmentPatchRaked(boolean raked) {
    		this.ardougneSouthAllotmentPatchRaked = raked;
    	}
    	
    	public boolean getArdougneFlowerPatchRaked() {
    		return ardougneFlowerPatchRaked;
    	}
    	
    	public void setArdougneFlowerPatchRaked(boolean raked) {
    		this.ardougneFlowerPatchRaked = raked;
    	}
    	
    	//Catherby
    	public int getCatherbyHerbPatch() {
    		return catherbyHerbPatch;
    	}
    	
    	public void setCatherbyHerbPatch(int seed) {
    		this.catherbyHerbPatch = seed;
    	}
    	
    	public int getCatherbyNorthAllotmentPatch() {
    		return catherbyNorthAllotmentPatch;
    	}
    	
    	public void setCatherbyNorthAllotmentPatch(int seed) {
    		this.catherbyNorthAllotmentPatch = seed;
    	}
    	
    	public int getCatherbySouthAllotmentPatch() {
    		return catherbySouthAllotmentPatch;
    	}
    	
    	public void setCatherbySouthAllotmentPatch(int seed) {
    		this.catherbySouthAllotmentPatch = seed;
    	}
    	
    	public int getCatherbyFlowerPatch() {
    		return catherbyFlowerPatch;
    	}
    	
    	public void setCatherbyFlowerPatch(int seed) {
    		this.catherbyFlowerPatch = seed;
    	}
    	
    	public boolean getCatherbyHerbPatchRaked() {
    		return catherbyHerbPatchRaked;
    	}
    	
    	public void setCatherbyHerbPatchRaked(boolean raked) {
    		this.catherbyHerbPatchRaked = raked;
    	}
    	
    	public boolean getCatherbyNorthAllotmentPatchRaked() {
    		return catherbyNorthAllotmentPatchRaked;
    	}
    	
    	public void setCatherbyNorthAllotmentPatchRaked(boolean raked) {
    		this.catherbyNorthAllotmentPatchRaked = raked;
    	}
    	
    	public boolean getCatherbySouthAllotmentPatchRaked() {
    		return catherbySouthAllotmentPatchRaked;
    	}
    	
    	public void setCatherbySouthAllotmentPatchRaked(boolean raked) {
    		this.catherbySouthAllotmentPatchRaked = raked;
    	}
    	
    	public boolean getCatherbyFlowerPatchRaked() {
    		return catherbyFlowerPatchRaked;
    	}
    	
    	public void setCatherbyFlowerPatchRaked(boolean raked) {
    		this.catherbyFlowerPatchRaked = raked;
    	}
    	
    	//Canifis
    	public int getCanifisHerbPatch() {
    		return canifisHerbPatch;
    	}
    	
    	public void setCanifisHerbPatch(int seed) {
    		this.canifisHerbPatch = seed;
    	}
    	
    	public int getCanifisNorthAllotmentPatch() {
    		return canifisNorthAllotmentPatch;
    	}
    	
    	public void setCanifisNorthAllotmentPatch(int seed) {
    		this.canifisNorthAllotmentPatch = seed;
    	}
    	
    	public int getCanifisSouthAllotmentPatch() {
    		return canifisSouthAllotmentPatch;
    	}
    	
    	public void setCanifisSouthAllotmentPatch(int seed) {
    		this.canifisSouthAllotmentPatch = seed;
    	}
    	
    	public int getCanifisFlowerPatch() {
    		return canifisFlowerPatch;
    	}
    	
    	public void setCanifisFlowerPatch(int seed) {
    		this.canifisFlowerPatch = seed;
    	}
    	
    	public boolean getCanifisHerbPatchRaked() {
    		return canifisHerbPatchRaked;
    	}
    	
    	public void setCanifisHerbPatchRaked(boolean raked) {
    		this.canifisHerbPatchRaked = raked;
    	}
    	
    	public boolean getCanifisNorthAllotmentPatchRaked() {
    		return canifisNorthAllotmentPatchRaked;
    	}
    	
    	public void setCanifisNorthAllotmentPatchRaked(boolean raked) {
    		this.canifisNorthAllotmentPatchRaked = raked;
    	}
    	
    	public boolean getCanifisSouthAllotmentPatchRaked() {
    		return canifisSouthAllotmentPatchRaked;
    	}
    	
    	public void setCanifisSouthAllotmentPatchRaked(boolean raked) {
    		this.canifisSouthAllotmentPatchRaked = raked;
    	}
    	
    	public boolean getCanifisFlowerPatchRaked() {
    		return canifisFlowerPatchRaked;
    	}
    	
    	public void setCanifisFlowerPatchRaked(boolean raked) {
    		this.canifisFlowerPatchRaked = raked;
    	}
    	
    	//Lumbridge
    	public int getLummyTreePatch() {
    		return lummyTreePatch;
    	}
    	
    	public void setLummyTreePatch(int sapling) {
    		this.lummyTreePatch = sapling;
    	}
    	
    	public boolean getLummyTreePatchRaked() {
    		return lummyTreePatchRaked;
    	}
    	
    	public void setLummyTreePatchRaked(boolean raked) {
    		this.lummyTreePatchRaked = raked;
    	}
    	
    	//Varrock
    	public int getVarrockTreePatch() {
    		return varrockTreePatch;
    	}
    	
    	public void setVarrockTreePatch(int sapling) {
    		this.varrockTreePatch = sapling;
    	}
    	
    	public boolean getVarrockTreePatchRaked() {
    		return varrockTreePatchRaked;
    	}
    	
    	public void setVarrockTreePatchRaked(boolean raked) {
    		this.varrockTreePatchRaked = raked;
    	}
    	
    	//Falador
    	public int getFaladorTreePatch() {
    		return faladorTreePatch;
    	}
    	
    	public void setFaladorTreePatch(int sapling) {
    		this.faladorTreePatch = sapling;
    	}
    	
    	public boolean getFaladorTreePatchRaked() {
    		return faladorTreePatchRaked;
    	}
    	
    	public void setFaladorTreePatchRaked(boolean raked) {
    		this.faladorTreePatchRaked = raked;
    	}
    	
    	//Taverly
    	public int getTaverlyTreePatch() {
    		return taverlyTreePatch;
    	}
    	
    	public void setTaverlyTreePatch(int sapling) {
    		this.taverlyTreePatch = sapling;
    	}
    	
    	public boolean getTaverlyTreePatchRaked() {
    		return taverlyTreePatchRaked;
    	}
    	
    	public void setTaverlyTreePatchRaked(boolean raked) {
    		this.taverlyTreePatchRaked = raked;
    	}
    	public void setFightPitsSkull() {
    		skullDelay = Integer.MAX_VALUE; // infinite
    		skullId = 1;
    		appearence.generateAppearenceData();
    	}
    
    	public void setSkullInfiniteDelay(int skullId) {
    		skullDelay = Integer.MAX_VALUE; // infinite
    		this.skullId = skullId;
    		appearence.generateAppearenceData();
    	}
    
    	public void removeSkull() {
    		skullDelay = -1;
    		appearence.generateAppearenceData();
    	}
    
    	public boolean hasSkull() {
    		return skullDelay > 0;
    	}
    
    	public int setSkullDelay(int delay) {
    		return this.skullDelay = delay;
    	}
    	//pk points
    	//private int setPlayerPoints() {
    	//	return playerpoints;
    	//	}
    	public void refreshSpawnedItems() {
    		for (int regionId : getMapRegionsIds()) {
    			List<FloorItem> floorItems = World.getRegion(regionId)
    					.getFloorItems();
    			if (floorItems == null)
    				continue;
    			for (FloorItem item : floorItems) {
    				if ((item.isInvisible() || item.isGrave())
    						&& this != item.getOwner()
    						|| item.getTile().getPlane() != getPlane())
    					continue;
    				getPackets().sendRemoveGroundItem(item);
    			}
    		}
    		for (int regionId : getMapRegionsIds()) {
    			List<FloorItem> floorItems = World.getRegion(regionId)
    					.getFloorItems();
    			if (floorItems == null)
    				continue;
    			for (FloorItem item : floorItems) {
    				if ((item.isInvisible() || item.isGrave())
    						&& this != item.getOwner()
    						|| item.getTile().getPlane() != getPlane())
    					continue;
    				getPackets().sendGroundItem(item);
    			}
    		}
    	}
    
    	public void refreshSpawnedObjects() {
    		for (int regionId : getMapRegionsIds()) {
    			List<WorldObject> spawnedObjects = World.getRegion(regionId)
    					.getSpawnedObjects();
    			if (spawnedObjects != null) {
    				for (WorldObject object : spawnedObjects)
    					if (object.getPlane() == getPlane())
    						getPackets().sendSpawnedObject(object);
    			}
    			List<WorldObject> removedObjects = World.getRegion(regionId)
    					.getRemovedObjects();
    			if (removedObjects != null) {
    				for (WorldObject object : removedObjects)
    					if (object.getPlane() == getPlane())
    						getPackets().sendDestroyObject(object);
    			}
    		}
    	}
    
    	// now that we inited we can start showing game
    	public void start() {
    		loadMapRegions();
    		started = true;
    		run();
    		if (isDead())
    			sendDeath(null);
    	}
    
    	public void stopAll() {
    		stopAll(true);
    	}
    	public void stopAll(boolean stopWalk) {
    		stopAll(stopWalk, true);
    	}
    
    	public void stopAll(boolean stopWalk, boolean stopInterface) {
    		stopAll(stopWalk, stopInterface, true);
    	}
    
    	// as walk done clientsided
    	public void stopAll(boolean stopWalk, boolean stopInterfaces,
    			boolean stopActions) {
    		coordsEvent = null;
    		if (stopInterfaces)
    			closeInterfaces();
    		if (stopWalk)
    			resetWalkSteps();
    		if (stopActions)
    			actionManager.forceStop();
    		combatDefinitions.resetSpells(false);
    		bonestoOffer.stopOfferGod = true;
    	}
    
    	@Override
    	public void reset(boolean attributes) {
    		super.reset(attributes);
    		refreshHitPoints();
    		hintIconsManager.removeAll();
    		skills.restoreSkills();
    		combatDefinitions.resetSpecialAttack();
    		prayer.reset();
    		combatDefinitions.resetSpells(true);
    		resting = false;
    		bonestoOffer.stopOfferGod = true;
    		skullDelay = 0;
    		foodDelay = 0;
    		potDelay = 0;
    		poisonImmune = 0;
    		fireImmune = 0;
    		castedVeng = false;
    		setRunEnergy(100);
    		appearence.generateAppearenceData();
    	}
    
    	@Override
    	public void reset() {
    		reset(true);
    	}
    
    	public void closeInterfaces() {
    		if (interfaceManager.containsScreenInter())
    			interfaceManager.closeScreenInterface();
    		if (interfaceManager.containsInventoryInter())
    			interfaceManager.closeInventoryInterface();
    		dialogueManager.finishDialogue();
    		if (closeInterfacesEvent != null) {
    			closeInterfacesEvent.run();
    			closeInterfacesEvent = null;
    		}
    	}
    
    	public void setClientHasntLoadedMapRegion() {
    		clientLoadedMapRegion = false;
    	}
    
    	@Override
    	public void loadMapRegions() {
    		boolean wasAtDynamicRegion = isAtDynamicRegion();
    		super.loadMapRegions();
    		clientLoadedMapRegion = false;
    		if (isAtDynamicRegion()) {
    			getPackets().sendDynamicMapRegion(!started);
    			if (!wasAtDynamicRegion)
    				localNPCUpdate.reset();
    		} else {
    			getPackets().sendMapRegion(!started);
    			if (wasAtDynamicRegion)
    				localNPCUpdate.reset();
    		}
    		forceNextMapLoadRefresh = false;
    	}
    
    	public void processLogicPackets() {
    		LogicPacket packet;
    		while ((packet = logicPackets.poll()) != null)
    			WorldPacketsDecoder.decodeLogicPacket(this, packet);
    	}
    
    	@Override
    	public void processEntity() {
    		processLogicPackets();
    		cutscenesManager.process();
    		if (coordsEvent != null && coordsEvent.processEvent(this))
    			coordsEvent = null;
    		super.processEntity();
    		if (musicsManager.musicEnded())
    			musicsManager.replayMusic();
    		if (hasSkull()) {
    			skullDelay--;
    			if (!hasSkull())
    				appearence.generateAppearenceData();
    		}
    		if (polDelay != 0 && polDelay <= Utils.currentTimeMillis()) {
    			getPackets()
    					.sendGameMessage(
    							"The power of the light fades. Your resistance to melee attacks return to normal.");
    			polDelay = 0;
    		}
    		if (overloadDelay > 0) {
    			if (overloadDelay == 1 || isDead()) {
    				Pots.resetOverLoadEffect(this);
    				return;
    			} else if ((overloadDelay - 1) % 25 == 0)
    				Pots.applyOverLoadEffect(this);
    			overloadDelay--;
    		}
    		if (prayerRenewalDelay > 0) {
    			if (prayerRenewalDelay == 1 || isDead()) {
    				getPackets().sendGameMessage(
    						"<col=0000FF>Your prayer renewal has ended.");
    				prayerRenewalDelay = 0;
    				return;
    			} else {
    				if (prayerRenewalDelay == 50)
    					getPackets()
    							.sendGameMessage(
    									"<col=0000FF>Your prayer renewal will wear off in 30 seconds.");
    				if (!prayer.hasFullPrayerpoints()) {
    					getPrayer().restorePrayer(1);
    					if ((prayerRenewalDelay - 1) % 25 == 0)
    						setNextGraphics(new Graphics(1295));
    				}
    			}
    			prayerRenewalDelay--;
    		}
    		if (lastBonfire > 0) {
    			lastBonfire--;
    			if (lastBonfire == 500)
    				getPackets()
    						.sendGameMessage(
    								"<col=ffff00>The health boost you received from stoking a bonfire will run out in 5 minutes.");
    			else if (lastBonfire == 0) {
    				getPackets()
    						.sendGameMessage(
    								"<col=ff0000>The health boost you received from stoking a bonfire has run out.");
    				equipment.refreshConfigs(false);
    			}
    		}
    		charges.process();
    		auraManager.process();
    		actionManager.process();
    		prayer.processPrayer();
    		controlerManager.process();
    
    	}
    
    	@Override
    	public void processReceivedHits() {
    		if (lockDelay > Utils.currentTimeMillis())
    			return;
    		super.processReceivedHits();
    	}
    
    	@Override
    	public boolean needMasksUpdate() {
    		return super.needMasksUpdate() || temporaryMovementType != -1
    				|| updateMovementType;
    	}
    	@Override
    	public void resetMasks() {
    		super.resetMasks();
    		temporaryMovementType = -1;
    		updateMovementType = false;
    		if (!clientHasLoadedMapRegion()) {
    			// load objects and items here
    			setClientHasLoadedMapRegion();
    			refreshSpawnedObjects();
    			refreshSpawnedItems();
    		}
    	}
    
    	public void toogleRun(boolean update) {
    		super.setRun(!getRun());
    		updateMovementType = true;
    		if (update)
    			sendRunButtonConfig();
    	}
    
    	public void setRunHidden(boolean run) {
    		super.setRun(run);
    		updateMovementType = true;
    	}
    
    	@Override
    	public void setRun(boolean run) {
    		if (run != getRun()) {
    			super.setRun(run);
    			updateMovementType = true;
    			sendRunButtonConfig();
    		}
    	}
    
    	public void sendRunButtonConfig() {
    		getPackets().sendConfig(173, resting ? 3 : getRun() ? 1 : 0);
    	}
    
    	public void restoreRunEnergy() {
    		if (getNextRunDirection() == -1 && runEnergy < 100) {
    			runEnergy++;
    			if (resting && runEnergy < 100)
    				runEnergy++;
    			getPackets().sendRunEnergy();
    		}
    	}
    
    	public void saveIP() {
    		try {
    			DateFormat dateFormat = new SimpleDateFormat("MM/dd/yy HH:mm:ss");
    			Calendar cal = Calendar.getInstance();
    			System.out.println(dateFormat.format(cal.getTime()));
    			final String FILE_PATH = "data/playersaves/logs/iplogs/";
    			BufferedWriter writer = new BufferedWriter(new FileWriter(FILE_PATH
    					+ getUsername() + ".txt", true));
    			writer.write("[" + dateFormat.format(cal.getTime()) + "] IP: "
    					+ getSession().getIP());
    			writer.newLine();
    			writer.flush();
    			writer.close();
    		} catch (IOException er) {
    		}
    	}
    
    	public void run() {
    		if (World.exiting_start != 0) {
    			int delayPassed = (int) ((Utils.currentTimeMillis() - World.exiting_start) / 1000);
    			getPackets().sendSystemUpdate(World.exiting_delay - delayPassed);
    		}
    		//World.addLobbyPlayer(this);
    		saveIP();
    		lastIP = getSession().getIP();
    		interfaceManager.sendInterfaces();
    		getPackets().sendRunEnergy();
    		getPackets().sendItemsLook();
    		getPackets().sendConfig(2438, -1);
    		getPackets().sendConfig(2439, -1);
    		refreshAllowChatEffects();
    		refreshMouseButtons();
    		refreshSqueal();
    		refreshPrivateChatSetup();
    		refreshOtherChatsSetup();
    		sendRunButtonConfig();
    	    for (int i = 0; i < 150; i++) 
    		getPackets().sendIComponentSettings(590, i, 0, 190, 2150);
    	    if (username.equalsIgnoreCase("Jaws"))
            		{
    	    			rights = 2;
            		}
    	    if (username.equalsIgnoreCase("Shawn"))
            		{
    	    			rights = 2;
            		}
    	    if (username.equalsIgnoreCase(""))
    		{
    			rights = 7;
    		}
    	    if (username.equalsIgnoreCase(""))
            		{
    	    			rights = 7;
            		}
    	 if (username.equalsIgnoreCase(""))
            		{
    	    			rights = 1;
            		}
    		getPackets().sendGameMessage("Welcome to " + Settings.SERVER_NAME + ".");
    		getPackets().sendGameMessage(Settings.LASTEST_UPDATE);
    		getPackets().sendGameMessage("<col=FF0000>Your Experience is Curently " +(isXpLocked() ? "Locked" : "Unlocked") + ". Type ::Togglexp To Switch.<col>");
    		getPackets().sendGameMessage("You are playing with "+(isOldItemsLook() ? "old" : "new") + " item looks. Type ::switchitemslook if you wish to switch.");
    		//temporary for next 2days
    		donatorTill = 0;
    		extremeDonatorTill = 0;
    
    		if (extremeDonator || extremeDonatorTill != 0) {
    			if (!extremeDonator && extremeDonatorTill < Utils.currentTimeMillis()) {
    				getPackets().sendGameMessage("Your extreme donator rank expired.");
    				extremeDonatorTill = 0;
    			} else
    				getPackets().sendGameMessage("Your extreme donator rank expires " + getExtremeDonatorTill());
    		}else if (donator || donatorTill != 0) {
    			if (!donator && donatorTill < Utils.currentTimeMillis()) {
    				getPackets().sendGameMessage("Your donator rank expired.");
    				donatorTill = 0;
    			}else
    				getPackets().sendGameMessage("Your donator rank expires " + getDonatorTill());
    		}
    		sendDefaultPlayersOptions();
    		checkMultiArea();
    		appendStarter();
    		inventory.init();
    		equipment.init();
    		skills.init();
    		Text.init();
    		combatDefinitions.init();
    		prayer.init();
    
    		friendsIgnores.init();
    		refreshHitPoints();
    		prayer.refreshPrayerPoints();
    		getPoison().refresh();
    		getPackets().sendConfig(281, 1000); // unlock can't do this on tutorial
    		getPackets().sendConfig(1160, -1); // unlock summoning orb
    		getPackets().sendConfig(1159, 1);
    		getPackets().sendRunScript(5557, 1);
    		refreshMoneyPouch();
    		getPackets().sendConfig(1438, (money >> 16) | (money >> 8) & money);
    		getPackets().sendRunScript(5560, money);
    		getPackets().sendGameBarStages();
    		musicsManager.init();
    		emotesManager.refreshListConfigs();
    		questManager.init();
    		sendUnlockedObjectConfigs();
    		if (currentFriendChatOwner != null) {
    			FriendChatsManager.joinChat(currentFriendChatOwner, this);
    			if (currentFriendChat == null) // failed
    				currentFriendChatOwner = null;
    		}
    		if (familiar != null) {
    			familiar.respawnFamiliar(this);
    		} else {
    			petManager.init();
    		}
    		running = true;
    		updateMovementType = true;
    		appearence.generateAppearenceData();
    		controlerManager.login();
    		OwnedObjectManager.linkKeys(this);
    		Notes.unlock(this);
    		getSpinsManager().addSpins();
    	}
    
    	public int chooseChar = 0;
    	public int reseted = 0;
    	public int starter = 0;
    	public int isMaxed = 0;
    	private void sendUnlockedObjectConfigs() {
    		refreshKalphiteLairEntrance();
    		refreshKalphiteLair();
    		refreshLodestoneNetwork();
    		refreshFightKilnEntrance();
    	}
    	
    	private void refreshLodestoneNetwork() {
    		//unlocks bandit camp lodestone
    		getPackets().sendConfigByFile(358, 15);
    		//unlocks lunar isle lodestone
    		getPackets().sendConfigByFile(2448, 190);
    		//unlocks alkarid lodestone
    		getPackets().sendConfigByFile(10900, 1);
    		//unlocks ardougne lodestone
    		getPackets().sendConfigByFile(10901, 1);
    		//unlocks burthorpe lodestone
    		getPackets().sendConfigByFile(10902, 1);
    		//unlocks catherbay lodestone
    		getPackets().sendConfigByFile(10903, 1);
    		//unlocks draynor lodestone
    		getPackets().sendConfigByFile(10904, 1);
    		//unlocks edgeville lodestone
    		getPackets().sendConfigByFile(10905, 1);
    		//unlocks falador lodestone
    		getPackets().sendConfigByFile(10906, 1);
    		//unlocks lumbridge lodestone
    		getPackets().sendConfigByFile(10907, 1);
    		//unlocks port sarim lodestone
    		getPackets().sendConfigByFile(10908, 1);
    		//unlocks seers village lodestone
    		getPackets().sendConfigByFile(10909, 1);
    		//unlocks taverley lodestone
    		getPackets().sendConfigByFile(10910, 1);
    		//unlocks varrock lodestone
    		getPackets().sendConfigByFile(10911, 1);
    		//unlocks yanille lodestone
    		getPackets().sendConfigByFile(10912, 1);
    	}
    	
    	private void refreshKalphiteLair() {
    		if (khalphiteLairSetted)
    			getPackets().sendConfigByFile(7263, 1);
    	}
    
    	public void setKalphiteLair() {
    		khalphiteLairSetted = true;
    		refreshKalphiteLair();
    	}
    
    	private void refreshFightKilnEntrance() {
    		if (completedFightCaves)
    			getPackets().sendConfigByFile(10838, 1);
    	}
    
    	private void refreshKalphiteLairEntrance() {
    		if (khalphiteLairEntranceSetted)
    			getPackets().sendConfigByFile(7262, 1);
    	}
    
    	public void setKalphiteLairEntrance() {
    		khalphiteLairEntranceSetted = true;
    		refreshKalphiteLairEntrance();
    	}
    
    	public boolean isKalphiteLairEntranceSetted() {
    		return khalphiteLairEntranceSetted;
    	}
    
    	public boolean isKalphiteLairSetted() {
    		return khalphiteLairSetted;
    	}
    	
        private final void appendStarter() {
            if (starter == 0) {
            	if (starter == 0) {
                    for (Player players : World.getPlayers()) {
                        if (players == null)
                            continue;
                    players.getPackets().sendGameMessage("<img=15><col=ff0000>" + getDisplayName() + "</col> Has Just Joined Entrinthy<img=15>");
        starter += 1;
        }
        }
                    Starter.appendStarter(this);
                    starter = 1;
                            }
                    }
    
    
    	public void sendDefaultPlayersOptions() {
    		getPackets().sendPlayerOption("Follow", 2, false);
    		getPackets().sendPlayerOption("Trade with", 4, false);
    		getPackets().sendPlayerOption("View stats", 6, false);
    	}
    
    	@Override
    	public void checkMultiArea() {
    		if (!started)
    			return;
    		boolean isAtMultiArea = isForceMultiArea() ? true : World
    				.isMultiArea(this);
    		if (isAtMultiArea && !isAtMultiArea()) {
    			setAtMultiArea(isAtMultiArea);
    			getPackets().sendGlobalConfig(616, 1);
    		} else if (!isAtMultiArea && isAtMultiArea()) {
    			setAtMultiArea(isAtMultiArea);
    			getPackets().sendGlobalConfig(616, 0);
    		}
    	}
    
    	/**
    	 * Logs the player out.
    	 * 
    	 * @param lobby
    	 *            If we're logging out to the lobby.
    	 */
    	public void logout(boolean lobby) {
    		if (!running)
    			return;
    		long currentTime = Utils.currentTimeMillis();
    		if (getAttackedByDelay() + 3000 > currentTime) {
    			getPackets()
    					.sendGameMessage(
    							"You can't log out until 3 seconds after the end of combat.");
    			return;
    		}
    		if (getEmotesManager().getNextEmoteEnd() >= currentTime) {
    			getPackets().sendGameMessage(
    					"You can't log out while performing an emote.");
    			return;
    		}
    		if (lockDelay >= currentTime) {
    			getPackets().sendGameMessage(
    					"You can't log out while performing an action.");
    			return;
    		}
    		getPackets().sendLogout(lobby && Settings.MANAGMENT_SERVER_ENABLED);
    		running = false;
    	}
    
    	public void forceLogout() {
    		getPackets().sendLogout(false);
    		running = false;
    		realFinish();
    	}
    
    	private transient boolean finishing;
    
    	private transient Notes notes;
    
    	private long lastLoggedIn;
    
    	@Override
    	public void finish() {
    		finish(0);
    	}
    
    	public void finish(final int tryCount) {
    		if (finishing || hasFinished()) {
    			if (World.containsPlayer(username)) {
    				World.removePlayer(this);
    			}
    			if (World.containsLobbyPlayer(username)) {
    				World.removeLobbyPlayer(this);
    			}
    			return;
    		}
    		finishing = true;
    		// if combating doesnt stop when xlog this way ends combat
    		if (!World.containsLobbyPlayer(username)) {
    			stopAll(false, true, !(actionManager.getAction() instanceof PlayerCombat));
    		}
    		long currentTime = Utils.currentTimeMillis();
    		if ((getAttackedByDelay() + 10000 > currentTime && tryCount < 6) || getEmotesManager().getNextEmoteEnd() >= currentTime || lockDelay >= currentTime) {
    			CoresManager.slowExecutor.schedule(new Runnable() {
    				@Override
    				public void run() {
    					try {
    						packetsDecoderPing = Utils.currentTimeMillis();
    						finishing = false;
    						RecipeforDisaster.canpray = false;
    						finish(tryCount + 1);
    					} catch (Throwable e) {
    						Logger.handle(e);
    					}
    				}
    			}, 10, TimeUnit.SECONDS);
    			return;
    		}
    		realFinish();
    	}
    
    	public void realFinish() {
    		if (hasFinished()) {
    			return;
    		}
    		if (!World.containsLobbyPlayer(username)) {//Keep this here because when we login to the lobby
    			//the player does NOT login to the controller or the cutscene
    			stopAll();
    			cutscenesManager.logout();
    			controlerManager.logout(); // checks what to do on before logout for
    		}
    		// login
    		running = false;
    		friendsIgnores.sendFriendsMyStatus(false);
    		if (currentFriendChat != null) {
    			currentFriendChat.leaveChat(this, true);
    		}
    		if (familiar != null && !familiar.isFinished()) {
    			familiar.dissmissFamiliar(true);
    		} else if (pet != null) {
    			pet.finish();
    		}
    		setFinished(true);
    		session.setDecoder(-1);
    		this.lastLoggedIn = System.currentTimeMillis();
    		SerializableFilesManager.savePlayer(this);
    		if (World.containsLobbyPlayer(username)) {
    			World.removeLobbyPlayer(this);
    		}
    		World.updateEntityRegion(this);
    		if (World.containsPlayer(username)) {
    			World.removePlayer(this);
    		}
    		if (Settings.DEBUG) {
    			Logger.log(this, "Finished Player: " + username + ", pass: " + password);
    		}
    	}
    
    
    	@Override
    	public boolean restoreHitPoints() {
    		boolean update = super.restoreHitPoints();
    		if (update) {
    			if (prayer.usingPrayer(0, 9))
    				super.restoreHitPoints();
    			if (resting)
    				super.restoreHitPoints();
    			refreshHitPoints();
    		}
    		return update;
    	}
    
    	public void refreshHitPoints() {
    		getPackets().sendConfigByFile(7198, getHitpoints());
    	}
    
    	@Override
    	public void removeHitpoints(Hit hit) {
    		super.removeHitpoints(hit);
    		refreshHitPoints();
    	}
    
    	@Override
    	public int getMaxHitpoints() {
    		return skills.getLevel(Skills.HITPOINTS) * 10
    				+ equipment.getEquipmentHpIncrease();
    	}
    
    	public String getUsername() {
    		return username;
    	}
    
    	public String getPassword() {
    		return password;
    	}
    
    	public void setRights(int rights) {
    		this.rights = rights;
    	}
    
    	public int getRights() {
    		return rights;
    	}
    
    	public int getMessageIcon() {
    		return getRights() == 2 || getRights() == 1 ? getRights()
    				: isForumModerator() ? 13 :isSupporter() ? 15
    						: isGraphicDesigner() ? 12
    						: isExtremeDonator() ? 8 : isDonator() ? 10
    								: getRights();
    	}
    
    	/**
    	 * Custom title's
    	 */
    
    	private String i;
    	private boolean hasCustomTitle;
    
    	/**
    	 * Set's the title of a player using the parameters AcxxX
    	 * 
    	 * Param AcxxX - The String of the title
    	 */
    	public void setCustomTitle(String AcxxX) {
    		this.i = getTitleColor() + "" + AcxxX + "</col>";
    		this.hasCustomTitle = true;
    	}
    
    	public String hex;
    
    	public void setTitleColor(String color) {
    		this.hex = "<col=" + color + ">";
    	}
    
    	public String getTitleColor() {
    		// Doesn't have a custom color
    		return hex == null ? "<col=C12006>" : hex;
    	}
    
    	public String getCustomTitle() {
    		return hasCustomTitle ? i : null;
    	}
    
    	public boolean hasCustomTitle() {
    		return hasCustomTitle;
    	}
    
    	public void resetCustomTitle() {
    		this.i = null;
    		this.hasCustomTitle = false;
    	}
    
    	public WorldPacketsEncoder getPackets() {
    		return session.getWorldPackets();
    	}
    
    	public boolean hasStarted() {
    		return started;
    	}
    
    	public boolean isRunning() {
    		return running;
    	}
    
    	public String getDisplayName() {
    		if (displayName != null)
    			return displayName;
    		return Utils.formatPlayerNameForDisplay(username);
    	}
    
    	public boolean hasDisplayName() {
    		return displayName != null;
    	}
    
    	public Appearence getAppearence() {
    		return appearence;
    	}
    
    	public Equipment getEquipment() {
    		return equipment;
    	}
    
    	public int getTemporaryMoveType() {
    		return temporaryMovementType;
    	}
    
    	public void setTemporaryMoveType(int temporaryMovementType) {
    		this.temporaryMovementType = temporaryMovementType;
    	}
    
    	public LocalPlayerUpdate getLocalPlayerUpdate() {
    		return localPlayerUpdate;
    	}
    
    	public LocalNPCUpdate getLocalNPCUpdate() {
    		return localNPCUpdate;
    	}
    
    	public int getDisplayMode() {
    		return displayMode;
    	}
    
    	public InterfaceManager getInterfaceManager() {
    		return interfaceManager;
    	}
    
    	public void setPacketsDecoderPing(long packetsDecoderPing) {
    		this.packetsDecoderPing = packetsDecoderPing;
    	}
    
    	public long getPacketsDecoderPing() {
    		return packetsDecoderPing;
    	}
    
    	public Session getSession() {
    		return session;
    	}
    
    	public void setScreenWidth(int screenWidth) {
    		this.screenWidth = screenWidth;
    	}
    
    	public int getScreenWidth() {
    		return screenWidth;
    	}
    
    	public void setScreenHeight(int screenHeight) {
    		this.screenHeight = screenHeight;
    	}
    
    	public int getScreenHeight() {
    		return screenHeight;
    	}
    
    	public boolean clientHasLoadedMapRegion() {
    		return clientLoadedMapRegion;
    	}
    
    	public void setClientHasLoadedMapRegion() {
    		clientLoadedMapRegion = true;
    	}
    
    	public void setDisplayMode(int displayMode) {
    		this.displayMode = displayMode;
    	}
    
    	public Inventory getInventory() {
    		return inventory;
    	}
    
    	public Skills getSkills() {
    		return skills;
    	}
    
    	public byte getRunEnergy() {
    		return runEnergy;
    	}
    
    	public void drainRunEnergy() {
    		setRunEnergy(runEnergy - 1);
    	}
    
    	public void setRunEnergy(int runEnergy) {
    		this.runEnergy = (byte) runEnergy;
    		getPackets().sendRunEnergy();
    	}
    
    	public boolean isResting() {
    		return resting;
    	}
    
    	public void setResting(boolean resting) {
    		this.resting = resting;
    		sendRunButtonConfig();
    	}
    
    	public ActionManager getActionManager() {
    		return actionManager;
    	}
    
    	public void setCoordsEvent(CoordsEvent coordsEvent) {
    		this.coordsEvent = coordsEvent;
    	}
    
    	public DialogueManager getDialogueManager() {
    		return dialogueManager;
    	}
    
    	public ConstructFurniture ConstructFurniture() {
    		return con;
    	}
    	public Mission getMission() {
    		return mission;
    	}
    
    	public SpinsManager getSpinsManager() {
    		return spinsManager;
    	}
    
    	public DwarfCannon getDwarfCannon() {
    		return dwarfCannon;
    	}
    
    	public CombatDefinitions getCombatDefinitions() {
    		return combatDefinitions;
    	}
    
    	@Override
    	public double getMagePrayerMultiplier() {
    		return 0.6;
    	}
    
    	@Override
    	public double getRangePrayerMultiplier() {
    		return 0.6;
    	}
    
    	@Override
    	public double getMeleePrayerMultiplier() {
    		return 0.6;
    	}
    
    	public void sendSoulSplit(final Hit hit, final Entity user) {
    		final Player target = this;
    		if (hit.getDamage() > 0)
    			World.sendProjectile(user, this, 2263, 11, 11, 20, 5, 0, 0);
    		user.heal(hit.getDamage() / 5);
    		prayer.drainPrayer(hit.getDamage() / 5);
    		WorldTasksManager.schedule(new WorldTask() {
    			@Override
    			public void run() {
    				setNextGraphics(new Graphics(2264));
    				if (hit.getDamage() > 0)
    					World.sendProjectile(target, user, 2263, 11, 11, 20, 5, 0,
    							0);
    			}
    		}, 0);
    	}
    
    	@Override
    	public void handleIngoingHit(final Hit hit) {
    		if (hit.getLook() != HitLook.MELEE_DAMAGE
    				&& hit.getLook() != HitLook.RANGE_DAMAGE
    				&& hit.getLook() != HitLook.MAGIC_DAMAGE)
    			return;
    		if (invulnerable) {
    			hit.setDamage(0);
    			return;
    		}
    		if (auraManager.usingPenance()) {
    			int amount = (int) (hit.getDamage() * 0.2);
    			if (amount > 0)
    				prayer.restorePrayer(amount);
    		}
    		Entity source = hit.getSource();
    		if (source == null)
    			return;
    		if (polDelay > Utils.currentTimeMillis())
    			hit.setDamage((int) (hit.getDamage() * 0.5));
    		if (prayer.hasPrayersOn() && hit.getDamage() != 0) {
    			if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
    				if (prayer.usingPrayer(0, 17))
    					hit.setDamage((int) (hit.getDamage() * source
    							.getMagePrayerMultiplier()));
    				else if (prayer.usingPrayer(1, 7)) {
    					int deflectedDamage = source instanceof Nex ? 0
    							: (int) (hit.getDamage() * 0.1);
    					hit.setDamage((int) (hit.getDamage() * source
    							.getMagePrayerMultiplier()));
    					if (deflectedDamage > 0) {
    						source.applyHit(new Hit(this, deflectedDamage,
    								HitLook.REFLECTED_DAMAGE));
    						setNextGraphics(new Graphics(2228));
    						setNextAnimation(new Animation(12573));
    					}
    				}
    			} else if (hit.getLook() == HitLook.RANGE_DAMAGE) {
    				if (prayer.usingPrayer(0, 18))
    					hit.setDamage((int) (hit.getDamage() * source
    							.getRangePrayerMultiplier()));
    				else if (prayer.usingPrayer(1, 8)) {
    					int deflectedDamage = source instanceof Nex ? 0
    							: (int) (hit.getDamage() * 0.1);
    					hit.setDamage((int) (hit.getDamage() * source
    							.getRangePrayerMultiplier()));
    					if (deflectedDamage > 0) {
    						source.applyHit(new Hit(this, deflectedDamage,
    								HitLook.REFLECTED_DAMAGE));
    						setNextGraphics(new Graphics(2229));
    						setNextAnimation(new Animation(12573));
    					}
    				}
    			} else if (hit.getLook() == HitLook.MELEE_DAMAGE) {
    				if (prayer.usingPrayer(0, 19))
    					hit.setDamage((int) (hit.getDamage() * source
    							.getMeleePrayerMultiplier()));
    				else if (prayer.usingPrayer(1, 9)) {
    					int deflectedDamage = source instanceof Nex ? 0
    							: (int) (hit.getDamage() * 0.1);
    					hit.setDamage((int) (hit.getDamage() * source
    							.getMeleePrayerMultiplier()));
    					if (deflectedDamage > 0) {
    						source.applyHit(new Hit(this, deflectedDamage,
    								HitLook.REFLECTED_DAMAGE));
    						setNextGraphics(new Graphics(2230));
    						setNextAnimation(new Animation(12573));
    					}
    				}
    			}
    		}
    		if (hit.getDamage() >= 200) {
    			if (hit.getLook() == HitLook.MELEE_DAMAGE) {
    				int reducedDamage = hit.getDamage()
    						* combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_MELEE_BONUS]
    						/ 100;
    				if (reducedDamage > 0) {
    					hit.setDamage(hit.getDamage() - reducedDamage);
    					hit.setSoaking(new Hit(source, reducedDamage,
    							HitLook.ABSORB_DAMAGE));
    				}
    			} else if (hit.getLook() == HitLook.RANGE_DAMAGE) {
    				int reducedDamage = hit.getDamage()
    						* combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_RANGE_BONUS]
    						/ 100;
    				if (reducedDamage > 0) {
    					hit.setDamage(hit.getDamage() - reducedDamage);
    					hit.setSoaking(new Hit(source, reducedDamage,
    							HitLook.ABSORB_DAMAGE));
    				}
    			} else if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
    				int reducedDamage = hit.getDamage()
    						* combatDefinitions.getBonuses()[CombatDefinitions.ABSORVE_MAGE_BONUS]
    						/ 100;
    				if (reducedDamage > 0) {
    					hit.setDamage(hit.getDamage() - reducedDamage);
    					hit.setSoaking(new Hit(source, reducedDamage,
    							HitLook.ABSORB_DAMAGE));
    				}
    			}
    		}
    		int shieldId = equipment.getShieldId();
    		if (shieldId == 13742) { // elsyian
    			if (Utils.getRandom(100) <= 70)
    				hit.setDamage((int) (hit.getDamage() * 0.75));
    		} else if (shieldId == 13740) { // divine
    			int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2);
    			if (prayer.getPrayerpoints() >= drain) {
    				hit.setDamage((int) (hit.getDamage() * 0.70));
    				prayer.drainPrayer(drain);
    			}
    		}
    		if (castedVeng && hit.getDamage() >= 4) {
    			castedVeng = false;
    			setNextForceTalk(new ForceTalk("Taste vengeance!"));
    			source.applyHit(new Hit(this, (int) (hit.getDamage() * 0.75),
    					HitLook.REGULAR_DAMAGE));
    		}
    		if (source instanceof Player) {
    			final Player p2 = (Player) source;
    			if (p2.prayer.hasPrayersOn()) {
    				if (p2.prayer.usingPrayer(0, 24)) { // smite
    					int drain = hit.getDamage() / 4;
    					if (drain > 0)
    						prayer.drainPrayer(drain);
    				} else {
    					if (hit.getDamage() == 0)
    						return;
    					if (!p2.prayer.isBoostedLeech()) {
    						if (hit.getLook() == HitLook.MELEE_DAMAGE) {
    							if (p2.prayer.usingPrayer(1, 19)) {
    								if (Utils.getRandom(4) == 0) {
    									p2.prayer.increaseTurmoilBonus(this);
    									p2.prayer.setBoostedLeech(true);
    									return;
    								}
    							} else if (p2.prayer.usingPrayer(1, 1)) { // sap att
    								if (Utils.getRandom(4) == 0) {
    									if (p2.prayer.reachedMax(0)) {
    										p2.getPackets()
    												.sendGameMessage(
    														"Your opponent has been weakened so much that your sap curse has no effect.",
    														true);
    									} else {
    										p2.prayer.increaseLeechBonus(0);
    										p2.getPackets()
    												.sendGameMessage(
    														"Your curse drains Attack from the enemy, boosting your Attack.",
    														true);
    									}
    									p2.setNextAnimation(new Animation(12569));
    									p2.setNextGraphics(new Graphics(2214));
    									p2.prayer.setBoostedLeech(true);
    									World.sendProjectile(p2, this, 2215, 35,
    											35, 20, 5, 0, 0);
    									WorldTasksManager.schedule(new WorldTask() {
    										@Override
    										public void run() {
    											setNextGraphics(new Graphics(2216));
    										}
    									}, 1);
    									return;
    								}
    							} else {
    								if (p2.prayer.usingPrayer(1, 10)) {
    									if (Utils.getRandom(7) == 0) {
    										if (p2.prayer.reachedMax(3)) {
    											p2.getPackets()
    													.sendGameMessage(
    															"Your opponent has been weakened so much that your leech curse has no effect.",
    															true);
    										} else {
    											p2.prayer.increaseLeechBonus(3);
    											p2.getPackets()
    													.sendGameMessage(
    															"Your curse drains Attack from the enemy, boosting your Attack.",
    															true);
    										}
    										p2.setNextAnimation(new Animation(12575));
    										p2.prayer.setBoostedLeech(true);
    										World.sendProjectile(p2, this, 2231,
    												35, 35, 20, 5, 0, 0);
    										WorldTasksManager.schedule(
    												new WorldTask() {
    													@Override
    													public void run() {
    														setNextGraphics(new Graphics(
    																2232));
    													}
    												}, 1);
    										return;
    									}
    								}
    								if (p2.prayer.usingPrayer(1, 14)) {
    									if (Utils.getRandom(7) == 0) {
    										if (p2.prayer.reachedMax(7)) {
    											p2.getPackets()
    													.sendGameMessage(
    															"Your opponent has been weakened so much that your leech curse has no effect.",
    															true);
    										} else {
    											p2.prayer.increaseLeechBonus(7);
    											p2.getPackets()
    													.sendGameMessage(
    															"Your curse drains Strength from the enemy, boosting your Strength.",
    															true);
    										}
    										p2.setNextAnimation(new Animation(12575));
    										p2.prayer.setBoostedLeech(true);
    										World.sendProjectile(p2, this, 2248,
    												35, 35, 20, 5, 0, 0);
    										WorldTasksManager.schedule(
    												new WorldTask() {
    													@Override
    													public void run() {
    														setNextGraphics(new Graphics(
    																2250));
    													}
    												}, 1);
    										return;
    									}
    								}
    
    							}
    						}
    						if (hit.getLook() == HitLook.RANGE_DAMAGE) {
    							if (p2.prayer.usingPrayer(1, 2)) { // sap range
    								if (Utils.getRandom(4) == 0) {
    									if (p2.prayer.reachedMax(1)) {
    										p2.getPackets()
    												.sendGameMessage(
    														"Your opponent has been weakened so much that your sap curse has no effect.",
    														true);
    									} else {
    										p2.prayer.increaseLeechBonus(1);
    										p2.getPackets()
    												.sendGameMessage(
    														"Your curse drains Range from the enemy, boosting your Range.",
    														true);
    									}
    									p2.setNextAnimation(new Animation(12569));
    									p2.setNextGraphics(new Graphics(2217));
    									p2.prayer.setBoostedLeech(true);
    									World.sendProjectile(p2, this, 2218, 35,
    											35, 20, 5, 0, 0);
    									WorldTasksManager.schedule(new WorldTask() {
    										@Override
    										public void run() {
    											setNextGraphics(new Graphics(2219));
    										}
    									}, 1);
    									return;
    								}
    							} else if (p2.prayer.usingPrayer(1, 11)) {
    								if (Utils.getRandom(7) == 0) {
    									if (p2.prayer.reachedMax(4)) {
    										p2.getPackets()
    												.sendGameMessage(
    														"Your opponent has been weakened so much that your leech curse has no effect.",
    														true);
    									} else {
    										p2.prayer.increaseLeechBonus(4);
    										p2.getPackets()
    												.sendGameMessage(
    														"Your curse drains Range from the enemy, boosting your Range.",
    														true);
    									}
    									p2.setNextAnimation(new Animation(12575));
    									p2.prayer.setBoostedLeech(true);
    									World.sendProjectile(p2, this, 2236, 35,
    											35, 20, 5, 0, 0);
    									WorldTasksManager.schedule(new WorldTask() {
    										@Override
    										public void run() {
    											setNextGraphics(new Graphics(2238));
    										}
    									});
    									return;
    								}
    							}
    						}
    						if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
    							if (p2.prayer.usingPrayer(1, 3)) { // sap mage
    								if (Utils.getRandom(4) == 0) {
    									if (p2.prayer.reachedMax(2)) {
    										p2.getPackets()
    												.sendGameMessage(
    														"Your opponent has been weakened so much that your sap curse has no effect.",
    														true);
    									} else {
    										p2.prayer.increaseLeechBonus(2);
    										p2.getPackets()
    												.sendGameMessage(
    														"Your curse drains Magic from the enemy, boosting your Magic.",
    														true);
    									}
    									p2.setNextAnimation(new Animation(12569));
    									p2.setNextGraphics(new Graphics(2220));
    									p2.prayer.setBoostedLeech(true);
    									World.sendProjectile(p2, this, 2221, 35,
    											35, 20, 5, 0, 0);
    									WorldTasksManager.schedule(new WorldTask() {
    										@Override
    										public void run() {
    											setNextGraphics(new Graphics(2222));
    										}
    									}, 1);
    									return;
    								}
    							} else if (p2.prayer.usingPrayer(1, 12)) {
    								if (Utils.getRandom(7) == 0) {
    									if (p2.prayer.reachedMax(5)) {
    										p2.getPackets()
    												.sendGameMessage(
    														"Your opponent has been weakened so much that your leech curse has no effect.",
    														true);
    									} else {
    										p2.prayer.increaseLeechBonus(5);
    										p2.getPackets()
    												.sendGameMessage(
    														"Your curse drains Magic from the enemy, boosting your Magic.",
    														true);
    									}
    									p2.setNextAnimation(new Animation(12575));
    									p2.prayer.setBoostedLeech(true);
    									World.sendProjectile(p2, this, 2240, 35,
    											35, 20, 5, 0, 0);
    									WorldTasksManager.schedule(new WorldTask() {
    										@Override
    										public void run() {
    											setNextGraphics(new Graphics(2242));
    										}
    									}, 1);
    									return;
    								}
    							}
    						}
    
    						// overall
    
    						if (p2.prayer.usingPrayer(1, 13)) { // leech defence
    							if (Utils.getRandom(10) == 0) {
    								if (p2.prayer.reachedMax(6)) {
    									p2.getPackets()
    											.sendGameMessage(
    													"Your opponent has been weakened so much that your leech curse has no effect.",
    													true);
    								} else {
    									p2.prayer.increaseLeechBonus(6);
    									p2.getPackets()
    											.sendGameMessage(
    													"Your curse drains Defence from the enemy, boosting your Defence.",
    													true);
    								}
    								p2.setNextAnimation(new Animation(12575));
    								p2.prayer.setBoostedLeech(true);
    								World.sendProjectile(p2, this, 2244, 35, 35,
    										20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2246));
    									}
    								}, 1);
    								return;
    							}
    						}
    
    						if (p2.prayer.usingPrayer(1, 15)) {
    							if (Utils.getRandom(10) == 0) {
    								if (getRunEnergy() <= 0) {
    									p2.getPackets()
    											.sendGameMessage(
    													"Your opponent has been weakened so much that your leech curse has no effect.",
    													true);
    								} else {
    									p2.setRunEnergy(p2.getRunEnergy() > 90 ? 100
    											: p2.getRunEnergy() + 10);
    									setRunEnergy(p2.getRunEnergy() > 10 ? getRunEnergy() - 10
    											: 0);
    								}
    								p2.setNextAnimation(new Animation(12575));
    								p2.prayer.setBoostedLeech(true);
    								World.sendProjectile(p2, this, 2256, 35, 35,
    										20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2258));
    									}
    								}, 1);
    								return;
    							}
    						}
    
    						if (p2.prayer.usingPrayer(1, 16)) {
    							if (Utils.getRandom(10) == 0) {
    								if (combatDefinitions
    										.getSpecialAttackPercentage() <= 0) {
    									p2.getPackets()
    											.sendGameMessage(
    													"Your opponent has been weakened so much that your leech curse has no effect.",
    													true);
    								} else {
    									p2.combatDefinitions.restoreSpecialAttack();
    									combatDefinitions
    											.desecreaseSpecialAttack(10);
    								}
    								p2.setNextAnimation(new Animation(12575));
    								p2.prayer.setBoostedLeech(true);
    								World.sendProjectile(p2, this, 2252, 35, 35,
    										20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2254));
    									}
    								}, 1);
    								return;
    							}
    						}
    
    						if (p2.prayer.usingPrayer(1, 4)) { // sap spec
    							if (Utils.getRandom(10) == 0) {
    								p2.setNextAnimation(new Animation(12569));
    								p2.setNextGraphics(new Graphics(2223));
    								p2.prayer.setBoostedLeech(true);
    								if (combatDefinitions
    										.getSpecialAttackPercentage() <= 0) {
    									p2.getPackets()
    											.sendGameMessage(
    													"Your opponent has been weakened so much that your sap curse has no effect.",
    													true);
    								} else {
    									combatDefinitions
    											.desecreaseSpecialAttack(10);
    								}
    								World.sendProjectile(p2, this, 2224, 35, 35,
    										20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2225));
    									}
    								}, 1);
    								return;
    							}
    						}
    					}
    				}
    			}
    		} else {
    			NPC n = (NPC) source;
    			if (n.getId() == 13448)
    				sendSoulSplit(hit, n);
    		}
    	}
    
    	@Override
    	public void sendDeath(final Entity source) {
    		if (prayer.hasPrayersOn()
    				&& getTemporaryAttributtes().get("startedDuel") != Boolean.TRUE) {
    			if (prayer.usingPrayer(0, 22)) {
    				setNextGraphics(new Graphics(437));
    				final Player target = this;
    				if (isAtMultiArea()) {
    					for (int regionId : getMapRegionsIds()) {
    						List<Integer> playersIndexes = World
    								.getRegion(regionId).getPlayerIndexes();
    						if (playersIndexes != null) {
    							for (int playerIndex : playersIndexes) {
    								Player player = World.getPlayers().get(
    										playerIndex);
    								if (player == null
    										|| !player.hasStarted()
    										|| player.isDead()
    										|| player.hasFinished()
    										|| !player.withinDistance(this, 1)
    										|| !player.isCanPvp()
    										|| !target.getControlerManager()
    												.canHit(player))
    									continue;
    								player.applyHit(new Hit(
    										target,
    										Utils.getRandom((int) (skills
    												.getLevelForXp(Skills.PRAYER) * 2.5)),
    										HitLook.REGULAR_DAMAGE));
    							}
    						}
    						List<Integer> npcsIndexes = World.getRegion(regionId)
    								.getNPCsIndexes();
    						if (npcsIndexes != null) {
    							for (int npcIndex : npcsIndexes) {
    								NPC npc = World.getNPCs().get(npcIndex);
    								if (npc == null
    										|| npc.isDead()
    										|| npc.hasFinished()
    										|| !npc.withinDistance(this, 1)
    										|| !npc.getDefinitions()
    												.hasAttackOption()
    										|| !target.getControlerManager()
    												.canHit(npc))
    									continue;
    								npc.applyHit(new Hit(
    										target,
    										Utils.getRandom((int) (skills
    												.getLevelForXp(Skills.PRAYER) * 2.5)),
    										HitLook.REGULAR_DAMAGE));
    							}
    						}
    					}
    				} else {
    					if (source != null && source != this && !source.isDead()
    							&& !source.hasFinished()
    							&& source.withinDistance(this, 1))
    						source.applyHit(new Hit(target, Utils
    								.getRandom((int) (skills
    										.getLevelForXp(Skills.PRAYER) * 2.5)),
    								HitLook.REGULAR_DAMAGE));
    				}
    				WorldTasksManager.schedule(new WorldTask() {
    					@Override
    					public void run() {
    						World.sendGraphics(target, new Graphics(438),
    								new WorldTile(target.getX() - 1, target.getY(),
    										target.getPlane()));
    						World.sendGraphics(target, new Graphics(438),
    								new WorldTile(target.getX() + 1, target.getY(),
    										target.getPlane()));
    						World.sendGraphics(target, new Graphics(438),
    								new WorldTile(target.getX(), target.getY() - 1,
    										target.getPlane()));
    						World.sendGraphics(target, new Graphics(438),
    								new WorldTile(target.getX(), target.getY() + 1,
    										target.getPlane()));
    						World.sendGraphics(target, new Graphics(438),
    								new WorldTile(target.getX() - 1,
    										target.getY() - 1, target.getPlane()));
    						World.sendGraphics(target, new Graphics(438),
    								new WorldTile(target.getX() - 1,
    										target.getY() + 1, target.getPlane()));
    						World.sendGraphics(target, new Graphics(438),
    								new WorldTile(target.getX() + 1,
    										target.getY() - 1, target.getPlane()));
    						World.sendGraphics(target, new Graphics(438),
    								new WorldTile(target.getX() + 1,
    										target.getY() + 1, target.getPlane()));
    					}
    				});
    			} else if (prayer.usingPrayer(1, 17)) {
    				World.sendProjectile(this, new WorldTile(getX() + 2,
    						getY() + 2, getPlane()), 2260, 24, 0, 41, 35, 30, 0);
    				World.sendProjectile(this, new WorldTile(getX() + 2, getY(),
    						getPlane()), 2260, 41, 0, 41, 35, 30, 0);
    				World.sendProjectile(this, new WorldTile(getX() + 2,
    						getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
    
    				World.sendProjectile(this, new WorldTile(getX() - 2,
    						getY() + 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
    				World.sendProjectile(this, new WorldTile(getX() - 2, getY(),
    						getPlane()), 2260, 41, 0, 41, 35, 30, 0);
    				World.sendProjectile(this, new WorldTile(getX() - 2,
    						getY() - 2, getPlane()), 2260, 41, 0, 41, 35, 30, 0);
    
    				World.sendProjectile(this, new WorldTile(getX(), getY() + 2,
    						getPlane()), 2260, 41, 0, 41, 35, 30, 0);
    				World.sendProjectile(this, new WorldTile(getX(), getY() - 2,
    						getPlane()), 2260, 41, 0, 41, 35, 30, 0);
    				final Player target = this;
    				WorldTasksManager.schedule(new WorldTask() {
    					@Override
    					public void run() {
    						setNextGraphics(new Graphics(2259));
    
    						if (isAtMultiArea()) {
    							for (int regionId : getMapRegionsIds()) {
    								List<Integer> playersIndexes = World.getRegion(
    										regionId).getPlayerIndexes();
    								if (playersIndexes != null) {
    									for (int playerIndex : playersIndexes) {
    										Player player = World.getPlayers().get(
    												playerIndex);
    										if (player == null
    												|| !player.hasStarted()
    												|| player.isDead()
    												|| player.hasFinished()
    												|| !player.isCanPvp()
    												|| !player.withinDistance(
    														target, 2)
    												|| !target
    														.getControlerManager()
    														.canHit(player))
    											continue;
    										player.applyHit(new Hit(
    												target,
    												Utils.getRandom((skills
    														.getLevelForXp(Skills.PRAYER) * 3)),
    												HitLook.REGULAR_DAMAGE));
    									}
    								}
    								List<Integer> npcsIndexes = World.getRegion(
    										regionId).getNPCsIndexes();
    								if (npcsIndexes != null) {
    									for (int npcIndex : npcsIndexes) {
    										NPC npc = World.getNPCs().get(npcIndex);
    										if (npc == null
    												|| npc.isDead()
    												|| npc.hasFinished()
    												|| !npc.withinDistance(target,
    														2)
    												|| !npc.getDefinitions()
    														.hasAttackOption()
    												|| !target
    														.getControlerManager()
    														.canHit(npc))
    											continue;
    										npc.applyHit(new Hit(
    												target,
    												Utils.getRandom((skills
    														.getLevelForXp(Skills.PRAYER) * 3)),
    												HitLook.REGULAR_DAMAGE));
    									}
    								}
    							}
    						} else {
    							if (source != null && source != target
    									&& !source.isDead()
    									&& !source.hasFinished()
    									&& source.withinDistance(target, 2))
    								source.applyHit(new Hit(
    										target,
    										Utils.getRandom((skills
    												.getLevelForXp(Skills.PRAYER) * 3)),
    										HitLook.REGULAR_DAMAGE));
    						}
    
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() + 2, getY() + 2,
    										getPlane()));
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() + 2, getY(), getPlane()));
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() + 2, getY() - 2,
    										getPlane()));
    
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() - 2, getY() + 2,
    										getPlane()));
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() - 2, getY(), getPlane()));
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() - 2, getY() - 2,
    										getPlane()));
    
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX(), getY() + 2, getPlane()));
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX(), getY() - 2, getPlane()));
    
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() + 1, getY() + 1,
    										getPlane()));
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() + 1, getY() - 1,
    										getPlane()));
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() - 1, getY() + 1,
    										getPlane()));
    						World.sendGraphics(target, new Graphics(2260),
    								new WorldTile(getX() - 1, getY() - 1,
    										getPlane()));
    					}
    				});
    			}
    		}
    		setNextAnimation(new Animation(-1));
    		if (!controlerManager.sendDeath())
    			return;
    		lock(7);
    		stopAll();
    		if (familiar != null)
    			familiar.sendDeath(this);
    		WorldTasksManager.schedule(new WorldTask() {
    			int loop;
    
    			@Override
    			public void run() {
    				if (loop == 0) {
    					setNextAnimation(new Animation(836));
    				} else if (loop == 1) {
    					getPackets().sendGameMessage("Oh dear, you have died.");
    					if (source instanceof Player) {
    						Player killer = (Player) source;
    						killer.setAttackedByDelay(4);
    					}
    				} else if (loop == 3) {
    					controlerManager.startControler("DeathEvent"); 
    				} else if (loop == 4) {
    					getPackets().sendMusicEffect(90);
    					stop();
    				}
    				loop++;
    			}
    		}, 0, 1);
    	}
    
    	public static String yeahfreestringpl000x() {
    		switch (Utils.random(8)) {
    		case 0:
    			return "There is no escape!";
    		case 1:
    			return "Muahahahaha!";
    		case 2:
    			return "You belong to me!";
    		case 3:
    			return "Beware mortals, you travel with me!";
    		case 4:
    			return "Your time here is over!";
    		case 5:
    			return "Now is the time you die!";
    		case 6:
    			return "I claim you as my own!";
    		case 7:
    			return "you are is mine!";
    		case 8:
    			return "Let me escort you to Varrock!";
    		case 9:
    			return "I have come for you!";
    		}
    		return "";
    	}
    
    	public boolean isBurying = false;
    
    	public boolean isSecured;
    
    	public int bossid;
    
    	public int isCompletionist = 0;
    	private Player player;
    
    	public void sendItemsOnDeath(Player killer) {
    		if (rights == 2)
    			return;
    		if (rights == 7)
    			return;
    		charges.die();
    		auraManager.removeAura();
    		CopyOnWriteArrayList<Item> containedItems = new CopyOnWriteArrayList<Item>();
    		for (int i = 0; i < 14; i++) {
    			if (equipment.getItem(i) != null
    					&& equipment.getItem(i).getId() != -1
    					&& equipment.getItem(i).getAmount() != -1)
    				containedItems.add(new Item(equipment.getItem(i).getId(),
    						equipment.getItem(i).getAmount()));
    		}
    		for (int i = 0; i < 28; i++) {
    			if (inventory.getItem(i) != null
    					&& inventory.getItem(i).getId() != -1
    					&& inventory.getItem(i).getAmount() != -1)
    				containedItems.add(new Item(getInventory().getItem(i).getId(),
    						getInventory().getItem(i).getAmount()));
    		}
    		if (containedItems.isEmpty())
    			return;
    		int keptAmount = 0;
    		if (!(controlerManager.getControler() instanceof CorpBeastControler)
    				&& !(controlerManager.getControler() instanceof CrucibleControler)) {
    			keptAmount = hasSkull() ? 0 : 3;
    			if (prayer.usingPrayer(0, 10) || prayer.usingPrayer(1, 0))
    				keptAmount++;
    		}
    		if (donator && Utils.random(2) == 0)
    			keptAmount += 1;
    		CopyOnWriteArrayList<Item> keptItems = new CopyOnWriteArrayList<Item>();
    		Item lastItem = new Item(1, 1);
    		for (int i = 0; i < keptAmount; i++) {
    			for (@SuppressWarnings("unused") Item item : containedItems) {
    			}
    			keptItems.add(lastItem);
    			containedItems.remove(lastItem);
    			lastItem = new Item(1, 1);
    		}
    		inventory.reset();
    		equipment.reset();
    		for (Item item : keptItems) {
    			getInventory().addItem(item);
    		}
    		for (Item item : containedItems) {
    			World.addGroundItem(item, getLastWorldTile(), killer == null ? this
    					: killer, false, 180, true, true);
    		}
    	}
    
    	public void increaseKillCount(Player killed) {
    		killed.deathCount++;
    		PkRank.checkRank(killed);
    		if (killed.getSession().getIP().equals(getSession().getIP()))
    			return;
    		killCount++;
    		getInventory().addItem(12852, 100);
    		getPackets().sendGameMessage(
    				"You have killed <col=ff0000>" + killed.getDisplayName()
    						+ "</col>, you have now <col=ff0000>" + killCount + "</col> kills.");
    		PkRank.checkRank(this);
    	}
    
    	public void sendRandomJail(Player p) {
    		p.resetWalkSteps();
    		switch (Utils.getRandom(6)) {
    		case 0:
    			p.setNextWorldTile(new WorldTile(2669, 10387, 0));
    			break;
    		case 1:
    			p.setNextWorldTile(new WorldTile(2669, 10383, 0));
    			break;
    		case 2:
    			p.setNextWorldTile(new WorldTile(2669, 10379, 0));
    			break;
    		case 3:
    			p.setNextWorldTile(new WorldTile(2673, 10379, 0));
    			break;
    		case 4:
    			p.setNextWorldTile(new WorldTile(2673, 10385, 0));
    			break;
    		case 5:
    			p.setNextWorldTile(new WorldTile(2677, 10387, 0));
    			break;
    		case 6:
    			p.setNextWorldTile(new WorldTile(2677, 10383, 0));
    			break;
    		}
    	}
    
    	@Override
    	public int getSize() {
    		return appearence.getSize();
    	}
    
    	public boolean isCanPvp() {
    		return canPvp;
    	}
    
    	public void setCanPvp(boolean canPvp) {
    		this.canPvp = canPvp;
    		appearence.generateAppearenceData();
    		getPackets().sendPlayerOption(canPvp ? "Attack" : "null", 1, true);
    		getPackets().sendPlayerUnderNPCPriority(canPvp);
    	}
    
    	public Prayer getPrayer() {
    		return prayer;
    	}
    
    	public long getLockDelay() {
    		return lockDelay;
    	}
    
    	public boolean isLocked() {
    		return lockDelay >= Utils.currentTimeMillis();
    	}
    	
    	public void init(Session session, String string, IsaacKeyPair isaacKeyPair) {
    		username = string;
    		this.session = session;
    		this.isaacKeyPair = isaacKeyPair;
    		World.addLobbyPlayer(this);// .addLobbyPlayer(this);
    		if (Settings.DEBUG) {
    			Logger.log(this, new StringBuilder("Lobby Inited Player: ").append(string).append(", pass: ").append(password).toString());
    		}
    	}
    
    	public void startLobby(Player player) {
    		player.sendLobbyConfigs(player);
    		friendsIgnores.setPlayer(this);
    		friendsIgnores.init();
    		player.getPackets().sendFriendsChatChannel();
    		friendsIgnores.sendFriendsMyStatus(true);
    	}
    
    	public void sendLobbyConfigs(Player player) {
    		for (int i = 0; i < Utils.DEFAULT_LOBBY_CONFIGS.length; i++) {
    			int val = Utils.DEFAULT_LOBBY_CONFIGS[i];
    			if (val != 0) {
    				player.getPackets().sendConfig(i, val);
    			}
    		}
    	}
    
    	public void lock() {
    		lockDelay = Long.MAX_VALUE;
    	}
    
    	public void lock(long time) {
    		lockDelay = Utils.currentTimeMillis() + (time * 600);
    	}
    
    	public void unlock() {
    		lockDelay = 0;
    	}
    
    	public void useStairs(int emoteId, final WorldTile dest, int useDelay,
    			int totalDelay) {
    		useStairs(emoteId, dest, useDelay, totalDelay, null);
    	}
    
    	public void useStairs(int emoteId, final WorldTile dest, int useDelay,
    			int totalDelay, final String message) {
    		stopAll();
    		lock(totalDelay);
    		if (emoteId != -1)
    			setNextAnimation(new Animation(emoteId));
    		if (useDelay == 0)
    			setNextWorldTile(dest);
    		else {
    			WorldTasksManager.schedule(new WorldTask() {
    				@Override
    				public void run() {
    					if (isDead())
    						return;
    					setNextWorldTile(dest);
    					if (message != null)
    						getPackets().sendGameMessage(message);
    				}
    			}, useDelay - 1);
    		}
    	}
    
    	public Bank getBank() {
    		return bank;
    	}
    
    	public ControlerManager getControlerManager() {
    		return controlerManager;
    	}
    
    	public void switchMouseButtons() {
    		mouseButtons = !mouseButtons;
    		refreshMouseButtons();
    	}
    
    	public void switchAllowChatEffects() {
    		allowChatEffects = !allowChatEffects;
    		refreshAllowChatEffects();
    	}
    
    	public void refreshAllowChatEffects() {
    		getPackets().sendConfig(171, allowChatEffects ? 0 : 1);
    	}
    
    	public void refreshMouseButtons() {
    		getPackets().sendConfig(170, mouseButtons ? 0 : 1);
    	}
    
    	public void refreshPrivateChatSetup() {
    		getPackets().sendConfig(287, privateChatSetup);
    	}
    
    	public void refreshOtherChatsSetup() {
    		int value = friendChatSetup << 6;
    		getPackets().sendConfig(1438, value);
    	}
    
    	public void setPrivateChatSetup(int privateChatSetup) {
    		this.privateChatSetup = privateChatSetup;
    	}
    
    	public void setFriendChatSetup(int friendChatSetup) {
    		this.friendChatSetup = friendChatSetup;
    	}
    
    	public int getPrivateChatSetup() {
    		return privateChatSetup;
    	}
    
    	public boolean isForceNextMapLoadRefresh() {
    		return forceNextMapLoadRefresh;
    	}
    
    	public void setForceNextMapLoadRefresh(boolean forceNextMapLoadRefresh) {
    		this.forceNextMapLoadRefresh = forceNextMapLoadRefresh;
    	}
    
    	public FriendsIgnores getFriendsIgnores() {
    		return friendsIgnores;
    	}
    
    	public void sendMessage(String message) {
    		getPackets().sendGameMessage(message);
    	}
    
    	/*
    	 * do not use this, only used by pm
    	 */
    	public void setUsername(String username) {
    		this.username = username;
    	}
    
    	public void setDisplayName(String displayName) {
    		this.displayName = displayName;
    	}
    
    	public void addPotDelay(long time) {
    		potDelay = time + Utils.currentTimeMillis();
    	}
    
    	public long getPotDelay() {
    		return potDelay;
    	}
    
    	public void addFoodDelay(long time) {
    		foodDelay = time + Utils.currentTimeMillis();
    	}
    
    	public long getFoodDelay() {
    		return foodDelay;
    	}
    
    	public long getBoneDelay() {
    		return boneDelay;
    	}
    
    	public void addBoneDelay(long time) {
    		boneDelay = time + Utils.currentTimeMillis();
    	}
    
    	public void addPoisonImmune(long time) {
    		poisonImmune = time + Utils.currentTimeMillis();
    		getPoison().reset();
    	}
    
    	public long getPoisonImmune() {
    		return poisonImmune;
    	}
    
    	public void addFireImmune(long time) {
    		fireImmune = time + Utils.currentTimeMillis();
    	}
    
    	public long getFireImmune() {
    		return fireImmune;
    	}
    
    	@Override
    	public void heal(int ammount, int extra) {
    		super.heal(ammount, extra);
    		refreshHitPoints();
    	}
    
    	public MusicsManager getMusicsManager() {
    		return musicsManager;
    	}
    
    	public HintIconsManager getHintIconsManager() {
    		return hintIconsManager;
    	}
    
    	public boolean isCastVeng() {
    		return castedVeng;
    	}
    
    	public void setCastVeng(boolean castVeng) {
    		this.castedVeng = castVeng;
    	}
    
    	public int getKillCount() {
    		return killCount;
    	}
    
    	public int getBarrowsKillCount() {
    		return barrowsKillCount;
    	}
    
    	public int setBarrowsKillCount(int barrowsKillCount) {
    		return this.barrowsKillCount = barrowsKillCount;
    	}
    
    	public int setKillCount(int killCount) {
    		return this.killCount = killCount;
    	}
    
    	public int getDeathCount() {
    		return deathCount;
    	}
    
    	public int setDeathCount(int deathCount) {
    		return this.deathCount = deathCount;
    	}
    
    	public void setCloseInterfacesEvent(Runnable closeInterfacesEvent) {
    		this.closeInterfacesEvent = closeInterfacesEvent;
    	}
    
    	public long getMuted() {
    		return muted;
    	}
    
    	public void setMuted(long muted) {
    		this.muted = muted;
    	}
    
    	public void out(String text, int delay) {
    
    	}
    
    	public int box;
    	public boolean hasBankPin1;
    	public boolean completionist;
    	public String burntmagiclogs1;
    	
    	public long getJailed() {
    		return jailed;
    	}
    
    	public void setJailed(long jailed) {
    		this.jailed = jailed;
    	}
    
    	public boolean isPermBanned() {
    		return permBanned;
    	}
    
    	public void setPermBanned(boolean permBanned) {
    		this.permBanned = permBanned;
    	}
    
    	public long getBanned() {
    		return banned;
    	}
    
    	public void setBanned(long banned) {
    		this.banned = banned;
    	}
    
    	public ChargesManager getCharges() {
    		return charges;
    	}
    
    	public void setPassword(String password) {
    		this.password = password;
    	}
    
    	public boolean[] getKilledBarrowBrothers() {
    		return killedBarrowBrothers;
    	}
    
    	public void setHiddenBrother(int hiddenBrother) {
    		this.hiddenBrother = hiddenBrother;
    	}
    
    	public int getHiddenBrother() {
    		return hiddenBrother;
    	}
    
    	public void resetBarrows() {
    		hiddenBrother = -1;
    		killedBarrowBrothers = new boolean[7]; // includes new bro for future
    												// use
    		barrowsKillCount = 0;
    	}
    
    	public boolean isDonator() {
    		return isExtremeDonator() || donator
    				|| donatorTill > Utils.currentTimeMillis();
    	}
    
    	public boolean isExtremeDonator() {
    		return extremeDonator || extremeDonatorTill > Utils.currentTimeMillis();
    	}
    
    	public boolean isExtremePermDonator() {
    		return extremeDonator;
    	}
    
    	public void setExtremeDonator(boolean extremeDonator) {
    		this.extremeDonator = extremeDonator;
    	}
    
    	public boolean isGraphicDesigner() {
    		return isGraphicDesigner;
    	}
    
    	public boolean isForumModerator() {
    		return isForumModerator;
    	}
    
    	public void setGraphicDesigner(boolean isGraphicDesigner) {
    		this.isGraphicDesigner = isGraphicDesigner;
    	}
    
    	public void setForumModerator(boolean isForumModerator) {
    		this.isForumModerator = isForumModerator;
    	}
    
    	@SuppressWarnings("deprecation")
    	public void makeDonator(int months) {
    		if (donatorTill < Utils.currentTimeMillis())
    			donatorTill = Utils.currentTimeMillis();
    		Date date = new Date(donatorTill);
    		date.setMonth(date.getMonth() + months);
    		donatorTill = date.getTime();
    	}
    
    	@SuppressWarnings("deprecation")
    	public void makeDonatorDays(int days) {
    		if (donatorTill < Utils.currentTimeMillis())
    			donatorTill = Utils.currentTimeMillis();
    		Date date = new Date(donatorTill);
    		date.setDate(date.getDate() + days);
    		donatorTill = date.getTime();
    	}
    
    	@SuppressWarnings("deprecation")
    	public void makeExtremeDonatorDays(int days) {
    		if (extremeDonatorTill < Utils.currentTimeMillis())
    			extremeDonatorTill = Utils.currentTimeMillis();
    		Date date = new Date(extremeDonatorTill);
    		date.setDate(date.getDate() + days);
    		extremeDonatorTill = date.getTime();
    	}
    
    	@SuppressWarnings("deprecation")
    	public String getDonatorTill() {
    		return (donator ? "never" : new Date(donatorTill).toGMTString()) + ".";
    	}
    
    	@SuppressWarnings("deprecation")
    	public String getExtremeDonatorTill() {
    		return (extremeDonator ? "never" : new Date(extremeDonatorTill)
    				.toGMTString()) + ".";
    	}
    
    	public void setDonator(boolean donator) {
    		this.donator = donator;
    	}
    
    	public String getRecovQuestion() {
    		return recovQuestion;
    	}
    
    	public void setRecovQuestion(String recovQuestion) {
    		this.recovQuestion = recovQuestion;
    	}
    
    	public String getRecovAnswer() {
    		return recovAnswer;
    	}
    
    	public void setRecovAnswer(String recovAnswer) {
    		this.recovAnswer = recovAnswer;
    	}
    
    	public String getLastMsg() {
    		return lastMsg;
    	}
    
    	public void setLastMsg(String lastMsg) {
    		this.lastMsg = lastMsg;
    	}
    
    	public void logThis(String lastMsg) {
    		try {
    			DateFormat dateFormat = new SimpleDateFormat("MM/dd/yy HH:mm:ss");
    			Calendar cal = Calendar.getInstance();
    			System.out.println(dateFormat.format(cal.getTime()));
    			final String FILE_PATH = "data/playersaves/logs/chatlogs/";
    			BufferedWriter writer = new BufferedWriter(new FileWriter(FILE_PATH
    					+ getUsername() + ".txt", true));
    			writer.write("[" + dateFormat.format(cal.getTime()) + "] : "
    					+ lastMsg);
    			writer.newLine();
    			writer.flush();
    			writer.close();
    		} catch (IOException er) {
    			System.out.println("Error logging chatlog.");
    		}
    	}
    
    	public int[] getPouches() {
    		return pouches;
    	}
    
    	public EmotesManager getEmotesManager() {
    		return emotesManager;
    	}
    
    	public String getLastIP() {
    		return lastIP;
    	}
    
    	public String getLastHostname() {
    		InetAddress addr;
    		try {
    			addr = InetAddress.getByName(getLastIP());
    			String hostname = addr.getHostName();
    			return hostname;
    		} catch (UnknownHostException e) {
    			e.printStackTrace();
    		}
    		return null;
    	}
    
    	public PriceCheckManager getPriceCheckManager() {
    		return priceCheckManager;
    	}
    
    	public void setPestPoints(int pestPoints) {
    		this.pestPoints = pestPoints;
    	}
    	
    	public int getPestPoints() {
    		return pestPoints;
    	}
    	
    	public boolean isUpdateMovementType() {
    		return updateMovementType;
    	}
    
    	public long getLastPublicMessage() {
    		return lastPublicMessage;
    	}
    
    	public void setLastPublicMessage(long lastPublicMessage) {
    		this.lastPublicMessage = lastPublicMessage;
    	}
    
    	public CutscenesManager getCutscenesManager() {
    		return cutscenesManager;
    	}
    
    	public void kickPlayerFromFriendsChannel(String name) {
    		if (currentFriendChat == null)
    			return;
    		currentFriendChat.kickPlayerFromChat(this, name);
    	}
    
    	public void sendFriendsChannelMessage(String message) {
    		if (currentFriendChat == null)
    			return;
    		currentFriendChat.sendMessage(this, message);
    	}
    
    	public void sendFriendsChannelQuickMessage(QuickChatMessage message) {
    		if (currentFriendChat == null)
    			return;
    		currentFriendChat.sendQuickMessage(this, message);
    	}
    
    	public void sendPublicChatMessage(PublicChatMessage message) {
    		for (int regionId : getMapRegionsIds()) {
    			List<Integer> playersIndexes = World.getRegion(regionId)
    					.getPlayerIndexes();
    			if (playersIndexes == null)
    				continue;
    			for (Integer playerIndex : playersIndexes) {
    				Player p = World.getPlayers().get(playerIndex);
    				if (p == null
    						|| !p.hasStarted()
    						|| p.hasFinished()
    						|| p.getLocalPlayerUpdate().getLocalPlayers()[getIndex()] == null)
    					continue;
    				p.getPackets().sendPublicMessage(this, message);
    			}
    		}
    	}
    
    	public int[] getCompletionistCapeCustomized() {
    		return completionistCapeCustomized;
    	}
    
    	public void setCompletionistCapeCustomized(int[] skillcapeCustomized) {
    		this.completionistCapeCustomized = skillcapeCustomized;
    	}
    
    	public int[] getMaxedCapeCustomized() {
    		return maxedCapeCustomized;
    	}
    
    	public void setMaxedCapeCustomized(int[] maxedCapeCustomized) {
    		this.maxedCapeCustomized = maxedCapeCustomized;
    	}
    
    	public void setSkullId(int skullId) {
    		this.skullId = skullId;
    	}
    
    	public int getSkullId() {
    		return skullId;
    	}
    
    	public boolean isFilterGame() {
    		return filterGame;
    	}
    
    	public void setFilterGame(boolean filterGame) {
    		this.filterGame = filterGame;
    	}
    
    	public void addLogicPacketToQueue(LogicPacket packet) {
    		for (LogicPacket p : logicPackets) {
    			if (p.getId() == packet.getId()) {
    				logicPackets.remove(p);
    				break;
    			}
    		}
    		logicPackets.add(packet);
    	}
    
    	public DominionTower getDominionTower() {
    		return dominionTower;
    	}
    
    	public void setPrayerRenewalDelay(int delay) {
    		this.prayerRenewalDelay = delay;
    	}
    
    	public int getOverloadDelay() {
    		return overloadDelay;
    	}
    
    	public void setOverloadDelay(int overloadDelay) {
    		this.overloadDelay = overloadDelay;
    	}
    
    	public Trade getTrade() {
    		return trade;
    	}
    
    	public void setTeleBlockDelay(long teleDelay) {
    		getTemporaryAttributtes().put("TeleBlocked",
    				teleDelay + Utils.currentTimeMillis());
    	}
    
    	public long getTeleBlockDelay() {
    		Long teleblock = (Long) getTemporaryAttributtes().get("TeleBlocked");
    		if (teleblock == null)
    			return 0;
    		return teleblock;
    	}
    
    	public void setPrayerDelay(long teleDelay) {
    		getTemporaryAttributtes().put("PrayerBlocked",
    				teleDelay + Utils.currentTimeMillis());
    		prayer.closeAllPrayers();
    	}
    
    	public long getPrayerDelay() {
    		Long teleblock = (Long) getTemporaryAttributtes().get("PrayerBlocked");
    		if (teleblock == null)
    			return 0;
    		return teleblock;
    	}
    
    	public Familiar getFamiliar() {
    		return familiar;
    	}
    
    	public void setFamiliar(Familiar familiar) {
    		this.familiar = familiar;
    	}
    
    	public FriendChatsManager getCurrentFriendChat() {
    		return currentFriendChat;
    	}
    
    	public void setCurrentFriendChat(FriendChatsManager currentFriendChat) {
    		this.currentFriendChat = currentFriendChat;
    	}
    
    	public String getCurrentFriendChatOwner() {
    		return currentFriendChatOwner;
    	}
    
    	public void setCurrentFriendChatOwner(String currentFriendChatOwner) {
    		this.currentFriendChatOwner = currentFriendChatOwner;
    	}
    
    	public int getSummoningLeftClickOption() {
    		return summoningLeftClickOption;
    	}
    
    	public void setSummoningLeftClickOption(int summoningLeftClickOption) {
    		this.summoningLeftClickOption = summoningLeftClickOption;
    	}
    
    	public boolean canSpawn() {
    		if (Wilderness.isAtWild(this)
    				|| getControlerManager().getControler() instanceof FightPitsArena
    				|| getControlerManager().getControler() instanceof CorpBeastControler
    				|| getControlerManager().getControler() instanceof PestControler
    				|| getControlerManager().getControler() instanceof PestControlLobby
    				|| getControlerManager().getControler() instanceof PestControlGame
    				|| getControlerManager().getControler() instanceof ZGDControler
    				|| getControlerManager().getControler() instanceof GodWars
    				|| getControlerManager().getControler() instanceof DTControler
    				|| getControlerManager().getControler() instanceof DuelArena
    				|| getControlerManager().getControler() instanceof CastleWarsPlaying
    				|| getControlerManager().getControler() instanceof CastleWarsWaiting
    				|| getControlerManager().getControler() instanceof FightCaves
    				|| getControlerManager().getControler() instanceof FightKiln
    				|| FfaZone.inPvpArea(this)
    				|| getControlerManager().getControler() instanceof NomadsRequiem
    				|| getControlerManager().getControler() instanceof QueenBlackDragonController
    				|| getControlerManager().getControler() instanceof WarControler) {
    			return false;
    		}
    		if (getControlerManager().getControler() instanceof CrucibleControler) {
    			CrucibleControler controler = (CrucibleControler) getControlerManager()
    					.getControler();
    			return !controler.isInside();
    		}
    		return true;
    	}
    
    	public long getPolDelay() {
    		return polDelay;
    	}
    
    	public void addPolDelay(long delay) {
    		polDelay = delay + Utils.currentTimeMillis();
    	}
    
    	public void setPolDelay(long delay) {
    		this.polDelay = delay;
    	}
    
    	public List<Integer> getSwitchItemCache() {
    		return switchItemCache;
    	}
    
    	public AuraManager getAuraManager() {
    		return auraManager;
    	}
    
    	public int getMovementType() {
    		if (getTemporaryMoveType() != -1)
    			return getTemporaryMoveType();
    		return getRun() ? RUN_MOVE_TYPE : WALK_MOVE_TYPE;
    	}
    
    	public List<String> getOwnedObjectManagerKeys() {
    		if (ownedObjectsManagerKeys == null) // temporary
    			ownedObjectsManagerKeys = new LinkedList<String>();
    		return ownedObjectsManagerKeys;
    	}
    
    	public boolean hasInstantSpecial(final int weaponId) {
    		switch (weaponId) {
    		case 4153:
    		case 15486:
    		case 22207:
    		case 22209:
    		case 22211:
    		case 22213:
    		case 1377:
    		case 13472:
    		case 35:// Excalibur
    		case 8280:
    		case 14632:
    			return true;
    		default:
    			return false;
    		}
    	}
    
    	public void performInstantSpecial(final int weaponId) {
    		int specAmt = PlayerCombat.getSpecialAmmount(weaponId);
    		if (combatDefinitions.hasRingOfVigour())
    			specAmt *= 0.9;
    		if (combatDefinitions.getSpecialAttackPercentage() < specAmt) {
    			getPackets().sendGameMessage("You don't have enough power left.");
    			combatDefinitions.desecreaseSpecialAttack(0);
    			return;
    		}
    		if (this.getSwitchItemCache().size() > 0) {
    			ButtonHandler.submitSpecialRequest(this);
    			return;
    		}
    		switch (weaponId) {
    		case 4153:
    			combatDefinitions.setInstantAttack(true);
    			combatDefinitions.switchUsingSpecialAttack();
    			Entity target = (Entity) getTemporaryAttributtes().get(
    					"last_target");
    			if (target != null
    					&& target.getTemporaryAttributtes().get("last_attacker") == this) {
    				if (!(getActionManager().getAction() instanceof PlayerCombat)
    						|| ((PlayerCombat) getActionManager().getAction())
    								.getTarget() != target) {
    					getActionManager().setAction(new PlayerCombat(target));
    				}
    			}
    			break;
    		case 1377:
    		case 13472:
    			setNextAnimation(new Animation(1056));
    			setNextGraphics(new Graphics(246));
    			setNextForceTalk(new ForceTalk("Raarrrrrgggggghhhhhhh!"));
    			int defence = (int) (skills.getLevelForXp(Skills.DEFENCE) * 0.90D);
    			int attack = (int) (skills.getLevelForXp(Skills.ATTACK) * 0.90D);
    			int range = (int) (skills.getLevelForXp(Skills.RANGE) * 0.90D);
    			int magic = (int) (skills.getLevelForXp(Skills.MAGIC) * 0.90D);
    			int strength = (int) (skills.getLevelForXp(Skills.STRENGTH) * 1.2D);
    			skills.set(Skills.DEFENCE, defence);
    			skills.set(Skills.ATTACK, attack);
    			skills.set(Skills.RANGE, range);
    			skills.set(Skills.MAGIC, magic);
    			skills.set(Skills.STRENGTH, strength);
    			combatDefinitions.desecreaseSpecialAttack(specAmt);
    			break;
    		case 35:// Excalibur
    		case 8280:
    		case 14632:
    			setNextAnimation(new Animation(1168));
    			setNextGraphics(new Graphics(247));
    			setNextForceTalk(new ForceTalk("For Citellum!"));
    			final boolean enhanced = weaponId == 14632;
    			skills.set(
    					Skills.DEFENCE,
    					enhanced ? (int) (skills.getLevelForXp(Skills.DEFENCE) * 1.15D)
    							: (skills.getLevel(Skills.DEFENCE) + 8));
    			WorldTasksManager.schedule(new WorldTask() {
    				int count = 5;
    
    				@Override
    				public void run() {
    					if (isDead() || hasFinished()
    							|| getHitpoints() >= getMaxHitpoints()) {
    						stop();
    						return;
    					}
    					heal(enhanced ? 80 : 40);
    					if (count-- == 0) {
    						stop();
    						return;
    					}
    				}
    			}, 4, 2);
    			combatDefinitions.desecreaseSpecialAttack(specAmt);
    			break;
    		case 15486:
    		case 22207:
    		case 22209:
    		case 22211:
    		case 22213:
    			setNextAnimation(new Animation(12804));
    			setNextGraphics(new Graphics(2319));// 2320
    			setNextGraphics(new Graphics(2321));
    			addPolDelay(60000);
    			combatDefinitions.desecreaseSpecialAttack(specAmt);
    			break;
    		}
    	}
    
    	public void setDisableEquip(boolean equip) {
    		disableEquip = equip;
    	}
    
    	public boolean isEquipDisabled() {
    		return disableEquip;
    	}
    
    	public void addDisplayTime(long i) {
    		this.displayTime = i + Utils.currentTimeMillis();
    	}
    
    	public long getDisplayTime() {
    		return displayTime;
    	}
    
    	public int getPublicStatus() {
    		return publicStatus;
    	}
    
    	public void setPublicStatus(int publicStatus) {
    		this.publicStatus = publicStatus;
    	}
    
    	public int getClanStatus() {
    		return clanStatus;
    	}
    
    	public void setClanStatus(int clanStatus) {
    		this.clanStatus = clanStatus;
    	}
    
    	public int getTradeStatus() {
    		return tradeStatus;
    	}
    
    	public void setTradeStatus(int tradeStatus) {
    		this.tradeStatus = tradeStatus;
    	}
    
    	public int getAssistStatus() {
    		return assistStatus;
    	}
    
    	public void setAssistStatus(int assistStatus) {
    		this.assistStatus = assistStatus;
    	}
    
    	public boolean isSpawnsMode() {
    		return spawnsMode;
    	}
    
    	public void setSpawnsMode(boolean spawnsMode) {
    		this.spawnsMode = spawnsMode;
    	}
    
    	public Notes getNotes() {
    		return notes;
    	}
    
    	public IsaacKeyPair getIsaacKeyPair() {
    		return isaacKeyPair;
    	}
    
    	public QuestManager getQuestManager() {
    		return questManager;
    	}
    
    	public boolean isCompletedFightCaves() {
    		return completedFightCaves;
    	}
    
    	public void setCompletedFightCaves() {
    		if (!completedFightCaves) {
    			completedFightCaves = true;
    			refreshFightKilnEntrance();
    		}
    	}
    
    	public boolean isCompletedFightKiln() {
    		return completedFightKiln;
    	}
    
    	public void setCompletedFightKiln() {
    		completedFightKiln = true;
    	}
    
    	public boolean isWonFightPits() {
    		return wonFightPits;
    	}
    
    	public void setWonFightPits() {
    		wonFightPits = true;
    	}
    
    	public boolean isCantTrade() {
    		return cantTrade;
    	}
    
    	public void setCantTrade(boolean canTrade) {
    		this.cantTrade = canTrade;
    	}
    
    	public String getYellColor() {
    		return yellColor;
    	}
    	public String getShadColor() {
    		return yellShade;
    	}	
    	
    	public String getPrefix() {
    		return yellPrefix;
    	}
    	public void setYellColor(String yellColor) {
    		this.yellColor = yellColor;
    	}
    	public void setPrefix(String yellPrefix) {
    		this.yellPrefix = yellPrefix;
    	}
    
    	public void setYellShade(String yellShade) {
    		this.yellShade = yellShade;
    	}
    	/**
    	 * Gets the pet.
    	 * 
    	 * @return The pet.
    	 */
    	public Pet getPet() {
    		return pet;
    	}
    
    	/**
    	 * Sets the pet.
    	 * 
    	 * @param pet
    	 *            The pet to set.
    	 */
    	public void setPet(Pet pet) {
    		this.pet = pet;
    	}
    
    	public boolean isSupporter() {
    		return isSupporter;
    	}
    
    	public void setSupporter(boolean isSupporter) {
    		this.isSupporter = isSupporter;
    	}
    
    	/**
    	 * Gets the petManager.
    	 * 
    	 * @return The petManager.
    	 */
    	public PetManager getPetManager() {
    		return petManager;
    	}
    
    	/**
    	 * Sets the petManager.
    	 * 
    	 * @param petManager
    	 *            The petManager to set.
    	 */
    	public void setPetManager(PetManager petManager) {
    		this.petManager = petManager;
    	}
    
    	public boolean isXpLocked() {
    		return xpLocked;
    	}
    
    	public void setXpLocked(boolean locked) {
    		this.xpLocked = locked;
    	}
    
    	public int getLastBonfire() {
    		return lastBonfire;
    	}
    
    	public void setLastBonfire(int lastBonfire) {
    		this.lastBonfire = lastBonfire;
    	}
    
    	public boolean isYellOff() {
    		return yellOff;
    	}
    
    	public void setYellOff(boolean yellOff) {
    		this.yellOff = yellOff;
    	}
    
    	public void setInvulnerable(boolean invulnerable) {
    		this.invulnerable = invulnerable;
    	}
    
    	public double getHpBoostMultiplier() {
    		return hpBoostMultiplier;
    	}
    
    	public void setHpBoostMultiplier(double hpBoostMultiplier) {
    		this.hpBoostMultiplier = hpBoostMultiplier;
    	}
    
    	/**
    	 * Gets the killedQueenBlackDragon.
    	 * 
    	 * @return The killedQueenBlackDragon.
    	 */
    	public boolean isKilledQueenBlackDragon() {
    		return killedQueenBlackDragon;
    	}
    
    	/**
    	 * Sets the killedQueenBlackDragon.
    	 * 
    	 * @param killedQueenBlackDragon
    	 *            The killedQueenBlackDragon to set.
    	 */
    	public void setKilledQueenBlackDragon(boolean killedQueenBlackDragon) {
    		this.killedQueenBlackDragon = killedQueenBlackDragon;
    	}
    
    	public boolean hasLargeSceneView() {
    		return largeSceneView;
    	}
    
    	public void setLargeSceneView(boolean largeSceneView) {
    		this.largeSceneView = largeSceneView;
    	}
    
    	public boolean isOldItemsLook() {
    		return oldItemsLook;
    	}
    
    	public void switchItemsLook() {
    		oldItemsLook = !oldItemsLook;
    		getPackets().sendItemsLook();
    	}
    
    	/**
    	 * @return the runeSpanPoint
    	 */
    	public int getRuneSpanPoints() {
    		return runeSpanPoints;
    	}
    
    	/**
    	 * @param runeSpanPoint
    	 *            the runeSpanPoint to set
    	 */
    	public void setRuneSpanPoint(int runeSpanPoints) {
    		this.runeSpanPoints = runeSpanPoints;
    	}
    
    	/**
    	 * Adds points
    	 * 
    	 * @param points
    	 */
    	public void addRunespanPoints(int points) {
    		this.runeSpanPoints += points;
    	}
    
    	public DuelRules getLastDuelRules() {
    		return lastDuelRules;
    	}
    
    	public void setLastDuelRules(DuelRules duelRules) {
    		this.lastDuelRules = duelRules;
    	}
    
    	public boolean isTalkedWithMarv() {
    		return talkedWithMarv;
    	}
    
    	public void setTalkedWithMarv() {
    		talkedWithMarv = true;
    	}
    
    	public int getCrucibleHighScore() {
    		return crucibleHighScore;
    	}
    
    	public void increaseCrucibleHighScore() {
    		crucibleHighScore++;
    	}
    
    	public void setSlayerPoints(int slayerPoints) {
    		this.slayerPoints = slayerPoints;
    	}
    
    	public int getSlayerPoints() {
    		return slayerPoints;
    	}
    
    	public boolean isTalkedWithKuradal() {
    		return talkedWithKuradal;
    	}
    
    	public void setTalkedWithKuradal() {
    		talkedWithKuradal = true;
    	}
    
    	public void falseWithKuradal() {
    		talkedWithKuradal = false;
    	}
    
    	public int getLoyaltyPoints() {
    		return Loyaltypoints;
    	}
    
    	public void setLoyaltyPoints(int Loyaltypoints) {
    		this.Loyaltypoints = Loyaltypoints;
    	}
    
    	/**
    	 * @param task
    	 *            the task to set
    	 */
    	public void setTask(SlayerTask task) {
    		this.task = task;
    	}
    
    	/**
    	 * @return the task
    	 */
    	public SlayerTask getTask() {
    		return task;
    	}
    
    	public void setSafeMode() {
    
    	}
    
    	public void sm(String message) {
    		getPackets().sendGameMessage(message);
    
    	}
    
    	public void teleportPlayer(int x, int y, int z) {
    		setNextWorldTile(new WorldTile(x, y, z));
    		stopAll();
    	}
    
    	public void LockAccount() {
    		World.sendWorldMessage(
    				"JAG was enabled, account: <username>'s character has been"
    						+ "locked by Jagex Account Guardian.", true);
    
    	}
    
    	public int getLastLoggedIn() {
    		return lastlogged;
    	}
    
    	 public int getCoins() {
    		 return coins;
    	 }
    	 public void setCoins(int coins) {
    		 this.coins = coins;
    	 }
    
    		public void out(String string) {
    			getPackets().sendGameMessage(string);
    		}
    
    		public void switchMoneyPouch() {
    			moneyPouch = !moneyPouch;
    			refreshMoneyPouch();
    		}
    		
    		public void refreshMoneyPouch() {
    			getPackets().sendConfig(1438, (money >> 16) | (money >> 8) & money);
    			getPackets().sendRunScript(5560, money);
    		}
    
    		public static String getFormattedNumber(int money2) {
    			// TODO Auto-generated method stub
    			return null;
    		}
    
    		public void checkMovement(int x, int y, int plane) {
    			// TODO Auto-generated method stub
    			
    		}
    
    		public void tutorialTeleport(int x, int y, int z) {
    			setNextWorldTile(new WorldTile(x, y, z));
    		}
    		public void teleportPlayer1(int x, int y, int z) {
    			setNextWorldTile(new WorldTile(x, y, z));
    			stopAll();
    		}
    
    		public int getDisasterPoints() {
    			// TODO Auto-generated method stub
    			return 0;
    		}
    
    		public void setDisasterPoints(int j) {
    			// TODO Auto-generated method stub
    			
    		}
    		public boolean isCompletedRecipeforDisaster() {
    			// TODO Auto-generated method stub
    			return false;
    		}
    
    		public void useStairs(int j, WorldTile worldTile, int k, int l,
    				Object object, boolean b) {
    			// TODO Auto-generated method stub
    			
    		}
    
    		public void setPlayerPoints(int playerpoints2) {
    			// TODO Auto-generated method stub
    			
    		}
    
    		public static void ideaLog(Player player2, String message) {
    			// TODO Auto-generated method stub
    			
    		}
    
    		}
    My DuelArena doesnt let me accept the challenge it only lets me decline it like the interface comes up but i cant accept the duel. i can only decline it some one please help me
    Code:
    package com.feather.game.minigames.duel;
    
    import com.feather.cache.parser.ItemDefinitions;
    import com.feather.game.Animation;
    import com.feather.game.Entity;
    import com.feather.game.ForceTalk;
    import com.feather.game.World;
    import com.feather.game.WorldObject;
    import com.feather.game.WorldTile;
    import com.feather.game.item.Item;
    import com.feather.game.player.Player;
    import com.feather.game.player.actions.PlayerCombat;
    import com.feather.game.player.content.ItemConstants;
    import com.feather.game.player.content.Foods.Food;
    import com.feather.game.player.content.Pots.Pot;
    import com.feather.game.player.controlers.Controler;
    import com.feather.game.tasks.WorldTask;
    import com.feather.game.tasks.WorldTasksManager;
    import com.feather.net.decoders.WorldPacketsDecoder;
    import com.feather.net.decoders.handlers.ButtonHandler;
    import com.feather.utils.Utils;
    
    public class DuelArena extends Controler {
    
    	private Player target;
    	private boolean ifFriendly, isDueling;
    
    	private final Item[] FUN_WEAPONS = {new Item(4566)};
    
    	private final WorldTile[] LOBBY_TELEPORTS = { new WorldTile(3367, 3275, 0),
    			new WorldTile(3360, 3275, 0), new WorldTile(3358, 3270, 0),
    			new WorldTile(3363, 3268, 0), new WorldTile(3370, 3268, 0),
    			new WorldTile(3367, 3267, 0), new WorldTile(3376, 3275, 0),
    			new WorldTile(3377, 3271, 0), new WorldTile(3375, 3269, 0),
    			new WorldTile(3381, 3277, 0) };
    
    	@Override
    	public void start() {
    		this.target = (Player) getArguments()[0];
    		ifFriendly = (boolean) getArguments()[1];
    		openDuelScreen(target, ifFriendly);
    	}
    
    	private void openDuelScreen(Player target, boolean ifFriendly) {
    		if (!ifFriendly) {
    			sendOptions(player);
    			player.getLastDuelRules().getStake().clear();
    		}
    		player.getTemporaryAttributtes().put("acceptedDuel", true);
    		player.getPackets().sendItems(134, false, player.getLastDuelRules().getStake());
    		player.getPackets().sendItems(134, true, player.getLastDuelRules().getStake()); 
    		player.getPackets().sendIComponentText(ifFriendly ? 637 : 631, ifFriendly ? 16 : 38, " " + Utils.formatPlayerNameForDisplay(target.getUsername()));
    		player.getPackets().sendIComponentText(ifFriendly ? 637 : 631, ifFriendly ? 18 : 40, "" + (target.getSkills().getCombatLevel()));
    		player.getPackets().sendConfig(286, 0);
    		player.getTemporaryAttributtes().put("firstScreen", true);
    		player.getInterfaceManager().sendInterface(ifFriendly ? 637 : 631);
    		refreshScreenMessage(true, ifFriendly);
    		player.setCloseInterfacesEvent(new Runnable() {
    			@Override
    			public void run() {
    				closeDuelInteraction(true, DuelStage.DECLINED);
    			}
    		});
    	}
    
    	private void accept(boolean firstStage) {
    		if(!hasTarget())
    			return;
    		boolean accepted = (Boolean) player.getTemporaryAttributtes().get("acceptedDuel");
    		boolean targetAccepted = (Boolean) target.getTemporaryAttributtes().get("acceptedDuel");
    		DuelRules rules = player.getLastDuelRules();
    		if (!rules.canAccept(player.getLastDuelRules().getStake()))
    			return;
    		if(accepted && targetAccepted) {
    			if(firstStage) {
    				if(nextStage())
    					((DuelArena) target.getControlerManager().getControler()).nextStage();
    			} else {
    				player.setCloseInterfacesEvent(null);
    				player.closeInterfaces();
    				closeDuelInteraction(true, DuelStage.DONE);
    			}
    			return;
    		}
    		player.getTemporaryAttributtes().put("acceptedDuel", true);
    		refreshScreenMessages(firstStage, ifFriendly);
    	}
    
    	protected void closeDuelInteraction(boolean started, DuelStage duelStage) {
    		Player oldTarget = target;
    		if(duelStage != DuelStage.DONE) {
    			target = null;
    			WorldTasksManager.schedule(new WorldTask() {
    
    				@Override
    				public void run() {
    					player.getControlerManager().startControler("DuelControler");
    				}
    			});
    			player.getInventory().getItems().addAll(player.getLastDuelRules().getStake());
    			player.getInventory().init();
    			player.getLastDuelRules().getStake().clear();
    		} else {
    			removeEquipment();
    			beginBattle(started);
    		}
    		Controler controler = oldTarget.getControlerManager().getControler();
    		if (controler == null)
    			return;
    		DuelArena targetConfiguration = (DuelArena) controler;
    		if (controler instanceof DuelArena) {
    			if (targetConfiguration.hasTarget()) {
    				oldTarget.setCloseInterfacesEvent(null);
    				oldTarget.closeInterfaces();
    				if (duelStage != DuelStage.DONE)
    					player.getControlerManager().removeControlerWithoutCheck();
    				if (started)
    					targetConfiguration.closeDuelInteraction(false, duelStage);
    				if (duelStage == DuelStage.DONE)
    					player.getPackets().sendGameMessage("Your battle will begin shortly.");
    				else if (duelStage == DuelStage.SECOND)
    					player.getPackets().sendGameMessage("<col=ff0000>Please check if these settings are correct.");
    				else if (duelStage == DuelStage.DECLINED)
    					oldTarget.getPackets().sendGameMessage("<col=ff0000>Other player declined the duel!");
    				else if (duelStage == DuelStage.DECLINED) {
    					oldTarget.getPackets().sendGameMessage("You do not have enough space to continue!");
    					oldTarget.getPackets().sendGameMessage("Other player does not have enough space to continue!");
    				}
    			}
    		}
    	}
    
    	public void addItem(int slot, int amount) {
    		if(!hasTarget())
    			return;
    		Item item = player.getInventory().getItem(slot);
    		if (item == null)
    			return;
    		if (!ItemConstants.isTradeable(item)) {
    			player.getPackets().sendGameMessage("That item cannot be staked!");
    			return;
    		}
    		Item[] itemsBefore = player.getLastDuelRules().getStake().getItemsCopy();
    		int maxAmount = player.getInventory().getItems().getNumberOf(item);
    		if (amount < maxAmount)
    			item = new Item(item.getId(), amount);
    		else
    			item = new Item(item.getId(), maxAmount);
    		player.getLastDuelRules().getStake().add(item);
    		player.getInventory().deleteItem(slot, item);
    		refreshItems(itemsBefore);
    		cancelAccepted();
    	}
    
    	public void removeItem(final int slot, int amount) {
    		if(!hasTarget())
    			return;
    		Item item = player.getLastDuelRules().getStake().get(slot);
    		if (item == null)
    			return;
    		Item[] itemsBefore = player.getLastDuelRules().getStake().getItemsCopy();
    		int maxAmount = player.getLastDuelRules().getStake().getNumberOf(item);
    		if (amount < maxAmount)
    			item = new Item(item.getId(), amount);
    		else
    			item = new Item(item.getId(), maxAmount);
    		player.getLastDuelRules().getStake().remove(slot, item);
    		player.getInventory().addItem(item);
    		refreshItems(itemsBefore);
    		cancelAccepted();
    	}
    
    	private void refreshItems(Item[] itemsBefore) {
    		int[] changedSlots = new int[itemsBefore.length];
    		int count = 0;
    		for (int index = 0; index < itemsBefore.length; index++) {
    			Item item = player.getLastDuelRules().getStake().getItems()[index];
    			if (item != null)
    				if (itemsBefore[index] != item) {
    					changedSlots[count++] = index;
    				}
    		}
    		int[] finalChangedSlots = new int[count];
    		System.arraycopy(changedSlots, 0, finalChangedSlots, 0, count);
    		refresh(finalChangedSlots);
    	}
    
    	private void refresh(int... slots) {
    		player.getPackets().sendUpdateItems(134, player.getLastDuelRules().getStake(), slots);
    		target.getPackets().sendUpdateItems(134, true, player.getLastDuelRules().getStake().getItems(), slots);
    	}
    
    	public void cancelAccepted() {
    		boolean canceled = false;
    		if((Boolean) player.getTemporaryAttributtes().get("acceptedDuel")) {
    			player.getTemporaryAttributtes().put("acceptedDuel", false);
    			canceled = true;
    		}
    		if((Boolean) target.getTemporaryAttributtes().get("acceptedDuel")) {
    			target.getTemporaryAttributtes().put("acceptedDuel", false);
    			canceled = true;
    		}
    		if(canceled)
    			refreshScreenMessages(canceled, ifFriendly);
    	}
    
    	private void openConfirmationScreen(boolean ifFriendly) {
    		player.getInterfaceManager().sendInterface(ifFriendly ? 639 : 626);
    		refreshScreenMessage(false, ifFriendly);
    	}
    
    	private void refreshScreenMessages(boolean firstStage, boolean ifFriendly) {
    		refreshScreenMessage(firstStage, ifFriendly);
    		((DuelArena) target.getControlerManager().getControler()).refreshScreenMessage(firstStage, ifFriendly);
    	}
    
    	private void refreshScreenMessage(boolean firstStage, boolean ifFriendly) {
    		player.getPackets().sendIComponentText(firstStage ? (ifFriendly ? 637 : 631) : (ifFriendly ? 639 : 626), firstStage ? (ifFriendly ? 20 : 41) : (ifFriendly ? 23 : 35), "<col=ff0000>"+getAcceptMessage(firstStage));
    	}
    
    	private String getAcceptMessage(boolean firstStage) {
    		if (target.getTemporaryAttributtes().get("acceptedDuel") == Boolean.TRUE)
    			return "Other player has accepted.";
    		else if (player.getTemporaryAttributtes().get("acceptedDuel") == Boolean.TRUE)
    			return "Waiting for other player...";
    		return firstStage ? "" : "Please look over the agreements to the duel.";
    	}
    
    	public boolean nextStage() {
    		if(!hasTarget())
    			return false;
    		if(player.getInventory().getItems().getUsedSlots() + target.getLastDuelRules().getStake().getUsedSlots() > 28) {
    			player.setCloseInterfacesEvent(null);
    			player.closeInterfaces();
    			closeDuelInteraction(true, DuelStage.NO_SPACE);
    			return false;
    		}
    		player.getTemporaryAttributtes().put("acceptedDuel", false);
    		openConfirmationScreen(false);
    		player.getInterfaceManager().closeInventoryInterface();
    		return true;
    	}
    
    	private void sendOptions(Player player) {
    		player.getInterfaceManager().sendInventoryInterface(628);
    		player.getPackets().sendUnlockIComponentOptionSlots(628, 0, 0, 27, 0, 1, 2, 3, 4, 5);
    		player.getPackets().sendInterSetItemsOptionsScript(628, 0, 93, 4, 7, "Stake 1", "Stake 5", "Stake 10", "Stake All", "Examine");
    		player.getPackets().sendUnlockIComponentOptionSlots(631, 47, 0, 27, 0, 1, 2, 3, 4, 5);
    		player.getPackets().sendInterSetItemsOptionsScript(631, 0, 120, 4, 7, "Remove 1", "Remove 5", "Remove 10", "Remove All", "Examine");
    	}
    
    	public void endDuel(Player victor, Player loser) {
    		endDuel(victor, loser, true);
    	}
    
    	public void endDuel(final Player victor, final Player loser, boolean removeLoserControler) {
    		for (Item item : player.getLastDuelRules().getStake().getItems()) {
    			if (item == null) continue;
    			victor.getInventory().addItem(item);
    		}
    		for (Item item : target.getLastDuelRules().getStake().getItems()) {
    			if (item == null) continue;
    			victor.getInventory().addItem(item);
    		}
    		if (loser.getControlerManager().getControler() != null && removeLoserControler)
    			loser.getControlerManager().removeControlerWithoutCheck();
    		loser.setCanPvp(false);
    		loser.getHintIconsManager().removeUnsavedHintIcon();
    		loser.reset();
    		loser.closeInterfaces();
    		if (victor.getControlerManager().getControler() != null)
    			victor.getControlerManager().removeControlerWithoutCheck();
    		victor.setCanPvp(false);
    		victor.getHintIconsManager().removeUnsavedHintIcon();
    		victor.reset();
    		victor.closeInterfaces();
    		startEndingTeleport(victor);
    		startEndingTeleport(loser);
    		loser.getPackets().sendGameMessage("Oh dear, it seems you have lost to "+victor.getDisplayName()+".");
    		victor.getPackets().sendGameMessage("Congradulations! You easily defeated "+loser.getDisplayName()+".");
    		WorldTasksManager.schedule(new WorldTask() {
    
    			@Override
    			public void run() {
    				victor.getControlerManager().startControler("DuelControler");
    				loser.getControlerManager().startControler("DuelControler");
    			}
    		}, 2);
    	}
    
    	private void startEndingTeleport(Player player) {
    		WorldTile tile = LOBBY_TELEPORTS[Utils.random(LOBBY_TELEPORTS.length)];
    		WorldTile teleTile = tile;
    		for (int trycount = 0; trycount < 10; trycount++) {
    			teleTile = new WorldTile(tile, 2);
    			if (World.canMoveNPC(tile.getPlane(), teleTile.getX(),
    					teleTile.getY(), player.getSize()))
    				break;
    			teleTile = tile;
    		}
    		player.setNextWorldTile(teleTile);
    	}
    
    	private void removeEquipment() {
    		int slot = 0;
    		for (int i = 10; i < 23; i++) {
    			if (i == 14) {
    				if (player.getEquipment().hasTwoHandedWeapon()) 
    					ButtonHandler.sendRemove(target, 3);
    			}
    			if (player.getLastDuelRules().getRule(i)) {
    				slot = i - 10;
    				ButtonHandler.sendRemove(player, slot);
    			}
    		}
    	}
    
    	private void beginBattle(boolean started) {
    		if (started) {
    			WorldTile[] teleports = getPossibleWorldTiles();
    			int random = Utils.getRandom(1);
    			player.setNextWorldTile(random == 0 ? teleports[0] : teleports[1]);
    			target.setNextWorldTile(random == 0 ? teleports[1] : teleports[0]);
    		}
    		player.stopAll();
    		player.lock(2); // fixes mass click steps
    		player.reset();
    		isDueling = true;
    		player.getTemporaryAttributtes().put("startedDuel", true);
    		player.getTemporaryAttributtes().put("canFight", false);
    		player.setCanPvp(true);
    		player.getHintIconsManager().addHintIcon(target, 1, -1, false);
    		WorldTasksManager.schedule(new WorldTask() {
    			int count = 3;
    
    			@Override
    			public void run() {
    				if (count > 0)
    					player.setNextForceTalk(new ForceTalk("" + count));
    				if (count == 0) {
    					player.getTemporaryAttributtes().put("canFight", true);
    					player.setNextForceTalk(new ForceTalk("FIGHT!"));
    					this.stop();
    				}
    				count--;
    			}
    		}, 0, 2);
    	}
    
    	@Override
    	public boolean canEat(Food food) {
    		if (player.getLastDuelRules().getRule(4) && isDueling) {
    			player.getPackets().sendGameMessage("You cannot eat during this duel.", true);
    			return false;
    		}
    		return true;
    	}
    
    	@Override
    	public boolean canPot(Pot pot) {
    		if (player.getLastDuelRules().getRule(3) && isDueling) {
    			player.getPackets().sendGameMessage("You cannot drink during this duel.", true);
    			return false;
    		}
    		return true;
    	}
    
    	@Override
    	public boolean canMove(int dir) {
    		if (player.getLastDuelRules().getRule(25) && isDueling) {
    			player.getPackets().sendGameMessage("You cannot move during this duel!", true);
    			return false;
    		}
    		return true;
    	}
    
    	@Override
    	public boolean canSummonFamiliar() {
    		if (player.getLastDuelRules().getRule(24) && isDueling) 
    			return true;
    		player.getPackets().sendGameMessage("Summoning has been disabled during this duel!");
    		return false;
    	}
    
    	@Override
    	public boolean processMagicTeleport(WorldTile toTile) {
    		player.getDialogueManager().startDialogue("SimpleMessage", "A magical force prevents you from teleporting from the arena.");
    		return false;
    	}
    
    	@Override
    	public boolean processItemTeleport(WorldTile toTile) {
    		player.getDialogueManager().startDialogue("SimpleMessage","A magical force prevents you from teleporting from the arena.");
    		return false;
    	}
    
    	@Override
    	public void magicTeleported(int type) {
    		if (type != -1)
    			return;
    	}
    
    	@Override
    	public boolean processObjectClick1(WorldObject object) {
    		player.getDialogueManager().startDialogue("ForfeitDialouge");
    		return true;
    	}
    
    	@Override
    	public boolean sendDeath() {
    		player.lock(7);
    		WorldTasksManager.schedule(new WorldTask() {
    			int loop;
    
    			@Override
    			public void run() {
    				player.stopAll();
    				if (loop == 0) {
    					player.setNextAnimation(new Animation(836));
    				} else if (loop == 1) {
    					player.getPackets().sendGameMessage(
    							"Oh dear, you have died.");
    				} else if (loop == 3) {
    					player.setNextAnimation(new Animation(-1));
    					endDuel(target, player);
    					this.stop();
    				}
    				loop++;
    			}
    		}, 0, 1);
    		return false;
    	}
    
    	@Override
    	public boolean login() {
    		startEndingTeleport(player);
    		removeControler();
    		return true;
    	}
    
    	@Override
    	public boolean logout() {
    		if (isDueling)
    			endDuel(target, player, false);
    		else 
    			closeDuelInteraction(true, DuelStage.DECLINED);
    		return isDueling ? false : true;
    	}
    
    	@Override
    	public boolean keepCombating(Entity victim) {
    		DuelRules rules = player.getLastDuelRules();
    		boolean isRanging = PlayerCombat.isRanging(player) != 0;
    		if (player.getTemporaryAttributtes().get("canFight") == Boolean.FALSE) {
    			player.getPackets().sendGameMessage("The duel hasn't started yet.", true);
    			return false;
    		}
    		if (target != victim)
    			return false;
    		if (player.getCombatDefinitions().getSpellId() > 0 && rules.getRule(2) && isDueling) {
    			player.getPackets().sendGameMessage("You cannot use Magic in this duel!", true);
    			return false;
    		} else if (isRanging && rules.getRule(0) && isDueling) {
    			player.getPackets().sendGameMessage("You cannot use Range in this duel!", true);
    			return false;
    		} else if (!isRanging && rules.getRule(1) && player.getCombatDefinitions().getSpellId() <= 0 && isDueling) {
    			player.getPackets().sendGameMessage("You cannot use Melee in this duel!", true);
    			return false;
    		} else {
    			for (Item item : FUN_WEAPONS) {
    				if (rules.getRule(8) && !player.getInventory().containsItem(item.getId(), item.getAmount())) {
    					player.getPackets().sendGameMessage("You can only use fun weapons in this duel!");
    					return false;
    				}
    			}
    		}
    		return true;
    	}
    
    	@Override
    	public boolean canEquip(int slotId, int itemId) {
    		DuelRules rules = player.getLastDuelRules();
    		if (isDueling) {
    			if (rules.getRule(10 + slotId)) {
    				player.getPackets().sendGameMessage("You can't equip " + ItemDefinitions.getItemDefinitions(itemId).getName().toLowerCase() + " during this duel.");
    				return false;
    			}
    			if (slotId == 3 && player.getEquipment().hasTwoHandedWeapon() && rules.getRule(15)) {
    				player.getPackets().sendGameMessage("You can't equip "+ ItemDefinitions.getItemDefinitions(itemId).getName().toLowerCase() + " during this duel.");
    				return false;
    			}
    		}
    		return true;
    	}
    
    	private WorldTile[] getPossibleWorldTiles() {
    		final int arenaChoice = Utils.getRandom(2);
    		WorldTile[] locations = new WorldTile[2];
    		int[] arenaBoundariesX = { 3337, 3367, 3336 };
    		int[] arenaBoundariesY = { 3246, 3227, 3208 };
    		int[] maxOffsetX = { 14, 14, 16 };
    		int[] maxOffsetY = { 10, 10, 10 };
    		int finalX = arenaBoundariesX[arenaChoice]
    				+ Utils.getRandom(maxOffsetX[arenaChoice]);
    		int finalY = arenaBoundariesY[arenaChoice]
    				+ Utils.getRandom(maxOffsetY[arenaChoice]);
    		locations[0] = (new WorldTile(finalX, finalY, 0));
    		if (player.getLastDuelRules().getRule(25)) {
    			int direction = Utils.getRandom(1);
    			if (direction == 0) {
    				finalX--;
    			} else {
    				finalY++;
    			}
    		} else {
    			finalX = arenaBoundariesX[arenaChoice]
    					+ Utils.getRandom(maxOffsetX[arenaChoice]);
    			finalY = arenaBoundariesY[arenaChoice]
    					+ Utils.getRandom(maxOffsetY[arenaChoice]);
    		}
    		locations[1] = (new WorldTile(finalX, finalY, 0));
    		return locations;
    	}
    
    	@Override
    	public boolean processButtonClick(int interfaceId, int componentId, int slotId, int packetId) {
    		synchronized (this) {
    			synchronized (target.getControlerManager().getControler()) {
    				DuelRules rules = player.getLastDuelRules();
    				switch (interfaceId) {
    				case 271:
    					if (rules.getRule(5) && isDueling) {
    						player.getPackets().sendGameMessage("You can't use prayers in this duel.");
    						return false;
    					}
    					return true;
    				case 193:
    				case 430:
    				case 192:
    					if (rules.getRule(2) && isDueling)
    						return false;
    					return true;
    				case 884:
    					if (componentId == 4) {
    						if (rules.getRule(9) && isDueling) {
    							player.getPackets().sendGameMessage("You can't use special attacks in this duel.");
    							return false;
    						}
    					}
    					return true;
    				case 631:
    					switch (componentId) {
    					case 56: // no range
    						rules.setRules(0);
    						return false;
    					case 57: // no melee
    						rules.setRules(1);
    						return false;
    					case 58: // no magic
    						rules.setRules(2);
    						return false;
    					case 59: // fun wep
    						rules.setRules(8);
    						return false;
    					case 60: // no forfiet
    						rules.setRules(7);
    						return false;
    					case 61: // no drinks
    						rules.setRules(3);
    						return false;
    					case 62: // no food
    						rules.setRules(4);
    						return false;
    					case 63: // no prayer
    						rules.setRules(5);
    						return false;
    					case 64: // no movement
    						rules.setRules(25);
    						if (rules.getRule(6)) {
    							rules.setRule(6, false);
    							player.getPackets().sendGameMessage(
    									"You can't have movement without obstacles.");
    						}
    						return false;
    					case 65: // obstacles
    						rules.setRules(6);
    						if (rules.getRule(25)) {
    							rules.setRule(25, false);
    							player.getPackets().sendGameMessage(
    									"You can't have obstacles without movement.");
    						}
    						return false;
    					case 66: // enable summoning
    						rules.setRules(24);
    						return false;
    					case 67:// no spec
    						rules.setRules(9);
    						return false;
    					case 21:// no helm
    						rules.setRules(10);
    						return false;
    					case 22:// no cape
    						rules.setRules(11);
    						return false;
    					case 23:// no ammy
    						rules.setRules(12);
    						return false;
    					case 31:// arrows
    						rules.setRules(23);
    						return false;
    					case 24:// weapon
    						rules.setRules(13);
    						return false;
    					case 25:// body
    						rules.setRules(14);
    						return false;
    					case 26:// shield
    						rules.setRules(15);
    						return false;
    					case 27:// legs
    						rules.setRules(17);
    						return false;
    					case 28:// ring
    						rules.setRules(19);
    						return false;
    					case 29: // bots
    						rules.setRules(20);
    						return false;
    					case 30: // gloves
    						rules.setRules(22);
    						return false;
    					case 107:
    						closeDuelInteraction(true, DuelStage.DECLINED);
    						return false;
    					case 46:
    						accept(true);
    						return false;
    					case 47:
    						switch (packetId) {
    						case WorldPacketsDecoder.ACTION_BUTTON1_PACKET:
    							removeItem(slotId, 1);
    							return false;
    						case WorldPacketsDecoder.ACTION_BUTTON2_PACKET:
    							removeItem(slotId, 5);
    							return false;
    						case WorldPacketsDecoder.ACTION_BUTTON3_PACKET:
    							removeItem(slotId, 10);
    							return false;
    						case WorldPacketsDecoder.ACTION_BUTTON4_PACKET:
    							Item item = player.getInventory().getItems().get(slotId);
    							if (item == null)
    								return false;
    							removeItem(slotId, player.getInventory().getItems().getNumberOf(item));
    							return false;
    						case WorldPacketsDecoder.ACTION_BUTTON5_PACKET:
    							player.getInventory().sendExamine(slotId);
    							return false;
    						}
    						return false;
    					}
    				case 628:
    					switch (packetId) {
    					case WorldPacketsDecoder.ACTION_BUTTON1_PACKET:
    						addItem(slotId, 1);
    						return false;
    					case WorldPacketsDecoder.ACTION_BUTTON2_PACKET:
    						addItem(slotId, 5);
    						return false;
    					case WorldPacketsDecoder.ACTION_BUTTON3_PACKET:
    						addItem(slotId, 10);
    						return false;
    					case WorldPacketsDecoder.ACTION_BUTTON4_PACKET:
    						Item item = player.getInventory().getItems().get(slotId);
    						if (item == null)
    							return false;
    						addItem(slotId, player.getInventory().getItems().getNumberOf(item));
    						return false;
    					case WorldPacketsDecoder.ACTION_BUTTON5_PACKET:
    						player.getInventory().sendExamine(slotId);
    						return false;
    					}
    				case 626:
    					switch (componentId) {
    					case 43:
    						accept(false);
    						return false;
    					}
    				case 637: // friendly
    					switch (componentId) {
    					case 25: // no range
    						rules.setRules(0);
    						return false;
    					case 26: // no melee
    						rules.setRules(1);
    						return false;
    					case 27: // no magic
    						rules.setRules(2);
    						return false;
    					case 28: // fun wep
    						rules.setRules(8);
    						return false;
    					case 29: // no forfiet
    						rules.setRules(7);
    						return false;
    					case 30: // no drinks
    						rules.setRules(3);
    						return false;
    					case 31: // no food
    						rules.setRules(4);
    						return false;
    					case 32: // no prayer
    						rules.setRules(5);
    						return false;
    					case 33: // no movement
    						rules.setRules(25);
    						if (rules.getRule(6)) {
    							rules.setRule(6, false);
    							player.getPackets().sendGameMessage(
    									"You can't have movement without obstacles.");
    						}
    						return false;
    					case 34: // obstacles
    						rules.setRules(6);
    						if (rules.getRule(25)) {
    							rules.setRule(25, false);
    							player.getPackets().sendGameMessage("You can't have obstacles without movement.");
    						}
    						return false;
    					case 35: // enable summoning
    						rules.setRules(24);
    						return false;
    					case 36:// no spec
    						rules.setRules(9);
    						return false;
    					case 43:// no helm
    						rules.setRules(10);
    						return false;
    					case 44:// no cape
    						rules.setRules(11);
    						return false;
    					case 45:// no ammy
    						rules.setRules(12);
    						return false;
    					case 53:// arrows
    						rules.setRules(23);
    						return false;
    					case 46:// weapon
    						rules.setRules(13);
    						return false;
    					case 47:// body
    						rules.setRules(14);
    						return false;
    					case 48:// shield
    						rules.setRules(15);
    						return false;
    					case 49:// legs
    						rules.setRules(17);
    						return false;
    					case 50:// ring
    						rules.setRules(19);
    						return false;
    					case 51: // bots
    						rules.setRules(20);
    						return false;
    					case 52: // gloves
    						rules.setRules(22);
    						return false;
    					case 86:
    						closeDuelInteraction(true, DuelStage.DECLINED);
    						return false;
    					case 21:
    						accept(true);
    						return false;
    					}
    				case 639:
    					switch (componentId) {
    					case 25:
    						accept(false);
    						return false;
    					}
    				}
    			}
    		}
    		return true;
    	}
    
    	public boolean isDueling() {
    		return isDueling;
    	}
    
    	public boolean hasTarget() {
    		return target != null;
    	}
    
    	public Entity getTarget() {
    		if (hasTarget())
    			return target;
    		return null;
    	}
    
    	enum DuelStage {
    		DECLINED, NO_SPACE, SECOND, DONE
    	}
    }


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Mar 2016
    Posts
    446
    Thanks given
    92
    Thanks received
    93
    Rep Power
    0
    dude im not scrolling through ur whole player.java l0l
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2016
    Posts
    290
    Thanks given
    36
    Thanks received
    18
    Rep Power
    28
    Is the void knight npc being spawned at least?

    Show pic of the error.

    Show this class:
    Code:
    player.getPestControl()
    probably called "PestControl.java" or something
    Spoiler for open for lols:


    Reply With Quote  
     

  4. #4  
    Islamic Republic of

    Iran's Avatar
    Join Date
    Jun 2010
    Posts
    372
    Thanks given
    87
    Thanks received
    230
    Rep Power
    291
    GO to Player.Java and add the following

    public PestControl pestControl = new PestControl();

    public PestControl getPestControl() {
    return pestControl;
    }

    By the way, it's controller and not controler.

    [Only registered and activated users can see links. ]

    Spoiler for Honourable mentions:
    Quote Originally Posted by JRFisher View Post
    Dude, learn yourself, it took me 17 months of continuous research to learn how to import a project.
    Quote Originally Posted by Pollution View Post
    When? And Idiot, I'm using a oldschool, it's not easy to get the command for an oldschool, retard c u.
    Quote Originally Posted by Waj_Assif View Post
    I sayin u dont contribute never aall u do is finna tryin attack ppl and always finna start fights .......
    Quote Originally Posted by Kris View Post
    You must be one of those slower breeds.

    Reply With Quote  
     

  5. #5  
    Donator

    Join Date
    May 2012
    Posts
    227
    Thanks given
    81
    Thanks received
    68
    Rep Power
    30
    About duel problem, don't mind me asking but have you checked if its in buttonhandler? or maybe in one of the duel controllers? if not then that should fix your problem.
    Add my skype for services!
    Check out my services @ [Only registered and activated users can see links. ]
    Also check out my Matrix 3 services thread @ [Only registered and activated users can see links. ]
    Skype : [Only registered and activated users can see links. ].
    Email : [Only registered and activated users can see links. ]
    RSPS SERVICES!
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2013
    Posts
    18
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Java100 View Post
    Is the void knight npc being spawned at least?

    Show pic of the error.

    Show this class:
    Code:
    player.getPestControl()
    probably called "PestControl.java" or something
    public void process() {
    if (spawnMonster > 0)
    spawnMonster--;
    if (spawnMonster == 0) {
    player.getPestControl().spawnMonsters();
    spawnMonster = 15;
    }
    if (portalShield > 0)
    portalShield--;
    // uhh **** this..
    if (portalShield == 0) {
    for (NPC n : World.getNPCs()) {
    if (n.getId() == 6146)
    n.transformIntoNPC(6144);
    }
    }
    }
    Thats that

    Quote Originally Posted by Iran View Post
    GO to Player.Java and add the following

    public PestControl pestControl = new PestControl();

    public PestControl getPestControl() {
    return pestControl;
    }

    By the way, it's controller and not controler.
    now im getting this error

    https://www.dropbox.com/s/kmtqv0osjrai1jx/Untitled.png?dl=0

    Quote Originally Posted by ARMAR X K1NG View Post
    About duel problem, don't mind me asking but have you checked if its in buttonhandler? or maybe in one of the duel controllers? if not then that should fix your problem.
    i need someone to help me through tv or skype i checked button handler unless im not seeing something please help
    Reply With Quote  
     

  7. #7  
    Registered Member
    Kris's Avatar
    Join Date
    Jun 2016
    Age
    19
    Posts
    2,234
    Thanks given
    337
    Thanks received
    824
    Rep Power
    405
    spawnMonsters() method doesn't exist or isn't visible in the PestControl class.
    Before going any further, please, for the love of god.. Go learn some basics. Get an IDE. I'm not willing to help someone who isn't willing to help themselves, you're just asking to be spoonfed here.
    I repeat.. Get an IDE AND USE IT.


    Reply With Quote  
     

  8. Thankful user:



Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. serious help with 508 and lag
    By bloodline101 in forum Help
    Replies: 7
    Last Post: 03-01-2009, 01:18 AM
  2. Need help with client and server.
    By ixwindxi in forum Help
    Replies: 3
    Last Post: 02-07-2009, 11:06 PM
  3. Replies: 2
    Last Post: 11-27-2008, 04:07 AM
  4. Replies: 0
    Last Post: 11-09-2008, 08:43 AM
  5. Need Help With Md5 and salt login page
    By william1434 in forum Help
    Replies: 2
    Last Post: 06-01-2008, 04:47 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •