dynamicninja Posted October 6, 2018 Share Posted October 6, 2018 This is my first major script and I feel like I'm being a little ambitious but I would really like some feedback on if there are some things that I should/shouldn't be doing. This is my first time using java, and a first project other than tutorials using object orientation. As a side, just want to say thanks Explv. Your tutorial was an awesome introduction FishingData.java FishingHandle.java Handler.java Main.java Banking.java Quote Link to comment Share on other sites More sharing options...
liverare Posted October 7, 2018 Share Posted October 7, 2018 (edited) You can do quite a lot more with enumerators in Java than that: import org.osbot.rs07.api.map.Area; public enum FishingData2 { SHRIMP(new Area(new int[][] { { 3087, 3226 }, { 3085, 3228 }, { 3085, 3231 }, { 3085, 3232 }, { 3083, 3235 }, { 3085, 3235 }, { 3088, 3232 }, { 3089, 3227 } }), new String[] {"Small fishing net"}, new String[] {"Net", "Bait"}), SARDINE(new Area(new int[][]{ { 3087, 3226 }, { 3085, 3228 }, { 3085, 3231 }, { 3085, 3232 }, { 3083, 3235 }, { 3085, 3235 }, { 3088, 3232 }, { 3089, 3227 } }), new String[] {"Fishing rod", "Fishing bait"}, new String[] {"Bait", "Net"}), ; private final Area fishingZone; private final String[] equipment; private final String[] npcOptions; private FishingData2(Area fishingZone, String[] equipment, String[] npcOptions) { this.fishingZone = fishingZone; this.equipment = equipment; this.npcOptions = npcOptions; } public Area getFishingZone() { return fishingZone; } public String[] getEquipment() { return equipment; } public String[] getNpcOptions() { return npcOptions; } } Then you can do: FishingData2.SARDINE.getEquipment() Also, perhaps read my most recent tutorial. It might help! Edited October 7, 2018 by liverare Quote Link to comment Share on other sites More sharing options...
dynamicninja Posted October 7, 2018 Author Share Posted October 7, 2018 Ah thank you! Didn't know you could do that. I might have to give it a shot! Had a quick read of your tutorial, looks great! I'll have a more in depth read shortly. Thanks for taking the time to have a look at my script, I appreciate it! Quote Link to comment Share on other sites More sharing options...