Iwin Posted September 19, 2016 Posted September 19, 2016 (edited) 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 October 12, 2016 by Iwin 2
jython Posted September 19, 2016 Posted September 19, 2016 I thought about doing this exact thing. +1 to small wins. Thanks for sharing.
Prolax Posted September 20, 2016 Posted September 20, 2016 You can also just use 99, that's what I did in 2005.
Botre Posted October 27, 2016 Posted October 27, 2016 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; Nice idea
dontbuzz Posted November 8, 2016 Posted November 8, 2016 You can also just use 99, that's what I did in 2005. This, I always type 99 when im doing shit legit haha