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.

Botre AIO Woodcutting devlog

Featured Replies

Blog

Day 18

  • Thread optimizations.
  • GUI tooltips.
  • Scripts Data Frame bugfix (adding and removing script instances).

 

Day 17.75

  • Fixed a minor bug in screen painting

Also, a funny bts bug:

 

469d7296932464759c0ad51b8f497301.png

 

Day 17.25

  • Object scanners now only scan when the script is logged in.
  • Settings saving implemented.
  • Settings loading implemented.
  • Script now only paints to screen when logged in.

 

Day 17

  • Data refreshing now only refreshes when the data panel is visible.
  • Script now creates its own folder inside the OSBot directory.
  • A folder for cached images is now created inside the OSBot directory.
  • Minimap painting fancied up and optimized.
 

Day 16.25

 

Todo list for Chop & Drop release.

  • Logo.
  • Icon.
  • Image downloading and caching.
  • Save last settings.
  • Tool tips.
  • Tutorial.
  • Faq.
  • Correctly link menu items.
  • Start and exit messages.

dferf7e.png

 

Day 16

 

 * Fixed typo in GUI.
 * Chop center (used with radius) now updates when changing script settings mid-session.
 * Paint now draws chop center;
 * Script can now be started from the log in screen.
 * Skill and xp tracking now works properly when a script is started while logged out.
 
ab3c63990264c17a9d0b54a7ca7000b0.png

 

Day 15
 

20396cc2dc4554f1a9f3f76af25f0a43.gif

 
Added support to change settings while running script.
I love this feature but  it took some rewriting of the framework, but it's all good now : d
 
69a1b52e50c22e4671e1f3ca71f4657b.gif
 
Fixed Logs enum's toString() method.
 
Minor Timer bug fixes.
 
Optimized object scanning.
 
Updated project:
 
58fbab0a3ef2bbd04cb863b1b6aaf9fb.gif
 
 
Day 14.75
  • The GUI is finished.
  • The data painter is finished.
  • The logic for powerchopping and dropping is finished.

These are all subject to change ofcourse, but I'm ready to release a free prototype version of the script that will just chop and drop soon.

 
Here's what the script's core class looks like:
 

package org.bjornkrols.script.ChopAndDrop;

import java.awt.Color;
import java.awt.Graphics2D;

import org.bjornkrols.events.CutTreeEvent;
import org.bjornkrols.events.DropAllEvent;
import org.bjornkrols.events.HandleRunEvent;
import org.bjornkrols.experience.SkillTracker;
import org.bjornkrols.script.BotreScript;
import org.bjornkrols.script.ConditionalSleep;
import org.bjornkrols.woodcutting.Tree;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.input.mouse.MiniMapTileDestination;
import org.osbot.rs07.script.ScriptManifest;

/**
 * @author 		Bjorn Krols (Botre)
 * @version		1.0
 * @since		March 17, 2015
 */

@ScriptManifest(author = "Botre", info = "Chops logs and drops them.", logo = "", name = "Chop & Drop", version = 00.00)
public class ChopAndDrop extends BotreScript {
	
	private int			vRunThreshold;
	private Tree			vTreeType;
	private int			vChopRadius;
	private String		        vLogsName;
	
	private SkillTracker 		stWoodcutting;
	
	private HandleRunEvent		eHandleRun;
	private CutTreeEvent 		eCutTree;
	private DropAllEvent		eDropAllLogs;

	@Override
	public void onStart() throws InterruptedException {
		ChopAndDropGUI gui = new ChopAndDropGUI();
		new ConditionalSleep(600, 900000) {
			@Override
			public boolean condition() {
				return gui.isVisible();
			}
		};
		
		vRunThreshold = gui.getRunThreshold();
		vTreeType = gui.getTreeType();
		vChopRadius = gui.getChopRadius();
		vLogsName = vTreeType.getLogs().getName();
		
		stWoodcutting = new SkillTracker(this, Skill.WOODCUTTING);
		
		eHandleRun = new HandleRunEvent(this, vRunThreshold);
		eCutTree = new CutTreeEvent(this, vTreeType, vChopRadius);
		eDropAllLogs = new DropAllEvent(this, vLogsName);
		super.onStart();
	}
	
	@Override
	public int onLoop() throws InterruptedException {
		eHandleRun.execute();
		if (!getInventory().isFull()) eCutTree.execute();
		else eDropAllLogs.execute();
		return super.onLoop();
	}
	
	@Override
	public void onDataRefresh() {
		super.onDataRefresh();
		data.put("Current level", stWoodcutting.getCurrentLevel());
		data.put("Current experience", stWoodcutting.getCurrentExperience());
		data.put("Gained level(s)", stWoodcutting.getGainedLevels());
		data.put("Gained experience", stWoodcutting.getGainedExperience());
		data.put("Experience per hour", (int) stWoodcutting.getExperiencePerHour(runtime));
		data.put("Experience left until next level", stWoodcutting.getExperienceLeftUntilNextLevel());
	}
	
