K. Replace your userake method with this
Code:
public static void useRake(final Player player, final int configId) {
if (player.getInventory().containsItem(RAKE, 1)) {
WorldTasksManager.schedule(new WorldTask() {
int loop;
@Override
public void run() {
if (loop == 0) {
player.lock();
player.setNextAnimation(new Animation(2273));
player.getPackets().sendConfigByFile(configId, 1);
player.getInventory().addItem(WEEDS, 1);
} else if (loop == 3) {
player.setNextAnimation(new Animation(2273));
player.getPackets().sendConfigByFile(configId, 2);
player.getInventory().addItem(WEEDS, 1);
} else if (loop == 6) {
player.setNextAnimation(new Animation(2273));
player.getPackets().sendConfigByFile(configId, 3);
player.getInventory().addItem(WEEDS, 1);
player.unlock();
}
loop++;
}
}, 0, 1);
} else {
player.sm("You'll need a rake to get rid of the weeds.");
}
}
Now in ObjectHandler.java
Under Option1, add these:
Code:
//Raking - (player, configId);
else if (id == 8150) {
FarmingManager.useRake(player, 780);
}
else if (id == 7847) {
FarmingManager.useRake(player, 728);
}
else if (id == 8550) {
FarmingManager.useRake(player, 708);
}
else if (id == 8551) {
FarmingManager.useRake(player, 709);
}
//End Raking
Credits:
me - 25% for cleaning up and releasing configs.
partyhatz - Setting up the code.