Jump to content

Scriptation

Members
  • Posts

    25
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Scriptation

  1. Post your whole script here or PM me it. 

    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. Graphics2D g = (Graphics2D) graphics;
    

    No need to cast here, since the parameter already uses Graphics2D.

     

     

    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. I'm not entierly sure but 

    sleep(3000);
    

    should be changed into

    sleep(random(3000); 
    
    
    

    Or atleast i think it should be

    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. Can you show the relevant code, such as the onPaint method? If you don't want the code public you can PM one of us scripters.

      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. 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?

  7. 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#
     

  8. Your animation does not update immediately. Add a conditional sleep until your player is animating.

    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();

  9. Yep, it will ask you for a username/password for the user account for the desktop environment, and then a password for the VNC password. Once installed connect to:

     

    your-ip:5901

    i copied it and got an error saying bash wasnt recognised?

  10. Can you VNC into the machine and get a desktop, or is this a basic CentOS 6 install? CentOS 6 does not come with a desktop environment on a VPS by default, and you'll have to manually install it. I am not well versed in CentOS 6 so I cannot help. Who is the VPS provider, or if you don't want to share are they just "VPS" or "Botting VPS"?

    Im just fresh installing a new version of ubuntu 14.04 because it messed up -.-

     

    im following this guide

     

    1. Download putty.

    2. Open putty and input your server's IP address.

    3. Type in the following (case sensitive):

    apt-get update

    Now wail till it updates and then type in:

    sudo apt-get install ubuntu-desktop --no-install-recommends

    Again, wait till it's done and after that type in:

    sudo apt-get install xrdp

    Then type in:

    /etc/init.d/xrdp status // we check the status of the server

    /etc/init.d/xrdp start // we start the server

    Now we need to install XFCE desktop.. So type in:

    sudo apt-get update // we update the repo again

    sudo apt-get install xfce4 // we install XFCE4

    Now after we installed everything we need to let know XFCE that we will be using it's desktop instead of ubuntu or gnome.

    So TYPE IN :

    echo xfce4-session >~/.xsession

    And then last step... Type in:

    sudo service xrdp restart

    Now to connect to your ubuntu, you don't really need any UltraVNC or anything like that. Just go to search on your windows and type in remote desktop, launch that little program and type in the IP of your server in the computer name field. It should now properly connect, type in your username (usually root) and password (whatever you setup on your vps as root) AND that's it! You are ready to bot, just remember to download JAVA!!! (sudo apt-get install java).

     

    Once you are in remote desktop now open terminal window and type in:

    sudo apt-get install default-jre

    sudo apt

    -get install firefox

    This will install java and firefox for you..

     

    Now you can download the bot...When you download the bot make sure you make it exe. so you move the bot file to the /root directory and then go to terminal and type in:

    chmod +x Advertising other bots isn't allowed..jar

    after that you can go and launch the bot and BOT... remember to select java 1.7.0 on Advertising other bots isn't allowed. client!!

     

    IF you are using XRDP and want to reconnect you to the same session you MUST follow these short steps!

     

    1. Login to your xfce desktop

    2. Go to /etc/xrdp/xrdp.ini       ( Should be in the file system somewhere )

    3. Look for "xrdp7" and at the bottom add this:

    [xrdp8]

    name=Reconnect

    lib=libvnc.so

    username=ask

    password=ask

    ip=127.0.0.1

    port=5910

    4. Save this file & exit your remote desktop.

    5. Login to xrdp with module "RECONNECT" and ta da, job is done:) (everytime now you want to connect to your existing session you need to use RECONNECT module.

  11. You need to run the jar from an X11 session, aka you need to setup a whole desktop environment or run it from a "emulated terminal" within a desktop environment. This will just be called a normal "Terminal" or "X11 Terminal" or "Something Terminal".

    how would i do that, sorry im not used to linux

  12. jus ttried.. yet this error.

     

    [root@Scriptation ~]# java -jar osbot.jar
    Exception in thread "main" java.lang.ExceptionInInitializerError
            at org.pushingpixels.substance.internal.contrib.jgoodies.looks.common.ShadowPopupFactory.install(ShadowPopupFactory.java:115)
            at org.pushingpixels.substance.api.SubstanceLookAndFeel.initialize(SubstanceLookAndFeel.java:1781)
            at javax.swing.UIManager.setLookAndFeel(UIManager.java:538)
            at org.pushingpixels.substance.api.SubstanceLookAndFeel.setSkin(SubstanceLookAndFeel.java:2163)
            at org.pushingpixels.substance.api.SubstanceLookAndFeel.access$000(SubstanceLookAndFeel.java:92)
            at org.pushingpixels.substance.api.SubstanceLookAndFeel$3.run(SubstanceLookAndFeel.java:2136)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
            at java.awt.EventQueue.access$500(EventQueue.java:97)
            at java.awt.EventQueue$3.run(EventQueue.java:709)
            at java.awt.EventQueue$3.run(EventQueue.java:703)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    Caused by: java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
            at sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:226)
            at org.pushingpixels.lafwidget.utils.LookUtils.isLowResolution(LookUtils.java:435)
            at org.pushingpixels.lafwidget.utils.LookUtils.<clinit>(LookUtils.java:233)
            ... 20 more
    [root@Scriptation ~]#


    Did you run it in terminal? (java -jar osbot.jar)

     

    If so see if the terminal has any errors.

     

    jus ttried.. yet this error.

     

    [root@Scriptation ~]# java -jar osbot.jar
    Exception in thread "main" java.lang.ExceptionInInitializerError
            at org.pushingpixels.substance.internal.contrib.jgoodies.looks.common.ShadowPopupFactory.install(ShadowPopupFactory.java:115)
            at org.pushingpixels.substance.api.SubstanceLookAndFeel.initialize(SubstanceLookAndFeel.java:1781)
            at javax.swing.UIManager.setLookAndFeel(UIManager.java:538)
            at org.pushingpixels.substance.api.SubstanceLookAndFeel.setSkin(SubstanceLookAndFeel.java:2163)
            at org.pushingpixels.substance.api.SubstanceLookAndFeel.access$000(SubstanceLookAndFeel.java:92)
            at org.pushingpixels.substance.api.SubstanceLookAndFeel$3.run(SubstanceLookAndFeel.java:2136)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
            at java.awt.EventQueue.access$500(EventQueue.java:97)
            at java.awt.EventQueue$3.run(EventQueue.java:709)
            at java.awt.EventQueue$3.run(EventQueue.java:703)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    Caused by: java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
            at sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:226)
            at org.pushingpixels.lafwidget.utils.LookUtils.isLowResolution(LookUtils.java:435)
            at org.pushingpixels.lafwidget.utils.LookUtils.<clinit>(LookUtils.java:233)
            ... 20 more
    [root@Scriptation ~]#

  13. Talk to the VPS supplier, if you wanna get technical try pinging some websites (in terminal "ping google.com") and see if you get any connections. This would probably be best brought up in a support ticket with your VPS provider, we can't do much here about it.

    ive done that and it works, like its pinging it everything on mozzilla also works and the osbot on my computer works..?

  14. 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...