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.

Jack's IP Checker Script

Featured Replies

This is a very simple script that checks your Ip address. Try it out biggrin.png

 

Edit: Updated Script! New Link! I also released the source below.

 

http://up.ht/1q2mtLB

 

 

0fb7e5d9ae85766081414ff63e0b897b.png

import java.awt.*;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;

@ScriptManifest(author = "Jack", name = "Jack's IP Checker", version = 1.1, info = "Checks your IP", logo = "")
public class IPChecker extends Script {

	String ip = "";
	boolean error = false;
	boolean haveIp = false;

	private final Font myFont = new Font("Arial", 1, 16);

	public void onStart() {
		try {
			BufferedReader in = new BufferedReader(new InputStreamReader(new URL("http://jackhallam.net/checkip.php").openStream()));
			ip = in.readLine().split("<")[0];
			in.close();
		} 
		catch (Exception e) {
			error = true;
		}
		if(ip.equals(""))
			error = true;
		haveIp = true;
	}

	public int onLoop() throws InterruptedException{
		return 1000;
	}

	public void onPaint(Graphics2D g){
		if(haveIp)
			if(error)
				drawStringWithStroke(g, "Error Finding IP Address", 10, 120, myFont);
			else
				drawStringWithStroke(g, "My IP Is: " + ip, 10, 120, myFont);
	}

	public void drawStringWithStroke(Graphics2D g, String s, int x, int y, Font f){
		if(f!=null)
			g.setFont(f);
		g.setColor(Color.BLACK);
		g.drawString(s, x+1, y);
		g.drawString(s, x-1, y);
		g.drawString(s, x, y+1);
		g.drawString(s, x, y-1);
		g.setColor(Color.WHITE);
		g.drawString(s, x, y);
	}
}

Edited by Jack

Why would you need that?

to check if your proxy is working orsomething like that. ^^

JUST WHAT I NEEDED wub.png

 

I believe it only shows your local IP, so not the IP your internet provider gives you

Edited by Fantabulous

Could you publish the source or do you want to keep it private? I have a version for OSB1, will be interesting to see the differences;

Could you publish the source or do you want to keep it private? I have a version for OSB1, will be interesting to see the differences;

Decompile it..

It's not particularly hard anyway, all he is likely doing *dont quote me on this as he may be using a different method* is reading off a basic web page which just provides the ip, I've seen it before but can't remember the link..

Then he simply saves it in a variable and calls it in his paint to be displayed on the script

  • Author

Decompile it..

It's not particularly hard anyway, all he is likely doing *dont quote me on this as he may be using a different method* is reading off a basic web page which just provides the ip, I've seen it before but can't remember the link..

Then he simply saves it in a variable and calls it in his paint to be displayed on the script

No but that would also work :P

  • Author

This doesn't show if a proxy is working.

Like someone said, it just shows your local IP.

Ok ill fix :) 

JUST WHAT I NEEDED wub.png

 

I believe it only shows your local IP, so not the IP your internet provider gives you

Ok im fixing now

  • 3 weeks 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.