Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

My First Project--> A Simple Lobster fisher

Featured Replies

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

  • Author

BTW the main class is called woodcutter because it was originally supposed to be a woodcutter, but I changed my mind.

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.

  • Author

 

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

  • 4 weeks later...

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

 

*

*

*

*

*

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.