Jump to content

My First Project--> A Simple Lobster fisher


Anaesthetic

Recommended Posts

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 by Turd Ferguson
Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

  • 4 weeks later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...