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.

Molly and Pinball hooks (1.8.2 do not work for me)

Featured Replies

As for me, 1.8.2 has broken Molly and Pinball not fixed. Maybe, its only for me.

I wrote hooks to fix randoms:

class PinballRandomHook extends RandomBehaviourHook
	{
		public PinballRandomHook(int arg0) {
			super(arg0);
		}
	
		@Override
		public int onLoop() throws InterruptedException
		{	
			RandomEventSolver pinball = randomManager.forId(randomManager.PINBALL);
			int ret = pinball.onLoop();

			RS2Interface parent = client.getInterface(263);
			if(parent==null)
				return ret;
			RS2InterfaceChild child = parent.getChild(1);
			if(child==null)
				return ret;
			String message = child.getMessage();
			if(!message.equals("Score: 10"))
				return ret;
			
			RS2Object caveExit = closestObjectForName("Cave Exit");
			if(caveExit==null){
				log("Pinball: no Cave Exit");
				return ret;
			}
			if(distance(caveExit) > 4){
				Position exitPos = caveExit.getPosition();
				Position myPos = client.getMyPlayer().getPosition();
				int x = exitPos.getX();
				if(x - myPos.getX() > 3)
					x = myPos.getX() + 3;
				if(x - myPos.getX() < -3)
					x = myPos.getX() - 3;
				int y = exitPos.getY();
				if(y - myPos.getY() > 3)
					y = myPos.getY() + 3;
				if(y - myPos.getY() < -3)
					y = myPos.getY() - 3;
				client.rotateCameraPitch(random(60, 67));
				boolean walked = walk(new Position(x,y,0));
			}
			return ret;
		}
	}
	
	class MollyRandomHook extends RandomBehaviourHook
	{
		public MollyRandomHook(int arg0) {
			super(arg0);
		}
		
		@Override
		public int onLoop() throws InterruptedException
		{	
			RandomEventSolver molly = randomManager.forId(randomManager.MOLLY);
			int ret = molly.onLoop();
			
			RS2Interface parent = client.getInterface(240);
			if(parent!=null)
				return ret;
			
			client.rotateCameraPitch(random(60, 67));
			return ret;
		}
	}

and this code add in onStart():

RandomBehaviourHook hook = new PinballRandomHook(randomManager.PINBALL);
randomManager.registerHook(hook);
RandomBehaviourHook hook = new MollyRandomHook(randomManager.MOLLY);
randomManager.registerHook(hook);

osm, i got like 7 fat account bans because bots were stuck overnight in pinball, thanx, btw aren't you supposed to do this also:?

this.randomManager.unregisterHook(randomManager.PINBALL);
this.randomManager.unregisterHook(randomManager.MOLLY);

Edited by andzelmaz

  • Author

Hmm... I think it is not necessary. If you stop and start script, all hooks are cleared. Or you can just call randomManager.clearHooks()

  • Author

Its for scripters. They can add bug fix to their scripts.

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

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.