Zero Posted January 10, 2014 Share Posted January 10, 2014 (edited) This script will allow you to show what OSBot users are currently using your scripts via a website. Setup is required and you will need website hosting and a MySQL database. MySQL Create a MySQL database, write down all the connection information and then run the following query: CREATE TABLE `online` (`id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `script` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `time` int(11) NOT NULL, `ip` varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci PHP Upload the following package to your website and edit the 'include/database.php' file: http://uppit.com/8q7nlo4h998w/online.zipNote: Edit the key in the index.php file. Java Add a class to your script called: Online.javaand paste the following code in it: http://pastebin.com/raw.php?i=2j9TDdHW Note: Don't forget to edit the key and php information. Now, add the following imports to your script: import java.util.Timer; import java.util.TimerTask; Add the following at the start of your scripts class: Timer timer = new Timer(); String script = "SCRIPT NAME"; Add the following to the start of your onStart method: log(Online.add_user(client.getBot().getUsername(), script)); timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { Online.add_user(client.getBot().getUsername(), script); } }, 0, 60000); And the following to your onExit method: log(Online.remove_user(client.getBot().getUsername(), script)); timer.cancel(); Usage! $online = json_decode(file_get_contents('http://YOURSITE.COM/online/index.php'), TRUE); //show every user and the script they are using foreach($online as $user) { echo $user['username'] . " : " . $user['script']; } //show total online user count echo count($online); Note! It's 3am, i'm tired and iv probably made a few mistakes.Please just post if you notice any errors or mistakes so i can get them sorted out. Edited February 6, 2014 by duxZero 2 Link to comment Share on other sites More sharing options...
imonlyaplayer3 Posted January 10, 2014 Share Posted January 10, 2014 Sick but do i have to make a website to use this Link to comment Share on other sites More sharing options...
Zero Posted January 10, 2014 Author Share Posted January 10, 2014 (edited) Sick but do i have to make a website to use this At the moment yes. I am considering creating a website that can be used by script developers to display users using this method but without the hassle of actually creating a website themselves. Edited January 10, 2014 by duxZero Link to comment Share on other sites More sharing options...
Simon Posted January 10, 2014 Share Posted January 10, 2014 This looks really cool seeing the code, shame I don't have a clue what 95% of it means! 1 Link to comment Share on other sites More sharing options...
pitoluwa Posted January 10, 2014 Share Posted January 10, 2014 how about if client has closed randomly by itself or OS crashed? 1 Link to comment Share on other sites More sharing options...
Zero Posted January 10, 2014 Author Share Posted January 10, 2014 how about if client has closed randomly by itself or OS crashed? Whenever anyone views the online users it quickly updates the database and removes any entries that haven't been updated in 2 minutes. 1 Link to comment Share on other sites More sharing options...
pitoluwa Posted January 10, 2014 Share Posted January 10, 2014 So if you want, u can change it and control the amount of instances for one osbot user, we should talk to admins can we use it Link to comment Share on other sites More sharing options...
Pseudo Posted January 10, 2014 Share Posted January 10, 2014 Nice job. Link to comment Share on other sites More sharing options...
Zero Posted January 10, 2014 Author Share Posted January 10, 2014 So if you want, u can change it and control the amount of instances for one osbot user, we should talk to admins can we use it Sure can :P Link to comment Share on other sites More sharing options...
lolmanden Posted January 11, 2014 Share Posted January 11, 2014 This is awesome Zero! 1 Link to comment Share on other sites More sharing options...
Zero Posted January 14, 2014 Author Share Posted January 14, 2014 Any users looking to use this script but are not able to implement it, please contact me, i have a solution for you. Link to comment Share on other sites More sharing options...
Reid Posted January 21, 2014 Share Posted January 21, 2014 would be nice if u can add it show it shows the current users using a script in a paint Link to comment Share on other sites More sharing options...
Zero Posted January 21, 2014 Author Share Posted January 21, 2014 Wouldn't be hard at all. Link to comment Share on other sites More sharing options...
FrostBug Posted January 22, 2014 Share Posted January 22, 2014 Why does it log their IP address? Link to comment Share on other sites More sharing options...
west Posted January 23, 2014 Share Posted January 23, 2014 Looks good, theres free webhosting companys out there with minimum specs and shit and free domain registers like the .tk domains, but all the more thats all you need if you just wanted to use your website intentionally just to see the users using your script at that current time. If anyone wants any links to these PM me or try google Im sure you'd get a faster response. I'm sure it will be a useful revenue tool for script writers to promote there scripts by showing how many live users are using the script. Link to comment Share on other sites More sharing options...