Generate six-digit password with letters

Started by Salt_Mint on

Topic category: Help with modding (Java Edition)

Last seen on 10:41, 21. Sep 2024
Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Generate six-digit password with letters

Hi guys!

I wonder how you would implement random password generation according to the scheme like :

"0/X 0/X 0/X 0/X 0/X 0/X" 

where 0 is a random digit and X is a random letter so that each character of the password can be either a random digit or a random letter. I'm trying to implement such a system now, and I kind of figured out how to do it, but I'm sure that my method, although working, is too complicated and not the most optimal. Having simplified my task, I choose the letters of the alphabet only from A to F, and this will be enough not to make the procedure too large. I'll show you my way later, how I'll finish it. The task is to generate, for example, "abs687" or "3bs4fa", etc. The ratio of the number of letters to numbers is not important. The result should be in text format, you can output it as an NBT or variable for convenience. If you have any questions, I will be happy to answer and explain in more detail ;) (I translate the text through a translator, so something may not be accurate)

You can use random procedure…
Mon, 09/02/2024 - 17:13

You can use random procedure block, if operator and concatenate string procedure block to get strings together.

If you are new to procedures, I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei