Random load image

Hello, it's been a while when I asked your for help, but I stuck in cosmetic problem, but I don't have a time to take care of it, so
I wanted to ask you for a plugin that will display random image from directory specified by plugin parameter when game files are preloaded. I cannot offer a money for my request, but If you are a gentelman I am sure we can make a good deal.
Maybe knowing why you want to do that will help.
But, I think you can make this by events.
Put the images in the pictures folder, the default one.

Then you can add the random pictures feature showing the picture via a script call.
Put inside a variable all the names of the pictures you want randomized.
Or, put each name of each picture inside a different variable(then you can use the random command in control variables)

Then in the script call, in the field name, you put this variable value.
Sorry, I'm not in pc right now, when I get there, I will post an example here.
If you want to use the actual loading screen, it seems you can use this sort of thing in a script call:
Code:
Graphics.setLoadingImage('img/system/Loading.png');
Alternatively this code should do the trick, save as a .js file and import as a plugin:
Code:
(function(alias) {

'use strict';

	const IMAGES = ['Loading','Loading1','Loading2'];	// Possible loading images

	Graphics.startLoading = function() {
		let img = IMAGES[Math.randomInt(IMAGES.length)];	// Get random image name
		img = 'img/system/' + img + '.png';			// Add directory and file extension
		Graphics.setLoadingImage(img);				// Assign new image
		alias.call(this);					// Continue as usual
	};

})(Graphics.startLoading);
You'll need to edit this line with the names of your loading images, you can add or remove entries as needed:
Code:
	const IMAGES = ['Loading','Loading1','Loading2'];	// Possible loading images
Tip: you can force the loading screen to display indefinitely on game start by temporarily removing the game font. (Replace it when you're done testing.) 😤
Thank you all, @caethyril I'm right away to check your script and I give an edit 🙂

@caethyril Works perfectly as I wanted. Thank you very much. I owe you one 🙂
Great, happy RPG Making! 😂

Original thread: https://forums.rpgmakerweb.com/threads/random-load-image.111666/