Jump to content

Debugging - Display player position in game


Lazuli

Recommended Posts

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);
	}
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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