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.

Master Farmer Pickpocket

Featured Replies

Start in Draynor, in bank

 

Eats trout, lobster, and salmon.

 

Pathing is horrible but will fix soon.

 

-Fixed a banking problem.

 

-Virus Scans:

 

https://www.virustotal.com/en/file/5fecff4cb660abf4dab1f09a67392e956996836c142a519291986d2da604c1ce/analysis/1406772744/

 

http://virusscan.jotti.org/en/scanresult/b655cbdd477c44aa067a3534e16e6b321d7d305a

 

http://www.mediafire.com/download/953o742324jj616/BasicPickpocket.jar

import org.osbot.legacy.script.mouse.MinimapTileDestination;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.utility.Area;
import org.osbot.rs07.input.mouse.MiniMapTileDestination;

import java.awt.*;

@ScriptManifest(author = "Gilaga", info = "First Script Iv'e ever made.", name = "Basic PickPocket", version = 0, logo = "")

public class BasicPickpocket extends Script{
	private static final Area BANK_AREA = new Area(3092,3240,3095,3246);
	private Position PICKPOCKET_POSITION = new Position(3081,3250,0);
	private Position BANK_POSITION = new Position(3092,3243,0);
	private Position RUN_POSITION = new Position(3095,3250,0);
	private enum State{
		EAT, BANK, WALK_TO_BANK, WALK_TO_PICKPOCKET, PICKPOCKET, RUN
	};
	private State getState(){
		if(myPlayer().isUnderAttack() && myPlayer().getInteracting().getId() == 5515){
			return State.RUN;
		}
		else if(skills.getDynamic(Skill.HITPOINTS) < 10){
			if(inventory.contains("Salmon", "Lobster", "Trout")){
				return State.EAT;
			}
			else if(BANK_AREA.contains(myPlayer())){
				return State.BANK;
			}
			else{
				return State.WALK_TO_BANK;
			}
		}
		else if(BANK_AREA.contains(myPlayer())){
			return State.WALK_TO_PICKPOCKET;
		}
		return State.PICKPOCKET;
	}
	public int onLoop() throws InterruptedException{
		switch(getState()){
			case EAT:
				inventory.interact("Eat", "Salmon", "Lobster", "Trout");
				break;
			case PICKPOCKET:
				getNpcs().closestThatContains("Master Farmer").interact("Pickpocket");
				break;
			case BANK:
				RS2Object bankBooth = objects.closest("Bank booth");
			    if (bankBooth != null) {
			        if (bankBooth.interact("Bank")) {
			            while (!bank.isOpen())
			                sleep(250);
			            	if(bank.contains("Salmon")){
			            		bank.depositAll();
			            		bank.withdraw("Salmon", 10);
			            		bank.close();
			            	}
			            	else if(bank.contains("Lobster")){
			            		bank.depositAll();
			            		bank.withdraw("Lobster", 10);
			            		bank.close();
			            	}
			            	else if(bank.contains("Trout")){
			            		bank.depositAll();
			            		bank.withdraw("Trout", 15);
			            		bank.close();
			            	}
			            	else{
			            		stop();
			            	}
			        }
			    }
			    break;
			case WALK_TO_PICKPOCKET:
				walkTile(PICKPOCKET_POSITION);
				break;
			case WALK_TO_BANK:
				walkTile(PICKPOCKET_POSITION);
				walkTile(BANK_POSITION);
				break;
			case RUN:
				walkTile(PICKPOCKET_POSITION);
				walkTile(RUN_POSITION);
				break;
		}
		return random(200,300);
	}
	private boolean walkTile(Position p) throws InterruptedException {
		mouse.move(new MiniMapTileDestination(bot, p), false);
		sleep(random(150, 250));
		mouse.click(false);
		int failsafe = 0;
		while (failsafe < 10 && myPlayer().getPosition().distance(p) > 2) {
			sleep(200);
			failsafe++;
			if (myPlayer().isMoving())
				failsafe = 0;
		}
		if (failsafe == 10)
			return false;
		return true;
	}
	public void onPaint(Graphics2D g) {
		 
    }
}

Edited by gilaga

  • Author

Are you allowed to have mediafire download links like that?

Honestly, I have no idea.

Honestly, I have no idea.

You should probably just post the source code so that we can look through and make sure that there is nothing malicious about the script itself...

You are allowed to have links, you should post a virus scan since you're new, and posting the code is indeed a good way to make people trust you a little more.

  • Author

You are allowed to have links, you should post a virus scan since you're new, and posting the code is indeed a good way to make people trust you a little more.

Thanks, where can I go for a good virus scan?

Edited by gilaga

Are you going to make a UI for this, so I can choose which food to use, and which seeds to steal? Would be awesome. Just started using this.

  • Author

Are you going to make a UI for this, so I can choose which food to use, and which seeds to steal? Would be awesome. Just started using this.

I am really new to making scripts and I really dont think I would be able to make a UI.

 

I am willing to make more food options available though, Currently the bot prioritizes certain foods over others, it will take out salmon first, then lobster, and then trout. I haven't tested this feature yet but I believe it works, confirmed with salmon though.

 

If you would like to make a suggestion on a food to add I would be open to it.

I am really new to making scripts and I really dont think I would be able to make a UI.

 

I am willing to make more food options available though, Currently the bot prioritizes certain foods over others, it will take out salmon first, then lobster, and then trout. I haven't tested this feature yet but I believe it works, confirmed with salmon though.

 

If you would like to make a suggestion on a food to add I would be open to it.

Oh no, I don't have a food suggestion, the only thing I'm really missing, is the drop option..

All these potato seeds are so unnecessary. but I'm very thankfull for the script, it's running smoothly for about an hour now. I'll see how it's running when I get home from work (In about 5 hours) - Tell you if it's still running.

  • Author

Oh no, I don't have a food suggestion, the only thing I'm really missing, is the drop option..

All these potato seeds are so unnecessary. but I'm very thankfull for the script, it's running smoothly for about an hour now. I'll see how it's running when I get home from work (In about 5 hours) - Tell you if it's still running.

Server restart.

Server restart.

I see, you are correct.

 

Now I can't start OSBot though, "check your boot options"

Anyone know the reason behind this?

  • Author

I see, you are correct.

 

Now I can't start OSBot though, "check your boot options"

Anyone know the reason behind this?

OSBot is currently down, think its happening for everyone.

Oh no, I don't have a food suggestion, the only thing I'm really missing, is the drop option..

All these potato seeds are so unnecessary. but I'm very thankfull for the script, it's running smoothly for about an hour now. I'll see how it's running when I get home from work (In about 5 hours) - Tell you if it's still running.

with the dropping option, its not necessary, I keep all my seeds, but if you dont want them, just take a visit to a general store one day, problem solved.

OSBot is currently down, think its happening for everyone.

with the dropping option, its not necessary, I keep all my seeds, but if you dont want them, just take a visit to a general store one day, problem solved.

Alrighty, will do.

 

Luckily, my bank is nowhere near filled up, so it shouldn't be a problem. 

Once again, thanks for the script.

Create an account or sign in to comment

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.