Jump to content

Search the Community

Showing results for tags 'appearance api'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OSBot
    • News & Announcements
    • Community Discussion
    • Bot Manager
    • Support Section
    • Mirror Client VIP
    • Script Factory
  • Scripts
    • Official OSBot Scripts
    • Script Factory
    • Unofficial Scripts & Applications
    • Script Requests
  • Market
    • OSBot Official Voucher Shop
    • Currency
    • Accounts
    • Services
    • Other & Membership Codes
    • Disputes
  • Graphics
    • Graphics
  • Archive

Product Groups

  • Premium Scripts
    • Combat & Slayer
    • Money Making
    • Minigames
    • Others
    • Plugins
    • Agility
    • Mining & Smithing
    • Woodcutting & Firemaking
    • Fishing & Cooking
    • Fletching & Crafting
    • Farming & Herblore
    • Magic & Prayer
    • Hunter
    • Thieving
    • Construction
    • Runecrafting
  • Donations
  • OSBot Membership
  • Backup

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location:


Interests

Found 1 result

  1. Find people wearing stuff. Note: doesn't work with ammo and rings. Example code: import java.util.List; import org.osbot.rs07.api.def.ItemDefinition; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import com.liverare.api.AppearanceAPI; @ScriptManifest(author = "", info = "", logo = "", name = "Test", version = 0) public class Test extends Script { AppearanceAPI appearance; @Override public void onStart() throws InterruptedException { appearance = new AppearanceAPI(); appearance.exchangeContext(bot); } @Override public int onLoop() throws InterruptedException { pesterRichPeopleForFreeStuff(); return 100; } private void pesterRichPeopleForFreeStuff() { List<Player> richPeople = appearance.findPlayersWielding(Test::isExpensiveItem); if (richPeople != null && !richPeople.isEmpty()) { // rich people spotted! // prepare for pestering // in 3... } } private static boolean isExpensiveItem(ItemDefinition itemDefinition) { String itemName = itemDefinition.getName(); return itemName.equals("Twisted bow") || itemName.equals("3rd age longsword") || itemName.equals("3rd age pickaxe") || itemName.equals("3rd age axe") || itemName.equals("3rd age cloak") || itemName.equals("Elysian spirit shield") || itemName.equals("3rd age bow"); } } Methods: public List<Player> findPlayersWielding(List<Player> players, Predicate<ItemDefinition> itemDefinitionFilter) public List<Player> findPlayersWielding(Predicate<ItemDefinition> itemDefinitionFilter) public Player findPlayerWielding(List<Player> players, Predicate<ItemDefinition> itemDefinitionFilter) public Player findPlayerWielding(Predicate<ItemDefinition> itemDefinitionFilter) public static boolean isDefined(Player player, Predicate<ItemDefinition> itemDefinitionFilter) private static boolean isDefined(int[] appearance, Predicate<ItemDefinition> itemDefinitionFilter) Source:
×
×
  • Create New...