April 21, 201510 yr A small script which powerchops regular trees, oaks and willows (prioritizes based on level). It's rather slow, the focus is more on not getting banned than maximizing xp. I'm currently testing if missclicks + a bit of walking actually reduces ban rates.Features:- Keeps track of #logs chopped- Missclicks (NOTE: THIS MAY LEAD TO COMBAT, which is a good thing imo)- System tray notification when some random phaggot near you starts talking (if supported by the OS) The "antiban" included in this script is basically the missclicks + it can walk to an oak tree if all willows are down etc (this can lead to some weird behavior) + the default mouse/camera shitHere it is package org.flamezzz; import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.Message; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.canvas.paint.Painter; import org.osbot.rs07.listener.MessageListener; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Created by Flamezzz on 21/04/2015. */ @ScriptManifest( name = "FChopAndDrop", author = "Flamezzz", version = 1.0, info = "Chops wood and drops it, the gains ma gawt", logo = "" ) public class FChopAndDrop extends Script implements Painter, MessageListener { public static final boolean DEBUG = true; private long starttime; private int missclickRate; private int no_logs; private int no_oaks; private int no_willows; private TrayIcon icon; private void debug(String s) { if(DEBUG) { log(s); } } private void notification(String txt) { if (SystemTray.isSupported()) { icon.displayMessage("FChopAndDrop", txt, TrayIcon.MessageType.INFO); } } private boolean hasAxe() { Filter<Item> f = new Filter<Item>() { public boolean match(Item item) { return item.getName().contains("axe"); } }; return equipment.contains(f) || inventory.contains(f); } private void missclick(Entity e) { debug("Missclicking"); Position p = e.getPosition(); p.hover(bot); mouse.moveSlightly(); mouse.click(false); } public void onStart() { starttime = System.currentTimeMillis(); missclickRate = random(10,50); // Feel free to download a fancy image Image image = Toolkit.getDefaultToolkit().getImage(getClass().getResource("flames.png")); icon = new TrayIcon(image, "FChopAndDrop"); if (SystemTray.isSupported()) { SystemTray tray = SystemTray.getSystemTray(); icon.setImageAutoSize(true); icon.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { icon.displayMessage("FChopAndDrop", "Script started", TrayIcon.MessageType.INFO); } }); try { tray.add(icon); } catch (AWTException e) { debug("TrayIcon could not be added."); } } notification("Script started!"); } private RS2Object getTree() { RS2Object willow = objects.closest("Willow"); RS2Object oak = objects.closest("oak"); RS2Object tree = objects.closest("tree"); if(skills.getStatic(Skill.WOODCUTTING) >= 30 && willow != null) { return willow; } else if( skills.getStatic(Skill.WOODCUTTING) >= 15 && oak != null) { return oak; } else { return tree; } } @Override public int onLoop() throws InterruptedException { if(random(1, 3000) == 1337) { log("Changing missclick rate"); missclickRate = random(10,50); } if(!hasAxe()) { debug("No axe, stopping"); stop(); } if(myPlayer().isUnderAttack()) { return random(1000, 2000); } if(inventory.isFull()) { inventory.dropAllExcept(new Filter<Item>() { public boolean match(Item item) { return item.getName().contains("axe") || random(0, missclickRate) == 1; } }); } if(random(1, 100) == 50) { sleep(random(1000, 20000)); } if(!myPlayer().isAnimating()) { RS2Object tree = getTree(); if(tree != null) { if(random(0, missclickRate) == 1) { missclick(tree); } else { if(myPlayer().getPosition().distance(tree.getPosition()) >= random(10, 20)) { map.walk(tree); return random(1500, 3000); } tree.interact("Chop down"); } } sleep(random(400, 600)); localWalker.waitUntilIdle(); sleep(random(400,600)); } return random(300, 1000); } public void onMessage(Message m) { String s = m.getMessage(); if(s.contains("willow logs")) { no_willows++; } else if(s.contains("oak logs")) { no_oaks++; } else if(s.contains("logs")) { no_logs++; } if(m.getType().equals(Message.MessageType.PLAYER)) { Player p = getPlayers().closest(m.getUsername()); if(p != null && p.getPosition().distance(myPlayer().getPosition()) <= 10) { notification(m.getMessage()); } } } public String format(long starttime) { long time = System.currentTimeMillis() - starttime; StringBuilder string = new StringBuilder(); long totalSeconds = time / 1000L; long totalMinutes = totalSeconds / 60L; long totalHours = totalMinutes / 60L; int seconds = (int)totalSeconds % 60; int minutes = (int)totalMinutes % 60; int hours = (int)totalHours % 24; if (hours > 0) { string.append(hours + "h "); } if (minutes > 0) { string.append(minutes + "m "); } string.append(seconds + "s"); return string.toString(); } public void onPaint(Graphics2D g) { g.drawString("Logs: " + no_logs, 300, 200); g.drawString("Oaks: " + no_oaks, 300, 230); g.drawString("Willows: " + no_willows, 300, 260); g.drawString("Running: " + format(starttime), 300, 290); } public void onExit() { SystemTray.getSystemTray().remove(icon); } }
April 21, 201510 yr Author Cool name gj Haha sorry for stealing the name :p Gonna suicide a new f2p account now, and create others with various break settings until I get a f2p account with 85+ wc