Jump to content

Scriptation

Members
  • Posts

    25
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Scriptation

  1. its literally this... import java.awt.*; import java.text.DecimalFormat; import java.util.concurrent.TimeUnit; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(name = "KaramjaFisher", author = "Scriptation", version = 1.0, info = "Fishes & Banks", logo = "") public class Main extends Script{ public String status; private long timeBegan; private long timeRan; @Override public void onStart() { timeBegan = System.currentTimeMillis(); log("Starting!"); } @Override public void onExit() { log("Ending"); } @Override public int onLoop() throws InterruptedException { return 100; } private String ft(long duration) { String res = ""; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } @Override public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - this.timeBegan; Graphics2D gr = g; g.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF)); g.setColor(new Color(255, 255, 255)); g.setFont(new Font("Arial", 0, 13)); g.drawString(status, 200, 200); g.drawString("Time running: " + ft(timeRan), 553, 225); } }
  2. anyway to fix my problem tho? trying to make a new script now and itsn ot showing any of the paint whatso ever.. nothing in the main loop either, just a return statement?
  3. chaning that wouldnt work as using random picks a random number between the two numbers you give, as you only give 3000, it wouldnt work.
  4. public void onPaint(Graphics2D graphics) { timeRan = System.currentTimeMillis() - this.timeBegan; Graphics2D g = (Graphics2D) graphics; g.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF)); g.setColor(new Color(255, 255, 255)); g.setFont(new Font("Arial", 0, 13)); g.drawString(status, 200, 200); g.drawString("Time running: " + ft(timeRan), 553, 225); g.drawString("Tanned: " + made, 553, 245); an example of a method.. public void walkbank() throws InterruptedException{ status = "Walking Bank"; localWalker.walk(3276, 3176); sleep(3000); localWalker.walk(3271, 3168); } it just greys out the status and removes the run time and amount made?
  5. hey guys, my paint keeps disapearing once it has started or done something in a method? at the top of the method I have.. status = "Banking"; and once it starts doing that, on the screen the world banking changes colour and disappears for a short time? worst thing is when I have my run time it also disappears
  6. Scriptation

    error

    Got it working guys thanks
  7. Scriptation

    error

    How do I download and install on Linux.. I'm new to linux sorry
  8. Scriptation

    error

    jaca version root@Scriptation:~/Desktop/osbot# java -version java version "1.7.0_91" OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-0ubuntu0.14.04.1) OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode) how do i uppdate?
  9. Scriptation

    error

    could t post in client bugs? getting this error on vps.. running ubuntu root@Scriptation:~/Desktop/osbot# java -jar osbot.jar Exception in thread "main" java.lang.UnsupportedClassVersionError: org/osbot/Boot : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) root@Scriptation:~/Desktop/osbot#
  10. ive got a string on the screen which sows when the animation has changed and it still clicks when the string changes to current annimation? g.drawString(status, 100, 100); status = "animation " + myPlayer().getAnimation();
  11. keeps spam clicking after the sleep, without the sleep it spams like mad? Thought the animation check would work? if(!inventory.isFull() && myPlayer().getAnimation() != 625 && clay.isVisible()){ return State.MINECLAY; case MINECLAY: clay.interact("Mine"); sleep(1000); break;
  12. got it working with okabes, thanks for the help everyone!
  13. testing this now, thanks i installed curl and its mid way through installing everything now
  14. i copied it and got an error saying bash wasnt recognised?
  15. just copy that into putty after fresh install?
  16. Im just fresh installing a new version of ubuntu 14.04 because it messed up -.- im following this guide
  17. how would i do that, sorry im not used to linux
  18. jus ttried.. yet this error. jus ttried.. yet this error.
  19. ive done that and it works, like its pinging it everything on mozzilla also works and the osbot on my computer works..?
  20. Im using a vps with centos 6 and whenever i run osbot I get an error on the login screen saying cannot connect to osbot and stable version is 0.0.0. Also tried to run oldschool rs in firefox and didnt load. I did use the comand "yum install java" to install the java
×
×
  • Create New...