Anaesthetic Posted October 4, 2013 Posted October 4, 2013 (edited) Hi all, this is my first project that I am working on here. It is going to be a simple lobster fisher than fish lobbies at Catherby. I am wondering if any of you experienced programmers out there would like to maybe take a look at it and give me any feedback? I have not implemented banking yet, but this is just simply the clicking on the fishing spots. Here it is, please feel free to give constructive feedback and if there are any errors, if you could point them out, that would be great. thanks, package Woodcutter;import java.awt.Graphics;import org.osbot.script.Script;import org.osbot.script.ScriptManifest;import org.osbot.script.rs2.model.Entity;import org.osbot.script.rs2.ui.Inventory;@ScriptManifest(author = "TF", info = "Fishes lobsters in the fishing guild", name = "Woodcutter", version = 0.1)public class Woodcutter extends Script{ final String FISHINGSPOT_NAME = "Fishing spot"; public void onExit(){ //code to be exectuted at the end } public void onStart(){ //code used at start } public int onLoop() throws InterruptedException{ //loops the code Inventory invent = client.getInventory(); //defines inventory and gets it Player player = client.getMyPlayer(); if(client.getInventory().isFull()){ //chop Entity fishSpot = closestObjectForName(FISHINGSPOT_NAME); if(fishSpot != null){ if(fishSpot.isVisible()) if(player.isAnimating()) fishSpot.interact("Cage"); sleep(random(700,800)); }else{ client.moveCameraToEntity(fishSpot); } } else{ //bank } return 50; } private void sleep(int i, int j) { // TODO Auto-generated method stub } public void onPaint(Graphics g){ //inports the paint }}~~TF~~ Edited October 4, 2013 by Turd Ferguson
Anaesthetic Posted October 4, 2013 Author Posted October 4, 2013 BTW the main class is called woodcutter because it was originally supposed to be a woodcutter, but I changed my mind.
Jack Posted October 4, 2013 Posted October 4, 2013 BTW the main class is called woodcutter because it was originally supposed to be a woodcutter, but I changed my mind. You must be new to java, you can change the class name at any time as long as you change the file name.
Anaesthetic Posted October 4, 2013 Author Posted October 4, 2013 BTW the main class is called woodcutter because it was originally supposed to be a woodcutter, but I changed my mind. You must be new to java, you can change the class name at any time as long as you change the file name. I am new to Java, that I right, but I do know that you can change the class name, I just haven't gotten around to it. I just wanted to clarify so that people weren't confused
Mysteryy Posted October 29, 2013 Posted October 29, 2013 Please paste your code in paste bin and post the link. This is unreadable. 1
HashPlant512 Posted October 29, 2013 Posted October 29, 2013 Please paste your code in paste bin and post the link. This is unreadable. I agree with mystery, i would love to help, but your code right now is just unbareable, i don't want to keep scrolling to the right to read 1 line of code at a time ;p Try to format it as a list * * * * *