Spork Posted December 30, 2016 Share Posted December 30, 2016 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. Quote Link to comment Share on other sites More sharing options...
Muffins Posted December 30, 2016 Share Posted December 30, 2016 do people even bother looking in the tutorial/snippet section Quote Link to comment Share on other sites More sharing options...
combat_acc Posted December 30, 2016 Share Posted December 30, 2016 DONT EXPECT PPL TO SPOON FEED 2 Quote Link to comment Share on other sites More sharing options...
Hel Posted December 30, 2016 Share Posted December 30, 2016 Reading through the API is almost a necessity Quote Link to comment Share on other sites More sharing options...
Vilius Posted December 30, 2016 Share Posted December 30, 2016 GroundItem item = getGroundItems().closest("whatever"); if(item != null) item.interact("take"); 1 Quote Link to comment Share on other sites More sharing options...
Chris Posted December 30, 2016 Share Posted December 30, 2016 GroundItem gI = getGroundItems().closest("item1", "item2"); if (gI != null) gI.interact("Take"); 1 Quote Link to comment Share on other sites More sharing options...
BrainDeadGenius Posted December 31, 2016 Share Posted December 31, 2016 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. 2 Quote Link to comment Share on other sites More sharing options...
Juggles Posted December 31, 2016 Share Posted December 31, 2016 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. Quote Link to comment Share on other sites More sharing options...
Spork Posted December 31, 2016 Author Share Posted December 31, 2016 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. 6 Quote Link to comment Share on other sites More sharing options...