goldcallum
Apprentice
What is your very favourite money mkaing script for rsbot?
Mine is probally the ess miner, lol.
Mine is probally the ess miner, lol.
import java.awt.*;
import com.speljohan.rsbot.script.*;
import com.speljohan.rsbot.script.wrappers.*;
import com.speljohan.rsbot.event.listeners.PaintListener;
import com.speljohan.rsbot.bot.Bot;
public class VialBuyer extends Script implements PaintListener{
public long startTime = System.currentTimeMillis();
public int VialID = 227;
public int MoneyID = 995;
public int vialsInBank;
public int vialPrice = 10;
public int vialGEPrice = 92;
public static final int rangeDoor = 34807;
public int[ ] BankerIDs = new int[ ]
{
34752
};
public int StorekeeperID = 590;
public int x;
public int Vials = 0;
public int vialCount;
// Tile paths:
public RSTile[ ] ToBank = new RSTile[ ]
{
new RSTile(2614, 3293),
new RSTile(2624, 3297),
new RSTile(2633, 3289),
new RSTile(2643, 3283),
new RSTile(2652, 3283),
new RSTile(2652, 3285)
};
public RSTile[ ] ToShop = reversePath( ToBank );
// Other globals:
public int ScriptState = 10;
public int GambleInt;
@Override
public double getVersion() {
return 3.0;
}
@Override
public String getName() {
return "VialBuyer";
}
@Override
public String getScriptCategory() {
return "Conor";
}
@Override
public String getAuthor() {
return "Conor";
}
public String getDescription() {
return "Start at Ardy South Bank, With gp in your inventory, than start the script";
}
public void onRepaint(Graphics g) {
if (isLoggedIn()) {
g.setColor(Color.black);
g.fillRect(340, 1, 170, 30);
g.setColor(Color.white);
g.drawRect(340, 1, 170, 30);
g.setColor(Color.green);
g.drawString("Fletched " + Integer.toString(vialCount)
+ " Logs in total", 364, 20);
}
}
public void onFinish( ) {
Bot.getEventManager( ).removeListener(PaintListener.class, this);
}
public int loop( )
{
switch ( ScriptState )
{
case 10:
WalkToShop( );
return( random(750, 1500) );
case 20:
TradeSeller( );
return( random(750, 1500) );
case 25:
BuyVials( );
return( random(750, 1500) );
case 30:
WalkToBank( );
return( random(750, 1500) );
case 35:
UseBank( );
return( random(750, 1500) );
case 36:
DepositVials( );
return( random(750, 1500) );
case 37:
ScriptState = 10;
return( random(750, 1500) );
}
return( -1 );
}
public void WalkToBank( )
{
if ( distanceTo(ToBank[ToBank.length - 1]) < 5) {
walkTileMM(ToBank[ToBank.length -1]);
ScriptState = 35;
return;
}
walkPathMM(randomizePath(ToBank, 2, 2), 15);
}
public void WalkToShop( )
{
if ( distanceTo(ToShop[ToShop.length - 1]) < 5 )
{
ScriptState = 20;
return;
}
walkPathMM(randomizePath(ToShop, 2, 2), 15);
}
public void UseBank( )
{
RSObject Banker = findObject( BankerIDs );
if ( Banker != null )
{
wait( random(1500, 1700) );
atObject(Banker, "Use-quickly");
wait( random(200, 500) );
if ( interfaceExists(INTERFACE_BANK) )
ScriptState = 36;
}
}
public void DepositVials( )
{
if ( getInventoryCount(VialID) >= 0 )
{
Vials += getInventoryCount(VialID);
depositAllExcept(MoneyID);
vialsInBank = getBankInventoryCount(VialID);
{
if(getInventoryCount(MoneyID) < 250)
withdraw(MoneyID, 15000 - getInventoryCount(MoneyID));
log("Checking if we have coins");
}
ScriptState = 37;
}
}
public void TradeSeller( )
{
RSNPC Storekeeper = getNearestNPCByID( StorekeeperID );
{
if ( Storekeeper != null )
{
setRun(true);
CheckDoor();
atNPC(Storekeeper, "Trade");
wait( random(1500, 2000) );
if ( interfaceExists(620) )
ScriptState = 25;
}
}
}
public void BuyVials( )
{
clickMouse(80, 118, 2, 2, false );
wait( random(10, 21) );
atMenu("Buy X");
wait( random(1500, 2000) );
buyXAmount();
wait( random(1500, 2500) );
if ( isInventoryFull( ) )
ScriptState = 30;
}
public void buyXAmount() {
int[] oftenUsedInputs = new int[] { 28, 35, 77, 68, 75, 33, 48 };
int buyThisAmount = oftenUsedInputs[random(0, oftenUsedInputs.length)];
wait( random(500, 700) );
sendText("" + buyThisAmount, true);
}
public void CheckDoor( )
{
if (findObject(rangeDoor) != null) {
if (distanceTo(findObject(rangeDoor)) < 6) {
atDoor(findObject(rangeDoor), "South", "Open");
wait( random(500, 1500) );
}
}
}
}

