FuzzyFightCaves v1.0
If any of you have used the same script from vInsert. you will know what to expect from this script. I'm currently converting it from Java and vInsert's API to Groovy and OSBot's API. It shouldn't take long and I shall attach a zip file containing the .groovy files to the thread.
NOTE: Current version is very basic, will improve script much more as soon as support for Java is added.
Instructions:
- Save script as "FuzzyFightCaves.groovy" - Place in: -> %userprofile%/osbot/scripts (Windows) -> /home/osbot/scripts (Mac/Linux) - Launch bot -> Log in -> Position your character near the entrance - Open script selector -> Click "Reload" -> Select "FuzzyFightCaves" -> Click "Start"
Changelog:
- v1.0 -> Initial release. - v1.1 -> Walks to centre of caves if out of combat for 10 seconds -> Camera should have stopped moving around so much
Features:
- Entering caves - Running back to centre of the area if out of combat for too long.// -- No GUI yet -> coming soon (When Java support is added)// - GUI// -> Shows experience and tokkul gained (and average hourly rates)
Planned features:
- GUI -> Exp and tokkul gains with hourly rates - NPC clicking -> Could be added now, but buggy and will likely lower the exp/h - Food/prayer support -> Food and prayers will be selectable by the user
Known bugs:
- None!
Script:
import org.osbot.script.ScriptManifestimport org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.RS2Objectimport java.awt.*@ScriptManifest(name = "FuzzyFightCaves", author = "Fuz", version = 1.1D, info = "Superior Fight Caves training script! (Crappy version)")public class FuzzyFightCaves extends org.osbot.script.Script { private static final int CAVE_ENTRANCE = 9356; private static final int CAVE_EXIT = 9357; private static final int TIMEOUT = 10; private int timeOut = TIMEOUT; private RS2Object exit; private RS2Object entrance; @Override void onStart() { } @Override int onLoop() { if ((entrance = getClosestObject(CAVE_ENTRANCE)) != null && (exit = getClosestObject(CAVE_EXIT)) == null) if (!selectEntityOption(entrance, "Enter")) client.moveCameraToEntity(entrance); else { if (timeOut < 1) { walk(getCentralTile()); timeOut = TIMEOUT; } else if (!client.myPlayer.isAnimating()) { timeOut -= 1; return 1000; } else timeOut = TIMEOUT; } return 2000; } @Override void onPaint(Graphics g) { } private RS2Object getClosestObject(int id) { RS2Object o = null; for (RS2Object obj : client.getCurrentRegion().getObjects()) if (obj != null && obj.getId() != null && obj.getId() == id) if (o == null || distance(obj) < distance(o)) o = obj; return o; } private Position getCentralTile() { int x = client.getMapBaseX(); int y = client.getMapBaseY(); return new Position(x + 96, y + 96, 0); }}
Please report any bugs, post proggies (1h+) if possible