June 22, 201411 yr This is a very simple script that checks your Ip address. Try it out Edit: Updated Script! New Link! I also released the source below. http://up.ht/1q2mtLB 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 June 23, 201411 yr by Jack
June 22, 201411 yr Why would you need that? to check if your proxy is working orsomething like that. ^^
June 22, 201411 yr JUST WHAT I NEEDED I believe it only shows your local IP, so not the IP your internet provider gives you Edited June 22, 201411 yr by Fantabulous
June 22, 201411 yr 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;
June 22, 201411 yr 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
June 22, 201411 yr 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
June 23, 201411 yr This doesn't show if a proxy is working. Like someone said, it just shows your local IP.
June 23, 201411 yr 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 I believe it only shows your local IP, so not the IP your internet provider gives you Ok im fixing now
Create an account or sign in to comment