Jump to content

Debugging - Display player position in game


Recommended Posts

Posted

Just an quick little tool to help with making scripts. Start it, enable input in the client, walk to the spots that you need your bot to walk to, write down the position. Thats all smile.png

Download: https://www.mediafire.com/?7b7rql0yfg3de8d

 

package com.lazuli;

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

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author="lazuli", info = "", logo = "", name = "Location Logger", version = 0)
public class main extends Script {

	private int x, y;
	
	@Override
	public void onStart() {
		x = myPlayer().getX();
		y = myPlayer().getY();
	}
	
	@Override
	public int onLoop() throws InterruptedException {
		x = myPlayer().getX();
		y = myPlayer().getY();
		return 800;
	}
	
	@Override
	public void onPaint(Graphics2D g) {
		g.setColor(Color.black);
		g.fillRect(20, 60, 150, 20);
		g.setColor(Color.blue);
		g.drawString("Position: (" + x + ", " + y + ")", 25, 72);
	}
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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