Cardozz 46 Share Posted November 12, 2017 With every successful interaction, increment your "total number of cabbages picked", and display that number times whatever the price of cabbages are to get your profit earned. You can simply create a ratio of current time ran per time in an hour to get your average profit per hour. In other words: Let the script verify the cabbage it wants to pick; Pick the cabbage; Do a double check that the object was picked (e.g. that the ground object no longer exists); Simply add 1 to the counter. In your field set: int cabbageCounter = 0; and then in your script after step 3 do: cabbageCounter++; You can grab the pricing from the GE by using Vlads GE price grabber, found somewhere in the script tutorials, or you can simply use a static number (i think cabbages have been like the same price for over 3 years), and after each loop from step 1 to 4 you update the cabbages counted times the price. This way it will keep you updated after every pick. I know this is kinda hard to understand especially if you have little experience with programming, but read it 5 times and you'll understand what i try to explain xD Link to comment Share on other sites More sharing options...
Xephy 237 Share Posted November 12, 2017 @@ProBotterIamN GroundItem g = getGroundItems().closest(g1 -> g1 != null && list.contains(g1.getName())); // Gets the item to loot / "pick" String name = g.getName(); // Gets the name so you can look up the price via name if you really want to. if (g != null && g.interact("Take")) { log("Looting " + name + " x" + g.getAmount()); int price = priceCheck.getPrice(g.getID()); // implements a pricechecker to calculate the price on the fly. if (price == 0) { price = priceCheck.getPrice(g.getID()-1); // if the price returned 0, it's likely that the item code // was wrong (for stackables) } profit += price * g.getAmount(); // For looting stackables int count = getInventory().count(name); // gets your current item count in your inventory sleepUntil(() -> count < getInventory().count(name) || !g.exists(), 6500); // Sleeps until you've successfully // picked the item. } Link to comment Share on other sites More sharing options...
ProBotterIamN 11 Author Share Posted November 12, 2017 @@ProBotterIamN GroundItem g = getGroundItems().closest(g1 -> g1 != null && list.contains(g1.getName())); // Gets the item to loot / "pick" String name = g.getName(); // Gets the name so you can look up the price via name if you really want to. if (g != null && g.interact("Take")) { log("Looting " + name + " x" + g.getAmount()); int price = priceCheck.getPrice(g.getID()); // implements a pricechecker to calculate the price on the fly. if (price == 0) { price = priceCheck.getPrice(g.getID()-1); // if the price returned 0, it's likely that the item code // was wrong (for stackables) } profit += price * g.getAmount(); // For looting stackables int count = getInventory().count(name); // gets your current item count in your inventory sleepUntil(() -> count < getInventory().count(name) || !g.exists(), 6500); // Sleeps until you've successfully // picked the item. } ty but got it working waiting for my topic to be accepted then moving to the SDN Link to comment Share on other sites More sharing options...
Cardozz 46 Share Posted November 12, 2017 ty but got it working waiting for my topic to be accepted then moving to the SDN Good to hear Link to comment Share on other sites More sharing options...
ProBotterIamN 11 Author Share Posted November 12, 2017 Good to hear Ty Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.