Jump to content

Bobrocket

Members
  • Posts

    1664
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    100%

Everything posted by Bobrocket

  1. if (regionB.contains(myPlayer()) walk(regionA); else if (getNpcs().closest("Monster X").interact("Attack")) log("attacked"); would work fine as an alternative.
  2. The reason people think it's 9999 over 10000 is because we start to count at 1, not 0. This is why programming is hard for a lot of people, especially with arrays, because they try to access index 1 as if it's index 0. Things would be a lot easier if we started counting from 0, not 1. My logic for 0000-9999 would be 10^4. Where 4 is the max number of digits, and 10 since we're working in base 10. (you can have a maximum of 10 different states per digit in base 10; 0-9)
  3. Another reason I wrote this API is easier cross-bot compatibility. Means I rewrite less code, and therefore I have the same code base in case a bug breaks out. Within this context, a null is not good. A null means that code that should work perfectly fine will not work. A null means additional checking on the users end, which can cause more problems if they forget. In my case, I pass a omniapi.data.DefaultNPC instance, which simply extends omniapi.data.NPC and is constructed to, simply, not exist. This means there is no NPE when trying to interact (my above post), but it still actually represents nothing. A new scripter is going to try the exact code I highlighted in my above post, realise it doesn't work, and panic because they wrote incorrect code (that is actually correct). I personally don't believe that the API should ever return null, especially in contexts like this. Lastly, I wrote this API as this is personally what I believe the OSBot API should be like.
  4. In a region with no "Dwarf" NPCs... getNpcs().closest("Dwarf").interact("Attack"); Result: (bot also freezes) getNPCFinder().findClosest("Dwarf").attack(); Result: Nothing, because it's handled. You shouldn't be returning null for anything (I know this isn't related directly to the interaction method, but it's a fair point), the code for both methods listed is perfectly valid and thus should work no matter what, right? Returning null is also known as the billion dollar mistake, and is for a good reason. NPCFinder will return an instance of omniapi.data.NPC no matter what, whereas NPCS will return either an instance of org.osbot.rs07.api.model.NPC or null. We shouldn't need to null check things like this. In fact, the api docs even states it returns the closest generically specified Entity - mentions nothing about null. Also, the NPC #closest() methods don't even return the correct closest NPC (even though it should be using Pythagoras' algorithm). I've highlighted this in a thread, which you have likely not read yet, and NPCFinder accounts for this. Wrapping around IE is temporary, it's there to show it works and I will be writing a custom interaction method very soon.
  5. Thanks for the 5m nerd Probably better item + widget support >learning java >osbot Stop bullying me I report you
  6. https://github.com/Bobrocket/OSBotAPI Example usage: leaked green dragon killer source getNPCFinder().findClosest("Green dragon").attack(); //OSBot version NPC n = getNPCS().closest("Green dragon"); if (n != null && n.exists() && n.getHealth() > 0 && !n.isUnderAttack() && !myPlayer().isUnderAttack()) n.interact("Attack"); omnipocket leak getNPCFinder().findClosest("Man").pickpocket(); //OSBot version NPC n = getNPCS().closest("Man"); if (n != null && n.exists() && n.getHealth() > 0 && !n.isUnderAttack() && !myPlayer().isUnderAttack()) n.interact("Pickpocket"); Advanced usage: get ge/collect box/bank/poll booth close button getWidgetFinder().findFromAction("Close", (widget) -> (widget.getSpriteIndex1() == 535)); //OSBot version cant be fucked l0l Super simple example script: attacks chickens 24/7 public int onLoop() throws InterruptedException { getNPCFinder().findClosest("Chicken").attack(); return Constants.TICK; } //OSBot version public int onLoop() throws InterruptedException { NPC n = getNPCS().closest("Chicken"); if (n != null && n.exists() && n.getHealth() > 0 && !n.isUnderAttack() && !myPlayer().isUnderAttack()) n.interact("Attack"); return 600; } Why use my API over the default OSBot one? Handles everything for you. Interacting with an NPC? Null checks, camera movements etc. all handled easily Streamlined, consistent API between data types Click accuracy increased by 5% on moving NPCs (tested against 2.3.136; will dig up test results later) A lot more customisation in Finders vs default OSBot methods (especially with widgets!) #findClosest() actually correctly returns the closest NPC/entity Super easy to implement - just change extends Script to extends OmniScript Usage Download the latest zip Drag the omniapi folder into your project (delete Test.java!) Make your script class extend OmniScript instead of Script Make use of the OmniScript API Please note the API is updated constantly, so be sure to redownload the zip occasionally!
  7. It's hard to tell, really. AFAIK, it's extremely hard (if not impossible) to detect injection bots via Java (especially since the applet would be loaded normally if I'm correct). However, I am not properly versed with the JVM like some people on this forum (cough cough @fixthissite). If you're going to gold farm on a large scale, don't bother with mirror.
  8. http://www.jonathancoulton.com/2015/09/25/new-portal-song-for-lego-dimensions/
  9. I don't ask anyone to spam fuckboy, I ask them to post a survey in here once.
  10. When you run the browser and head to runescape.com, a java applet will run. This can actually grab your real IP (whether or not jagex does this is unknown), however I know that if you run just tor.exe for the proxy and then run the jagex launcher through the tor proxy then it will work just fine.
  11. Tor has a SOCKS proxy on port 9050 (or 9150 or 9051 depending on your configuration). Run tor.exe and connect to the proxy (127.0.0.1:9050)
  12. I think I circumvented this for myself by removing imagealphablending($image, false);. Good luck
  13. To celebrate my free script, OmniMen, pickpocketing over 500,000 men, I have decided to do a little giveaway. You can enter in a few ways: Fill out the short survey listed below in this thread Change your signature to one of those listed below You can do both for 2 entries. For your signature entry to be valid, it must remain your signature until the winners are picked. You also must post in the thread saying that you have changed your signature to reflect the ones below. Survey: Signatures: With images Without images Applying signatures: Prizes: First Prize - a $9.99 store voucher, OmniPocket and OmniFletch! Second Prize - OmniPocket and OmniFletch Third Prize - Either OmniPocket or OmniFletch (you choose) How am I going to pick winners: I am going to tally up how many entries each person has and assign a random number to each one. I am going to pick a random entry three times, the first one being the first prize, second being the second prize etc. I will announce the winners in this thread and message them as appropriate. This giveaway will end in 2 weeks from the time I post this (ending on the 19th of October). May the odds ever be in your favour
  14. Bobrocket

    Wam

    OSRS requires CPU over GPU. You can max out about 10 mirror clients on 2x hexa core xeon CPUs for reference.
  15. Older_than_the_internet.bmp
  16. Bobrocket

    Tinychat

    Come hear my voice twerps
  17. ???????????????????????? ???????????????????????????????????????????????????????????????????????
  18. I have the Moto G 2nd gen, dual sim, unlocked, works amazingly and I got mine for £80 through a friend.
×
×
  • Create New...