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.

Simple Path Tool

Featured Replies

Lets u quickly grab position data for making paths. (Useful for dungeons, zeah, unmapped locations, etc.)

 

4a5e1c79aa2c6e06fd2123467a93b28d.png

 

EDIT: Added auto position grabbing every 7 tiles. (No more clicking the button)

import java.awt.GridLayout;
import java.awt.Toolkit;
import java.awt.datatransfer.StringSelection;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.border.EmptyBorder;

import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.script.Script;

public class PathTool {

	private Script script;
	private String newline = "\n";
	private String text;
	private Thread t;
	private Position currentPosition;

	public PathTool(Script script) {
		this.script = script;
	}

	public void open() {
		JFrame frame = new JFrame("Path Maker - " + script.getClient().getUsername());
		JButton button = new JButton("Listen");
		JButton button2 = new JButton("Copy Data");
		JTextArea output = new JTextArea(10, 1);
		JScrollPane scrollPane = new JScrollPane(output);
		output.setEditable(false);
		frame.setLocationRelativeTo(null);
		frame.setSize(300, 350);
		frame.setResizable(false);

		button.addActionListener(event -> {
	text = String.format("new Position(%d, %d, %d), ", script.myPlayer().getX(), script.myPlayer().getY(),
					script.myPlayer().getZ()) + newline;
			output.append(text + newline);
			currentPosition = script.myPlayer().getPosition();
			Thread t1 = new Thread(new Runnable() {
				public void run() {
					while (true) {
		   if (script.myPlayer().getPosition().distance(currentPosition) >= 7) {
							text = String.format("new Position(%d, %d, %d), ", script.myPlayer().getX(),
									script.myPlayer().getY(), script.myPlayer().getZ()) + newline;
							output.append(text + newline);
							currentPosition = script.myPlayer().getPosition();
						}
						try {
							Thread.sleep(500);
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
					}
				}
			});
			t1.start();
		});

		button2.addActionListener(event -> {
			String data = output.getText().replace("\n", "");
			Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(data), null);
			JOptionPane.showMessageDialog(frame, "Data copied to clipboard!");

		});

		JPanel textPanel = new JPanel();
		JPanel buttonPanel = new JPanel();
		JPanel masterPanel = new JPanel();

		textPanel.setLayout(new GridLayout(1, 1, 5, 5));
		textPanel.setBorder(BorderFactory.createTitledBorder("Data"));
		textPanel.add(scrollPane);

		buttonPanel.setLayout(new GridLayout(1, 2, 5, 5));
		buttonPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		buttonPanel.add(button);
		buttonPanel.add(button2);

		masterPanel.setLayout(new BoxLayout(masterPanel, BoxLayout.Y_AXIS));
		masterPanel.add(textPanel);
		masterPanel.add(buttonPanel);

		frame.getContentPane().add(masterPanel);
		frame.setVisible(true);

		frame.addWindowListener(new java.awt.event.WindowAdapter() {
			public void windowClosing(java.awt.event.WindowEvent e) {
				t.interrupt();
				frame.dispose();
			}
		});

	}

}

Edited by LoudPacks

  • Author

Lol y u do this? Web walking thou?

 

I needed to walk in an unmapped dungeon today lol. Im a pleb so I don't have my own and lemons doesn't have zeah, and OSBot doesn't have much besides regular maps.

Edited by LoudPacks

I needed to walk in an unmapped dungeon today lol. Im a pleb so I don't have my own and lemons doesn't have zeah, and OSBot doesn't have much besides regular maps.

Osbot Web included zeah thou

You don't have automatic position grabbing???? you have to stop, press the button and carry on to the next spot... how painful!

 

  • Author

You don't have automatic position grabbing???? you have to stop, press the button and carry on to the next spot... how painful!

 

I could have done that but I just needed a quick path through the cave. How would do that? On a timer? Comparing positions? I figured clicking the button is pretty simple.

Osbot Web included zeah thou

 

I didn't know that. I was in ape atol dungeon.

I could have done that but I just needed a quick path through the cave. How would do that? On a timer? Comparing positions? I figured clicking the button is pretty simple.

I didn't know that. I was in ape atol dungeon.

Just use distance from the last position added. So if the player is 5 tiles away from the last position added, then add another. Something like that.

Brothers, I copied your code, the results shown, how much of "x" and red wavy my scholarship did not get started, thank you guide my question

post-31821-0-38688100-1453649225_thumb.jpg

  • 3 weeks later...
  • 10 months later...

Create an account or sign in to comment

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.