Jack Posted June 22, 2014 Share Posted June 22, 2014 (edited) 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, 2014 by Jack 4 Quote Link to comment Share on other sites More sharing options...
thepecher Posted June 22, 2014 Share Posted June 22, 2014 Why would you need that? Quote Link to comment Share on other sites More sharing options...
Rick Posted June 22, 2014 Share Posted June 22, 2014 Why would you need that? to check if your proxy is working orsomething like that. ^^ Quote Link to comment Share on other sites More sharing options...
Fantabulous Posted June 22, 2014 Share Posted June 22, 2014 (edited) JUST WHAT I NEEDED I believe it only shows your local IP, so not the IP your internet provider gives you Edited June 22, 2014 by Fantabulous Quote Link to comment Share on other sites More sharing options...
Trustmybet Posted June 22, 2014 Share Posted June 22, 2014 This is good so now I know whether or not if the proxy is enabled correctly. Quote Link to comment Share on other sites More sharing options...
ILikeTrains Posted June 22, 2014 Share Posted June 22, 2014 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; Quote Link to comment Share on other sites More sharing options...
Bears Posted June 22, 2014 Share Posted June 22, 2014 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 Quote Link to comment Share on other sites More sharing options...
Jack Posted June 22, 2014 Author Share Posted June 22, 2014 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 Quote Link to comment Share on other sites More sharing options...
Arctic Posted June 23, 2014 Share Posted June 23, 2014 This doesn't show if a proxy is working. Like someone said, it just shows your local IP. 1 Quote Link to comment Share on other sites More sharing options...
Jack Posted June 23, 2014 Author Share Posted June 23, 2014 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 Quote Link to comment Share on other sites More sharing options...
Volta Posted June 23, 2014 Share Posted June 23, 2014 Just use Wireshark noobs. Quote Link to comment Share on other sites More sharing options...
Realist Posted June 25, 2014 Share Posted June 25, 2014 Couldn't you google what's my ip? Quote Link to comment Share on other sites More sharing options...
Jack Posted June 25, 2014 Author Share Posted June 25, 2014 Couldn't you google what's my ip?Not inside the osbot client. 1 Quote Link to comment Share on other sites More sharing options...
Bears Posted June 25, 2014 Share Posted June 25, 2014 Not inside the osbot client.Just do what I said silly :p Quote Link to comment Share on other sites More sharing options...
ImMoney Posted July 11, 2014 Share Posted July 11, 2014 Does this one works? So you can check if your proxy works? Quote Link to comment Share on other sites More sharing options...