December 30, 20169 yr Hey OSBot, I'm writing my first script currently. I've figured out walking, areas, and (some) entity interaction, but I'm not super sure on how to pick up a ground item. What I want is for onLoop() to check region if a ground item with name/id exists (isValid?) and simply "Take" it. I can't even figure out how to iterate through the List<GroundItems> or if that's how to do it in the first place. Not very good at reading javadocs lol. Thanks in the future, OSBot.
December 30, 20169 yr GroundItem item = getGroundItems().closest("whatever"); if(item != null) item.interact("take");
December 30, 20169 yr GroundItem gI = getGroundItems().closest("item1", "item2"); if (gI != null) gI.interact("Take");
December 31, 20169 yr GroundItem gI = getGroundItems().closest("item1", "item2"); if (gI != null) gI.interact("Take"); Do people not like readability or? Granted, not as big a problem for this simple task, but still.
December 31, 20169 yr https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=how+to+loot+ground+items+osbotPeople should try to google these questions more often bc they have been asked in the past.
December 31, 20169 yr Author Lol thanks to those who were helpful, but I figured it out soon after I asked the question. Seems like this community is really toxic and I can't expect help lmao. I did search it before hand, fingering through 8 pages of tuts and snippets and even reading a few opensource scripts. Not asking for spoonfeed, if I was I would ask for the whole script. Uptight asshats lmao, get triggered. Reading through the API is almost a necessity Oh, I'm sorry you didn't understand because your community calls a javadoc an "API" lmao. I said I read it and had a hard time figuring it out. DONT EXPECT PPL TO SPOON FEED If I could neg rep you I would lol. I didn't ask to be spoon fed, I asked for help with one specific function. Don't be so toxic.
Create an account or sign in to comment