Requirements:
Money to buy the supplies required. As of the 30th of December Pie Dishes are 103 GP Mid and Pastry Dough is 415GP Mid.
What does this do?
Mixes pastry dough with pie dish to make massive profits.
Pastry dough is around 415p Pie dish is around 100gp and the finished product is well over 1000gp. Getting supplies can be quite a hassle sometimes though.
Features
Very Simple Script; Just does it's Job.
The video that encouraged me to make this script:
Projected Updates:
Bug Fixes.
Update Log:
Version 0.1 - First Release
Lots of credit to Debauchery who basically helped me get back on my feet after not coding for a long time. He basically wrote the whole thing.
And finally code:
import org.rsbot.event.events.MessageEvent;
import org.rsbot.script.Script;
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.wrappers.RSItem;
import org.rsbot.event.listeners.PaintListener;
import java.awt.*;
import org.rsbot.event.listeners.MessageListener;
import java.awt.Graphics2D;
import org.rsbot.script.util.Timer;
import org.rsbot.script.wrappers.RSComponent;
@ScriptManifest(authors = {"Forever_Madness"}, name = "PieShellMaker", description = "Combines all ingedients to make a pie shell.", version = 0.1)
public class PieShellMaker extends Script implements PaintListener, MessageListener {
int shellID = 2315;
int doughID = 1953;
int dishID = 2313;
int made = 0;
long startTime;
int shellPrice, doughPrice, dishPrice, profit, pPH;
@Override
public boolean onStart() {
log("Script starting up!");
startTime = System.currentTimeMillis();
camera.setPitch(true);
mouse.setSpeed(random(5, 8));
sleep(500, 1500);
shellPrice = grandExchange.getMarketPrice(shellID);
doughPrice = grandExchange.getMarketPrice(doughID);
dishPrice = grandExchange.getMarketPrice(dishID);
return true;
}
public void makeShell() {
if (!bank.isOpen()) {
RSItem Dough = inventory.getItem(doughID);
RSItem Dish = inventory.getItem(dishID);
sleep(random(100, 110));
if (Dough != null && Dish != null) {
inventory.useItem(Dough, Dish);
sleep(1000, 1200);
}
RSComponent pie = interfaces.getComponent(905, 14);
if (pie != null && pie.getTooltip().contains("Make All")) {
pie.doClick(true);
sleep(10000, 12500);
}
}
}
public void useBank() {
if (bank.open() == false) {
stopScript();
}
sleep(500,1000);
if (bank.isOpen()) {
if (inventory.contains(shellID)) {
bank.depositAll();
}
if (bank.getCount(doughID) >= 14) {
if (inventory.getCount(doughID) < 14) {
bank.withdraw(doughID, (14 - inventory.getCount(doughID)));
sleep(500,1000);
}
} else {
log("No more dough");
stopScript();
}
if (bank.getCount(dishID) >= 14) {
if (inventory.getCount(dishID) < 14) {
bank.withdraw(dishID, (14 - inventory.getCount(dishID)));
sleep(500,1000);
}
} else {
log("No more dishes");
stopScript();
}
if (inventory.getCount(dishID) == 14 && inventory.getCount(doughID) == 14) {
bank.close();
sleep(500,1000);
}
}
}
@Override
public void onFinish() {
log("You made:" + made);
log("Money:" + profit);
env.saveScreenshot(true);
}
public void onRepaint(Graphics g1) {
Graphics2D g = (Graphics2D) g1;
g.setRenderingHints(antialiasing);
long millis = System.currentTimeMillis() - startTime;
profit = ((shellPrice - (doughPrice + dishPrice)) * made);
pPH = (int) ((profit) * 3600000D / (System.currentTimeMillis() - startTime));
if (game.isLoggedIn()) {
g.setFont(font1);
g.setColor(color1);
g.drawString("Ran For:" + Timer.format(millis), 5, 20);
g.drawString("Made:" + made, 5, 45);
g.drawString("Profit:" + profit, 5, 60);
g.drawString("P/H:" + pPH, 5, 75);
}
}
private final RenderingHints antialiasing = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
private final Color color1 = new Color(0, 255, 0);
private final Font font1 = new Font("Arial", 0, 18);
public void messageReceived(MessageEvent e) {
String message = e.getMessage().toLowerCase();
if (message.equalsIgnoreCase("You put the pastry dough into the pie dish to make a pie shell.")) {
made++;
}
}
private enum State {
NEEDS_TO_BANK, MAKING_PIES
}
private State GetState() {
if (!inventory.contains(doughID) && !inventory.contains(dishID)) {
return State.NEEDS_TO_BANK;
} else {
return State.MAKING_PIES;
}
}
public int loop() {
switch (GetState()) {
case NEEDS_TO_BANK:
useBank();
break;
case MAKING_PIES:
makeShell();
break;
}
return 1;
}
}










Back to top
