Jump to content

gfxnick

Members
  • Posts

    2
  • Joined

  • Last visited

gfxnick's Achievements

Bronze Member

Bronze Member (1/10)

  1. HOW TO USE: if you are already not at varok Grand exchange go there, Make sure you have plenty of chocolate bars and a knife in you bank or inventory (if the knife is in the bank the script will get it out) okay so now you are at the grand exchange start the script and like magic you chocolate will be made to dust with 0 effort CODE: import com.epicbot.api.os.model.game.WidgetID; import com.epicbot.api.shared.APIContext; import com.epicbot.api.shared.GameType; import com.epicbot.api.shared.entity.SceneObject; import com.epicbot.api.shared.model.Area; import com.epicbot.api.shared.model.Tile; import com.epicbot.api.shared.script.LoopScript; import com.epicbot.api.shared.script.ScriptManifest; import com.epicbot.api.shared.util.paint.frame.PaintFrame; import com.epicbot.api.shared.util.time.Time; import java.awt.*; @ScriptManifest(name = "Gfxnick's Chocolate Duster", gameType = GameType.OS) public class Main extends LoopScript { private final Area BANK_AREA = new Area(new Tile(3167, 3490, 0), new Tile(3167, 3490, 0)); //private final Area Cut_Area = new Area(new Tile(3167, 3498, 0)); @Override public boolean onStart(String... strings) { return true; } @Override protected int loop() { if(getAPIContext().inventory().contains("Chocolate Bar")) { Cutchoc(); }else if(!getAPIContext().inventory().isFull()) { coinsGet(); Time.sleep(60); }else { getAPIContext().inventory().deselectItem(); bank(); Time.sleep(60); } return 0; } public void bank() { if (!BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { getAPIContext().walking().walkTo(BANK_AREA.getCentralTile()); System.out.println("Walking to bank"); Time.sleep(1000); } else if (BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { if (!getAPIContext().bank().isOpen()) { System.out.println("Trying to open bank"); getAPIContext().bank().open(); Time.sleep(400, () -> getAPIContext().bank().isOpen()); } if (getAPIContext().bank().isOpen()) { System.out.println("Bank is open"); getAPIContext().bank().depositAllExcept("Knife", "Chocolate bar"); System.out.println("Closing bank"); getAPIContext().bank().close(); Time.sleep(400); } } } public void coinsGet() { if (!getAPIContext().bank().isOpen()) { getAPIContext().bank().open(); getAPIContext().bank().withdraw(1, "Knife"); } if (!getAPIContext().bank().isOpen()) { getAPIContext().bank().open(); } if (getAPIContext().bank().isOpen() ) { if(getAPIContext().inventory().contains("Knife")) { getAPIContext().bank().withdrawAll("Chocolate bar"); } Time.sleep(60); getAPIContext().bank().close(); } } public void Cutchoc() { if(getAPIContext().inventory().interactItem("Use" , "Knife")) { getAPIContext().inventory().interactItem("Use" , "Chocolate bar"); Time.sleep(500); } } public void bankOpen() { if (BANK_AREA.contains(getAPIContext().localPlayer().getLocation())) { if (!getAPIContext().bank().isOpen()) { System.out.println("Opening bank"); getAPIContext().bank().open(); } } } public void CancelKnife() { if(getAPIContext().inventory().interactItem("Use" , "Knife")) { getAPIContext().inventory().deselectItem(); } } public void Deposit() { if(getAPIContext().inventory().isFull()) { bankOpen(); getAPIContext().bank().depositAll( "Chocolate dust"); } } @Override protected void onPaint(Graphics2D g, APIContext ctx) { PaintFrame frame = new PaintFrame("Gfxnick's Choclate Duster"); frame.addLine("Title", "Value"); frame.draw(g, 0, 170, ctx); } }
×
×
  • Create New...