Jump to content

Assume

Trade With Caution
  • Posts

    65
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Assume

  1. package org.assume.api; import java.util.ArrayList; import java.util.List; import org.osbot.script.Script; import org.osbot.script.rs2.model.Item; public class Methods extends Script { public boolean inventoryContains(int...ids) { List<Integer> def = new ArrayList<Integer>(); for(int i : ids) { def.add(i); } for(Item i : client.getInventory().getItems()) { if(def.contains(i.getId())) return true; } return false; } public boolean inventoryContainsAll(int... ids) { int total = 0; List<Integer> def = new ArrayList<Integer>(); for(int i : ids) { def.add(i); } for(Item i : client.getInventory().getItems()) { if(def.contains(i.getId())) { total++; def.remove(i.getId()); } } return total == ids.length; } public Item[] findInInventory(int... ids) { List<Item> list = new ArrayList<Item>(); List<Integer> def = new ArrayList<Integer>(); for(int i : ids) { def.add(i); } for(Item i : client.getInventory().getItems()) { if(def.contains(i.getId())) list.add(i); } return list.toArray(new Item[list.size()]); } } Checking an Array to see if it contains a value would be much less efficient than using a List. I would have to call a separate method to iterate through every value in the array and see if it contained the value. If you are referring to the findInInventory method using a normal array is impossible as I cannot dynamically add to it (arrays in Java have a fixed size).
  2. I needed them so I wrote them up. I haven't tested them so I cannot be sure they work but I don't see why they wouldn't. package org.assume.api; import java.util.ArrayList; import java.util.List; import org.osbot.script.Script; import org.osbot.script.rs2.model.Item; public class Methods extends Script { public boolean inventoryContains(int...ids) { List<Integer> def = new ArrayList<Integer>(); for(int i : ids) { def.add(i); } for(Item i : client.getInventory().getItems()) { if(def.contains(i.getId())) return true; } return false; } public boolean inventoryContainsAll(int... ids) { int total = 0; List<Integer> def = new ArrayList<Integer>(); for(int i : ids) { def.add(i); } for(Item i : client.getInventory().getItems()) { if(def.contains(i.getId())) { total++; def.remove(i.getId()); } } return total == ids.length; } public Item[] findInInventory(int... ids) { List<Item> list = new ArrayList<Item>(); List<Integer> def = new ArrayList<Integer>(); for(int i : ids) { def.add(i); } for(Item i : client.getInventory().getItems()) { if(def.contains(i.getId())) list.add(i); } return list.toArray(new Item[list.size()]); } }
  3. He didn't refund a user that was having trouble with the script. If any moderator or such would like I can send them the link to the dispute... Incorrect. I banned a users authorization code who was slandering my script. There's no reason to go into it. I did not scam him as my Terms of Service stated EVERYTHING I did was allowed. He agreed to the Terms of Service when he purchased the script. If that was true, then why were you banned? Shouldn't you be unbanned? He thinks his ToS out-beats the Advertising other bots isn&#39;t allowed. rules. What Advertising other bots isn&#39;t allowed. rules? They made a site wide premium script ToS AFTER they banned me. Don't act like you know everything that happened.
  4. He didn't refund a user that was having trouble with the script. If any moderator or such would like I can send them the link to the dispute... Incorrect. I banned a users authorization code who was slandering my script. There's no reason to go into it. I did not scam him as my Terms of Service stated EVERYTHING I did was allowed. He agreed to the Terms of Service when he purchased the script. If that was true, then why were you banned? Shouldn't you be unbanned? Read the line I added after you responded.
  5. He didn't refund a user that was having trouble with the script. If any moderator or such would like I can send them the link to the dispute... Incorrect. I banned a users authorization code who was slandering my script. There's no reason to go into it. I did not scam him as my Terms of Service stated EVERYTHING I did was allowed. He agreed to the Terms of Service when he purchased the script. They have hated me since I applied for scripter and was denied and a 15 page thread was made with my customers yelling at them. They were as happy to ban me as they were with Divinius.
  6. I got back from my vacation on the 19th and I am now working on porting CombatAIO over from Advertising other bots isn&#39;t allowed. to OSbot. Once I look over the API and adjust the script to work with the abstract API OSbot uses it shouldn't take long. I don't have any current videos but I'll post some proggies, screenshots, and the video posted when the script originally came out. http://www.youtube.com/watch?v=zhFo0ws592w
×
×
  • Create New...