Jump to content

World hopping


Recommended Posts

Posted (edited)

Hey guys,

I was kinda looking into world hopping but it couldn't seem to get it to work. Now I tried to kind of build around it but for some weird reason it gets stuck after the logout

public void hopButtonClick() {
mouse.click(55, 480, false);
}
 
public void loginChar() throws InterruptedException {
mouse.click(460, 290, false);
sleep(random(300, 600));
keyboard.typeString("USERNAME HERE");
sleep(random(500, 1000));
mouse.click(365, 275, false);
sleep(random(500, 1000));
keyboard.typeString("PASSWORD HERE");
sleep(random(500, 1000));
mouse.click(300, 320, false);
sleep(random(3000, 4000));
mouse.click(385, 335, false);
sleep(random(3000, 4000));
}
 
public void hopAndLog() throws InterruptedException {
int hopWorld = random(1,10);
tabs.logoutTab.logOut();
sleep(random(4000, 5000));
hopButtonClick();
sleep(random(500, 1000));
if (hopWorld == 1) {
mouse.click(244, 131, false);
} else if (hopWorld == 2) {
mouse.click(245, 275, false);
} else if (hopWorld == 3) {
mouse.click(334, 56, false);
} else if (hopWorld == 4) {
mouse.click(337, 178, false);
} else if (hopWorld == 5) {
mouse.click(329, 417, false);
} else if (hopWorld == 6) {
mouse.click(426, 106, false);
} else if (hopWorld == 7) {
mouse.click(427, 224, false);
} else if (hopWorld == 8) {
mouse.click(425, 370, false);
} else if (hopWorld == 9) {
mouse.click(425, 464, false);
} else if (hopWorld == 10) {
mouse.click(518, 154, false);
}
sleep(random(500, 1000));
loginChar();
}

EDIT: it seems like the end of my post didn't make it. In the first instance I tried to use world.Hop(303);

It does log out but gets stuck at the login screen doing nothing. (in both instances)

 

Also, initially I would like to to make the script log out when somebody pops up on my map, anyone has good suggestions on how to do that? I was thinking of

if (dude pops up on minimap) {
hopAndLog();
}

I was just wondering if anybody had an idea on how to do the dude pops up on minimap part?

 

Cheers,

Forcanl

Edited by ForcaNL
Posted

Hey Kev,

Thanks for your quick response, I think I must've deleted the end of my post when I pasted my code in. Initially I tried to use world.Hop(303); but this seemed to only log me out and stay stuck on the login page. (which also happens with my code at the moment)

 

You do know you don't need to log out to world hop right?

Posted (edited)

I am aware of this indeed smile.png It's just that I would love to use the logging for my breaking system too.

 

API method:

getWorlds().hop(world);

And if you're talking about hopping when another player is nearby, you could do something like:

List<Player> players = getPlayers().filter(player -> player != myPlayer());
if(players != null && players.size() > 0) getWorlds().hop(random(1, 94));
Edited by Explv
Posted (edited)

 

API method:

getWorlds().hop(world);

And if you're talking about hopping when another player is nearby, you could do something like:

if you get all players and dont remove yourself. It will continue to world hop. Your player count as one playyer

Edited by Joseph
Posted (edited)

Oh wow.. getWorlds, how could I miss that! Thanks alot guys!

 

Also I tried editing the code you send me so that it would only trigger if more than two players spotted but I instantly got an error message when I tried putting it in there. This is what I changed it to

List<Player> players = getPlayers().filter(player -> player != myPlayer());
               if(players != null && players.size() > 1) getWorlds().hop(random(1, 94));

EDIT: Hmm the forums seem to skip the end of the post when you paste code in the middle.

 

Anyways, like this it says I should take the type out. But when I do that errors on the second line start popping up.

 

I'm really sorry if I annoy you guys with my newb questions, I'm trying to learn as I go along! smile.png

 

Edit: I got it to, kind of work.. The script runs but there has to be some error here since it always freezes on this part. (Keeps running tho, just the client freezes)

 

case GRAB:
GroundItem item = getGroundItems().closest(berryArea, "White berries");
item.interact("Take");
inventoryBreak();
if (inventory.getEmptySlots() > 0) {
if(getPlayers().getAll() != null) {
           java.util.List<Player> p = getPlayers().getAll();
           if(p.size() > 1 && combat.isWilderness()){
               tabs.logoutTab.logOut();
               break;
           }
       } 
   }
break;
Edited by ForcaNL
Posted

Hey guys,

I decided to try to make it into a method to see if that would help me to not bug the program out, although now it doesn't start at all lol, anyone got some suggestions?

public void playerCheck() {
java.util.List<Player> p = getPlayers().getAll();
if (p.size() > 1) {
tabs.logoutTab.logOut();
} else {
return; 
}
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...