Jump to content

Hoppable Worlds Array


Swizzbeat
 Share

Recommended Posts

public static int[] WORLDS = {301, 302, 303, 304, 305, 306, 308, 309, 310, 311, 312,
	313, 314, 316, 317, 318, 319, 320, 321, 322, 326, 327, 328, 329, 330, 333, 334,
	335, 336, 338, 341, 342, 343, 344, 345, 346, 349, 350, 351, 352, 353, 354, 357,
	358, 359, 360, 361, 362, 365, 366, 367, 368, 369, 370, 373, 374, 375, 376, 377,
	378};

And to hop to a random one:

new WorldHopper(MethodProvider).hopWorld(WORLDS[random(WORLDS.length)]);

Had to make this last night and might save someone a couple minutes tongue.png

 

This list CONTAINS F2P worlds: 308, 316

This list DOES NOT CONTAIN PvP worlds: 325, 337

Edited by Swizzbeat
  • Like 1
Link to comment
Share on other sites

You have to subtract by one, the length of an array with one object is 1, while the object index is 0. If the random method returns the length of this array it will give you a nullpointer as the object that has the index of the length doesnt exist (in short words: the lenght of an array is its total objects +1)

Link to comment
Share on other sites

You have to subtract by one, the length of an array with one object is 1, while the object index is 0. If the random method returns the length of this array it will give you a nullpointer as the object that has the index of the length doesnt exist (in short words: the lenght of an array is its total objects +1)

Hmm so my original code was right I just need to add a min/max value in....I'll fix when I get on a computer!
Link to comment
Share on other sites

Your code is too broad and it doesn't take into consideration potential latency issues someone may experience, e.g., I don't play on American servers because there would be too much latency at times. If I were to bot, this would undoubtedly effect the bot's performance.

This is just an array for all the possible worlds people can hop to without the PvP ones. I don't think anyone really cares if their on an American/Germany server :p

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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