March 25, 20178 yr So for firemaking i'm sort of confused on how to format the following properly. skills.getStatic(Skill.FIREMAKING).experiencegained(); Alternatively I also need if myPlayer().animation == null checking (failing to light fire)
March 25, 20178 yr For animation use a combination of: myPlayer().isAnimating() --> returns a boolean myPlayer().getInteracting() == null or != null //not sure if u can fully use this one in a firemaking situation but i left it here anyway myPlayer().getAnimation() == 829 (829 is the eating one i think i cant remember but idk if theres one for lighting fires?) but if there is lets assume it's 999 myPlayer().getAnimation() != 999 (not equal to 999) for formatting exp gained i use this: Taken from Explv's paint tutorial thread public final String formatValue(final int v){ return (v > 1_000_000) ? String.format("%.2fm", (double) (v / 1_000_000)) : (v > 1000) ? String.format("%.1fk", (double) (v / 1000)) : v + ""; }
March 26, 20178 yr Author 14 hours ago, Saiyan said: For animation use a combination of: myPlayer().isAnimating() --> returns a boolean myPlayer().getInteracting() == null or != null //not sure if u can fully use this one in a firemaking situation but i left it here anyway myPlayer().getAnimation() == 829 (829 is the eating one i think i cant remember but idk if theres one for lighting fires?) but if there is lets assume it's 999 myPlayer().getAnimation() != 999 (not equal to 999) for formatting exp gained i use this: Taken from Explv's paint tutorial thread public final String formatValue(final int v){ return (v > 1_000_000) ? String.format("%.2fm", (double) (v / 1_000_000)) : (v > 1000) ? String.format("%.1fk", (double) (v / 1000)) : v + ""; } public static String formatIntegers(int num) { return NumberFormat.getInstance().format(num); } Mines more cleaner lol
March 26, 20178 yr 7 minutes ago, Booleans YAY said: public static String formatIntegers(int num) { return NumberFormat.getInstance().format(num); } Mines more cleaner lol Yeah but does urs replace with K if more than 1000 and less than 1m and m if greater than 1m
March 26, 20178 yr 10 minutes ago, Booleans YAY said: public static String formatIntegers(int num) { return NumberFormat.getInstance().format(num); } Mines more cleaner lol Slapping methods inside a singleton doesn't make it cleaner. Not really sure what your asking for either question. For animation checking, just have a conditional sleep until a fire is located on the position you want, that way you know your done with that location as either you or someone else has lit the fire. If you want to know if you have successfully lit the fire, just check if your firemaking experience has increased (cache before you attempt to create another) or if you have less logs in your inventory than what you had previously.