Jump to content

A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec


Apaec

Recommended Posts

  • 1 month later...
  • 3 weeks later...

Hello guys, I am not of the homosexual orientation. I have never been attracted to Men, Just Women. I don't have a real problem with homosexuals, They leave me alone and I leave them alone. I don't have any homosexual friends, but I don't think that's got any subliminal hatred attached at all. I mean you can't change who you are attracted to and the actual definition of homosexual is; "being sexually "Attracted" to people of one's own sex."

 

With all that said and done, I've been looking for a guide like this for ages.

 

I love you.

(No Homo)

  • Like 6
Link to comment
Share on other sites

Hello guys, I am not of the homosexual orientation. I have never been attracted to Men, Just Women. I don't have a real problem with homosexuals, They leave me alone and I leave them alone. I don't have any homosexual friends, but I don't think that's got any subliminal hatred attached at all. I mean you can't change who you are attracted to and the actual definition of homosexual is; "being sexually "Attracted" to people of one's own sex."

 

With all that said and done, I've been looking for a guide like this for ages.

 

I love you.

(No Homo)

 

k

 

x)

  • Like 1
Link to comment
Share on other sites

Hey man I used to code for RSBot along time ago, but resently started playing runescape again due to osrs being open for f2p. I was wondering what my problem is, I resently made a very simple power miner

 

package com.embah.PowerMiner;

import java.awt.Graphics2D;

import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Boyyo11", info = "Simple powerminer", name = "PowerMiner", version = 0, logo = "boobs")
public class PowerMiner extends Script{
    private static final int rock_id = 14864;
    private static final int ore_id = 438;
    
    @Override
    public void onStart() {
        log("Starting Embah p****bot, please enjoy.");
    }

    @Override
    public int onLoop() throws InterruptedException {
        if(myPlayer().isAnimating()){
            if(inventory.isFull()){
                inventory.dropAll(ore_id);
            }
            Entity rocks = objects.closest(rock_id);
            if(rocks != null){
                rocks.interact("Mine Rock");
                sleep(random(25, 30));
            }
        }
        return random(200, 300);
    }

    @Override
    public void onExit() {
        log("Thanks for using Embah Powermine, have a great day.");
    }

    @Override
    public void onPaint(Graphics2D g) {
            
    }
}

 

I have exported the file as jar file and put into the scripts folder, but yet when I run OSBot, I get an error saying it had a problem loading PowerMiner.class, ive even tried just putting the classes files into the folder nd no luck. And help would be surely appreciated. Thanks - boyyo

Link to comment
Share on other sites

Hey man I used to code for RSBot along time ago, but resently started playing runescape again due to osrs being open for f2p. I was wondering what my problem is, I resently made a very simple power miner

package com.embah.PowerMiner;

import java.awt.Graphics2D;

import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Boyyo11", info = "Simple powerminer", name = "PowerMiner", version = 0, logo = "boobs")
public class PowerMiner extends Script{
    private static final int rock_id = 14864;
    private static final int ore_id = 438;
    
    @Override
    public void onStart() {
        log("Starting Embah p****bot, please enjoy.");
    }

    @Override
    public int onLoop() throws InterruptedException {
        if(myPlayer().isAnimating()){
            if(inventory.isFull()){
                inventory.dropAll(ore_id);
            }
            Entity rocks = objects.closest(rock_id);
            if(rocks != null){
                rocks.interact("Mine Rock");
                sleep(random(25, 30));
            }
        }
        return random(200, 300);
    }

    @Override
    public void onExit() {
        log("Thanks for using Embah Powermine, have a great day.");
    }

    @Override
    public void onPaint(Graphics2D g) {
            
    }
}

I have exported the file as jar file and put into the scripts folder, but yet when I run OSBot, I get an error saying it had a problem loading PowerMiner.class, ive even tried just putting the classes files into the folder nd no luck. And help would be surely appreciated. Thanks - boyyo

 

Heya,

you sure you exported the correct file? I mean that seems odd as you have the manifest and all... You added the buildpath, right? any red lines in the code? :s

Link to comment
Share on other sites

Heya,

you sure you exported the correct file? I mean that seems odd as you have the manifest and all... You added the buildpath, right? any red lines in the code? :s

 

I think he is exporting a .class file not a .jar file. That is the problem or so it seems. Also:

 

if(myPlayer().isAnimating()){

 

needs to be:

if(!myPlayer().isAnimating()){

 

also that return random(200,300); should be higher around 700-800

Edited by Fay
Link to comment
Share on other sites

I think he is exporting a .class file not a .jar file. That is the problem or so it seems. Also:

 

if(myPlayer().isAnimating()){

 

needs to be:

if(!myPlayer().isAnimating()){

 

also that return random(200,300); should be higher around 700-800

 

random 200,300 is fine! I heard gRandom(215,80) is optimum. Also I think  'Mine Rock' is the incorrect string but I could be wrong

Link to comment
Share on other sites

Well I understand its post to be !animating i just simple wrote up but I have it in eclipse nd fixed, and is exported as jar, I have coded before so I know what im doing, I just cant figure out why it wont accept my class file, even tho its in a jar.

 

Did you export it like I showed, into the correct folder? Ensure its a Jar file, not a runnable jar file too. 

 

It needs to go in users/osbot/scripts, and ensure that there are no osbot1 local scripts in that folder as they cannot co-exist.

 

apaec

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...