Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/22/20 in all areas

  1. This would be a bit cleaner, allowing for types other than just NPC, and filters other than just entity name: public <T extends Entity> Optional<T> closestToPosition(final Position position, final List<T> entities) { return entities.stream().min(Comparator.comparingInt(e -> position.distance(e.getPosition()))); } Example Usage: Position pos = new Position(1, 2, 3); Optional<NPC> rat = closestToPosition(pos, getNpcs().filter(new NameFilter<>("Rat"))); Note that `position.distance()` is the *straight line* distance, it does not take into account any obstacles. This doesn't matter in your specific use-case, but if you wanted to account for it, then you should use getMap().realDistance(). For example: public <T extends Entity> Optional<T> closestToPosition(final Position position, final List<T> entities) { return entities.stream().min(Comparator.comparingInt(e -> getMap().realDistance(position, e.getPosition()))); } Or you can support both options using: public <T extends Entity> Optional<T> closestToPosition(final Position position, final List<T> entities, final boolean realDistance) { final ToIntFunction<T> distanceFunc = (T e) -> ( realDistance ? getMap().realDistance(position, e.getPosition()) : position.distance(e.getPosition()) ); return entities.stream().min(Comparator.comparingInt(distanceFunc)); } If you want to include further filtering abilities within the helper function itself, that can also be achieved using: public <T extends Entity> Optional<T> closestToPosition(final Position position, final List<T> entities, final boolean realDistance, final Filter<T>... entityFilter) { final ToIntFunction<T> distanceFunc = (T e) -> ( realDistance ? getMap().realDistance(position, e.getPosition()) : position.distance(e.getPosition()) ); final Predicate<T> aggregatedEntityFilter = e -> Stream.of(entityFilter).allMatch(filter -> filter.match(e)); return entities.stream().filter(aggregatedEntityFilter).min(Comparator.comparingInt(distanceFunc)); } Example usage: Position pos = new Position(1, 2, 3); Optional<NPC> rat = closestToPosition(pos, getNpcs().getAll(), true, new NameFilter<>("Rat"));
    7 points
  2. Over the years we had some pretty great disputes, so I thought it would be interesting to collect our favorites and then do a vote to decide which ones are the best. This topic will be used for nominations, once we got a few I will create a poll. I will start of with 2 of my personal favorites: 1. Zappster pretending to be a Federal Agent/Swatting. The title really speaks for itself here. Additonal info: Full screenshots of the conversation can be found here https://imgur.com/a/LaUzbVd 2. Dbolter being disputed over less than 3% downtime on his proxies. Originally the accuser wanted a 97 CENT refund, which ended up being reduced to 48 CENTS Go ahead and post any good disputes you can find, there must be quite a few over all of the years .
    5 points
  3. β™”CzarScripts #1 Bots β™” Proven the #1 selling, most users, most replies Script Series on the market. Big THANK YOU to all our wonderful users and supporters over the 8 years, we couldn't have done it without you. Czar Bots have always been the Best and the most Feature-rich bots available with the most total sales in OSBot history. Come and find out why everyone is choosing Czar Bots today. β™” LATEST BOTS β™” If you want a trial - just post the script name and it will be activated after I hit 'like' on your post Requirements: hit 'like' on this thread
    2 points
  4. Want to buy with OSGP? Contact me on Discord! Detailed feature list: - Account builder mode to level your firemaking to level 50 or even higher. - Equips pyromancer gear option - Chopping and burning logs (base Option) - Relights brazier - Fletch option - Fix brazier option - Make potion and heal pyromancer when down option - Tons of food supported - Brazier swicthing when pyromancer is down - Advanced game settings to skip games, smart caluclate points, afk at certain points, ... - Bank or Open crates - Dragon axe special attack - Fletch at brazier option - Chop in safespot option - Worldhopping - CLI support for goldfarmers Custom Breakmanager: - Setup Bot and break times - Randomize your break times - Stop script on certain conditions (Stop on first break, Stop after X amount of minutes, Stop when skill level is reached) - Worldhopping - Crucial part to botting in 2023! Script queueing: - Support queueing multiple script in a row - All Khal scripts support flawless transitions in between scripts - Start creating your acc in a few clicks from scratch to multiple 99's - Flawless CLI support - Learn more here: How to use CLI parameters: - Example Usage: -script 909:ScriptFile.BreakFile.DiscordFile SAVEFILE = Saved Filename BREAKFILE = Breakmanager Filename - SAVEFILE: Save file can be created in the GUI. Navigate to the tab you want to run and press "Save As CLI file". Please choose your filename wisely (No special characters) - BREAKFILE (Optional): Breakfile can also be create in the GUI, set the breaksettings you wish to use and press "Save new CLI BreakFile". Please choose your filename wisely (No special characters) - Final form (Note that with some bot managers you do not need to specify -script 909): -script 909:TaskList1.4515breaks (With breaks) -script 909:TaskList1.4515breaks.discord1 (With breaks & discord) -script 909:TaskList1..discord1 (NO breaks & discord) Proggies:
    1 point
  5. 'the intelligent choice' By @Czar CURRENT RECORD: 201 HOURS Lifetime updates and support, request a feature either on the main thread or on our active discord! For advice and strategies, join our discord! You can also purchase the bot with GP if you'd like. 84 HOUR PROGRESS ON A LEVEL 20 ACCOUNT Suicided account with mirror mode near rock crabs, 81 mining! I will probably go for 99 Mine 1 drop 1 item drop pre-hover feature: (it's faster in the actual update)
    1 point
  6. Brought to you by the #1 most sold script series on the market. Come and see why everyone's choosing Czar Scripts! This is the most advanced Agility bot you will find anywhere. $9.99 SCRIPT INSTRUCTIONS Optimal Setup for the bot: Please set the mouse zoom to far away (to the left, like below) so that more obstacles can be seen in the view, and so the script can be more stable and reliable Also, make sure to have roofs toggled off (either go to settings tab or type ::toggleroof) for optimal results
    1 point
  7. ** $14.99 - 24 hour trials available - like and comment on this thread Don't pm me on OSBot or Discord to ask for a trial. Loot anything, anywhere, with this highly customizable script! PvP worlds, waiting on loot piles, drop parties across Gielinor, even popping balloons in the party room! Buy The Script Here Check out these videos on using Fury AIO Looter to make money! [OSRS] Botting To Ban #7: Looting ! Crazy Profit [OSRS] Botting To Ban #8: F2P Looting FAQs: What does x setting on GUI mean? Look in the GUI spoiler below for a detailed explanation of what each option does. What settings should I use? WHATS THE BEST??? Whatever works for you, try new things until you find something thats good. I made it as customizable as possible for a reason There is no "best" settings before you ask me. lol. If I told everyone the ""best"" settings then everyone would do that and it would no longer be the best. Experiment and see what works for you Where should I run the looter? Anywhere there is loot on the ground. Experiment. See whats making money. Known locations would be GE drop parties in highly populated worlds. PVP worlds in active areas (ge, lumbridge, varrock, etc). ZMI. Wintertodt. Skillers that drop their inventory like barbarian village fishers, rimmington mine iron ore droppers etc. It will even work in the party room to pop balloons GUI: CLI: Discord Server: POGRESS REPORTS:
    1 point
  8. Molly's Thiever This script is designed to quickly and efficiently level your thieving! Check out the features below. Buy HERE Features: - Capable of 200k+ per hour and 30k+ exp/ph on mid-level thieving accounts. - Quickly reaches 38 thieving to get started on those master farmers for ranarr and snap seeds! - Fixes itself if stuck. - Hopping from bot-worlds. - Stun handling so the bot doesn't just continually spam click the npc. - Drops bad seeds if inventory is full at master farmers. - Eats any food at the hp of your choosing. Supports: -Lumbridge men -Varrock tea -Ardougne cake -Ardougne silk -Ardougne fur -Kourend Fruit Stalls -Ardougne/Draynor master farmer -Ardougne/Varrock/Falador guards -Ardougne knight -Ardougne paladin -Ardougne hero -Blackjacking bandits as well as Menaphite thugs, this has limitations, click the spoiler below to see them Setup: Select your option from the drop down menu, it will tell you the location where the target is located. Fill out the gui and hit start. Simple setup! Proggies: Proggy from an acc started at 38 theiving:
    1 point
  9. Hahahha that was a great laugh thanks for this!
    1 point
  10. this actually sums this up pretty nicely
    1 point
  11. Trying this now. Will hopefully post a fat progress.
    1 point
  12. 1 point
  13. Hiya folks, Didn't immediately see a way of implementing this (I'm fairly new to the API) so I went about implementing it myself. Here's a snippet that takes a Position to minimize the distance from, as well as a String carrying the name of the NPC using Java 8 Streams. It returns a list of all NPCs that occupy the position of the NPC you've searched for. Additionally I've included an offset, so for the sake of loops (if the closest NPC isn't suitable, say it is already in combat) then you can add 1 and it will bring back the next closest position. I would imagine it is quite easy to adjust the returned object type, such as for other Entities. This is being used with my first script, a Tutorial Island implementation, so I make no guarantees for actual in-game use, due to the seemingly large differences between Tutorial Island and the actual main game. Hope it helps. public static List<NPC> closestToPosition(Position position, String entity){ List<NPC> npcs = getNpcs().getAll(); List<Position> npcPositions = npcs.stream().filter(c -> c.getName().equals(entity)) .map(temp -> new Position(temp.getX(), temp.getY(), temp.getZ()) ).sorted(Comparator.comparingInt(temp -> temp.distance(position))).collect(Collectors.toList()); return getNpcs().get(npcPositions.get(0).getX(), npcPositions.get(0).getY()); } public static List<NPC> closestToPosition(Position position, String entity, int offset){ List<NPC> npcs = getNpcs().getAll(); List<Position> npcPositions = npcs.stream().filter(c -> c.getName().equals(entity)) .map(temp -> new Position(temp.getX(), temp.getY(), temp.getZ()) ).sorted(Comparator.comparingInt(temp -> temp.distance(position))).collect(Collectors.toList()); return getNpcs().get(npcPositions.get(offset).getX(), npcPositions.get(offset).getY()); } Edit: I realize this is open to IndexOutOfRange issues; shouldn't be too big of a deal to handle on your end, but if it comes back to bite me I'll update as needed.
    1 point
  14. Could I please have a trial for this? Appreciate it!
    1 point
  15. Thank for your reply. [Super informative and also odd flex with those semicolons] Programing with higher order funtions gets easier the more you use them. So keep it up =).
    1 point
  16. Can you give me some use cases for this? Also does this do the same thing? public NPC closestToPosition(Position position, String entity){ return Scheme.scemeBot.getNpcs().getAll().stream().filter(s->s.getName().equals(entity)&&check(s)).reduce((a,b)->{ return (a.getPosition().distance(position)< b.getPosition().distance(position))?a:b; } ).get(); } private boolean check(NPC npc) { return !npc.isHitBarVisible() && !npc.isUnderAttack() && npc.getHealthPercent() > 0 && npc.getInteracting() == null; }
    1 point
  17. @Gunman Closest is based off (as far as I could tell) the player position, which is great for 99.9% of the cases. In my case though, for Tutorial Island, I was trying to attack the Giant rats using the bow from a specific position. I was having issues with movement, so I wanted to attack the closest rat relative to a particular Position away from the player itself; this is what I believe to be lacking in the closest method. Unless I'm blind and missing something, but it gave me a chance to mess around with Streams so hey.
    1 point
  18. Will add some more functionality for those, update coming up - so sorry about this @Phoenix (Disclaimer: this is a development build of the script!) Almost done on muling, apologies for the delay. Quick sneak peek:
    1 point
  19. @Supamen Will be releasing v135.0 within a few hours with more improvements and updates, so sorry about that. You will notice shorter delay in this release, as well as improvements to the magic spell Ty once again for all the help, you've been excellent lately As for trials activated enjoy, please lemme know how it goes. If you notice anything lemme know!
    1 point
  20. Thanks, I have just bought off the back of a great trial of this script! I didn't get a chance to try out your fisher though (because I was at todt the whole time) - will have to request a trial again at some point when I've got 99 fming
    1 point
  21. I believe this is an issue with the client in general. Especially Mirror Mode
    1 point
  22. Will add to my to do list choosing closest vs specific bank to run to. Will be in the next big update
    1 point
  23. all food basically mate can use trout if u wish
    1 point
  24. I'm not a fan of this script.... REQUEST A FREE TRAIL BEFORE YOU PURCHASE
    1 point
  25. Hey, Download link: http://osbot.org/devbuilds/osbot 2.5.86.jar API CHANGES: - Added Bot#getMouseMoveProfile & Bot#setMouseMoveProfile which will allow the scripter to change a variety of mouse movement parameters. More will be added later. These ofcourse only affect the new mouse, nothing will change with the old mouse. - Added some exception checks. - Quest VAMPIRE_SLAYER has been deprecated and replaced with VAMPYRE_SLAYER. MISC: - Added an option to toggle between the old mouse and the new mouse in the boot interface. - Minor bug fixes. - The OSBot Team
    1 point
  26. I'm afraid I'm not currently doing trials To disable bank and GE start in debug mode (press F4 while the GUI is open, title will change to Stealth Quester (debug mode)), this may not work if you don't have all the items the script expects (may be different from the quest requirements, they are printed in the logger when the script checks bank for the first time) There is also an iron man mode (press F5 while the GUI is open, title will change to Stealth Quester (ironman mode)), which will automatically gather all required items but only supports 9 quests so far Mithril so far
    1 point
  27. My dumbass missed again, please bless LOL
    0 points
Γ—
Γ—
  • Create New...