Jump to content

Aviri

Members
  • Posts

    14
  • Joined

  • Last visited

  • Feedback

    100%

Profile Information

  • Gender
    Male

Recent Profile Visitors

820 profile views

Aviri's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. Yep! Thanks to everyone who helped out. Working perfectly as intended now!
  2. Thank you so much EDIT: Okay, that part works just fine now. (Thank you Bobrocket, you taught me streams today ) Now I need to get a list of my inventory items but only make sure the list size (or amount of slots I need to clear up) only reaches the size of wanted ground items. Note: to put this in context, I only need to check this when my inv is full and my wanted items are on the ground. (simple conditions I don't need help with) Basically, my inventory is full, I have 3 items on the floor that I want, and need to make 3 spaces in my inventory, so I need to remove 3 of the shitty items I have in my inventory. In a simpler form, how would I set a condition to limit the size of the list? (I know how to set the shitty item condition mentioned above). Or can I get the list, and then trim it to the size of wanted items? Thanks in advance, sorry if I don't explain all this too well.
  3. Would I still be able to get the size (how many) of result items using streams as he shows?
  4. This is pretty beast. Have no idea how it works but I'm going to figure it out. Thank you! Thanks apa, too
  5. How would I collect a list of the all ground items that I can edit? Been trying to do this for about 3 hours now with no luck... Basically need to get all the ground items, and then out of all out those remove any items I don't want, and then give me how many items are left within the list. Been trying with List and Collections, but no luck. Any tips would be great, thanks!
  6. Welp, didn't even realize that. Thanks for getting me there, and the helpful tip
  7. Alright, last error I am getting: The method closest(Filter<RS2Object>...) in the type EntityAPI<RS2Object> is not applicable for the arguments (RS2Object) RS2Object DOOR = objects.closest("Door"); getObjects().closest(DOOR).interact("Open", "Use"); I assume I am initializing DOOR incorrect to work with the closest method, but not too sure how to go about fixing it.
  8. Your comment came in a the perfect time. ily
  9. Thanks a lot Joseph! You da best. I'll update this post if I've fixed it, still a good 'ol begginner so it's been rough.
  10. Nope, getting a NullPointerException again. Note, this is with a ring of dueling equipted and without it equipted. [ERROR][Bot #1][10/03 05:05:07 PM]: Error in script executor! java.lang.NullPointerException at org.osbot.rs07.api.Equipment.getItems(yi:195) at org.osbot.rs07.api.util.ItemContainer.filter(ji:112) at org.osbot.rs07.api.Equipment.isWearingItem(yi:137) at org.osbot.rs07.api.Equipment.isWearingItem(yi:130) at main.onLoop(main.java:82) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ck:136) at java.lang.Thread.run(Unknown Source) Also, I edited the bottom of my original post with another question, let me know if you can help. Thank you! Does the bot do this check automatically, or do I have to do that check within my script? Thank you for your help!
  11. I'm trying to see if my player has a ring of dueling in his equipment slot, but I am getting a NullPointerException. Here is what I have so far, and it is not working. if(!equipment.getItemInSlot(9).getName().startsWith("Ring of dueling")) { bank.withdraw(2552, 1); //withdraws ring of dueling(8) } else log("Already have a Ring of dueling."); Does this work (if done correctly) if my bot currently has the bank open? Or do I have to tell it to open the eqiupment tab first, and then check if it has a ring or not? Also, another thing I am having trouble with is using an inventory item on an object. Ex: Using a key on a door. How would I go about doing that? Thanks for any help, in advance.
  12. I need either a tutorial link or help on how to correctly open a door. Here is my current code, and it does not work due to it opening other doors. private void checkDoor() { Entity door = objects.closest(true, 6106); if (door.exists()) { log("Opening door."); door.interact("Open"); } else log("Cannot find door."); } Is there anyway to specify which door I need opened? Thanks in advance.
  13. Awesome help! Thank you for helping me out.
  14. Hey guys, kinda new to OSBot and wanted to know how to define areas. I looked at his code and even looked at what tiles at Barbarian Outpost his bank area is pointing to, and that just confused me more since most of them aren't even in the bank. I am thinking the area to just be a box with 4 points and anything within the box is the area... But since there are more than 4 positions (or tiles) being defined, it just confuses me. Can someone clarify on how to define an area? Can an area be used like how I am explaining it? And, what exactly is he trying to do when defining the area with 6 poistions? Thanks in advance.
×
×
  • Create New...