Search the Community
Showing results for tags 'scripts'.
-
looking for info on scripts for gauntlet, CG, TOA,ZUL,VORK, CORP ect... and how much they would cost. will be using paypal if i can get my hands on some.
-
Hello, new guy here. I thought I'd start by sharing my experience of completing a functional DB3 script using GPT-4. It's a simple random walk script that sends you wandering about aimlessly, but it works. The challenge was to get GPT-4 to do it instead of lecturing me about the immorality of botting video games and violating the publisher's TOS. It turns out all I had to do was to tell GPT-4 that I am just a student learning to code in Java and that I'm only using a private OSRS server. I was no longer reminded of my moral inferiority after this. 😂 An additional challenge was to get GPT-4 to stop using deprecated code. Without careful prompting, it will produce DB2 code. Once all that was sorted out, here's what it came up with: import org.dreambot.api.input.Mouse; import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.walking.impl.Walking; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import java.util.Random; @ScriptManifest(author = "YourName", category = Category.MISC, name = "Random Walker", version = 1.0) public class TestScript extends AbstractScript { private final Area gameWorld = new Area(3000, 3000, 3300, 3300); // Define the area of the game world where the bot will walk @Override public int onLoop() { // Simulate human-like random sleep if (randomSleep()) { return Calculations.random(3000, 6000); // Sleep for 3 to 6 seconds } // Walk to a random tile within the game world Walking.walk(gameWorld.getRandomTile()); // Sleep for a random time to mimic human behavior return Calculations.random(1000, 2000); // Sleep for 1 to 2 seconds } private boolean randomSleep() { int number = new Random().nextInt(100); // Generate a random number between 0 and 99 if (number < 5) { // 5% chance to sleep log("Random sleep!"); Mouse.moveOutsideScreen(true); // Move mouse outside of screen return true; } return false; } }
-
I'm making a script that mines and then walks to the back, deposits it and walks back. I've written the script so that I can start it anywhere and it will walk to the specified coordinates and start mining again. Here's My Problem: since I am using GameObjects.closest(ore name here) for example, if the script detects any object matching that name along the way to the coordinates, it will try to interact with that object instead. How can I check if my player is within a specific area BEFORE trying to interact with an object? basically walk,walk,walk -> am I in specified area? NO(keep walking to coords) YES(look for/interact with object)