minedas
Trade With Caution-
Posts
5 -
Joined
-
Last visited
-
Feedback
0%
About minedas
Profile Information
-
Gender
Male
minedas's Achievements
Newbie (1/10)
0
Reputation
-
Hi thanks for fast reply.It just stands at well and not fill buckets. Im not really familiar with interacting with inventory items so this is why im used other user script
-
So i used other user source and edited to work as clay softner but it isnt working correctly,it just goes to well and stands there and i dont know is it softs the clay since it doesnt fill buckets.Heres edited script import java.awt.Color; import java.awt.Graphics2D; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.input.mouse.MiniMapTileDestination; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.Area; import org.osbot.rs07.api.model.Entity; @ScriptManifest(author = "", info = "", name ="", version = 0.0, logo = "") public class Cooker extends Script { private long startTime; private String status = "Initializing"; private Color bg; String state; @SuppressWarnings("unused") private Color box; public int statsX; public int statsY; public void onStart() { startTime = System.currentTimeMillis(); bg = new Color(69, 53, 15, 125); box = new Color(0, 0, 0); statsX = 313; statsY = 344; } public void onPaint(Graphics2D g1) { long millis = System.currentTimeMillis() - startTime; Graphics2D g = g1; g.setColor(bg); g.fillRect(statsX, statsY, 184, 115); g.setColor(Color.green); g.drawRect(statsX, statsY, 184, 115); g.setColor(Color.white); g.drawString((new StringBuilder("")).append("0.1 | Author : IkNight").toString(), statsX + 5, statsY + 15); g.drawString((new StringBuilder("State: ")).append(status).toString(), statsX + 5, statsY + 30); g.drawString((new StringBuilder("Time ran: ")).append(timeToString((int)millis)).toString(), statsX + 5, statsY + 45); g.drawString((new StringBuilder("Softened/Hour: ")).append(perHour((int)(statsX), System.currentTimeMillis() - millis)).toString(), statsX + 5, statsY + 75); } public void walkPath(Position[] path) throws InterruptedException { for (Position p : path) { if (myPosition().distance(p) > 16 || myPosition().distance(p) < 3) continue; boolean success; do { success = walkTile(p); } while (!success); } } public boolean walkTile(Position p) throws InterruptedException { if (myPosition().distance(p) > 13) { Position pos = new Position(((p.getX() + myPosition().getX()) / 2) + random(-3, 3), ((p.getY() + myPosition().getY()) / 2) + random(-3, 3), myPosition().getZ()); walkTile(pos); } mouse.click(new MiniMapTileDestination(bot, p), false); int fail = 0; while (myPosition().distance(p) > 2 && fail < 10) { sleep(500); if (!myPlayer().isMoving()) fail++; } return fail != 10; } public static String perHour(int gained, long startTime) { int i = (int)(((double)gained * 3600000D) / (double)(System.currentTimeMillis() - startTime)); return (new StringBuilder()).append(i).toString(); } public static String timeToString(long time) { int seconds = (int)(time / 1000L) % 60; int minutes = (int)((time / 60000L) % 60L); int hours = (int)((time / 0x36ee80L)); return (new StringBuilder(String.valueOf(hours))).append(":").append(minutes).append(":").append(seconds).toString(); } public void walktowell() { RS2Object range = objects.closest(new String[] {"Well"}); status = "Walking to Well"; try { walkTile(new Position (range.getPosition().getX(), range.getPosition().getY(), 0)); } catch (InterruptedException e) { e.printStackTrace(); } } public void bank() { status = "Opening Bank"; RS2Object banks = objects.closest(new String[] {"Bank booth"}); localWalker.walk(banks.getPosition()); while(myPlayer().isMoving()) { } banks.interact("Bank"); } public void withdraw() { status = "Withdrawing"; getBank().depositAll(); getBank().withdraw(1925, 14); getBank().withdraw(434, 14); } public void fill() throws InterruptedException { RS2Object Well = objects.closest(new String[] {"Well"}); status = "Interacting with Well"; getInventory().getItem(1925).interact("Use"); Well.interact("Use"); sleep(1500); } public void soft() throws InterruptedException { status = "Interacting with Clay"; getInventory().getItem(1929).interact("Use"); getInventory().getItem(434).interact("Use"); sleep(900); } public void makeall() { status = "Making X"; if (getInterfaces().getChild(548, 130).isVisible()) { getInterfaces().getChild(309, 2).interact("Make All"); } } public void wersofting() { status = "We Are Softing!"; } private static final Area wellA = new Area(3086,3502,3083,3502); private static final Area bankA = new Area(3091,3449,3098,3494); public int onLoop() throws InterruptedException { if (getColorPicker().isColorAt(573, 133, new Color(175, 176, 162))) { status = "Toggling Run"; interfaces.getChild(548, 94).interact("Toggle Run"); return 500; } if (getBank().isOpen() && getInventory().getAmount(1925,434) == 0) { withdraw(); return 500; } if (bankA.contains(myPlayer())) { walktowell(); return 500; } if (getInventory().getAmount(1761) == 0 && wellA.contains(myPlayer())) { bank(); return 500; } if (getInventory().getAmount(1925,434) == 0) { bank(); return 1500; } if (wellA.contains(myPlayer()) && getInventory().getAmount(1925) != 0 && !myPlayer().isAnimating()) { fill(); return 500; } if (wellA.contains(myPlayer()) && getInventory().getAmount(434) != 0 && !myPlayer().isAnimating()) { soft(); return 800; } if (myPlayer().isAnimating()) { wersofting(); } return 0; } }
-
I tried getInventory().getItem(1929).interact("Use"); getInventory().getItem(Clay).interact(); // and its not interacting i changed clay to 434 id and its working ;/ well thanks for help
-
Will try thanks
-
So what i want to do is after selecting 1 item i want to interact with other in my inventory