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.

DeadCommon

Members
  • Joined

  • Last visited

  1. Sure I have five minutes. @ScriptManifest(name = "Demo 3", info = "Demoooo", version = 1.0, author = "DeadCommon") public class Demo3 extends Script { NPC[] attackable; @Override public int onLoop() throws InterruptedException { attackable = getAllAttackableNPC("Guard", "Goblin", "Cow", "Chicken"); return 550; } @Override public void onPaint(Graphics arg0) { if (attackable != null) { boolean closest = true; for (NPC next : attackable) if (next != null) { arg0.setColor(closest ? Color.GREEN : Color.RED); arg0.drawPolygon(next.getPosition().getPolygon(bot)); closest = false; } } } public NPC[] getAllAttackableNPC(String... arg0) { List<NPC> cache = client.getLocalNPCs(); if (cache == null || cache.isEmpty()) return null; // No NPCs found (whatsoever) final Player me = myPlayer(); for (Iterator<NPC> i = cache.iterator(); i.hasNext(); ) { NPC next = i.next(); if (next == null || !next.exists() || !contains(arg0, next.getName()) || next.getHealth() == 0 || (next.getFacing() != null && !next.isFacing(me))) i.remove(); } if (cache.isEmpty()) return null; // No valid NPCs filtered Collections.sort(cache, new Comparator<NPC>() { @Override public int compare(NPC o1, NPC o2) { return new Integer(o1.getPosition().distance(me.getPosition())) .compareTo(new Integer(o2.getPosition().distance( me.getPosition()))); } }); return cache.toArray(new NPC[cache.size()]); } public static boolean contains(String[] a, String b) { if (a == null || a.length == 0 || b == null || b.isEmpty()) return false; else for (String next : a) if (next != null && !next.isEmpty() && next.equals(b)) return true; return false; } }

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.