Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

omni4life

Members
  • Joined

  • Last visited

Everything posted by omni4life

  1. I really don't mean to be spoon fed, but I'm struggling a little bit to understand the implementation. I've only just begun an online course on Java so for the most part I struggle to follow anything outside of states and if statements. I'm hoping to actually move to a node/OOP style next script, but I don't understand it well enough yet. If I post my current code, could you be so kind as to give me a demonstration of how it would be integrated? Either way, I'll keep experimenting with everything so thank you very much to both you and everyone else for your advice and input ! import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Omni4life", info = "Kills Yaks on Neitiznot.", name = "Yakinator", version = 1, logo = "") public class yakKiller extends Script { // Declare all Variables public static String status; @Override public void onStart() { log("Yak Killer by Omni4life has begun."); log("If you experience any issues while running this script please report them to me on the forums."); } private enum State { ATTACK, WAIT }; private State getState() { NPC yak = npcs.closest("Yak"); if (yak != null) return State.ATTACK; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case ATTACK: NPC yak = npcs.closest("Yak"); if (yak != null && !combat.isFighting() && !yak.isUnderAttack() && yak.isAttackable()) { yak.interact("Attack"); status = "Interacting with Yak"; sleep(random(500, 800)); } break; case WAIT: sleep(random(500, 700)); break; } return random(200, 300); } @Override public void onExit() { log("Thanks for running Yak Killer"); } @Override public void onPaint(Graphics2D g) { } }
  2. Thanks very much for the advice. With point 2, !combat.isFighting checks of my player is interacting, but not being interacted yes? I'm away from my pc/api at the minute, but which class is interacted under? MyPlayer()?Thanks for any and all input everyone!
  3. Hey all, back again for yet another round of questions. I wrote an ultra quick Yak killer today for personal use, however, I have some issues with the combat method and I would love some more experienced users input. This is my method as it stands at the moment: case ATTACK: NPC yak = npcs.closest("Yak"); if (yak != null && !combat.isFighting() && !yak.isUnderAttack()) { yak.interact("Attack"); status = "Interacting with Yak"; sleep(random(500,800)); } break; These are my questions: As my character kills the NPC, the NPC enters its death animation thus rendering !combat.isFighting() false and the method continues to click the NPC attempting to re initiate combat. Is there a check I can implement so that once the NPC I'm fighting begins its death animation I can instantly move onto the next? The clicking a dying NPC looks very botlike, but I'm unsure how to combat it. Sometimes, despite the fact my character is already under attack from a Yak it will ignore it and attempt to fight a different Yak, spam clicking it and being unable to attack as it isn't a multicombat zone. Is there a reason it's doing this that I can't see or is the !combat.isFighting method just a little bit iffy? Thanks for any and all help as always! I really appreciate all of your input, ideas and advice. -Omni.
  4. I thought Deadman was going to have safe zones to handle any commerce, wasn't it? I only read the in game poll about it, I don't really know a whole heap.
  5. Are there any errors being output to the OSBot console? You enable the console in the top right where the interaction lock and settings etc are.
  6. omni4life replied to Wishy's topic in Archive
    I started work on this tonight. There's still a few days work in it as I'm currently studying for my end of semesters and only get 30 minutes or so to toy around with this a night and I'm still wrapping my head around a new organisation system for my code but hopefully I'll have a beta by next weekend. That said: If Flamezzz winds up adding this to his Clue script, it'd be well worth the money to buy that as I just don't have his level of patience to solve the clues.
  7. If you set a bank pin on Tutorial Island, you can deactivate Iron Man mode at any time by talking to the people in Lumbridge (it takes 7 days in case you're hacked).
  8. omni4life replied to Wishy's topic in Archive
    Okay, well if no-one more competent or motivated doesn't jump in I might chip away at this throughout the week. It'll be extremely basic for the time being, just kills the Cocatrices, loots any decent runes and clues, eats a hardcoded food (likely lobsters) and returns to Zanaris when it has one. Once I learn GUI's I'll add options for food, walk to Seers and variable loots but sadly for the moment that's beyond me.
  9. omni4life replied to Wishy's topic in Archive
    That really shouldn't be too hard. Once I finish learning Swing (which admittedly may be over two weeks as I'm in the middle of my semesters peak load at the minute), if no-one has released one I'll be happy to take a shot at it. It's a fairly basic script. I'll definitely wouldn't try and touch solving clues, that's way beyond my skillset. I'd definitely rather leave that one to Flamezzz. He's the resident clue expert and would outdo me every time. What functionality are you after? If I were doing it, I'd simply use the fairy ring network to bank, get food and what not. I could also do Seer's banking, but that would definitely have to wait until I understand Swing more.
  10. The website is currently having some issues with DDoS attacks. This is likely related. The download at the top of the website is still working though so you can download the .jar from that link instead. The link is found here.
  11. Apologies for making another thread, I didn't actually realise that this was on ongoing issue. Most of my "scripting" is 9/10'ths fiddling until something works and 1/10'th coughing in surprise when it actually does. I'd merely assumed I was using the method incorrectly. Best of luck with chasing down the problem and thanks for posting
  12. Haha, I don't even want to imagine that nightmare. If I branch out from my iron man, I think I'll be paying for any fiddly scripts rather than writing them myself. I take it from the likes that this is a known issue that's bugging quite a few people ?
  13. Hey guys, I was wondering if there is a way to increase the accuracy of the .interact method? I have the following code snippet, but sometimes it misclicks the bank chest, clicks through the wall and runs outside looking suspicious and damaging xp/ph Entity chest = objects.closest(true, bankChest); .... other code here chest.interact("Use"); Thanks for any help or suggestions! -Omni.
  14. You're right, silly error. the localWalker walked me to the tile exactly beside the right side of the bank chest which I hadn't included in my bankArea so when the the banking state was checking for my player to be in bank area, it was never executed! Thank's for everyones help! I'll toy around with that one when I get home this evening ! There are so many functions hidden away in the API I'm really struggling to know what to use and when. Thanks for the feedback!
  15. That's really up to you, you can change it in the first part. I.e. inventory.getItems() or bank.getItems() If you check in the API and look at each of the types (inventory, bank etc) you can determine what methods you can call from them. In that case, .getItems() is predefined for both so you don't have to create any custom code (unless you have a reason I'm overlooking, and I'm still learning all of this myself so that's possible)
  16. Hey guys, I've made a few scripts now for personal use and what not and eventually I'd quite like to be decent enough to share it around on the SDN, but I've noticed I have the same issue in virtually all of the scripts. They all work perfectly fine right up until the moment I add my paint to the script at which point it usually executes 4/5's properly and get's jammed in a state. In this instance, my character cuts the logs fine, walks to the bank and gets stuck standing there in the WALK2BANK state constantly outputting "Walking to Bank" in the log. I just can't see my error and I'd absolutely love a second set of eyes. Code removed, thank you to all for assistance. Any and all feedback is appreciated, both on my in general code and my issue. I'm headed off to bed now so I'll check responses tomorrow. I hugely appreciate everyone's help in advance.
  17. I believe I've had this issue before and I solved it by adding into the item check code, if item!=null execute item check else do something I might let someone more experienced wade in, but that should be a quick thing to test in the interim . Best of luck with it!
  18. My advise would be to walk using the method outlined within this tutorial . To do it, simply add Divine Utility (found under the 'Other' section of the SDN) to your list of scripts and collect the full path you wish you walk. Once you have the path, all you need to is add it to the top of your script and use: localWalker.walkPath(path); Best of luck with it! Feel free to message me or reply if you need a hand getting it working. I also believe that earlier this week I saw a post saying that Web Walking should be implemented within about a week so all of these methods will likely become obsolete at that time.
  19. Hey man, I guess it's my chance to return the help I got . You're correct in saying the area I defined was wrong and should only have two points. That was my fault, I didn't properly know how to use Divine Utility yet and I was clicking the tiles for the area I wanted as opposed to selecting the two corners. Using Divine Utility, you select your top right and bottom left corners (or whatever two corners you see fit). This is the corrected code to define the area within the Barbarian Outpost bank: Area bankArea = new Area(new Position(2536, 3575, 0), new Position(2535, 3571, 0)); This defines the two corners and creates a square/rectangle between them. To walk to the bank I did the following: private Position[] bankPos = new Position[] { new Position(2519, 3580, 0), new Position(2525, 3571, 0), new Position(2531, 3571, 0), new Position(2533, 3573, 0), new Position(2535, 3574, 0), new Position(2536, 3573, 0), }; private State getState() { if (inventory.isFull()) { return State.WALK2BANK; } } public int onLoop() throws InterruptedException { switch (getState()) { case WALK2BANK: status = "Walking to bank"; localWalker.walkPath(bankPos); break; } } My banking method was as follows. Note the area check in line three: case BANK: log("Case Change to Bank"); if (inventory.isFull() && bankArea.contains(myPlayer())) { status = "Banking"; log("Status Change and condition check"); Entity chest = objects.closest(true, bankChest); if (!bank.isOpen()) { if (chest != null) { if (chest.isVisible()) { if (!myPlayer().isMoving()) { chest.interact("Use"); sleep(random(1000, 1500)); } } } else { camera.toEntity(chest); } } else if (getInventory().contains( "Bronze axe, Iron axe, Steel axe, Black axe, Mithril axe, Adamant axe, Rune axe, Dragon axe")) { bank.depositAllExcept( "Bronze axe, Iron axe, Steel axe, Black axe, Mithril axe, Adamant axe, Rune axe, Dragon axe"); } else { bank.depositAll(); sleep(random(200, 300)); } } break; I hope this helps you, if you need any more help just say the word. I know the learning curve is steep, but it can be damn rewarding!
  20. I think it might be worth my time to not try and dive head first into scripting overnight and instead take the time to take some Java courses first. I actually started John Purcell's "Java Tutorial for Complete Beginners" on Udemy and that's definitely going to help me out I think. The next thing I want to tackle is GUI's because at the minute, I'm creating separate scripts for the same skill as I level (i.e. willow cutter, maple, iron miner, coal miner etc) so I think I might take a Swing class. Do you have any recommendations as to good resources for it?
  21. Yeah haha, I spotted your scripts last night and saw the issue. Don't worry, I won't be encroaching on your turf . I used to release under Omni on rscheata/iBot but I haven't had anything to do with this for years. I'll definitely not put Omni in any names or similar Also, regarding nodes, I haven't used Java for years. I had a look at it and for the time being, I think it's beyond my abilities. I'm trying to work towards being able to use it, but in the interim I'm just creating scripts that I actually have a use for to learn.
  22. I actually used it once he suggested it, I'm definitely a fan of it. It makes life a lot easier and no doubt saved me a lot of time and fiddling. If I may make a suggestion (as someone with no experience so this might be a nightmare to do), when you have the auto collect path option selected you could be able to right click one of the recorded tiles in the GUI and delete it from the log and the output as I misclicked a few times and didn't want to have to return to the start of my path to re-record a more accurate version. I just manually edited it out of the Array after I got the code so no biggie, but that might make things a tiny bit easier.
  23. I'll toy around with that in the morning and see if I can get it working properly. I really appreciate you and everyone else taking the time to help me . I think the script is actually almost ready to be left alone for more than 20 minutes.
  24. That fixed it perfectly , Thank you to everyone! It was so simple when I actually think about it. If you don't mind, I just have two more questions for now if anyone has time. I'm looking to create a simple safeguard the says "if no xp is gained in 10 minutes, terminate script, logout". I'm not too sure how to implement it. I know how to track XP gains as I've been using it in a paint I created thanks to Pugs tutorial, but I'm not totally sure how to actually write it. Would this be a simple enough job? I have my character set to dismiss randoms events. When it did this in my mining script, it actually caused to script to stop working. It didn't crash or anything, it was still running it just simply stood there as opposed to resuming mining. Is there any code I have to add in to say "pause script on random"? Thanks again to everyone here, I really appreciate how patient and helpful the community is.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.