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~~