Jump to content

Help with a chest


skatebourddd

Recommended Posts

No i dont want to be spoonfed but i have been trying trial and error on how to make it right click search for traps at the ardounge nature rune chest, not sure if i need to make it entity chest or entity stall = objects.closest("chest"); 

 

also on my state would it be SEARCH_FOR_TRAPS or is their a different way to do that? 

 

This is my first script and I am just trying to learn and this seems like an extremely easy script to start with! Any help or guidance would be appreciated thanks!

post-210432-0-51507600-1456931887_thumb.png

Link to comment
Share on other sites

Just a few bits of advice:

 

1. I would use RS2Object instead of Entity because Objects extends EntityAPI<RS2Object>. 
2. You are searching for the chest twice between your getState() and onLoop() which is a bit inefficient. If your getState() found the object, you should pass that object to your onLoop() without having to find it all over again.

 

But yes, no underscores. You are interacting with the action exactly as you see it in-game (with color tags being stripped).

  • Like 2
Link to comment
Share on other sites

Is there any tips you could give me on programming bots? I do have some basic java knowledge and I am just trying to make simple scripts until learning how to do it efficiently.

Just write whatever you want. You'll learn from that. Take something a bit harder than you think you can do. This will stimulate you to actually think about solutions to your problem.

Eventually your experience writing scripts and hopefully your Java knowledge will grow.

EDIT: Also, you should get rit of that framework as soon as possible!

Edited by Psvxe
Link to comment
Share on other sites

Just write whatever you want. You'll learn from that. Take something a bit harder than you think you can do. This will stimulate you to actually think about solutions to your problem.

Eventually your experience writing scripts and hopefully your Java knowledge will grow.

EDIT: Also, you should get rit of that framework as soon as possible!

why is that?

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