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
  • Scripting for newbs


    Nuclear Nezz

    Recommended Posts

    could you give me a screen shot?

     

    I deleted the script. I was trying to use your example + the simple chicken killer?

     

    But I think the chicken killer is outdated?

     

    I'm trying to use states to start attacking a "Cow", but how would I go by doing that?

     

     

    // EDIT //

     

    Am I just able to create an enum state: ATTACK

     

    And say: private state getState() {

     if(COW_AREA.contains(getLocalPlayer())){

                     return State.ATTACK;

     

     

    ??

    I think I'm missing the part where I specify the npc. How would I go about doing that? :/

    Link to comment
    Share on other sites

    • 2 weeks later...

    :x I think you're asking some pretty general questions

    The chicken killer might be outdated, but only on a few of the API calls, the logic is still the same.

     

    You can create a State enum by doing

    public enum State{

    }

     

    You can replace State with whatever you want.

    Then to add values into the enum you'd just do

    public enum State{
        ATTACK, RUN, EAT
    }

     

    and that's it. To access those values you'd do

    State.ATTACK

     

    To specify what you're attacking would be in the getNpcs().closest("npc you want to attack");

    so for a cow it's

    getNpcs().closest("Cow")

    a chicken is

    getNpcs().closest("Chicken")

     

    I just realized I'm 11 days late on replying to this and I feel like an ass. I'm sorry ;-;

    Link to comment
    Share on other sites

    • 4 months later...
    • 2 months later...

    Not quite sure what public boolean match(GroundItem gi){ means or does?

    also

    public boolean match(GameObject go){

     

    Another thing, I've noticed you have gameObject in an if statement. I've been trying to use gameobject in my if statements in my script but it says they aren't compatible.. I will upload that portion of the code when I get home.

    Link to comment
    Share on other sites

    • 2 months later...

    Is there any way you could put out a voice over tut? I used to mess around creating private servers back in the day, but haven't scripted in a LONG time. I'd love to get back into it and help the community out with various scripts.

    Link to comment
    Share on other sites

    Is there any way you could put out a voice over tut? I used to mess around creating private servers back in the day, but haven't scripted in a LONG time. I'd love to get back into it and help the community out with various scripts.

     

    Check out this thread =] http://dreambot.org/forums/index.php/topic/3556-dreamlickers-video-tutorials/

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.