Jump to content

Creviix

Member
  • Content count

    2
  • Joined

  • Last visited

About Creviix

  • Rank
    Bronze Member
  • Birthday 06/18/1995
  1. I am having a problem with compiling and it seems like the problem lays within' the AshScatter.java file but I'm not sure on how to fix it due to my lack of experience and knowledge of coding. This is what I'm getting: And this is the AshScattering.java file: package com.rs.game.player.content; import java.util.HashMap; import java.util.Map; import com.rs.cache.loaders.ItemDefinitions; import com.rs.game.Animation; import com.rs.game.Graphics; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; import com.rs.utils.Utils; public class AshScattering { public enum Ash { IMPIOUS(20264, 62, new Graphics(56)), ACCURSED(20266, 150, new Graphics(47)), INFERNAL(20268, 200, new Graphics(40)); private int id; private double experience; private Graphics graphics; private static Map < Integer, Ash > ashes = new HashMap < Integer, Ash > (); private static Ash[] values = values(); public static Ash[] valuesCached() { return values; } static { for (Ash ash: valuesCached()) { ashes.put(ash.getId(), ash); } } public static Ash forId(int id) { return ashes.get(id); } private Ash(int id, double experience, Graphics graphics) { this.id = id; this.experience = experience; this.graphics = graphics; } public int getId() { return id; } public double getExperience() { return experience; } public Graphics getGraphics() { return graphics; } } public static boolean scatter(final Player player, int slotId) { final Item item = player.getInventory().getItem(slotId); if (item == null || Ash.forId(item.getId()) == null) return false; if (player.getAshDelay() > Utils.currentTimeMillis()) return true; final Ash ash = Ash.forId(item.getId()); player.addStopDelay(4); player.setNextAnimation(new Animation(445)); player.setNextGraphics(ash.getGraphics()); WorldTasksManager.schedule(new WorldTask() { @Override public void run() { player.getInventory().deleteItem(item.getId(), 1); player.getPackets().sendGameMessage("You scatter the ashes in the wind."); player.getSkills().addXp(Skills.PRAYER, ash.getExperience()); stop(); } }, 2); return false; } } Would appreciate some clarification as to why this is happening, Thank you very much
  2. To start, excellent server! I'm not sure if you're gonna read this or not but I am having a problem with compiling and it seems like the problem lays within' the AshScatter.java file but I'm not sure on how to fix it due to my lack of experience and knowledge of coding. This is what I'm getting: And this is the AshScattering.java file: package com.rs.game.player.content; import java.util.HashMap; import java.util.Map; import com.rs.cache.loaders.ItemDefinitions; import com.rs.game.Animation; import com.rs.game.Graphics; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; import com.rs.utils.Utils; public class AshScattering { public enum Ash { IMPIOUS(20264, 62, new Graphics(56)), ACCURSED(20266, 150, new Graphics(47)), INFERNAL(20268, 200, new Graphics(40)); private int id; private double experience; private Graphics graphics; private static Map < Integer, Ash > ashes = new HashMap < Integer, Ash > (); private static Ash[] values = values(); public static Ash[] valuesCached() { return values; } static { for (Ash ash: valuesCached()) { ashes.put(ash.getId(), ash); } } public static Ash forId(int id) { return ashes.get(id); } private Ash(int id, double experience, Graphics graphics) { this.id = id; this.experience = experience; this.graphics = graphics; } public int getId() { return id; } public double getExperience() { return experience; } public Graphics getGraphics() { return graphics; } } public static boolean scatter(final Player player, int slotId) { final Item item = player.getInventory().getItem(slotId); if (item == null || Ash.forId(item.getId()) == null) return false; if (player.getAshDelay() > Utils.currentTimeMillis()) return true; final Ash ash = Ash.forId(item.getId()); player.addStopDelay(4); player.setNextAnimation(new Animation(445)); player.setNextGraphics(ash.getGraphics()); WorldTasksManager.schedule(new WorldTask() { @Override public void run() { player.getInventory().deleteItem(item.getId(), 1); player.getPackets().sendGameMessage("You scatter the ashes in the wind."); player.getSkills().addXp(Skills.PRAYER, ash.getExperience()); stop(); } }, 2); return false; } } Would appreciate some clarification as to why this is happening, Thank you very much!
×