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.

Basic Iron Knife Smither

Featured Replies

Creates Iron Knifes in Varrock.

 

Start in varrock bank with hammer in inventory.

 

Will take out iron bars, go to anvil and smith them into knives, bank and repeat.

 

Virus scans:

 

https://www.virustotal.com/en/file/ce1dcf4b012b6ca750affd09dc20a5aaecdf3e66a0b9fbcea274b548a02530ab/analysis/1407213632/

 

http://virusscan.jotti.org/en/scanresult/0e82097f1114456abed8dd39254222ad7a846bf1

 

 

Download:

 

http://www.mediafire.com/download/2e5l8i9psjcml98/BasicSmither.jar

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.input.mouse.EntityDestination;
import org.osbot.rs07.input.mouse.MiniMapTileDestination;
import org.osbot.rs07.utility.Area;

import java.awt.*;

@ScriptManifest(author = "Gilaga", info = "Basic Iron Knife Smither.", name = "Basic Smither", version = 0, logo = "")

public class BasicSmither extends Script{
	private static final Area SMITHING_AREA = new Area(3185,3420,3190,3427);
	private enum State{
		SMITH, BANK, WALK_TO_SMITH, WALK_TO_BANK
	};
	private State getState(){
		if(inventory.contains("Iron bar") && SMITHING_AREA.contains(myPlayer().getPosition())){
			return State.SMITH;
		}
		else if(!inventory.contains("Iron bar") && !SMITHING_AREA.contains(myPlayer().getPosition())){
			return State.BANK;
		}
		else if(inventory.contains("Iron bar") && !SMITHING_AREA.contains(myPlayer().getPosition())){
			return State.WALK_TO_SMITH;
		}
		else{
			return State.WALK_TO_BANK;
		}
	}
	public int onLoop() throws InterruptedException{
		switch(getState()){
			case SMITH:
				outerIf:
				if(!myPlayer().isAnimating()){
					sleep(1000);
					if(!inventory.contains("Iron bar")){
						sleep(500);
						break outerIf;
					}
					int failSafe = 0;
					while(!myPlayer().isAnimating()){
						sleep(50);
						failSafe++;
						if(failSafe >= 10){
							inventory.interactWithNameThatContains("Use", "Iron bar");
							RS2Object anvil = objects.closest(2097);
							mouse.click(new EntityDestination(bot, anvil));
							if(interfaces.get(312) != null){
								
							}
							sleep(1500);
							mouse.move(370,180);
							mouse.click(true);
							sleep(250);
							mouse.move(365,250);
							mouse.click(false);
							sleep(1000);
							keyboard.typeString("27");
							sleep(500);
							break outerIf;
						}
					}
				}
				break;
			case BANK:
				RS2Object bankBooth = objects.closest("Bank booth");
			    if (bankBooth != null) {
			        if (bankBooth.interact("Bank")) {
			        	while(!bank.isOpen()){
			        		sleep(250);
			        	}
			        	bank.depositAll("Iron knife");
			        	if(bank.contains("Iron bar")){
			        		bank.withdraw("Iron bar", 27);
			        	}
			        	else{
			        		stop();
			        	}
			        	bank.close();
			        }
			    }
			    break;
			case WALK_TO_BANK:
				walkTile(new Position(3185,3436,0));
				break;
			case WALK_TO_SMITH:
				walkTile(new Position(3185,3426,0));
				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) {
		 
    }
}

Looks nice, any chance you could fix the messed up code snippet? or is it just showing up white every other line for me :/

If that's the code then it's clean - glad to see some more free scripts flying around!!

  • 4 weeks later...
  • Author

the bot is fine i think the new client update broke this script can you fix it?

What is wrong with it, what happens when you run it?

  • 2 weeks later...
  • 4 weeks later...

Please add a 1 or 2 second delay inbetween "Withdraw 'x' amount of bars" and the amount to withdraw as it tries to withdraw them before the "x" amount interface has even opened resulting in the amount it is trying to withdraw being typed into the chat box.

 

Apart from that the rest of the script works great,

 

Thanks.

  • 1 month later...

bots broken man i may try to fix it studying up on scripting a bit looks like it would be a good place to start

  • 4 weeks later...

Sad to think this is never going to be fixed :'(

  • 5 months later...
  • 3 weeks later...

I don't see why people would make iron knifes when you don't profit that much. Either way good job on release.

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.