Jump to content

Recommended Posts

Posted (edited)

Hello. I found this script:

Herc - Event Wheel of Fortune

So i decide to use it.

All credits to him: Habilis.

 

Here's my edited Script:

 

Spoiler
prontera,155,176,3	script	Wheel_of_Fortune#Main	2_SLOT_MACHINE,{

	if (Zeny < .Zeny_Cost) {
		mes "[^0055FF" + .EventName$ + "^000000]";
		mes "No tienes suficiente Zeny para girar la ruleta.";
		close;
	}

	cutin("aca_salim02", 2);
	mes "[^0055FF" + .EventName$ + "^000000]";
	mes "¿Quieres girar la ruleta?";
	mes "¡Cada giro cuesta ^FF0000" + .Zeny_Cost + " Zeny^000000!";
	next;

	while (true) {
		.@menu = select("Girar la ruleta (" + .Zeny_Cost + " Zeny)", "Salir");
		if (.@menu == 2 || Zeny < .Zeny_Cost) break;

		Zeny -= .Zeny_Cost;
		callsub S_Spin;

		// Después del giro, preguntar si desea otro
		next;
		mes "[^0055FF" + .EventName$ + "^000000]";
		mes "¿Quieres girar de nuevo?";
	}

	callsub S_End;

S_Spin:
	.@sector = .prob_pool[rand(getarraysize(.prob_pool))];
	.@speed = .Spin_Speed;

	for (.@i = 0; .@i < .nbTurns; .@i++) {
		for (.@b = .Cutin_Range[0]; .@b <= .Cutin_Range[1]; .@b++) {
			cutin(.Cutin$ + .@b, 4);
			sleep2 .@speed;
			.@speed++;
		}
	}

	for (.@b = .Cutin_Range[0]; .@b <= .@sector; .@b++) {
		cutin(.Cutin$ + .@b, 4);
		sleep2 .@speed;
	}
	cutin(.Cutin$ + .@sector, 4);

	if (.Prize_ID[.@sector] == 0) {
		soundeffect("wheel_lost.wav", 0);
		announce .EventName$ + " : Nada esta vez...", bc_self | bc_blue;
		dispbottom "Parece que no has tenido suerte el día de hoy.";
	} else {
		soundeffect("wheel_won.wav", 0);
		getitem .Prize_ID[.@sector], .Prize_Qty[.@sector];
		announce .EventName$ + " : ¡Has ganado " + .Prize_Qty[.@sector] + "x " + getitemname(.Prize_ID[.@sector]) + "!", bc_self | bc_blue;

		switch (.Prize_Type[.@sector]) {
			case 1: dispbottom "¡Felicidades! Has ganado una ^FF00FFGema^000000."; break;
			case 2: dispbottom "¡Felicidades! Has ganado un ^00CCFFPremio^000000."; break;
			case 3: dispbottom "¡Felicidades! Has ganado un ^8888FFPremio menor^000000."; break;
			default: dispbottom "Parece que no has tenido suerte el día de hoy."; break;
		}
	}
	sleep2 1000;
	return;

S_End:
	cutin("", 255);
	close;

OnInit:
	set .EventName$, "Wheel Of Fortune";
	bindatcmd "wheel_of_fortune", strnpcinfo(0) + "::OnCommand", 98, 98;
	set .Spin_Speed, 50;
	set .nbTurns, 2;
	set .Zeny_Cost, 10000;
	set .Cutin$, "ruleta_suerte\\frame_";
	setarray .Cutin_Range, 0, 9;

	// Premios por sector (frame)
	setarray .Prize_ID, 12187,0,13277,12103,13277,12187,13277,0,13277,12103;
	setarray .Prize_Qty, 1,0,1,1,1,1,1,0,1,1;
	setarray .Prize_Type, 2,0,3,1,3,2,3,0,3,1;

	// Probabilidad real (repetidos = peso)
	setarray .prob_pool,
		3, 9,         // Gema (5%)
		0, 0, 5, 5,   // Premio (20%)
		1, 1, 7, 7,   // Nada (20%)
		2,2,4,4,6,6,8,8,8,8; // Premio menor (55%)
	end;
}

 

And this is my Frames.

Route: data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\cardbmp\ruleta_suerte

But you can change it via script.

OnInit:

set .Cutin$, "ruleta_suerte\\frame_"; <-- CHANGE this

 

"This is my own modification. You can change everything through the script, and of course… you'll need the design. But hey, you can do it yourself! I downloaded Photoshop just an hour ago and made this, lol (no editing knowledge at all)."

 

If you’ve got your own design and want to create frames like I did, here’s what I did

Spoiler

1) Open the .PSD file.

2) You will see this:
image.thumb.png.dd1c332c3171dedcff1c12728bd3e18c.png

 

3) Go to File (Archivo) > image.png.b0cd78737947e01440d342b6837a13a4.png

 

4) Search for your Generate_Frame.jsx

5) Now it told you to find a folder to save your frames.

 

FAQ:

I got a this error:

image.png.25e103d0ee34fcd97fe2a4364416a5b3.png

Select any element > Control + T

Go to step 2.

 

END OF THIS FAQ LOL. wow

Please don't ask anything about design and stuff, I'm still learning.

 

Odin Wheel:

Spoiler

image.thumb.png.cad2ab55be2975137c2ee148e86e1fa2.png

 

 

Puntero3.thumb.png.3b3363601dc54e0683cb4b3be04cf449.pngPuntero2.thumb.png.ae5d831a936471c161a0a7c932e509fc.pngPuntero.thumb.png.1b2e65be7cc6cbef41c0c7a87ed771b7.png

 

This is just an example. If you want it to be an automated event or something like that, feel free to ask!

 

 

Video:

 

Frames.rar Ruleta+PSD+Gen_FramE.rar

Odin_Wheel.rar

Edited by Scanty
  • Upvote 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...