skatebourddd Posted March 2, 2016 Posted March 2, 2016 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!
Goaks Posted March 2, 2016 Posted March 2, 2016 Did you try without those underscores? this, i believe it searches for the literal string
skatebourddd Posted March 2, 2016 Author Posted March 2, 2016 Did you try without those underscores? That worked thanks lol that was an easy fix!
Alek Posted March 2, 2016 Posted March 2, 2016 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). 2
skatebourddd Posted March 2, 2016 Author Posted March 2, 2016 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.
darkrossx Posted March 2, 2016 Posted March 2, 2016 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. I also need this
Psvxe Posted March 2, 2016 Posted March 2, 2016 (edited) 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 March 2, 2016 by Psvxe
skatebourddd Posted March 2, 2016 Author Posted March 2, 2016 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?