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.

Minimap help

Featured Replies

Hello, i need help.
Im trying to paint object position on minimap, but with no luck. Can someone post a sample code of it?
Thanks.

I think I used GraphicUtilities for this, Im about to eat I will check when I get back. 

 

Look in there and see if there is something useful.

  • Author

Nevermind. Found it myself. Thanks for the response.

Edited by arvy2kas

Highlighting a tile ingame:

public void drawTileIngame(Script script, Graphics g, Position p, Color positionColor) {
  g.setColor(positionColor);
  Polygon PosHighlight = p.getPolygon(script.getBot());
  g.drawPolygon(PosHighlight);
 }

Marking tile on minimap: (this code is for marking an entity on the minimap)

public void drawMinimapPosition(Script script, Graphics g,
			Entity entity, Color positionColor, Color textColor, boolean fill) {
		if (entity != null && entity.exists()) {
			short[] minimapP = GraphicUtilities.getMinimapScreenCoordinate(
					script.getBot(), entity.getX(), entity.getY());
			if (minimapP[0] > 0) {
				g.setColor(positionColor);
				if (fill) 
					g.fillRect(minimapP[0] - 2, minimapP[1] - 2, 4, 4);
				 else 
					g.drawRect(minimapP[0] - 2, minimapP[1] - 2, 4, 4);
				
				g.setColor(textColor);
				g.drawString(entity.getName(), minimapP[0] - 4, minimapP[1] - 4);
			}
		}
	}

Marking a position: (modded of the above to remove the unneeded stuff)

public static void drawMinimapPosition(Script script, Graphics g,
			Position p, Color positionColor, Color textColor, boolean fill) {
		if (p != null) {
			short[] minimapP = GraphicUtilities.getMinimapScreenCoordinate(
					script.getBot(), entity.getX(), entity.getY());
			if (minimapP[0] > 0) {
				g.setColor(positionColor);
				if (fill) 
					g.fillRect(minimapP[0] - 2, minimapP[1] - 2, 4, 4);
				 else 
					g.drawRect(minimapP[0] - 2, minimapP[1] - 2, 4, 4);
				g.setColor(textColor);
			}
		}
	}

Nevermind. Found it myself. Thanks for the response.

Use minimap destination and use the rec method in that class

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.