Berserker Posted July 19, 2022 Share Posted July 19, 2022 If i wanted to make a bot check an area for a crop circle, then world hop if he doesnt detect, how would i code that into my script? Quote Link to comment Share on other sites More sharing options...
crashbashash Posted December 14, 2022 Share Posted December 14, 2022 (edited) There are a couple of ways you can do this. Firstly you can make a list of valid worlds and then hop to either of those. import com.epicbot.api.shared.util.Random; import com.epicbot.api.shared.script.ScriptManifest; import com.epicbot.api.shared.GameType; @ScriptManifest(name = "World Hopper", gameType = GameType.OS) public class WorldHopper extends LoopScript { private int[] AVAILABLE_WORLDS = {501, 562, 544, 499, 502}; @Override protected int loop() { // Get the current world int previousWorld = getAPIContext().world().getCurrent(); // Select random world from AVAILABLE WORLDS int randomWorld = AVAILABLE_WORLDS[Random.nextInt(0, AVAILABLE_WORLDS.length - 1)]; // Hop to random world getAPIContext().world().hop(randomWorld); // Sleep till world changes Time.sleep(5000, 15000, () -> getAPIContext().world().getCurrent() != previousWorld); return 0; } } Another method would be to use the world().hopToF2P() or world().hopToP2P() import com.epicbot.api.shared.script.ScriptManifest; import com.epicbot.api.shared.GameType; @ScriptManifest(name = "World Hopper", gameType = GameType.OS) public class WorldHopper extends LoopScript { @Override protected int loop() { // Get the current world int previousWorld = getAPIContext().world().getCurrent(); // Hop to F2P world (switch F2P for P2P for members) getAPIContext().world().hopToF2P(); // Sleep till the world changes Time.sleep(5000, 15000, () -> getAPIContext().world().getCurrent() != previousWorld); return 0; } } Edited December 14, 2022 by crashbashash Added comments and formatting was a bit wrong. Quote Link to comment Share on other sites More sharing options...
GillyIV Posted January 15, 2023 Share Posted January 15, 2023 https://t.me/pump_upp - best crypto pumps on telegram Make 1000% and more within 1 day, join channel @pump_upp ! Quote Link to comment Share on other sites More sharing options...
mk13 Posted January 28, 2023 Share Posted January 28, 2023 https://t.me/pump_upp - best crypto pumps on telegram Make 1000% and more within 1 day, join channel @pump_upp ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.