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.

thelegacy0

Members
  • Joined

  • Last visited

Everything posted by thelegacy0

  1. I can't help much but think this should work... Go into your client settings, and turn on Object Info. This will tell you that your set trap is an object (so closestObjectForName, since you want text handled) and if the trap fails, you'll see that it's also an object. I noticed that while 'laying' the trap, the trap is an item until fully set, so a failed trap might be the same thing, but that's something you'll find out. For dropping unwanted items, create an array with the items you want to drop (ints or names) and after you collect a trap, or whenever, cycle through this array. If an item is in the array, then: String dropMe = itemsToDrop[i]; client.getInventory().interactWithName(dropMe, "Drop"); sleep(random(500, 1000); Hope this helps! Would love to see a low level hunter script that supports multiple traps
  2. System.out.println(i); Should just print out 1-4 (0-3?)... I'm not all to familiar with Position, but look at this - String[] Salutations = {"Hi", "Hello", "Hey"}; public void onMyCommand() { Random r = newRandom(); int pickMe = r.random(Salutations.size()-1); //Whatever the random integer method is, ranging from 0 to 1 less than the max array value //Arrays start at 0 System.out.println(Salutations[pickMe]+" there, digdig18."); } You take a random number, that wouldn't exceed the value of your array, and then select that position in the array.
  3. I do believe that is what I'm looking for, thank you!
  4. Like I said I'm very new, so bare with me. I found this: public boolean isFacing(Character<?> character) Returns whether this character is facing, or as you may call it interacting, with the specified Character. Parameters: character - The specified character. Returns: And that works for characters and NPCs, yes? How would I set this to look for an ent (the ent I encountered was ID 1719)? I'd imagine it'd be like if(isFacing(ent)) { //so on } But I don't know what needs to be implemented or how, like RS2Object ent = howeverYouDoIDs(1719); Sorry for the very late response, I'm trying to read through the api so I don't have to be spoonfed
  5. Hey guys, I need some help with this. I don't babysit my bot, but it'll go for an hour or two easily (ran it up to 4 hours at once already). I don't know if it's coincidental, but it'll have no problems for those hours, then sometimes it'll eat an ent. I'm very new to this API but I'm doing my best to learn what I can. When I cut, I check for an ent: if(client.getMyPlayer().isAnimating() == false) { if(closestObjectForName("Willow").getId() != 1719) { Unless ents have different ID's... That might be my problem, but where could I find a list of those? In my onLoop(), I have this, because I don't know how to check the object I'm interacting with: if(client.getCurrentRegion().getObjects().contains(1719)) { walk(willowsArea); } This way, if there's an ent in the area, it'll walk away, and refresh my selected tree (first snippet). Also, another HUGE problem: it seems stop(); doesn't really work for me. public void logout() throws InterruptedException { if(!client.getMyPlayer().isUnderAttack()) { log("Rune axe was not equipped, logging out."); logoutTab.open(); sleep(random(1000,1500)); logoutTab.logOut(); } else { log("Player is under attacking, retrying."); while (client.getMyPlayer().isUnderAttack()) { sleep(1000); } logoutTab.logoutTab.open(); logoutTab.logoutTab.logOut(); } stop(); } All the thing does is logout, login, logout, login. Very freaking bot-like. Shouldn't the entire logout() method complete (as in pass stop() before the loginhandler activates? Kind've silly to implement that mid-task.. Then, how would I go about logging out and closing the script? Answer for ents: NPC ent = closestNPCForName("Willow"); Thank you, Reden.
  6. I used this - http://osbot.org/forum/topic/10553-basic-script-tutorial-for-beginners/ The using just the skeleton, added things as I needed them.

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.