dzihaad 0 Posted April 7, 2020 Hello. I was wondering if someone could write this easy script to avoid logging out. For example, every 4-4.5 minutes it would press random F button (F1 - F12) to avoid 5 min. log out timer. If someone would have time to do this, i would be very thankful.
TheRevelo 7 Posted April 7, 2020 Sure, if i'll find the Time for it. When its finished i post the link to the Topic here
Pseudo 179 Posted April 7, 2020 Timer timer = new Timer(0); int r = Random.nextInt(240000, 300000); if (timer.getElapsed() > r) { Keyboard.typeSpecialKey(KeyEvent.VK_F1); timer.reset(); } Something like that should do you.
dzihaad 0 Author Posted April 9, 2020 On 4/7/2020 at 5:54 PM, Pseudo said: Timer timer = new Timer(0); int r = Random.nextInt(240000, 300000); if (timer.getElapsed() > r) { Keyboard.typeSpecialKey(KeyEvent.VK_F1); timer.reset(); } Something like that should do you. So, if i would use script template from another thread, where should I paste it? import org.dreambot.api.methods.Calculations; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.script.Category; @ScriptManifest(author = "You", name = "My First Script", version = 1.0, description = "Simple Tea Thiever", category = Category.THIEVING) public class main extends AbstractScript { public void onStart() { } public void onExit() { } @Override public int onLoop() { return Calculations.random(500, 600); } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.