Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • How to hover over skillpane to check xp?


    Encore
     Share

    Recommended Posts

    This is as far as i got with 20 minutes of fucking around =/

     

    getLocalPlayer().hoverSkill(PRAYER);

     

    with 

    public static final Skill PRAYER;

     

    declared up top

    Link to comment
    Share on other sites

    im trying to learn you troll


    how do i check the api to see which method can be called on what?

     

    pretty sure i have a promising script going >=]

    Edited by Encore
    Link to comment
    Share on other sites

    i have more fun with tinkering, but yeah been there doing that, i have trouble understanding how to use most of the stuff on there though.

    Edited by Encore
    Link to comment
    Share on other sites

    i have more fun with tinkering, but yeah been there doing that, i have trouble understanding how to use most of the stuff on there though.

    I suggest learning the basics of Java before trying to learn how to make a script. Once you learn how Objects work you will understand the javadocs a lot more.

    Link to comment
    Share on other sites

    I suggest learning the basics of Java before trying to learn how to make a script. Once you learn how Objects work you will understand the javadocs a lot more.

    =[ i thought i understood objects... looking at the Skill constructor, does that mean i should create a skill object, and pass to it, a already created client object?... then access.hove through the skill objecT?

     

    Constructor Summary Constructors Constructor and Description Skills(Client client)

    forgive my noobiness guys... ill get better... eventually

    Edited by Encore
    Link to comment
    Share on other sites

    =[ i thought i understood objects... looking at the Skill constructor, does that mean i should create a skill object, and pass to it, a already created client object?... then access.hove through the skill objecT?

     

    Constructor Summary Constructors Constructor and Description Skills(Client client)

    forgive my noobiness guys... ill get better... eventually

    You don't need to do that for many of the classes you wish to use in DreamBot. http://dreambot.org/javadocs/org/dreambot/api/methods/MethodContext.html

     

    This class here already getters for many things you will need, so you don't have to pass the client around.

     

    Luckily, your main script class extends AbstractScript which extends MethodContext. That mean you can do getSkills() and this gets you the Skills object you want.

    Link to comment
    Share on other sites

    ur field that you declared "Skill prayer" is null, as it it has no value assigned to it. 

     

    You have to set a value to it by using the = operator.

     

    How is java to know you want the prayer tab if you don't set a value? All it sees is you created a field with the type Skill and named it prayer.

    Link to comment
    Share on other sites

     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.