	@Override
	public void onPaint(Graphics2D g2d) {
		super.onPaint(g2d);
		g2d.setColor(Color.GREEN);
		g2d.draw(eCutTree.targets[1].getModel().getArea(eCutTree.targets[1].getGridX(), eCutTree.targets[1].getGridY(), myPlayer().getZ()));
		g2d.fill(new MiniMapTileDestination(getBot(), eCutTree.targets[1].getPosition()).getBoundingBox());
		g2d.setColor(Color.CYAN);
		g2d.draw(eCutTree.targets[2].getModel().getArea(eCutTree.targets[2].getGridX(), eCutTree.targets[2].getGridY(), myPlayer().getZ()));
		g2d.fill(new MiniMapTileDestination(getBot(), eCutTree.targets[2].getPosition()).getBoundingBox());
		g2d.setColor(Color.ORANGE);
		g2d.draw(eCutTree.targets[0].getPosition().getPolygon(getBot()));
		g2d.draw(new MiniMapTileDestination(getBot(), eCutTree.targets[0].getPosition()).getBoundingBox());
	}
	
}

 
Also fixed a small bug related to JSpinner value parsing.
Time for an extended test session smile.png
 
48238898443a75f3af6c50dde588b2cb.png
 
Day 14.5
 
Script data painter finished.
 
2697321e7eb83aa10cd331bb54296066.png
 
14e85c1ff070915360b46c25ad0217f6.png
 
Day 14.25
  • Added support for radius & free roaming.

8dc9a5f5b1f351fb583d22b62af37a8b.png

  • Started working on a frame-style "paint" to display script data. (inspired by @Valkyr)

4d525225c5bf35cd618e0fba54168fb4.png

 

Day 14
  • Nest detection and looting.
  • Abstraction of a couple of events so I can reuse them more easily in the future.
  • Added menu bar to GUI.
lootNest = new LootEvent(this, "Bird nest")

9d85cb555c964eb903356b51b0edfa7d.png

 

Day 13.25
More GUI stuff.
768897d8df067da8b75dad8b19b0e4af.png
 
Day 13
Started toying around with GUI stuff.
pPIBMRi.png
 
Day 12.5
Big day:
  • Finished framework (for now) (switched to an event/node based fw).
84246c08a51cdb5c681f9805e5704c9e.png
  • Axe enum.

d6b8397c5bc43ebb9e21040a9045a5a2.png

  • A new efficient method to detect tiles you can make a fire on (message listening wasn't very accurate). I'm still not happy with the algorithm to find the best one though.

a05595f37b4488c333244c718130c03d.png

  • Did some testing, a couple of minor bugs arose because of the switch to the new framework but other than that the script seems to perform better than ever.

a8c3160cd70284a6972849fc52775258.png

  • Added the following methods to my custom MethodProvider:
public static boolean clickMinimapDestination(Script script, Position position)
public static List<InteractableObject> getInteractables(Script script)
public static List<Position> getInteractablesPositions(Script script)

4d3f59ee1cca4aff8f2f53c8afd61636.png

 
Day 12
Started working on a new framework for more efficient scripting.
 
c39110de20d762df6aab1d284ea10293.png
 
Archive
 
 

 

Edited by Botre

  • Author

Good luck man, nice to see the runtime include 'days' 00:00:00:00, high ambitions eh? biggrin.png

 

Been there done that cool.png

O dayum botre , u back

 

gl ^_^

True.

 

 

True.

 

 

True.

You used to have the little bald cartoon kid ava? :P

  • Author

What why?

 

Constant fast tree scanning.

Really pays off when you need to switch targets quickly (when chopping low level trees for example).

Don't worry, it's a safe and cost-efficient implementation.

Edited by Botre

Constant fast tree scanning.

Really pays off when you need to switch targets quickly (when chopping low level trees for example).

Don't worry, it's a safe and cost-efficient implementation.

Spawning a separate thread for something like that is kinda stupid imo. You're trading off using extra resources for a few millisecond quicker click on the next object. Besides, since everyone's so concerned with antiban now, that would be counterproductive to click an object instantly when it takes an actual human ~250 ms for the signals to travel from the eye -> brain make decision -> finger press down on mouse assuming your reaction time is spot on.

  • Author

Spawning a separate thread for something like that is kinda stupid imo. You're trading off using extra resources for a few millisecond quicker click on the next object. Besides, since everyone's so concerned with antiban now, that would be counterproductive to click an object instantly when it takes an actual human ~250 ms for the signals to travel from the eye -> brain make decision -> finger press down on mouse assuming your reaction time is spot on.

 

It's not only about quick reaction times.

Knowing which tree or set of trees to chop next accurately and almost in real-time allows me write behavior accordingly, instead of hovering over the tree I last interacted with I can move the mouse / camera to the next target, prepare a right click, etc.... It also allows me to switch to a target B (closer to me because of movement) while walking to an initial target A.

But yeah perhaps it doesn't justify a separate thread, but it doesn't seem to hurt anything as of now, we'll see ^^

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.