Thread: [718] Farming Release

Page 1 of 6 123 ... LastLast
Results 1 to 10 of 51
  1. #1 [718] Farming Release 
    WVWVWVWVWVWVWVW

    _jordan's Avatar
    Join Date
    Nov 2012
    Age
    23
    Posts
    2,865
    Thanks given
    62
    Thanks received
    1,529
    Discord
    View profile
    Rep Power
    5000
    This is only a snippet only because it is not 100%. Credits to the guy that last released Farming, this just has more stuff added such as Tree Patches, Inventory Space Checks, Tree Growth, Weeds Regrow, Correct Tree Staging, Hatchet shit, and also supports every other patches I had access to configs to, such as Allotments, Herbs, Flowers and Tree Patches! One last thing, this does not save so feel free to contribute if you add saving. I already started off part of the saving. Enjoy

    Code:
    package org.veratrix.game.player.actions;
    
    import java.io.Serializable;
    import java.util.HashMap;
    import java.util.Map;
    
    import org.veratrix.game.Animation;
    import org.veratrix.game.player.Player;
    import org.veratrix.game.player.Skills;
    import org.veratrix.game.tasks.WorldTask;
    import org.veratrix.game.tasks.WorldTasksManager;
    
    /**
     * 
     * @author Swirl
     *
     */
    public class Farming implements Serializable {
    
    
    	private transient Player player;
    	
    	private static final long serialVersionUID = 147342384798739L;
    
    	public static int RAKE = 5341;
    	public static int SEED_DIBBER = 5343;
    	public static int SECATEURS = 5329;
    	public static int INFERNO_ADZE = 13661;
    	public static int DRAGON_AXE = 6739;
    	public static int RUNE_AXE = 1359;
    	public static int ADAMANT_AXE = 1357;
    	public static int MITHRIL_AXE = 1355;
    	public static int BLACK_AXE = 1361;
    	public static int STEEL_AXE = 1353;
    	public static int IRON_AXE = 1349;
    	public static int BRONZE_AXE = 1351;
    	public static int SPADE = 952;
    	public static int WEEDS = 6055;
    	public static final Animation RAKE_ANIMATION = new Animation(2273);
    	public static final Animation PLANT_ANIMATION = new Animation(2291);
    	public static final Animation PICK_HERB = new Animation(2281);
    	public static final Animation PICK_ALLOTMENT = new Animation(830);
    	public static final Animation CHOP_TREE = new Animation(867);
    	public static final Animation INFERNO_ADZE_CHOP = new Animation(10251);
    	public static final Animation DRAGON_AXE_CHOP = new Animation(2846);
    	public static final Animation RUNE_AXE_CHOP = new Animation(867);
    	public static final Animation ADAMANT_AXE_CHOP = new Animation(869);
    	public static final Animation MITHRIL_AXE_CHOP = new Animation(871);
    	public static final Animation BLACK_AXE_CHOP = new Animation(873);
    	public static final Animation STEEL_AXE_CHOP = new Animation(875);
    	public static final Animation IRON_AXE_CHOP = new Animation(877);
    	public static final Animation BRONZE_AXE_CHOP = new Animation(879);
    	public static boolean raked;
    	
    	public static enum Patches {
    		FALADOR_NORTH_ALLOTMENT(8550, 708),
    		FALADOR_SOUTH_ALLOTMENT(8551, 709),
    		FALADOR_HERB(8150, 780),
    		FALADOR_FLOWER(7847, 728),
    		CATHERBY_NORTH_ALLOTMENT(8552, 710),
    		CATHERBY_SOUTH_ALLOTMENT(8553, 711),
    		CATHERBY_HERB(8151, 781),
    		CATHERBY_FLOWER(7848, 729),
    		ARDY_NORTH_ALLOTMENT(8554, 712),
    		ARDY_SOUTH_ALLOTMENT(8555, 713),
    		ARDY_HERB(8152, 782),
    		ARDY_FLOWER(7849, 730),
    		CANIFIS_NORTH_ALLOTMENT(8556, 714),
    		CANIFIS_SOUTH_ALLOTMENT(8557, 715),
    		CANIFIS_HERB(8153, 783),
    		CANIFIS_FLOWER(7850, 731),
    		LUMMY_TREE_PATCH(8391, 703),
    		VARROCK_TREE_PATCH(8390, 702),
    		FALADOR_TREE_PATCH(8389, 701),
    		TAVERLY_TREE_PATCH(8388, 700);
    		
    		public static Map<Integer, Patches> patches = new HashMap<Integer, Patches>();
    		
    		public static Patches forId(int id) {
    			return patches.get(id);
    		}
    		
    		static {
    			for (Patches patch : Patches.values()) {
    				patches.put(patch.objectId, patch);
    			}
    		}
    		
    		private int objectId;
    		private int configId;
    		
    		Patches(int objectId, int configId) {
    			this.objectId = objectId;
    			this.configId = configId;
    		}
    		
    		public int getObjectId() {
    			return objectId;
    		}
    		
    		public int getConfigId() {
    			return configId;
    		}
    	}
    	
    	public static enum Trees {
    		OAK(5370, 1521, 15, 20, 22, 8, 5),
    		WILLOW(5371, 1519, 30, 33, 35, 15, 7),
    		MAPLE(5372, 1517, 45, 49, 51, 24, 9),
    		YEW(5373, 1515, 60, 85, 87, 35, 11),
    		MAGIC(5374, 1513, 75, 136, 138, 48, 13);
    	
    		private int sapling;
    		private int product;
    		private int req;
    		private double plantXp;
    		private double harvestXp;
    		private int configId;
    		private int stages;
    	
    	public static Map<Integer, Trees> trees = new HashMap<Integer, Trees>();
    	
    	public static Trees forId(int id) {
    		return trees.get(id);
    	}
    	
    	static {
    		for (Trees tree : Trees.values()) {
    			trees.put(tree.sapling, tree);
    		}
    	}
    	
    		private Trees(int sapling, int product, int req, double plantXp, double harvestXp, int configId, int stages) {
    			this.sapling = sapling;
    			this.product = product;
    			this.req = req;
    			this.plantXp = plantXp;
    			this.harvestXp = harvestXp;
    			this.configId = configId;
    			this.stages = stages;
    		}
    	
    		public int getSapling() {
    			return sapling;
    		}
    	
    		public int getProduct() {
    			return product;
    		}
    	
    		public int getReq() {
    			return req;
    		}
    	
    		public double getHarvestXp() {
    			return harvestXp;
    		}
    	
    		public double getPlantXp() {
    			return plantXp;
    		}
    	
    		public int getConfigId() {
    			return configId;
    		}
    		
    		public int getStages() {
    			return stages;
    		}
    	}
    	
    	public static enum Herbs {
    		GUAM(5291, 199, 9, 15, 17, 4),
    		MARRENTILL(5292, 201, 14, 20, 22, 11),
    		TARROMIN(5293, 203, 19, 24, 26, 18),
    		HARRALANDER(5294, 205, 26, 30, 32, 25),
    		RANARR(5295, 207, 32, 35, 37, 32),
    		TOADFLAX(5296, 3049, 38, 40, 42, 39),
    		IRIT(5297, 209, 44, 48, 50, 46),
    		AVANTOE(5298, 211, 50, 60, 62, 53),
    		WERGALI(14870, 14836, 46, 54, 56, 60),
    		KWUARM(5299, 213, 56, 69, 78, 69),
    		SNAPDRAGON(5300, 3051, 62, 87.5, 98.5, 75),
    		CADANTINE(5301, 215, 67, 106.5, 120, 82),
    		LANTADYME(5302, 2485, 73, 134.5, 151.5, 89),
    		DWARF_WEED(5303, 217, 79, 170.5, 192, 96),
    		TORSTOL(5304, 219, 85, 199.5, 22.5, 103),
    		FELLSTALK(21621, 21626, 91, 225, 315.6, 103);
    		
    		private int seed;
    		private int product;
    		private int req;
    		private double plantXp;
    		private double harvestXp;
    		private int configId;
    		
    		public static Map<Integer, Herbs> herbs = new HashMap<Integer, Herbs>();
    		
    		public static Herbs forId(int id) {
    			return herbs.get(id);
    		}
    		
    		static {
    			for (Herbs herb : Herbs.values()) {
    				herbs.put(herb.seed, herb);
    			}
    		}
    		
    		private Herbs(int seed, int product, int req, double plantXp, double harvestXp, int configId) {
    			this.seed = seed;
    			this.product = product;
    			this.req = req;
    			this.plantXp = plantXp;
    			this.harvestXp = harvestXp;
    			this.configId = configId;
    		}
    		
    		public int getSeed() {
    			return seed;
    		}
    		
    		public int getProduct() {
    			return product;
    		}
    		
    		public int getReq() {
    			return req;
    		}
    		
    		public double getHarvestXp() {
    			return harvestXp;
    		}
    		
    		public double getPlantXp() {
    			return plantXp;
    		}
    		
    		public int getConfigId() {
    			return configId;
    		}
    	}
    	
    	public static enum Allotments {
    		POTATO(5318, 1942, 1, 8, 10, 6, 4),
    		ONION(5319, 1957, 5, 12, 14, 13, 4),
    		CABBAGE(5324, 1965, 7, 14, 16, 20, 4),
    		TOMATOES(5322, 1982, 12, 21, 23, 27, 4),
    		SWEETCORN(5320, 5986, 20, 29, 31, 34, 6),
    		STRAWERRIES(5323, 5504, 31, 39, 41, 43, 6),
    		WATERMELON(5321, 5982, 47, 48.5, 54.5, 52, 8);
    		
    		private int seed;
    		private int product;
    		private int req;
    		private double plantXp;
    		private double harvestXp;
    		private int configId;
    		private int stages;
    		
    		public static Map<Integer, Allotments> allotments = new HashMap<Integer, Allotments>();
    		
    		public static Allotments forId(int id) {
    			return allotments.get(id);
    		}
    		
    		static {
    			for (Allotments allotment : Allotments.values()) {
    				allotments.put(allotment.seed, allotment);
    			}
    		}
    		
    		private Allotments(int seed, int product, int req, double plantXp, double harvestXp, int configId, int stages) {
    			this.seed = seed;
    			this.product = product;
    			this.req = req;
    			this.plantXp = plantXp;
    			this.harvestXp = harvestXp;
    			this.configId = configId;
    			this.stages = stages;
    		}
    		
    		public int getSeed() {
    			return seed;
    		}
    		
    		public int getProduct() {
    			return product;
    		}
    		
    		public int getReq() {
    			return req;
    		}
    		
    		public double getHarvestXp() {
    			return harvestXp;
    		}
    		
    		public double getPlantXp() {
    			return plantXp;
    		}
    		
    		public int getConfigId() {
    			return configId;
    		}
    		
    		public int getStages() {
    			return stages;
    		}
    	}
    	
    	public static enum Flowers {
    		MARIGOLD(5096, 6010, 2, 8.5, 12, 8, 4),
    		ROSEMARY(5097, 6014, 11, 12, 15, 13, 4),
    		NASTURTIUM(5098, 6012, 24, 19.5, 20, 18, 4),
    		WOAD(5099, 1793, 25, 20.5, 22, 23, 4),
    		LIMPWURT(5100, 225, 26, 21.5, 24.5, 28, 5),
    		LILY(14589, 14583, 52, 70, 74.8, 37, 4);
    		
    		private int seed;
    		private int product;
    		private int req;
    		private double plantXp;
    		private double harvestXp;
    		private int configId;
    		private int stages;
    		
    		public static Map<Integer, Flowers> flowers = new HashMap<Integer, Flowers>();
    		
    		public static Flowers forId(int id) {
    			return flowers.get(id);
    		}
    		
    		static {
    			for (Flowers flower : Flowers.values()) {
    				flowers.put(flower.seed, flower);
    			}
    		}
    		
    		private Flowers(int seed, int product, int req, double plantXp, double harvestXp, int configId, int stages) {
    			this.seed = seed;
    			this.product = product;
    			this.req = req;
    			this.plantXp = plantXp;
    			this.harvestXp = harvestXp;
    			this.configId = configId;
    			this.stages = stages;
    		}
    		
    		public int getSeed() {
    			return seed;
    		}
    		
    		public int getProduct() {
    			return product;
    		}
    		
    		public int getReq() {
    			return req;
    		}
    		
    		public double getHarvestXp() {
    			return harvestXp;
    		}
    		
    		public double getPlantXp() {
    			return plantXp;
    		}
    		
    		public int getConfigId() {
    			return configId;
    		}
    		
    		public int getStages() {
    			return stages;
    		}
    	}
    	
    	/**
    	 * Grows the weeds back into the patch
    	 * @param player
    	 * @param objectId
    	 */
    	
    	public static void growWeeds(final Player player, final int objectId) {
    		WorldTasksManager.schedule(new WorldTask() {
    			int stage;
    			Patches patch = Patches.forId(objectId);
    			
    			@Override
    			public void run() {
    				if (stage == 0) {
    					player.getPackets().sendConfigByFile(patch.getConfigId(), 2);
    				} else if (stage == 3) {
    					player.getPackets().sendConfigByFile(patch.getConfigId(), 1);
    				} else if (stage == 6) {
    					player.getPackets().sendConfigByFile(patch.getConfigId(), -1);
    					
    					if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    						player.setFaladorFlowerPatchRaked(false);
    					}
    					if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    						player.setFaladorHerbPatchRaked(false);
    					}
    					if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    						player.setFaladorNorthAllotmentPatchRaked(false);
    					}
    					if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    						player.setFaladorSouthAllotmentPatchRaked(false);
    					}
    					
    					//Catherby
    					
    					if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    						player.setCatherbyFlowerPatchRaked(false);
    					}
    					if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    						player.setCatherbyHerbPatchRaked(false);
    					}
    					if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    						player.setCatherbyNorthAllotmentPatchRaked(false);
    					}
    					if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    						player.setCatherbySouthAllotmentPatchRaked(false);
    					}
    					
    					//Ardougne
    					
    					if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    						player.setArdougneFlowerPatchRaked(false);
    					}
    					if (objectId == Patches.ARDY_HERB.getObjectId()) {
    						player.setArdougneHerbPatchRaked(false);
    					}
    					if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    						player.setArdougneNorthAllotmentPatchRaked(false);
    					}
    					if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    						player.setArdougneSouthAllotmentPatchRaked(false);
    					}
    					
    					//Canifis
    					
    					if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    						player.setCanifisFlowerPatchRaked(false);
    					}
    					if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    						player.setCanifisHerbPatchRaked(false);
    					}
    					if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    						player.setCanifisNorthAllotmentPatchRaked(false);
    					}
    					if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    						player.setCanifisSouthAllotmentPatchRaked(false);
    					}
    					
    					//Lumbridge
    					
    					if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    						player.setLummyTreePatchRaked(false);
    					}
    					
    					//Varrock
    					
    					if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    						player.setVarrockTreePatchRaked(false);
    					}
    					
    					//Falador
    					
    					if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    						player.setFaladorTreePatchRaked(false);
    					}
    					
    					//Taverly
    					
    					if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    						player.setTaverlyTreePatchRaked(false);
    					}
    				}
    				stage ++;
    			}
    		}, 0, 1);
    	}
    	
    	/**
    	 * Starts the player to rake the selected patch
    	 * @param player
    	 * @param objectId
    	 */
    	
    	public static void startRake(final Player player, final int objectId) {
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You don't have enough inventory space.");
    		}
    		else if (player.getInventory().containsItem(RAKE, 1)) {
    			WorldTasksManager.schedule(new WorldTask() {
    				int stage;
    				Patches patch = Patches.forId(objectId);
    				
    				@Override
    				public void run() {
    					if (stage == 0) {
    						player.lock();
    						player.setNextAnimation(RAKE_ANIMATION);
    						player.getPackets().sendConfigByFile(patch.getConfigId(), 1);
    						player.getInventory().addItem(WEEDS, 1);
    					} else if (stage == 3) {
    						player.setNextAnimation(RAKE_ANIMATION);
    						player.getPackets().sendConfigByFile(patch.getConfigId(), 2);
    						player.getInventory().addItem(WEEDS, 1);
    					} else if (stage == 6) {
    						player.setNextAnimation(RAKE_ANIMATION);
    						player.getPackets().sendConfigByFile(patch.getConfigId(), 3);
    						player.getInventory().addItem(WEEDS, 1);
    						player.unlock();
    						
    						//Falador
    						
    						if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    							player.setFaladorFlowerPatchRaked(true);
    						}
    						if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    							player.setFaladorHerbPatchRaked(true);
    						}
    						if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    							player.setFaladorNorthAllotmentPatchRaked(true);
    						}
    						if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    							player.setFaladorSouthAllotmentPatchRaked(true);
    						}
    						
    						//Catherby
    						
    						if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    							player.setCatherbyFlowerPatchRaked(true);
    						}
    						if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    							player.setCatherbyHerbPatchRaked(true);
    						}
    						if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    							player.setCatherbyNorthAllotmentPatchRaked(true);
    						}
    						if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    							player.setCatherbySouthAllotmentPatchRaked(true);
    						}
    						
    						//Ardougne
    						
    						if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    							player.setArdougneFlowerPatchRaked(true);
    						}
    						if (objectId == Patches.ARDY_HERB.getObjectId()) {
    							player.setArdougneHerbPatchRaked(true);
    						}
    						if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    							player.setArdougneNorthAllotmentPatchRaked(true);
    						}
    						if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    							player.setArdougneSouthAllotmentPatchRaked(true);
    						}
    						
    						//Canifis
    						
    						if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    							player.setCanifisFlowerPatchRaked(true);
    						}
    						if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    							player.setCanifisHerbPatchRaked(true);
    						}
    						if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    							player.setCanifisNorthAllotmentPatchRaked(true);
    						}
    						if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    							player.setCanifisSouthAllotmentPatchRaked(true);
    						}
    						
    						//Lumbridge
    						
    						if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    							player.setLummyTreePatchRaked(true);
    						}
    						
    						//Varrock
    						
    						if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    							player.setVarrockTreePatchRaked(true);
    						}
    						
    						//Falador
    						
    						if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    							player.setFaladorTreePatchRaked(true);
    						}
    						
    						//Taverly
    						
    						if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    							player.setTaverlyTreePatchRaked(true);
    						}
    						
    					}
    					stage++;
    				}
    			}, 0, 1);
    		} else {
    			player.getPackets().sendGameMessage("You need a rake to rake these weeds.");
    			return;
    		}
    	}
    	
    	/**
    	 * Plants the tree sapling in the selected patch
    	 * @param player
    	 * @param sapling
    	 * @param objectId
    	 */
    	
    	public static void plantTreeSapling(final Player player, final int sapling, final int objectId) {
    		final Trees tree = Trees.forId(sapling);
    		final Patches patch = Patches.forId(objectId);
    		if (player.getSkills().getLevelForXp(Skills.FARMING) < tree.getReq()) {
    			player.getPackets().sendGameMessage("You need a Farming level of " + tree.getReq() + " to plant this.");
    			return;
    		}
    		if (player.getInventory().containsItem(SEED_DIBBER, 1)) {
    			if (Trees.trees.containsKey(sapling)) {
    				WorldTasksManager.schedule(new WorldTask() {
    					int stage;
    					
    					@Override
    					public void run() {
    						if (stage == 0) {
    							player.lock();
    							player.setNextAnimation(PLANT_ANIMATION);
    							if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    								player.setLummyTreePatch(tree.getSapling());
    							}
    							if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    								player.setVarrockTreePatch(tree.getSapling());
    							}
    							if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    								player.setFaladorTreePatch(tree.getSapling());
    							}
    							if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    								player.setTaverlyTreePatch(tree.getSapling());
    							}
    							player.getSkills().addXp(Skills.FARMING, tree.getPlantXp());
    							player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId());
    							player.getInventory().deleteItem(tree.getSapling(), 1);
    							player.unlock();
    							} else if (stage == 6 && tree.getStages() >= 1) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 1);
    							} else if (stage == 12 && tree.getStages() >= 2) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 2);
    							} else if (stage == 18 && tree.getStages() >= 3) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 3);
    							} else if (stage == 24 && tree.getStages() >= 4) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 4);
    							} else if (stage == 30 && tree.getStages() >= 5) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 5);
    							} else if (stage == 36 && tree.getStages() >= 6) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 6);
    							} else if (stage == 42 && tree.getStages() >= 7) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 7);
    							} else if (stage == 48 && tree.getStages() >= 8) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 8);
    							} else if (stage == 54 && tree.getStages() >= 9) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 9);
    							} else if (stage == 60 && tree.getStages() >= 10) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 10);
    							} else if (stage == 66 && tree.getStages() >= 11) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 11);
    							} else if (stage == 72 && tree.getStages() >= 12) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 12);
    							} else if (stage == 78 && tree.getStages() >= 13) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 13);
    							} else if (stage == 84 && tree.getStages() >= 14) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 14);
    							}
    							stage++;
    						}
    					}, 0, 1);
    				} else {
    					player.getPackets().sendGameMessage("You can't plant that here.");
    				return;
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a seed dibber to plant this sapling.");
    		return;
    		}
    	}
    	
    	/**
    	 * Plants the herb seed into the selected patch
    	 * @param player
    	 * @param seed
    	 * @param objectId
    	 */
    	
    	public static void plantHerbSeed(final Player player, final int seed, final int objectId) {
    		final Herbs herb = Herbs.forId(seed);
    		final Patches patch = Patches.forId(objectId);
    		if (player.getSkills().getLevelForXp(Skills.FARMING) < herb.getReq()) {
    			player.getPackets().sendGameMessage("You need a Farming level of " + herb.getReq() + " to plant this.");
    			return;
    		}
    		if (player.getInventory().containsItem(SEED_DIBBER, 1)) {
    			if (Herbs.herbs.containsKey(seed)) {
    				WorldTasksManager.schedule(new WorldTask() {
    					int stage;
    					
    					@Override
    					public void run() {
    						if (stage == 0) {
    							player.lock();
    							player.setNextAnimation(PLANT_ANIMATION);
    							if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    								player.setFaladorHerbPatch(herb.getSeed());
    							}
    							if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    								player.setCatherbyHerbPatch(herb.getSeed());
    							}
    							if (objectId == Patches.ARDY_HERB.getObjectId()) {
    								player.setArdougneHerbPatch(herb.getSeed());
    							}
    							if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    								player.setCanifisHerbPatch(herb.getSeed());
    							}
    							player.getSkills().addXp(Skills.FARMING, herb.getPlantXp());
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId());
    							player.getInventory().deleteItem(herb.getSeed(), 1);
    							player.unlock();
    						} else if (stage == 6) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId() + 1);
    						} else if (stage == 12) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId() + 2);
    						} else if (stage == 18) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId() + 3);
    						} else if (stage == 24) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId() + 4);
    						}
    						stage++;
    					}
    				}, 0, 1);
    			} else {
    				player.getPackets().sendGameMessage("You can't plant that here.");
    				return;
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a seed dibber to plant these seeds.");
    			return;
    		}
    	}
    	
    	/**
    	 * Plants the seed into the selected patch
    	 * @param player
    	 * @param seed
    	 * @param objectId
    	 */
    	
    	public static void plantAllotmentSeed(final Player player, final int seed, final int objectId) {
    		final Allotments allotment = Allotments.forId(seed);
    		final Patches patch = Patches.forId(objectId);
    		if (player.getSkills().getLevelForXp(Skills.FARMING) < allotment.getReq()) {
    			player.getPackets().sendGameMessage("You need a Farming level of " + allotment.getReq() + " to plant this.");
    			return;
    		}
    		if (player.getInventory().containsItem(SEED_DIBBER, 1) && player.getInventory().containsItem(allotment.getSeed(), 3)) {
    			if (Allotments.allotments.containsKey(seed)) {
    				WorldTasksManager.schedule(new WorldTask() {
    					int stage;
    					
    					@Override
    					public void run() {
    						if (stage == 0) {
    							player.lock();
    							player.setNextAnimation(PLANT_ANIMATION);
    							if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    								player.setFaladorNorthAllotmentPatch(allotment.getSeed());
    							} else if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    								player.setFaladorSouthAllotmentPatch(allotment.getSeed());
    							}
    							if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    								player.setCatherbyNorthAllotmentPatch(allotment.getSeed());
    							} else if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    								player.setCatherbySouthAllotmentPatch(allotment.getSeed());
    							}
    							if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    								player.setArdougneNorthAllotmentPatch(allotment.getSeed());
    							} else if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    								player.setArdougneSouthAllotmentPatch(allotment.getSeed());
    							}
    							if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    								player.setCanifisNorthAllotmentPatch(allotment.getSeed());
    							} else if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    								player.setCanifisSouthAllotmentPatch(allotment.getSeed());
    							}
    							player.getSkills().addXp(Skills.FARMING, allotment.getPlantXp());
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId());
    							player.getInventory().deleteItem(allotment.getSeed(), 3);
    							player.unlock();
    						} else if (stage == 6 && allotment.getStages() >= 1) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 1);
    						} else if (stage == 12 && allotment.getStages() >= 2) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 2);
    						} else if (stage == 18 && allotment.getStages() >= 3) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 3);
    						} else if (stage == 24 && allotment.getStages() >= 4) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 4);
    						} else if (stage == 30 && allotment.getStages() >= 5) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 5);
    						} else if (stage == 36 && allotment.getStages() >= 6) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 6);
    						} else if (stage == 42 && allotment.getStages() >= 7) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 7);
    						} else if (stage == 48 && allotment.getStages() >= 8) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 8);
    						}
    						stage++;
    					}
    				}, 0, 1);
    			} else {
    				player.getPackets().sendGameMessage("You can't plant that here.");
    				return;
    			}
    		} else if (!player.getInventory().containsItem(SEED_DIBBER, 1)) {
    			player.getPackets().sendGameMessage("You need a seed dibber to plant these seeds.");
    			return;
    		} else if (!player.getInventory().containsItem(allotment.getSeed(), 3)) {
    			player.getPackets().sendGameMessage("You need atleast three seeds to plant.");
    			return;
    		}
    	}
    	
    	/**
    	 * Plants the flower seed into the allotment
    	 * @param player
    	 * @param seed
    	 * @param objectId
    	 */
    	
    	public static void plantFlowerSeed(final Player player, final int seed, final int objectId) {
    		final Flowers flower = Flowers.forId(seed);
    		final Patches patch = Patches.forId(objectId);
    		if (player.getSkills().getLevelForXp(Skills.FARMING) < flower.getReq()) {
    			player.getPackets().sendGameMessage("You need a Farming level of " + flower.getReq() + " to plant this.");
    			return;
    		}
    		if (player.getInventory().containsItem(SEED_DIBBER, 1)) {
    			if (Flowers.flowers.containsKey(seed)) {
    				WorldTasksManager.schedule(new WorldTask() {
    					int stage;
    					
    					@Override
    					public void run() {
    						if (stage == 0) {
    							player.lock();
    							player.setNextAnimation(PLANT_ANIMATION);
    							if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    								player.setFaladorFlowerPatch(flower.getSeed());
    							}
    							if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    								player.setCatherbyFlowerPatch(flower.getSeed());
    							}
    							if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    								player.setArdougneFlowerPatch(flower.getSeed());
    							}
    							if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    								player.setCanifisFlowerPatch(flower.getSeed());
    							}
    							player.getSkills().addXp(Skills.FARMING, flower.getPlantXp());
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId());
    							player.getInventory().deleteItem(flower.getSeed(), 1);
    							player.unlock();
    						} else if (stage == 6 && flower.getStages() >= 1) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId() + 1);
    						} else if (stage == 12 && flower.getStages() >= 2) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId() + 2);
    						} else if (stage == 18 && flower.getStages() >= 3) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId() + 3);
    						} else if (stage == 24 && flower.getStages() >= 4) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId() + 4);
    						}
    						stage++;
    					}
    				}, 0, 1);
    			} else {
    				player.getPackets().sendGameMessage("You can't plant that here.");
    				return;
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a seed dibber to plant these seeds.");
    			return;
    		}
    	}
    	
    	/**
    	 * Harvests tree saplings from tree patches
    	 * @param player
    	 * @param objectId
    	 * @param sapling
    	 */
    	
    	public static void harvestTreeSapling(final Player player, final int objectId, int sapling) {
    		final Trees tree = Trees.forId(sapling);
    		int weaponId = player.getEquipment().getWeaponId();
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You need atleast three free inventory spaces to harvest.");
    		} else if (weaponId != -1) {
    			switch (weaponId) {
    			
    			case 13661:
    				player.setNextAnimation(INFERNO_ADZE_CHOP);
    				break;
    				
    			case 6739:
    				player.setNextAnimation(DRAGON_AXE_CHOP);
    				break;
    				
    			case 1359:
    				player.setNextAnimation(RUNE_AXE_CHOP);
    				break;
    				
    			case 1357:
    				player.setNextAnimation(ADAMANT_AXE_CHOP);
    				break;
    				
    			case 1355:
    				player.setNextAnimation(MITHRIL_AXE_CHOP);
    				break;
    				
    			case 1361:
    				player.setNextAnimation(BLACK_AXE_CHOP);
    				break;
    				
    			case 1353:
    				player.setNextAnimation(STEEL_AXE_CHOP);
    				break;
    				
    			case 1349:
    				player.setNextAnimation(IRON_AXE_CHOP);
    				break;
    				
    			case 1351:
    				player.setNextAnimation(BRONZE_AXE_CHOP);
    				break;
    			}
    			int amount = 3;
    			double xp = amount * tree.getHarvestXp();
    			if (amount < 3 && player.getInventory().getFreeSlots() <= 3) {
    				player.getSkills().addXp(Skills.FARMING, xp * 3);
    				player.getInventory().addItem(tree.getProduct(), 3);
    				growWeeds(player, objectId);
    				if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setLummyTreePatch(-1);
    					player.setLummyTreePatchRaked(false);
    				}
    				if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setVarrockTreePatch(-1);
    					player.setVarrockTreePatchRaked(false);
    				}
    				if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setFaladorTreePatch(-1);
    					player.setFaladorTreePatchRaked(false);
    				}
    				if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setTaverlyTreePatch(-1);
    					player.setTaverlyTreePatchRaked(false);
    				}
    			} else if (player.getInventory().getFreeSlots() < amount) {
    				amount = player.getInventory().getFreeSlots();
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(tree.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setLummyTreePatch(-1);
    					player.setLummyTreePatchRaked(false);
    				}
    				if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setVarrockTreePatch(-1);
    					player.setVarrockTreePatchRaked(false);
    				}
    				if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setFaladorTreePatch(-1);
    					player.setFaladorTreePatchRaked(false);
    				}
    				if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setTaverlyTreePatch(-1);
    					player.setTaverlyTreePatchRaked(false);
    				}
    			} else {
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(tree.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setLummyTreePatch(-1);
    					player.setLummyTreePatchRaked(false);
    				}
    				if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setVarrockTreePatch(-1);
    					player.setVarrockTreePatchRaked(false);
    				}
    				if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setFaladorTreePatch(-1);
    					player.setFaladorTreePatchRaked(false);
    				}
    				if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setTaverlyTreePatch(-1);
    					player.setTaverlyTreePatchRaked(false);
    				}
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a hatchet to chop down this tree.");
    			return;
    		}
    	}
    	
    	/**
    	 * Harvests the herbs from the patch.
    	 * @param player
    	 * @param objectId
    	 * @param seed
    	 */
    	
    	public static void harvestHerb(final Player player, final int objectId, int seed) {
    		final Herbs herb = Herbs.forId(seed);
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You need atleast three free inventory spaces to harvest.");
    		} else if (player.getInventory().containsItem(SECATEURS, 1)) {
    			int amount = 3;
    			double xp = amount * herb.getHarvestXp();
    			if (amount < 3 && player.getInventory().getFreeSlots() <= 3) {
    				player.setNextAnimation(PICK_HERB);
    				player.getSkills().addXp(Skills.FARMING, xp * 3);
    				player.getInventory().addItem(herb.getProduct(), 3);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    					player.setFaladorHerbPatch(-1);
    					player.setFaladorHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    					player.setCatherbyHerbPatch(-1);
    					player.setCatherbyHerbPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_HERB.getObjectId()) {
    					player.setArdougneHerbPatch(-1);
    					player.setArdougneHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    					player.setCanifisHerbPatch(-1);
    					player.setCanifisHerbPatchRaked(false);
    				}
    			} else if (player.getInventory().getFreeSlots() < amount) {
    				amount = player.getInventory().getFreeSlots();
    				player.setNextAnimation(PICK_HERB);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(herb.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    					player.setFaladorHerbPatch(-1);
    					player.setFaladorHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    					player.setCatherbyHerbPatch(-1);
    					player.setCatherbyHerbPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_HERB.getObjectId()) {
    					player.setArdougneHerbPatch(-1);
    					player.setArdougneHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    					player.setCanifisHerbPatch(-1);
    					player.setCanifisHerbPatchRaked(false);
    				}
    			} else {
    				player.setNextAnimation(PICK_HERB);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(herb.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    					player.setFaladorHerbPatch(-1);
    					player.setFaladorHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    					player.setCatherbyHerbPatch(-1);
    					player.setCatherbyHerbPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_HERB.getObjectId()) {
    					player.setArdougneHerbPatch(-1);
    					player.setArdougneHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    					player.setCanifisHerbPatch(-1);
    					player.setCanifisHerbPatchRaked(false);
    				}
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need secateurs to harvest these herbs.");
    			return;
    		}
    	}
    	
    	/**
    	 * Harvests the seed from allotments
    	 * @param player
    	 * @param objectId
    	 * @param seed
    	 */
    	
    	public static void harvestAllotment(final Player player, final int objectId, int seed) {
    		final Allotments allotment = Allotments.forId(seed);
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You need atleast three free inventory spaces to harvest.");
    		} else if (player.getInventory().containsItem(SPADE, 1)) {
    			int amount = 3;
    			double xp = amount * allotment.getHarvestXp();
    			if (amount < 3 && player.getInventory().getFreeSlots() <= 3) {
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp * 3);
    				player.getInventory().addItem(allotment.getProduct(), 3);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorNorthAllotmentPatch(-1);
    					player.setFaladorNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorSouthAllotmentPatch(-1);
    					player.setFaladorSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbyNorthAllotmentPatch(-1);
    					player.setCatherbyNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbySouthAllotmentPatch(-1);
    					player.setCatherbySouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneNorthAllotmentPatch(-1);
    					player.setArdougneNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneSouthAllotmentPatch(-1);
    					player.setArdougneSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisNorthAllotmentPatch(-1);
    					player.setCanifisNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisSouthAllotmentPatch(-1);
    					player.setCanifisSouthAllotmentPatchRaked(false);
    				}
    			} else if (player.getInventory().getFreeSlots() < amount) {
    				amount = player.getInventory().getFreeSlots();
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(allotment.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorNorthAllotmentPatch(-1);
    					player.setFaladorNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorSouthAllotmentPatch(-1);
    					player.setFaladorSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbyNorthAllotmentPatch(-1);
    					player.setCatherbyNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbySouthAllotmentPatch(-1);
    					player.setCatherbySouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneNorthAllotmentPatch(-1);
    					player.setArdougneNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneSouthAllotmentPatch(-1);
    					player.setArdougneSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisNorthAllotmentPatch(-1);
    					player.setCanifisNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisSouthAllotmentPatch(-1);
    					player.setCanifisSouthAllotmentPatchRaked(false);
    				}
    			} else {
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(allotment.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorNorthAllotmentPatch(-1);
    					player.setFaladorNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorSouthAllotmentPatch(-1);
    					player.setFaladorSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbyNorthAllotmentPatch(-1);
    					player.setCatherbyNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbySouthAllotmentPatch(-1);
    					player.setCatherbySouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneNorthAllotmentPatch(-1);
    					player.setArdougneNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneSouthAllotmentPatch(-1);
    					player.setArdougneSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisNorthAllotmentPatch(-1);
    					player.setCanifisNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisSouthAllotmentPatch(-1);
    					player.setCanifisSouthAllotmentPatchRaked(false);
    				}
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a spade to harvest this allotment.");
    			return;
    		}
    	}
    	
    	/**
    	 * Harvests flowers from the flower allotment
    	 * @param player
    	 * @param objectId
    	 * @param seed
    	 */
    	
    	public static void harvestFlower(final Player player, final int objectId, int seed) {
    		final Flowers flower = Flowers.forId(seed);
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You need atleast three free inventory spaces to harvest.");
    		} else if (player.getInventory().containsItem(SPADE, 1)) {
    			int amount = 3;
    			double xp = amount * flower.getHarvestXp();
    			if (player.getInventory().getFreeSlots() < amount) {
    				amount = player.getInventory().getFreeSlots();
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp * 3);
    				player.getInventory().addItem(flower.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    					player.setFaladorFlowerPatch(-1);
    					player.setFaladorFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    					player.setCatherbyFlowerPatch(-1);
    					player.setCatherbyFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    					player.setArdougneFlowerPatch(-1);
    					player.setArdougneFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    					player.setCanifisFlowerPatch(-1);
    					player.setCanifisFlowerPatchRaked(false);
    				}
    			} else {
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(flower.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    					player.setFaladorFlowerPatch(-1);
    					player.setFaladorFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    					player.setCatherbyFlowerPatch(-1);
    					player.setCatherbyFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    					player.setArdougneFlowerPatch(-1);
    					player.setArdougneFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    					player.setCanifisFlowerPatch(-1);
    					player.setCanifisFlowerPatchRaked(false);
    				}
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a spade to harvest this flower.");
    			return;
    		}
    	}
    
    	public void setPlayer(Player player) {
    		this.player = player;
    	}
    	
    	public Player getPlayer() {
    		return player;
    	}
    	
    }
    Code:
    	/**
    	 * Farming
    	 */
    	
    	//Falador
    	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;
    	
    	//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;
    Code:
    				/**
    				 * Farming
    				 */
    					
    				//Falador
    				} else if (Herbs.herbs.containsKey(itemId) && player.getFaladorHerbPatchRaked()) {
    					Farming.plantHerbSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getFaladorNorthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getFaladorSouthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Flowers.flowers.containsKey(itemId) && player.getFaladorFlowerPatchRaked()) {
    					Farming.plantFlowerSeed(player, itemId, object.getId());
    					
    				//Catherby
    				} else if (Herbs.herbs.containsKey(itemId) && player.getCatherbyHerbPatchRaked()) {
    					Farming.plantHerbSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getCatherbyNorthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getCatherbySouthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Flowers.flowers.containsKey(itemId) && player.getCatherbyFlowerPatchRaked()) {
    					Farming.plantFlowerSeed(player, itemId, object.getId());
    					
    				//Ardougne	
    				} else if (Herbs.herbs.containsKey(itemId) && player.getArdougneHerbPatchRaked()) {
    					Farming.plantHerbSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getArdougneNorthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getArdougneSouthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Flowers.flowers.containsKey(itemId) && player.getArdougneFlowerPatchRaked()) {
    					Farming.plantFlowerSeed(player, itemId, object.getId());
    					
    				//Canifis
    				} else if (Herbs.herbs.containsKey(itemId) && player.getCanifisHerbPatchRaked()) {
    					Farming.plantHerbSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getCanifisNorthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getCanifisSouthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Flowers.flowers.containsKey(itemId) && player.getCanifisFlowerPatchRaked()) {
    					Farming.plantFlowerSeed(player, itemId, object.getId());
    					
    				//Lumbridge
    				} else if (Trees.trees.containsKey(itemId) && player.getLummyTreePatchRaked()) {
    					Farming.plantTreeSapling(player, itemId, object.getId());
    					
    				//Varrock
    				} else if (Trees.trees.containsKey(itemId) && player.getVarrockTreePatchRaked()) {
    					Farming.plantTreeSapling(player, itemId, object.getId());
    					
    				//Falador
    				} else if (Trees.trees.containsKey(itemId) && player.getFaladorTreePatchRaked()) {
    					Farming.plantTreeSapling(player, itemId, object.getId());
    					
    				//Taverly
    				} else if (Trees.trees.containsKey(itemId) && player.getTaverlyTreePatchRaked()) {
    					Farming.plantTreeSapling(player, itemId, object.getId());
    Code:
    				/**
    				 * Falador
    				 */
    				
    				//Herb
    				if (id == 8150 && !player.getFaladorHerbPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Flower
    				if (id == 7847 && !player.getFaladorFlowerPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//North
    				if (id == 8550 && !player.getFaladorNorthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//South
    				if (id == 8551 && !player.getFaladorSouthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Herb
    				if (id == 8150 && player.getFaladorHerbPatchRaked()) {
    					Farming.harvestHerb(player, id, player.getFaladorHerbPatch());
    				}
    				
    				//North
    				if (id == 8550 && player.getFaladorNorthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getFaladorNorthAllotmentPatch());
    				}
    				
    				//South
    				if (id == 8551 && player.getFaladorSouthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getFaladorSouthAllotmentPatch());
    				}
    				
    				//Flower
    				if (id == 7847 && player.getFaladorFlowerPatchRaked()) {
    					Farming.harvestFlower(player, id, player.getFaladorFlowerPatch());
    				}
    				
    				/**
    				 * Catherby
    				 */
    				
    				//Herb
    				if (id == 8151 && !player.getCatherbyHerbPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Flower
    				if (id == 7848 && !player.getCatherbyFlowerPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//North
    				if (id == 8552 && !player.getCatherbyNorthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//South
    				if (id == 8553 && !player.getCatherbySouthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Herb
    				if (id == 8151 && player.getCatherbyHerbPatchRaked()) {
    					Farming.harvestHerb(player, id, player.getCatherbyHerbPatch());
    				}
    				
    				//North
    				if (id == 8552 && player.getCatherbyNorthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getCatherbyNorthAllotmentPatch());
    				}
    				
    				//South
    				if (id == 8553 && player.getCatherbySouthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getCatherbySouthAllotmentPatch());
    				}
    				
    				//Flower
    				if (id == 7848 && player.getCatherbyFlowerPatchRaked()) {
    					Farming.harvestFlower(player, id, player.getCatherbyFlowerPatch());
    				}
    				
    				/**
    				 * Ardougne
    				 */
    				
    				//Herb
    				if (id == 8152 && !player.getArdougneHerbPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Flower
    				if (id == 7849 && !player.getArdougneFlowerPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//North
    				if (id == 8554 && !player.getArdougneNorthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//South
    				if (id == 8555 && !player.getArdougneSouthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Herb
    				if (id == 8152 && player.getArdougneHerbPatchRaked()) {
    					Farming.harvestHerb(player, id, player.getArdougneHerbPatch());
    				}
    				
    				//North
    				if (id == 8554 && player.getArdougneNorthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getArdougneNorthAllotmentPatch());
    				}
    				
    				//South
    				if (id == 8555 && player.getArdougneSouthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getArdougneSouthAllotmentPatch());
    				}
    				
    				//Flower
    				if (id == 7849 && player.getArdougneFlowerPatchRaked()) {
    					Farming.harvestFlower(player, id, player.getArdougneFlowerPatch());
    				}
    				
    				/**
    				 * Canifis
    				 */
    				
    				//Herb
    				if (id == 8153 && !player.getCanifisHerbPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Flower
    				if (id == 7850 && !player.getCanifisFlowerPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//North
    				if (id == 8556 && !player.getCanifisNorthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//South
    				if (id == 8557 && !player.getCanifisSouthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Herb
    				if (id == 8153 && player.getCanifisHerbPatchRaked()) {
    					Farming.harvestHerb(player, id, player.getCanifisHerbPatch());
    				}
    				
    				//North
    				if (id == 8556 && player.getCanifisNorthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getCanifisNorthAllotmentPatch());
    				}
    				
    				//South
    				if (id == 8557 && player.getCanifisSouthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getCanifisSouthAllotmentPatch());
    				}
    				
    				//Flower
    				if (id == 7850 && player.getCanifisFlowerPatchRaked()) {
    					Farming.harvestFlower(player, id, player.getCanifisFlowerPatch());
    				}
    				
    				/**
    				 * Lumbridge
    				 */
    				
    				//Tree Patch
    				if (id == 8391 && !player.getLummyTreePatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Tree Patch
    				if (id == 8391 && player.getLummyTreePatchRaked()) {
    					Farming.harvestTreeSapling(player, id, player.getLummyTreePatch());
    				}
    				
    				/**
    				 * Varrock
    				 */
    				
    				//Tree Patch
    				if (id == 8390 && !player.getVarrockTreePatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Tree Patch
    				if (id == 8390 && player.getVarrockTreePatchRaked()) {
    					Farming.harvestTreeSapling(player, id, player.getVarrockTreePatch());
    				}
    				
    				/**
    				 * Falador
    				 */
    				
    				//Tree Patch
    				if (id == 8389 && !player.getFaladorTreePatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Tree Patch
    				if (id == 8389 && player.getFaladorTreePatchRaked()) {
    					Farming.harvestTreeSapling(player, id, player.getFaladorTreePatch());
    				}
    				
    				/**
    				 * Taverly
    				 */
    				
    				//Tree Patch
    				if (id == 8388 && !player.getTaverlyTreePatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Tree Patch
    				if (id == 8388 && player.getTaverlyTreePatchRaked()) {
    					Farming.harvestTreeSapling(player, id, player.getTaverlyTreePatch());
    				}
    Code:
    	/**
    	 * 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;
    	}
    Link for PrivatePaste

    [Only registered and activated users can see links. ]

    Spoiler for signature:
    When your vision is crystal clear, they say it's razor-sharp
    A focused mind is said to be like a knife, but the scalpel is wisdom
    All one can do is accept that life is a double-edged sword
    Stay on the edge

    -



    Reply With Quote  
     


  2. #2  
    The Enigma
    Cαleb's Avatar
    Join Date
    Nov 2012
    Posts
    333
    Thanks given
    87
    Thanks received
    33
    Rep Power
    15
    Holy hell that's very nice. Great job man will be working on it a bit
    Reply With Quote  
     

  3. #3  
    Mug Club


    Join Date
    Jul 2011
    Age
    26
    Posts
    1,875
    Thanks given
    510
    Thanks received
    890
    Discord
    View profile
    Rep Power
    332
    This hurts my eyes. But at least people are using configs now..


    My Open Source Projects
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Registered Member

    Join Date
    Jul 2011
    Posts
    808
    Thanks given
    448
    Thanks received
    250
    Rep Power
    126
    public static boolean raked;

    yep, cause we can rake and plant on another patch ?
    and..

    Code:
    	//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;
    what the fk
    Need help? Feel free to send me a PM!
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    May 2013
    Posts
    160
    Thanks given
    8
    Thanks received
    28
    Rep Power
    17
    not really meddling much with coding right now, but I have to say its impressive that you have taken this on a step further, a great contribution and I feel this is more what the community should be about, sharing ideas, building upon each others and making the RSPS community and servers an even better experience, I can see great leap forwards in Construction and Farming recently, maybe soon dungeoneering will be taken a step further too!
    Reply With Quote  
     

  7. Thankful user:


  8. #6  
    ♢♢♢♢♢♢

    Con Artist's Avatar
    Join Date
    Jan 2012
    Posts
    1,354
    Thanks given
    665
    Thanks received
    307
    Rep Power
    386
    Nice snippet i guess


    widdy widdy


    /|\
    / \

    Reply With Quote  
     

  9. #7  
    Registered Member Taylor Moon's Avatar
    Join Date
    Aug 2012
    Posts
    2,568
    Thanks given
    625
    Thanks received
    1,301
    Rep Power
    66
    Honestly very bad.

    Reply With Quote  
     

  10. Thankful user:


  11. #8  
    The Emperor of the Sands

    Azir's Avatar
    Join Date
    Nov 2008
    Posts
    2,468
    Thanks given
    8
    Thanks received
    487
    Rep Power
    117
    Quote Originally Posted by ArcaneStream View Post
    This is only a snippet only because it is not 100%. Credits to the guy that last released Farming, this just has more stuff added such as Tree Patches, Inventory Space Checks, Tree Growth, Weeds Regrow, Correct Tree Staging, Hatchet shit, and also supports every other patches I had access to configs to, such as Allotments, Herbs, Flowers and Tree Patches! One last thing, this does not save so feel free to contribute if you add saving. I already started off part of the saving. Enjoy

    Code:
    package org.veratrix.game.player.actions;
    
    import java.io.Serializable;
    import java.util.HashMap;
    import java.util.Map;
    
    import org.veratrix.game.Animation;
    import org.veratrix.game.player.Player;
    import org.veratrix.game.player.Skills;
    import org.veratrix.game.tasks.WorldTask;
    import org.veratrix.game.tasks.WorldTasksManager;
    
    /**
     * 
     * @author Swirl
     *
     */
    public class Farming implements Serializable {
    
    
    	private transient Player player;
    	
    	private static final long serialVersionUID = 147342384798739L;
    
    	public static int RAKE = 5341;
    	public static int SEED_DIBBER = 5343;
    	public static int SECATEURS = 5329;
    	public static int INFERNO_ADZE = 13661;
    	public static int DRAGON_AXE = 6739;
    	public static int RUNE_AXE = 1359;
    	public static int ADAMANT_AXE = 1357;
    	public static int MITHRIL_AXE = 1355;
    	public static int BLACK_AXE = 1361;
    	public static int STEEL_AXE = 1353;
    	public static int IRON_AXE = 1349;
    	public static int BRONZE_AXE = 1351;
    	public static int SPADE = 952;
    	public static int WEEDS = 6055;
    	public static final Animation RAKE_ANIMATION = new Animation(2273);
    	public static final Animation PLANT_ANIMATION = new Animation(2291);
    	public static final Animation PICK_HERB = new Animation(2281);
    	public static final Animation PICK_ALLOTMENT = new Animation(830);
    	public static final Animation CHOP_TREE = new Animation(867);
    	public static final Animation INFERNO_ADZE_CHOP = new Animation(10251);
    	public static final Animation DRAGON_AXE_CHOP = new Animation(2846);
    	public static final Animation RUNE_AXE_CHOP = new Animation(867);
    	public static final Animation ADAMANT_AXE_CHOP = new Animation(869);
    	public static final Animation MITHRIL_AXE_CHOP = new Animation(871);
    	public static final Animation BLACK_AXE_CHOP = new Animation(873);
    	public static final Animation STEEL_AXE_CHOP = new Animation(875);
    	public static final Animation IRON_AXE_CHOP = new Animation(877);
    	public static final Animation BRONZE_AXE_CHOP = new Animation(879);
    	public static boolean raked;
    	
    	public static enum Patches {
    		FALADOR_NORTH_ALLOTMENT(8550, 708),
    		FALADOR_SOUTH_ALLOTMENT(8551, 709),
    		FALADOR_HERB(8150, 780),
    		FALADOR_FLOWER(7847, 728),
    		CATHERBY_NORTH_ALLOTMENT(8552, 710),
    		CATHERBY_SOUTH_ALLOTMENT(8553, 711),
    		CATHERBY_HERB(8151, 781),
    		CATHERBY_FLOWER(7848, 729),
    		ARDY_NORTH_ALLOTMENT(8554, 712),
    		ARDY_SOUTH_ALLOTMENT(8555, 713),
    		ARDY_HERB(8152, 782),
    		ARDY_FLOWER(7849, 730),
    		CANIFIS_NORTH_ALLOTMENT(8556, 714),
    		CANIFIS_SOUTH_ALLOTMENT(8557, 715),
    		CANIFIS_HERB(8153, 783),
    		CANIFIS_FLOWER(7850, 731),
    		LUMMY_TREE_PATCH(8391, 703),
    		VARROCK_TREE_PATCH(8390, 702),
    		FALADOR_TREE_PATCH(8389, 701),
    		TAVERLY_TREE_PATCH(8388, 700);
    		
    		public static Map<Integer, Patches> patches = new HashMap<Integer, Patches>();
    		
    		public static Patches forId(int id) {
    			return patches.get(id);
    		}
    		
    		static {
    			for (Patches patch : Patches.values()) {
    				patches.put(patch.objectId, patch);
    			}
    		}
    		
    		private int objectId;
    		private int configId;
    		
    		Patches(int objectId, int configId) {
    			this.objectId = objectId;
    			this.configId = configId;
    		}
    		
    		public int getObjectId() {
    			return objectId;
    		}
    		
    		public int getConfigId() {
    			return configId;
    		}
    	}
    	
    	public static enum Trees {
    		OAK(5370, 1521, 15, 20, 22, 8, 5),
    		WILLOW(5371, 1519, 30, 33, 35, 15, 7),
    		MAPLE(5372, 1517, 45, 49, 51, 24, 9),
    		YEW(5373, 1515, 60, 85, 87, 35, 11),
    		MAGIC(5374, 1513, 75, 136, 138, 48, 13);
    	
    		private int sapling;
    		private int product;
    		private int req;
    		private double plantXp;
    		private double harvestXp;
    		private int configId;
    		private int stages;
    	
    	public static Map<Integer, Trees> trees = new HashMap<Integer, Trees>();
    	
    	public static Trees forId(int id) {
    		return trees.get(id);
    	}
    	
    	static {
    		for (Trees tree : Trees.values()) {
    			trees.put(tree.sapling, tree);
    		}
    	}
    	
    		private Trees(int sapling, int product, int req, double plantXp, double harvestXp, int configId, int stages) {
    			this.sapling = sapling;
    			this.product = product;
    			this.req = req;
    			this.plantXp = plantXp;
    			this.harvestXp = harvestXp;
    			this.configId = configId;
    			this.stages = stages;
    		}
    	
    		public int getSapling() {
    			return sapling;
    		}
    	
    		public int getProduct() {
    			return product;
    		}
    	
    		public int getReq() {
    			return req;
    		}
    	
    		public double getHarvestXp() {
    			return harvestXp;
    		}
    	
    		public double getPlantXp() {
    			return plantXp;
    		}
    	
    		public int getConfigId() {
    			return configId;
    		}
    		
    		public int getStages() {
    			return stages;
    		}
    	}
    	
    	public static enum Herbs {
    		GUAM(5291, 199, 9, 15, 17, 4),
    		MARRENTILL(5292, 201, 14, 20, 22, 11),
    		TARROMIN(5293, 203, 19, 24, 26, 18),
    		HARRALANDER(5294, 205, 26, 30, 32, 25),
    		RANARR(5295, 207, 32, 35, 37, 32),
    		TOADFLAX(5296, 3049, 38, 40, 42, 39),
    		IRIT(5297, 209, 44, 48, 50, 46),
    		AVANTOE(5298, 211, 50, 60, 62, 53),
    		WERGALI(14870, 14836, 46, 54, 56, 60),
    		KWUARM(5299, 213, 56, 69, 78, 69),
    		SNAPDRAGON(5300, 3051, 62, 87.5, 98.5, 75),
    		CADANTINE(5301, 215, 67, 106.5, 120, 82),
    		LANTADYME(5302, 2485, 73, 134.5, 151.5, 89),
    		DWARF_WEED(5303, 217, 79, 170.5, 192, 96),
    		TORSTOL(5304, 219, 85, 199.5, 22.5, 103),
    		FELLSTALK(21621, 21626, 91, 225, 315.6, 103);
    		
    		private int seed;
    		private int product;
    		private int req;
    		private double plantXp;
    		private double harvestXp;
    		private int configId;
    		
    		public static Map<Integer, Herbs> herbs = new HashMap<Integer, Herbs>();
    		
    		public static Herbs forId(int id) {
    			return herbs.get(id);
    		}
    		
    		static {
    			for (Herbs herb : Herbs.values()) {
    				herbs.put(herb.seed, herb);
    			}
    		}
    		
    		private Herbs(int seed, int product, int req, double plantXp, double harvestXp, int configId) {
    			this.seed = seed;
    			this.product = product;
    			this.req = req;
    			this.plantXp = plantXp;
    			this.harvestXp = harvestXp;
    			this.configId = configId;
    		}
    		
    		public int getSeed() {
    			return seed;
    		}
    		
    		public int getProduct() {
    			return product;
    		}
    		
    		public int getReq() {
    			return req;
    		}
    		
    		public double getHarvestXp() {
    			return harvestXp;
    		}
    		
    		public double getPlantXp() {
    			return plantXp;
    		}
    		
    		public int getConfigId() {
    			return configId;
    		}
    	}
    	
    	public static enum Allotments {
    		POTATO(5318, 1942, 1, 8, 10, 6, 4),
    		ONION(5319, 1957, 5, 12, 14, 13, 4),
    		CABBAGE(5324, 1965, 7, 14, 16, 20, 4),
    		TOMATOES(5322, 1982, 12, 21, 23, 27, 4),
    		SWEETCORN(5320, 5986, 20, 29, 31, 34, 6),
    		STRAWERRIES(5323, 5504, 31, 39, 41, 43, 6),
    		WATERMELON(5321, 5982, 47, 48.5, 54.5, 52, 8);
    		
    		private int seed;
    		private int product;
    		private int req;
    		private double plantXp;
    		private double harvestXp;
    		private int configId;
    		private int stages;
    		
    		public static Map<Integer, Allotments> allotments = new HashMap<Integer, Allotments>();
    		
    		public static Allotments forId(int id) {
    			return allotments.get(id);
    		}
    		
    		static {
    			for (Allotments allotment : Allotments.values()) {
    				allotments.put(allotment.seed, allotment);
    			}
    		}
    		
    		private Allotments(int seed, int product, int req, double plantXp, double harvestXp, int configId, int stages) {
    			this.seed = seed;
    			this.product = product;
    			this.req = req;
    			this.plantXp = plantXp;
    			this.harvestXp = harvestXp;
    			this.configId = configId;
    			this.stages = stages;
    		}
    		
    		public int getSeed() {
    			return seed;
    		}
    		
    		public int getProduct() {
    			return product;
    		}
    		
    		public int getReq() {
    			return req;
    		}
    		
    		public double getHarvestXp() {
    			return harvestXp;
    		}
    		
    		public double getPlantXp() {
    			return plantXp;
    		}
    		
    		public int getConfigId() {
    			return configId;
    		}
    		
    		public int getStages() {
    			return stages;
    		}
    	}
    	
    	public static enum Flowers {
    		MARIGOLD(5096, 6010, 2, 8.5, 12, 8, 4),
    		ROSEMARY(5097, 6014, 11, 12, 15, 13, 4),
    		NASTURTIUM(5098, 6012, 24, 19.5, 20, 18, 4),
    		WOAD(5099, 1793, 25, 20.5, 22, 23, 4),
    		LIMPWURT(5100, 225, 26, 21.5, 24.5, 28, 5),
    		LILY(14589, 14583, 52, 70, 74.8, 37, 4);
    		
    		private int seed;
    		private int product;
    		private int req;
    		private double plantXp;
    		private double harvestXp;
    		private int configId;
    		private int stages;
    		
    		public static Map<Integer, Flowers> flowers = new HashMap<Integer, Flowers>();
    		
    		public static Flowers forId(int id) {
    			return flowers.get(id);
    		}
    		
    		static {
    			for (Flowers flower : Flowers.values()) {
    				flowers.put(flower.seed, flower);
    			}
    		}
    		
    		private Flowers(int seed, int product, int req, double plantXp, double harvestXp, int configId, int stages) {
    			this.seed = seed;
    			this.product = product;
    			this.req = req;
    			this.plantXp = plantXp;
    			this.harvestXp = harvestXp;
    			this.configId = configId;
    			this.stages = stages;
    		}
    		
    		public int getSeed() {
    			return seed;
    		}
    		
    		public int getProduct() {
    			return product;
    		}
    		
    		public int getReq() {
    			return req;
    		}
    		
    		public double getHarvestXp() {
    			return harvestXp;
    		}
    		
    		public double getPlantXp() {
    			return plantXp;
    		}
    		
    		public int getConfigId() {
    			return configId;
    		}
    		
    		public int getStages() {
    			return stages;
    		}
    	}
    	
    	/**
    	 * Grows the weeds back into the patch
    	 * @param player
    	 * @param objectId
    	 */
    	
    	public static void growWeeds(final Player player, final int objectId) {
    		WorldTasksManager.schedule(new WorldTask() {
    			int stage;
    			Patches patch = Patches.forId(objectId);
    			
    			@Override
    			public void run() {
    				if (stage == 0) {
    					player.getPackets().sendConfigByFile(patch.getConfigId(), 2);
    				} else if (stage == 3) {
    					player.getPackets().sendConfigByFile(patch.getConfigId(), 1);
    				} else if (stage == 6) {
    					player.getPackets().sendConfigByFile(patch.getConfigId(), -1);
    					
    					if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    						player.setFaladorFlowerPatchRaked(false);
    					}
    					if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    						player.setFaladorHerbPatchRaked(false);
    					}
    					if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    						player.setFaladorNorthAllotmentPatchRaked(false);
    					}
    					if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    						player.setFaladorSouthAllotmentPatchRaked(false);
    					}
    					
    					//Catherby
    					
    					if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    						player.setCatherbyFlowerPatchRaked(false);
    					}
    					if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    						player.setCatherbyHerbPatchRaked(false);
    					}
    					if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    						player.setCatherbyNorthAllotmentPatchRaked(false);
    					}
    					if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    						player.setCatherbySouthAllotmentPatchRaked(false);
    					}
    					
    					//Ardougne
    					
    					if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    						player.setArdougneFlowerPatchRaked(false);
    					}
    					if (objectId == Patches.ARDY_HERB.getObjectId()) {
    						player.setArdougneHerbPatchRaked(false);
    					}
    					if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    						player.setArdougneNorthAllotmentPatchRaked(false);
    					}
    					if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    						player.setArdougneSouthAllotmentPatchRaked(false);
    					}
    					
    					//Canifis
    					
    					if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    						player.setCanifisFlowerPatchRaked(false);
    					}
    					if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    						player.setCanifisHerbPatchRaked(false);
    					}
    					if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    						player.setCanifisNorthAllotmentPatchRaked(false);
    					}
    					if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    						player.setCanifisSouthAllotmentPatchRaked(false);
    					}
    					
    					//Lumbridge
    					
    					if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    						player.setLummyTreePatchRaked(false);
    					}
    					
    					//Varrock
    					
    					if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    						player.setVarrockTreePatchRaked(false);
    					}
    					
    					//Falador
    					
    					if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    						player.setFaladorTreePatchRaked(false);
    					}
    					
    					//Taverly
    					
    					if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    						player.setTaverlyTreePatchRaked(false);
    					}
    				}
    				stage ++;
    			}
    		}, 0, 1);
    	}
    	
    	/**
    	 * Starts the player to rake the selected patch
    	 * @param player
    	 * @param objectId
    	 */
    	
    	public static void startRake(final Player player, final int objectId) {
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You don't have enough inventory space.");
    		}
    		else if (player.getInventory().containsItem(RAKE, 1)) {
    			WorldTasksManager.schedule(new WorldTask() {
    				int stage;
    				Patches patch = Patches.forId(objectId);
    				
    				@Override
    				public void run() {
    					if (stage == 0) {
    						player.lock();
    						player.setNextAnimation(RAKE_ANIMATION);
    						player.getPackets().sendConfigByFile(patch.getConfigId(), 1);
    						player.getInventory().addItem(WEEDS, 1);
    					} else if (stage == 3) {
    						player.setNextAnimation(RAKE_ANIMATION);
    						player.getPackets().sendConfigByFile(patch.getConfigId(), 2);
    						player.getInventory().addItem(WEEDS, 1);
    					} else if (stage == 6) {
    						player.setNextAnimation(RAKE_ANIMATION);
    						player.getPackets().sendConfigByFile(patch.getConfigId(), 3);
    						player.getInventory().addItem(WEEDS, 1);
    						player.unlock();
    						
    						//Falador
    						
    						if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    							player.setFaladorFlowerPatchRaked(true);
    						}
    						if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    							player.setFaladorHerbPatchRaked(true);
    						}
    						if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    							player.setFaladorNorthAllotmentPatchRaked(true);
    						}
    						if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    							player.setFaladorSouthAllotmentPatchRaked(true);
    						}
    						
    						//Catherby
    						
    						if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    							player.setCatherbyFlowerPatchRaked(true);
    						}
    						if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    							player.setCatherbyHerbPatchRaked(true);
    						}
    						if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    							player.setCatherbyNorthAllotmentPatchRaked(true);
    						}
    						if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    							player.setCatherbySouthAllotmentPatchRaked(true);
    						}
    						
    						//Ardougne
    						
    						if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    							player.setArdougneFlowerPatchRaked(true);
    						}
    						if (objectId == Patches.ARDY_HERB.getObjectId()) {
    							player.setArdougneHerbPatchRaked(true);
    						}
    						if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    							player.setArdougneNorthAllotmentPatchRaked(true);
    						}
    						if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    							player.setArdougneSouthAllotmentPatchRaked(true);
    						}
    						
    						//Canifis
    						
    						if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    							player.setCanifisFlowerPatchRaked(true);
    						}
    						if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    							player.setCanifisHerbPatchRaked(true);
    						}
    						if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    							player.setCanifisNorthAllotmentPatchRaked(true);
    						}
    						if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    							player.setCanifisSouthAllotmentPatchRaked(true);
    						}
    						
    						//Lumbridge
    						
    						if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    							player.setLummyTreePatchRaked(true);
    						}
    						
    						//Varrock
    						
    						if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    							player.setVarrockTreePatchRaked(true);
    						}
    						
    						//Falador
    						
    						if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    							player.setFaladorTreePatchRaked(true);
    						}
    						
    						//Taverly
    						
    						if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    							player.setTaverlyTreePatchRaked(true);
    						}
    						
    					}
    					stage++;
    				}
    			}, 0, 1);
    		} else {
    			player.getPackets().sendGameMessage("You need a rake to rake these weeds.");
    			return;
    		}
    	}
    	
    	/**
    	 * Plants the tree sapling in the selected patch
    	 * @param player
    	 * @param sapling
    	 * @param objectId
    	 */
    	
    	public static void plantTreeSapling(final Player player, final int sapling, final int objectId) {
    		final Trees tree = Trees.forId(sapling);
    		final Patches patch = Patches.forId(objectId);
    		if (player.getSkills().getLevelForXp(Skills.FARMING) < tree.getReq()) {
    			player.getPackets().sendGameMessage("You need a Farming level of " + tree.getReq() + " to plant this.");
    			return;
    		}
    		if (player.getInventory().containsItem(SEED_DIBBER, 1)) {
    			if (Trees.trees.containsKey(sapling)) {
    				WorldTasksManager.schedule(new WorldTask() {
    					int stage;
    					
    					@Override
    					public void run() {
    						if (stage == 0) {
    							player.lock();
    							player.setNextAnimation(PLANT_ANIMATION);
    							if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    								player.setLummyTreePatch(tree.getSapling());
    							}
    							if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    								player.setVarrockTreePatch(tree.getSapling());
    							}
    							if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    								player.setFaladorTreePatch(tree.getSapling());
    							}
    							if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    								player.setTaverlyTreePatch(tree.getSapling());
    							}
    							player.getSkills().addXp(Skills.FARMING, tree.getPlantXp());
    							player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId());
    							player.getInventory().deleteItem(tree.getSapling(), 1);
    							player.unlock();
    							} else if (stage == 6 && tree.getStages() >= 1) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 1);
    							} else if (stage == 12 && tree.getStages() >= 2) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 2);
    							} else if (stage == 18 && tree.getStages() >= 3) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 3);
    							} else if (stage == 24 && tree.getStages() >= 4) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 4);
    							} else if (stage == 30 && tree.getStages() >= 5) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 5);
    							} else if (stage == 36 && tree.getStages() >= 6) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 6);
    							} else if (stage == 42 && tree.getStages() >= 7) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 7);
    							} else if (stage == 48 && tree.getStages() >= 8) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 8);
    							} else if (stage == 54 && tree.getStages() >= 9) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 9);
    							} else if (stage == 60 && tree.getStages() >= 10) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 10);
    							} else if (stage == 66 && tree.getStages() >= 11) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 11);
    							} else if (stage == 72 && tree.getStages() >= 12) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 12);
    							} else if (stage == 78 && tree.getStages() >= 13) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 13);
    							} else if (stage == 84 && tree.getStages() >= 14) {
    								player.getPackets().sendConfigByFile(patch.getConfigId(), tree.getConfigId() + 14);
    							}
    							stage++;
    						}
    					}, 0, 1);
    				} else {
    					player.getPackets().sendGameMessage("You can't plant that here.");
    				return;
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a seed dibber to plant this sapling.");
    		return;
    		}
    	}
    	
    	/**
    	 * Plants the herb seed into the selected patch
    	 * @param player
    	 * @param seed
    	 * @param objectId
    	 */
    	
    	public static void plantHerbSeed(final Player player, final int seed, final int objectId) {
    		final Herbs herb = Herbs.forId(seed);
    		final Patches patch = Patches.forId(objectId);
    		if (player.getSkills().getLevelForXp(Skills.FARMING) < herb.getReq()) {
    			player.getPackets().sendGameMessage("You need a Farming level of " + herb.getReq() + " to plant this.");
    			return;
    		}
    		if (player.getInventory().containsItem(SEED_DIBBER, 1)) {
    			if (Herbs.herbs.containsKey(seed)) {
    				WorldTasksManager.schedule(new WorldTask() {
    					int stage;
    					
    					@Override
    					public void run() {
    						if (stage == 0) {
    							player.lock();
    							player.setNextAnimation(PLANT_ANIMATION);
    							if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    								player.setFaladorHerbPatch(herb.getSeed());
    							}
    							if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    								player.setCatherbyHerbPatch(herb.getSeed());
    							}
    							if (objectId == Patches.ARDY_HERB.getObjectId()) {
    								player.setArdougneHerbPatch(herb.getSeed());
    							}
    							if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    								player.setCanifisHerbPatch(herb.getSeed());
    							}
    							player.getSkills().addXp(Skills.FARMING, herb.getPlantXp());
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId());
    							player.getInventory().deleteItem(herb.getSeed(), 1);
    							player.unlock();
    						} else if (stage == 6) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId() + 1);
    						} else if (stage == 12) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId() + 2);
    						} else if (stage == 18) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId() + 3);
    						} else if (stage == 24) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), herb.getConfigId() + 4);
    						}
    						stage++;
    					}
    				}, 0, 1);
    			} else {
    				player.getPackets().sendGameMessage("You can't plant that here.");
    				return;
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a seed dibber to plant these seeds.");
    			return;
    		}
    	}
    	
    	/**
    	 * Plants the seed into the selected patch
    	 * @param player
    	 * @param seed
    	 * @param objectId
    	 */
    	
    	public static void plantAllotmentSeed(final Player player, final int seed, final int objectId) {
    		final Allotments allotment = Allotments.forId(seed);
    		final Patches patch = Patches.forId(objectId);
    		if (player.getSkills().getLevelForXp(Skills.FARMING) < allotment.getReq()) {
    			player.getPackets().sendGameMessage("You need a Farming level of " + allotment.getReq() + " to plant this.");
    			return;
    		}
    		if (player.getInventory().containsItem(SEED_DIBBER, 1) && player.getInventory().containsItem(allotment.getSeed(), 3)) {
    			if (Allotments.allotments.containsKey(seed)) {
    				WorldTasksManager.schedule(new WorldTask() {
    					int stage;
    					
    					@Override
    					public void run() {
    						if (stage == 0) {
    							player.lock();
    							player.setNextAnimation(PLANT_ANIMATION);
    							if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    								player.setFaladorNorthAllotmentPatch(allotment.getSeed());
    							} else if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    								player.setFaladorSouthAllotmentPatch(allotment.getSeed());
    							}
    							if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    								player.setCatherbyNorthAllotmentPatch(allotment.getSeed());
    							} else if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    								player.setCatherbySouthAllotmentPatch(allotment.getSeed());
    							}
    							if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    								player.setArdougneNorthAllotmentPatch(allotment.getSeed());
    							} else if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    								player.setArdougneSouthAllotmentPatch(allotment.getSeed());
    							}
    							if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    								player.setCanifisNorthAllotmentPatch(allotment.getSeed());
    							} else if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    								player.setCanifisSouthAllotmentPatch(allotment.getSeed());
    							}
    							player.getSkills().addXp(Skills.FARMING, allotment.getPlantXp());
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId());
    							player.getInventory().deleteItem(allotment.getSeed(), 3);
    							player.unlock();
    						} else if (stage == 6 && allotment.getStages() >= 1) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 1);
    						} else if (stage == 12 && allotment.getStages() >= 2) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 2);
    						} else if (stage == 18 && allotment.getStages() >= 3) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 3);
    						} else if (stage == 24 && allotment.getStages() >= 4) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 4);
    						} else if (stage == 30 && allotment.getStages() >= 5) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 5);
    						} else if (stage == 36 && allotment.getStages() >= 6) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 6);
    						} else if (stage == 42 && allotment.getStages() >= 7) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 7);
    						} else if (stage == 48 && allotment.getStages() >= 8) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), allotment.getConfigId() + 8);
    						}
    						stage++;
    					}
    				}, 0, 1);
    			} else {
    				player.getPackets().sendGameMessage("You can't plant that here.");
    				return;
    			}
    		} else if (!player.getInventory().containsItem(SEED_DIBBER, 1)) {
    			player.getPackets().sendGameMessage("You need a seed dibber to plant these seeds.");
    			return;
    		} else if (!player.getInventory().containsItem(allotment.getSeed(), 3)) {
    			player.getPackets().sendGameMessage("You need atleast three seeds to plant.");
    			return;
    		}
    	}
    	
    	/**
    	 * Plants the flower seed into the allotment
    	 * @param player
    	 * @param seed
    	 * @param objectId
    	 */
    	
    	public static void plantFlowerSeed(final Player player, final int seed, final int objectId) {
    		final Flowers flower = Flowers.forId(seed);
    		final Patches patch = Patches.forId(objectId);
    		if (player.getSkills().getLevelForXp(Skills.FARMING) < flower.getReq()) {
    			player.getPackets().sendGameMessage("You need a Farming level of " + flower.getReq() + " to plant this.");
    			return;
    		}
    		if (player.getInventory().containsItem(SEED_DIBBER, 1)) {
    			if (Flowers.flowers.containsKey(seed)) {
    				WorldTasksManager.schedule(new WorldTask() {
    					int stage;
    					
    					@Override
    					public void run() {
    						if (stage == 0) {
    							player.lock();
    							player.setNextAnimation(PLANT_ANIMATION);
    							if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    								player.setFaladorFlowerPatch(flower.getSeed());
    							}
    							if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    								player.setCatherbyFlowerPatch(flower.getSeed());
    							}
    							if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    								player.setArdougneFlowerPatch(flower.getSeed());
    							}
    							if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    								player.setCanifisFlowerPatch(flower.getSeed());
    							}
    							player.getSkills().addXp(Skills.FARMING, flower.getPlantXp());
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId());
    							player.getInventory().deleteItem(flower.getSeed(), 1);
    							player.unlock();
    						} else if (stage == 6 && flower.getStages() >= 1) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId() + 1);
    						} else if (stage == 12 && flower.getStages() >= 2) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId() + 2);
    						} else if (stage == 18 && flower.getStages() >= 3) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId() + 3);
    						} else if (stage == 24 && flower.getStages() >= 4) {
    							player.getPackets().sendConfigByFile(patch.getConfigId(), flower.getConfigId() + 4);
    						}
    						stage++;
    					}
    				}, 0, 1);
    			} else {
    				player.getPackets().sendGameMessage("You can't plant that here.");
    				return;
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a seed dibber to plant these seeds.");
    			return;
    		}
    	}
    	
    	/**
    	 * Harvests tree saplings from tree patches
    	 * @param player
    	 * @param objectId
    	 * @param sapling
    	 */
    	
    	public static void harvestTreeSapling(final Player player, final int objectId, int sapling) {
    		final Trees tree = Trees.forId(sapling);
    		int weaponId = player.getEquipment().getWeaponId();
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You need atleast three free inventory spaces to harvest.");
    		} else if (weaponId != -1) {
    			switch (weaponId) {
    			
    			case 13661:
    				player.setNextAnimation(INFERNO_ADZE_CHOP);
    				break;
    				
    			case 6739:
    				player.setNextAnimation(DRAGON_AXE_CHOP);
    				break;
    				
    			case 1359:
    				player.setNextAnimation(RUNE_AXE_CHOP);
    				break;
    				
    			case 1357:
    				player.setNextAnimation(ADAMANT_AXE_CHOP);
    				break;
    				
    			case 1355:
    				player.setNextAnimation(MITHRIL_AXE_CHOP);
    				break;
    				
    			case 1361:
    				player.setNextAnimation(BLACK_AXE_CHOP);
    				break;
    				
    			case 1353:
    				player.setNextAnimation(STEEL_AXE_CHOP);
    				break;
    				
    			case 1349:
    				player.setNextAnimation(IRON_AXE_CHOP);
    				break;
    				
    			case 1351:
    				player.setNextAnimation(BRONZE_AXE_CHOP);
    				break;
    			}
    			int amount = 3;
    			double xp = amount * tree.getHarvestXp();
    			if (amount < 3 && player.getInventory().getFreeSlots() <= 3) {
    				player.getSkills().addXp(Skills.FARMING, xp * 3);
    				player.getInventory().addItem(tree.getProduct(), 3);
    				growWeeds(player, objectId);
    				if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setLummyTreePatch(-1);
    					player.setLummyTreePatchRaked(false);
    				}
    				if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setVarrockTreePatch(-1);
    					player.setVarrockTreePatchRaked(false);
    				}
    				if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setFaladorTreePatch(-1);
    					player.setFaladorTreePatchRaked(false);
    				}
    				if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setTaverlyTreePatch(-1);
    					player.setTaverlyTreePatchRaked(false);
    				}
    			} else if (player.getInventory().getFreeSlots() < amount) {
    				amount = player.getInventory().getFreeSlots();
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(tree.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setLummyTreePatch(-1);
    					player.setLummyTreePatchRaked(false);
    				}
    				if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setVarrockTreePatch(-1);
    					player.setVarrockTreePatchRaked(false);
    				}
    				if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setFaladorTreePatch(-1);
    					player.setFaladorTreePatchRaked(false);
    				}
    				if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setTaverlyTreePatch(-1);
    					player.setTaverlyTreePatchRaked(false);
    				}
    			} else {
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(tree.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.LUMMY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setLummyTreePatch(-1);
    					player.setLummyTreePatchRaked(false);
    				}
    				if (objectId == Patches.VARROCK_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setVarrockTreePatch(-1);
    					player.setVarrockTreePatchRaked(false);
    				}
    				if (objectId == Patches.FALADOR_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setFaladorTreePatch(-1);
    					player.setFaladorTreePatchRaked(false);
    				}
    				if (objectId == Patches.TAVERLY_TREE_PATCH.getObjectId()) {
    					growWeeds(player, objectId);
    					player.setTaverlyTreePatch(-1);
    					player.setTaverlyTreePatchRaked(false);
    				}
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a hatchet to chop down this tree.");
    			return;
    		}
    	}
    	
    	/**
    	 * Harvests the herbs from the patch.
    	 * @param player
    	 * @param objectId
    	 * @param seed
    	 */
    	
    	public static void harvestHerb(final Player player, final int objectId, int seed) {
    		final Herbs herb = Herbs.forId(seed);
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You need atleast three free inventory spaces to harvest.");
    		} else if (player.getInventory().containsItem(SECATEURS, 1)) {
    			int amount = 3;
    			double xp = amount * herb.getHarvestXp();
    			if (amount < 3 && player.getInventory().getFreeSlots() <= 3) {
    				player.setNextAnimation(PICK_HERB);
    				player.getSkills().addXp(Skills.FARMING, xp * 3);
    				player.getInventory().addItem(herb.getProduct(), 3);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    					player.setFaladorHerbPatch(-1);
    					player.setFaladorHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    					player.setCatherbyHerbPatch(-1);
    					player.setCatherbyHerbPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_HERB.getObjectId()) {
    					player.setArdougneHerbPatch(-1);
    					player.setArdougneHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    					player.setCanifisHerbPatch(-1);
    					player.setCanifisHerbPatchRaked(false);
    				}
    			} else if (player.getInventory().getFreeSlots() < amount) {
    				amount = player.getInventory().getFreeSlots();
    				player.setNextAnimation(PICK_HERB);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(herb.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    					player.setFaladorHerbPatch(-1);
    					player.setFaladorHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    					player.setCatherbyHerbPatch(-1);
    					player.setCatherbyHerbPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_HERB.getObjectId()) {
    					player.setArdougneHerbPatch(-1);
    					player.setArdougneHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    					player.setCanifisHerbPatch(-1);
    					player.setCanifisHerbPatchRaked(false);
    				}
    			} else {
    				player.setNextAnimation(PICK_HERB);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(herb.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_HERB.getObjectId()) {
    					player.setFaladorHerbPatch(-1);
    					player.setFaladorHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_HERB.getObjectId()) {
    					player.setCatherbyHerbPatch(-1);
    					player.setCatherbyHerbPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_HERB.getObjectId()) {
    					player.setArdougneHerbPatch(-1);
    					player.setArdougneHerbPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_HERB.getObjectId()) {
    					player.setCanifisHerbPatch(-1);
    					player.setCanifisHerbPatchRaked(false);
    				}
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need secateurs to harvest these herbs.");
    			return;
    		}
    	}
    	
    	/**
    	 * Harvests the seed from allotments
    	 * @param player
    	 * @param objectId
    	 * @param seed
    	 */
    	
    	public static void harvestAllotment(final Player player, final int objectId, int seed) {
    		final Allotments allotment = Allotments.forId(seed);
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You need atleast three free inventory spaces to harvest.");
    		} else if (player.getInventory().containsItem(SPADE, 1)) {
    			int amount = 3;
    			double xp = amount * allotment.getHarvestXp();
    			if (amount < 3 && player.getInventory().getFreeSlots() <= 3) {
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp * 3);
    				player.getInventory().addItem(allotment.getProduct(), 3);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorNorthAllotmentPatch(-1);
    					player.setFaladorNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorSouthAllotmentPatch(-1);
    					player.setFaladorSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbyNorthAllotmentPatch(-1);
    					player.setCatherbyNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbySouthAllotmentPatch(-1);
    					player.setCatherbySouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneNorthAllotmentPatch(-1);
    					player.setArdougneNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneSouthAllotmentPatch(-1);
    					player.setArdougneSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisNorthAllotmentPatch(-1);
    					player.setCanifisNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisSouthAllotmentPatch(-1);
    					player.setCanifisSouthAllotmentPatchRaked(false);
    				}
    			} else if (player.getInventory().getFreeSlots() < amount) {
    				amount = player.getInventory().getFreeSlots();
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(allotment.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorNorthAllotmentPatch(-1);
    					player.setFaladorNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorSouthAllotmentPatch(-1);
    					player.setFaladorSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbyNorthAllotmentPatch(-1);
    					player.setCatherbyNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbySouthAllotmentPatch(-1);
    					player.setCatherbySouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneNorthAllotmentPatch(-1);
    					player.setArdougneNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneSouthAllotmentPatch(-1);
    					player.setArdougneSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisNorthAllotmentPatch(-1);
    					player.setCanifisNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisSouthAllotmentPatch(-1);
    					player.setCanifisSouthAllotmentPatchRaked(false);
    				}
    			} else {
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(allotment.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_NORTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorNorthAllotmentPatch(-1);
    					player.setFaladorNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.FALADOR_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setFaladorSouthAllotmentPatch(-1);
    					player.setFaladorSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbyNorthAllotmentPatch(-1);
    					player.setCatherbyNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CATHERBY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCatherbySouthAllotmentPatch(-1);
    					player.setCatherbySouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_NORTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneNorthAllotmentPatch(-1);
    					player.setArdougneNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.ARDY_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setArdougneSouthAllotmentPatch(-1);
    					player.setArdougneSouthAllotmentPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_NORTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisNorthAllotmentPatch(-1);
    					player.setCanifisNorthAllotmentPatchRaked(false);
    				} else if (objectId == Patches.CANIFIS_SOUTH_ALLOTMENT.getObjectId()) {
    					player.setCanifisSouthAllotmentPatch(-1);
    					player.setCanifisSouthAllotmentPatchRaked(false);
    				}
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a spade to harvest this allotment.");
    			return;
    		}
    	}
    	
    	/**
    	 * Harvests flowers from the flower allotment
    	 * @param player
    	 * @param objectId
    	 * @param seed
    	 */
    	
    	public static void harvestFlower(final Player player, final int objectId, int seed) {
    		final Flowers flower = Flowers.forId(seed);
    		if (player.getInventory().getFreeSlots() < 3) {
    			player.getPackets().sendGameMessage("You need atleast three free inventory spaces to harvest.");
    		} else if (player.getInventory().containsItem(SPADE, 1)) {
    			int amount = 3;
    			double xp = amount * flower.getHarvestXp();
    			if (player.getInventory().getFreeSlots() < amount) {
    				amount = player.getInventory().getFreeSlots();
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp * 3);
    				player.getInventory().addItem(flower.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    					player.setFaladorFlowerPatch(-1);
    					player.setFaladorFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    					player.setCatherbyFlowerPatch(-1);
    					player.setCatherbyFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    					player.setArdougneFlowerPatch(-1);
    					player.setArdougneFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    					player.setCanifisFlowerPatch(-1);
    					player.setCanifisFlowerPatchRaked(false);
    				}
    			} else {
    				player.setNextAnimation(PICK_ALLOTMENT);
    				player.getSkills().addXp(Skills.FARMING, xp);
    				player.getInventory().addItem(flower.getProduct(), amount);
    				growWeeds(player, objectId);
    				if (objectId == Patches.FALADOR_FLOWER.getObjectId()) {
    					player.setFaladorFlowerPatch(-1);
    					player.setFaladorFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.CATHERBY_FLOWER.getObjectId()) {
    					player.setCatherbyFlowerPatch(-1);
    					player.setCatherbyFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.ARDY_FLOWER.getObjectId()) {
    					player.setArdougneFlowerPatch(-1);
    					player.setArdougneFlowerPatchRaked(false);
    				}
    				if (objectId == Patches.CANIFIS_FLOWER.getObjectId()) {
    					player.setCanifisFlowerPatch(-1);
    					player.setCanifisFlowerPatchRaked(false);
    				}
    			}
    		} else {
    			player.getPackets().sendGameMessage("You need a spade to harvest this flower.");
    			return;
    		}
    	}
    
    	public void setPlayer(Player player) {
    		this.player = player;
    	}
    	
    	public Player getPlayer() {
    		return player;
    	}
    	
    }
    Code:
    	/**
    	 * Farming
    	 */
    	
    	//Falador
    	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;
    	
    	//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;
    Code:
    				/**
    				 * Farming
    				 */
    					
    				//Falador
    				} else if (Herbs.herbs.containsKey(itemId) && player.getFaladorHerbPatchRaked()) {
    					Farming.plantHerbSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getFaladorNorthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getFaladorSouthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Flowers.flowers.containsKey(itemId) && player.getFaladorFlowerPatchRaked()) {
    					Farming.plantFlowerSeed(player, itemId, object.getId());
    					
    				//Catherby
    				} else if (Herbs.herbs.containsKey(itemId) && player.getCatherbyHerbPatchRaked()) {
    					Farming.plantHerbSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getCatherbyNorthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getCatherbySouthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Flowers.flowers.containsKey(itemId) && player.getCatherbyFlowerPatchRaked()) {
    					Farming.plantFlowerSeed(player, itemId, object.getId());
    					
    				//Ardougne	
    				} else if (Herbs.herbs.containsKey(itemId) && player.getArdougneHerbPatchRaked()) {
    					Farming.plantHerbSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getArdougneNorthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getArdougneSouthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Flowers.flowers.containsKey(itemId) && player.getArdougneFlowerPatchRaked()) {
    					Farming.plantFlowerSeed(player, itemId, object.getId());
    					
    				//Canifis
    				} else if (Herbs.herbs.containsKey(itemId) && player.getCanifisHerbPatchRaked()) {
    					Farming.plantHerbSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getCanifisNorthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Allotments.allotments.containsKey(itemId) && player.getCanifisSouthAllotmentPatchRaked()) {
    					Farming.plantAllotmentSeed(player, itemId, object.getId());
    				} else if (Flowers.flowers.containsKey(itemId) && player.getCanifisFlowerPatchRaked()) {
    					Farming.plantFlowerSeed(player, itemId, object.getId());
    					
    				//Lumbridge
    				} else if (Trees.trees.containsKey(itemId) && player.getLummyTreePatchRaked()) {
    					Farming.plantTreeSapling(player, itemId, object.getId());
    					
    				//Varrock
    				} else if (Trees.trees.containsKey(itemId) && player.getVarrockTreePatchRaked()) {
    					Farming.plantTreeSapling(player, itemId, object.getId());
    					
    				//Falador
    				} else if (Trees.trees.containsKey(itemId) && player.getFaladorTreePatchRaked()) {
    					Farming.plantTreeSapling(player, itemId, object.getId());
    					
    				//Taverly
    				} else if (Trees.trees.containsKey(itemId) && player.getTaverlyTreePatchRaked()) {
    					Farming.plantTreeSapling(player, itemId, object.getId());
    Code:
    				/**
    				 * Falador
    				 */
    				
    				//Herb
    				if (id == 8150 && !player.getFaladorHerbPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Flower
    				if (id == 7847 && !player.getFaladorFlowerPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//North
    				if (id == 8550 && !player.getFaladorNorthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//South
    				if (id == 8551 && !player.getFaladorSouthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Herb
    				if (id == 8150 && player.getFaladorHerbPatchRaked()) {
    					Farming.harvestHerb(player, id, player.getFaladorHerbPatch());
    				}
    				
    				//North
    				if (id == 8550 && player.getFaladorNorthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getFaladorNorthAllotmentPatch());
    				}
    				
    				//South
    				if (id == 8551 && player.getFaladorSouthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getFaladorSouthAllotmentPatch());
    				}
    				
    				//Flower
    				if (id == 7847 && player.getFaladorFlowerPatchRaked()) {
    					Farming.harvestFlower(player, id, player.getFaladorFlowerPatch());
    				}
    				
    				/**
    				 * Catherby
    				 */
    				
    				//Herb
    				if (id == 8151 && !player.getCatherbyHerbPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Flower
    				if (id == 7848 && !player.getCatherbyFlowerPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//North
    				if (id == 8552 && !player.getCatherbyNorthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//South
    				if (id == 8553 && !player.getCatherbySouthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Herb
    				if (id == 8151 && player.getCatherbyHerbPatchRaked()) {
    					Farming.harvestHerb(player, id, player.getCatherbyHerbPatch());
    				}
    				
    				//North
    				if (id == 8552 && player.getCatherbyNorthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getCatherbyNorthAllotmentPatch());
    				}
    				
    				//South
    				if (id == 8553 && player.getCatherbySouthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getCatherbySouthAllotmentPatch());
    				}
    				
    				//Flower
    				if (id == 7848 && player.getCatherbyFlowerPatchRaked()) {
    					Farming.harvestFlower(player, id, player.getCatherbyFlowerPatch());
    				}
    				
    				/**
    				 * Ardougne
    				 */
    				
    				//Herb
    				if (id == 8152 && !player.getArdougneHerbPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Flower
    				if (id == 7849 && !player.getArdougneFlowerPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//North
    				if (id == 8554 && !player.getArdougneNorthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//South
    				if (id == 8555 && !player.getArdougneSouthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Herb
    				if (id == 8152 && player.getArdougneHerbPatchRaked()) {
    					Farming.harvestHerb(player, id, player.getArdougneHerbPatch());
    				}
    				
    				//North
    				if (id == 8554 && player.getArdougneNorthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getArdougneNorthAllotmentPatch());
    				}
    				
    				//South
    				if (id == 8555 && player.getArdougneSouthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getArdougneSouthAllotmentPatch());
    				}
    				
    				//Flower
    				if (id == 7849 && player.getArdougneFlowerPatchRaked()) {
    					Farming.harvestFlower(player, id, player.getArdougneFlowerPatch());
    				}
    				
    				/**
    				 * Canifis
    				 */
    				
    				//Herb
    				if (id == 8153 && !player.getCanifisHerbPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Flower
    				if (id == 7850 && !player.getCanifisFlowerPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//North
    				if (id == 8556 && !player.getCanifisNorthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//South
    				if (id == 8557 && !player.getCanifisSouthAllotmentPatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Herb
    				if (id == 8153 && player.getCanifisHerbPatchRaked()) {
    					Farming.harvestHerb(player, id, player.getCanifisHerbPatch());
    				}
    				
    				//North
    				if (id == 8556 && player.getCanifisNorthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getCanifisNorthAllotmentPatch());
    				}
    				
    				//South
    				if (id == 8557 && player.getCanifisSouthAllotmentPatchRaked()) {
    					Farming.harvestAllotment(player, id, player.getCanifisSouthAllotmentPatch());
    				}
    				
    				//Flower
    				if (id == 7850 && player.getCanifisFlowerPatchRaked()) {
    					Farming.harvestFlower(player, id, player.getCanifisFlowerPatch());
    				}
    				
    				/**
    				 * Lumbridge
    				 */
    				
    				//Tree Patch
    				if (id == 8391 && !player.getLummyTreePatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Tree Patch
    				if (id == 8391 && player.getLummyTreePatchRaked()) {
    					Farming.harvestTreeSapling(player, id, player.getLummyTreePatch());
    				}
    				
    				/**
    				 * Varrock
    				 */
    				
    				//Tree Patch
    				if (id == 8390 && !player.getVarrockTreePatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Tree Patch
    				if (id == 8390 && player.getVarrockTreePatchRaked()) {
    					Farming.harvestTreeSapling(player, id, player.getVarrockTreePatch());
    				}
    				
    				/**
    				 * Falador
    				 */
    				
    				//Tree Patch
    				if (id == 8389 && !player.getFaladorTreePatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Tree Patch
    				if (id == 8389 && player.getFaladorTreePatchRaked()) {
    					Farming.harvestTreeSapling(player, id, player.getFaladorTreePatch());
    				}
    				
    				/**
    				 * Taverly
    				 */
    				
    				//Tree Patch
    				if (id == 8388 && !player.getTaverlyTreePatchRaked()) {
    					Farming.startRake(player, id);
    				}
    				
    				//Tree Patch
    				if (id == 8388 && player.getTaverlyTreePatchRaked()) {
    					Farming.harvestTreeSapling(player, id, player.getTaverlyTreePatch());
    				}
    Code:
    	/**
    	 * 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;
    	}
    Link for PrivatePaste

    [Only registered and activated users can see links. ]
    i have to be that one person that does this, just in case...


    Reply With Quote  
     

  12. Thankful users:


  13. #9  
    Donator
    BongoProd's Avatar
    Join Date
    Oct 2012
    Posts
    812
    Thanks given
    1
    Thanks received
    68
    Rep Power
    0
    nice
    Reply With Quote  
     

  14. #10  
    Registered Member
    Join Date
    Jun 2013
    Posts
    17
    Thanks given
    0
    Thanks received
    2
    Rep Power
    11
    [email protected] King J Scape, Keep packing on the leechers
    751 EoC Server Programmer
    Reply With Quote  
     

Page 1 of 6 123 ... LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 110
    Last Post: 04-27-2016, 01:20 AM
  2. 718 Farming
    By BongoProd in forum Help
    Replies: 7
    Last Post: 01-21-2013, 11:53 PM
  3. Spawnscape 718 Finally Released!
    By Zarfots in forum Advertise
    Replies: 26
    Last Post: 01-03-2013, 10:08 PM
  4. Replies: 53
    Last Post: 12-29-2012, 07:57 PM
  5. 718 Farming Help
    By twayneguitar in forum Help
    Replies: 2
    Last Post: 11-03-2012, 10:46 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •