![](https://osbot.org/forum/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://osbot.org/forum/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
chardragon
Members-
Posts
7 -
Joined
-
Last visited
-
Feedback
0%
Profile Information
-
Gender
Male
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
chardragon's Achievements
![Rank: Newbie (1/10) Newbie](https://osbot.org/forum/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_default_rank.png)
Newbie (1/10)
2
Reputation
-
I disagree mate, maybe i explained it wrong but imagine you are mining 3 rocks around you so your character stands still you are more likely in real life to go say top middle bottom and repeat than to to top middle back to top etc... and just to clarify i am specifically talking about iron ore here so that you mine one the next one has spawned. I try to just try to implement what i do when i play. Regarding your last point ill try to bare that in mind thanks for taking the time to reply Thank you!
-
Hi, I want to click on a specific square and I've created a position called target which has the x, y, and z all visible from the bank. Atm I am using getmap().walk(target) which uses the map which i don't think is realistic as its right next to the bank. so I think its better to just click on the map after fast closing the bank interface with escape. How can i do this as i tried using the api but i didnt get very far. Edit: I would also appreciate if someone can tell me how i can do actions on specific locations for example say I want to mine 3 rocks is there a way I can make the bot focus on the 3 rocks in a way which is better than RS2Object ore_vein = getObjects().closest(obj -> obj.getName().equals("Iron rocks") && MiningArea.contains(obj)); Ideally I would like to cycle through 3 rocks so that it does the same order rather than atm this produces somewhat random results sometimes it picks the top one then the middle then back to the top then bottom etc. which isnt very real like
-
Hi Thanks for the reply I actually managed to solve it by doing this getObjects().closest(obj -> Arrays.asList(ids).contains(Integer.toString(obj.getId())) and then making it an array of strings instead I'm not really sure why it wouldn't work with ints but there we go
-
Hi as title says I know that it is discouraged to use "while" in the loop, but for the activities mentioned you cant use !myPlayer().isAnimating() due to the character hitting -1 animation during the creation of items. For example, when stringing magic longbows every 5 or so I get a -1 animation and so the bot tries to string again. I currently am getting around this using a while loop with a counter which basically will break the loop when it hits a number which means something isnt working properly for whatver reason but I know this isnt a good way to handle it. I am struggling to see anything in the api to help (although i am not the best at reading apis). I was wondering what the consensus is on how to work around this issue?
-
I am trying to make a simple agility script for Faldor which has two consecutive "Jump Ledges" and the bot currently chooses the previous one as its the closest whern using private String[] names = {"Rough wall", "Tightrope", "Hand holds", "Gap", "Gap", "Tightrope","Tightrope","Gap","Ledge","Ledge","Ledge","Ledge","Edge"}; // private int[] names = {14898, 14899, 14901, 14903, 14904, 14905,14911,14919,14920,14921,14923,14924,149251}; Entity previous; @Override public void onStart() { getExperienceTracker().start(Skill.AGILITY); } @Override public int onLoop() throws InterruptedException { int starting = getExperienceTracker().getGainedXP(Skill.AGILITY); Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) && Arrays.asList(actions).contains(obj.getActions()[0]) && (getMap().canReach(obj)) && !obj.equals(previous)); log(nextObj.getId()); I am trying to implement the array of ids and have tried Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getId()) && Arrays.asList(actions).contains(obj.getActions()[0]) && (getMap().canReach(obj)) && !obj.equals(previous)); However it just creates nulls and breaks the script i was wondering how can i overcome this / the best way to achieve this.