Jump to content

Make X


Iwin

Recommended Posts

I've seen in quite a few scripts that for Make X people use random(28, 1000)

or something similar... (I'm guilty of this), So I made one that is a decent bit more inconspicuous.

	public String makeX() {
		int num = random(1, 9);
		int length = random(2, 4);
		String finishednum = "";
		if (num < 3) {
			length = random(3, 4);
		}
		for (int i = 0; i < length; i++) {
			finishednum += "" + random(num - 1, num > 8 ? num : num + 1);
		}
		if (Integer.parseInt(finishednum) < 28) {
			return makeX();
		}
		return finishednum;
	}

By default if it makes less than 28, it will loop back into the function.

You'll get results like 122, 988, 77, 34, 343, ect.

Instead of results like 294, 984, 349, 28, 69, 77.

Random isn't a horrible result, but it looks like you smash your number pad. But in real life, we generally do numbers that are close to each other, hence + 1, - 1;

TLDR; Small anti-ban.

It's pretty simple, but I figured someone could use it.

Edited by Iwin
  • Like 2
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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