Jump to content
  • 0
Yonko

R> Color Game Machine

Question

Hi, I would like to request an Color Game Machine using the illust image provided inside the data.grf and rdata.grf. Here's the mechanics of the Machine when the player talk to the machine, The Machine asked to input TCG(any amount) and select color he/she wants then after the transaction the machine will rolled off a random color with animation using "cutin" so players can see which colors will be the machine to be chosen then .


when the color matches the player's chosen color, He/She will win double prize let say he input 5pcs of TCG then he got 10TCG .

Images here.
http://i42.tinypic.com/14t28tk.png
http://i41.tinypic.com/25z5izs.jpg
http://i44.tinypic.com/rviop1.png
http://i43.tinypic.com/a1u3xw.jpg
http://i40.tinypic.com/29c6p78.png


Thanks & More Power to rAthena

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 1

prontera,150,188,5	script	Color Machine	100,{
	cutin "color_machine_0", 2;
	if ( countitem(7227) < 5 ) {
		mes "you must have at least 5 TCG to play";
		close2;
		cutin "", 255;
		end;
	}
	mes "how many TCG you want to play ?";
	mes "minimum to bet = 5";
	next;
	input [email protected], 5, countitem(7227);
	mes "betting = "+ [email protected];
	mes "choose a color";
	next;
	[email protected] = select( "Red", "Green", "Blue", "Yellow" ) -1;
	[email protected] = rand(4);
	[email protected] = [email protected] + 4*5 +1; // 4 choices * 10 loops
	for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) {
		cutin "color_machine_"+( [email protected]%4 +1 ), 2;
		sleep2 250;
	}
	if ( [email protected] == [email protected] ) {
		mes "Correct !";
		getitem 7227, [email protected];
	}
	else {
		mes "Wrong";
		delitem 7227, [email protected];
	}
	close2;
	cutin "", 255;
	end;
}
I got a pm regarding this topic, so I want to say something

in this script request section we supporters only write the system

if you want this npc looks more interesting, you have to learn how to edit the dialog

like add mes,next,progressbar ... these stuff you have to do it yourself

if you edited this script and its not working, feel free to post your edited script in script support section

  • Upvote 1
Link to comment
Share on other sites

mathematics ..

there are 4 choices, and if choose 1 correct, your prize get double

means the probability of earning back is money is x*2/4 = 1/2x ...

... the more you play ... your money gradually gets lessen by 1/2 ...

just kidding

 color_machine.rar

prontera,150,188,5	script	kjhdfkjsdhf	100,{
	cutin "color_machine_0", 2;
	if ( countitem(7227) < 5 ) {
		mes "you must have at least 5 TCG to play";
		close2;
		cutin "", 255;
		end;
	}
	mes "choose a color";
	select "Red", "Green", "Blue", "Yellow";
	[email protected] = rand(1,4);
	cutin "color_machine_"+ [email protected], 2;
	if ( @menu == [email protected] ) {
		mes "Correct !";
		getitem 7227, 5;
	}
	else {
		mes "Wrong";
		delitem 7227, 5;
	}
	close2;
	cutin "", 255;
	end;
}
btw I'm just writing for fun, since I haven't write any script using cutin for about ... 5 years ? lol ...
Link to comment
Share on other sites

	if ( @menu == [email protected] ) {
		mes "Correct !";
		getitem 7227, 5;
	}
	else {
		mes "Wrong";
		delitem 7227, 5;
	}
	close2;
	cutin "", 255;
	end;

impossible, I've tested in-game before I post on the board

... I think no need a screenshot to prove <.<

maybe you edited something ... try show it

Link to comment
Share on other sites

mathematics ..

there are 4 choices, and if choose 1 correct, your prize get double

means the probability of earning back is money is x*2/4 = 1/2x ...

... the more you play ... your money gradually gets lessen by 1/2 ...

just kidding

 attachicon.gifcolor_machine.rar

prontera,150,188,5	script	kjhdfkjsdhf	100,{
	cutin "color_machine_0", 2;
	if ( countitem(7227) < 5 ) {
		mes "you must have at least 5 TCG to play";
		close2;
		cutin "", 255;
		end;
	}
	mes "choose a color";
	select "Red", "Green", "Blue", "Yellow";
	[email protected] = rand(1,4);
	cutin "color_machine_"+ [email protected], 2;
	if ( @menu == [email protected] ) {
		mes "Correct !";
		getitem 7227, 5;
	}
	else {
		mes "Wrong";
		delitem 7227, 5;
	}
	close2;
	cutin "", 255;
	end;
}
btw I'm just writing for fun, since I haven't write any script using cutin for about ... 5 years ? lol ..

hi i tested your script and it works fine it is possible to have timer so that there's an animation like this? after inputing 5 tcg then the animation will go for 10 seconds then it will stop on the winning random color

http://imgflip.com/i/5ln48

Edited by Xii
Link to comment
Share on other sites

hi madam im amze this script for rathena can you convert to eathena

 

change

	[email protected] = select( "Red", "Green", "Blue", "Yellow" ) -1;
	[email protected] = rand(4);
	[email protected] = [email protected] + 4*5 +1; // 4 choices * 10 loops
	for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) {

to

	set [email protected],select( "Red", "Green", "Blue", "Yellow" ) -1;
	set [email protected],rand(4);
	set [email protected],( [email protected] + 4*5 +1 ); // 4 choices * 10 loops
	for ( set [email protected],0; [email protected] < [email protected]; set [email protected],[email protected] + 1 ) {

 

Sorry to ask but where to upload the images under color_machine.rar?

illust folder

Link to comment
Share on other sites

Hello I tried putting the Images in illust folder, but when I talk to the npc the image doesnt show :( any help ?

put the image at illust folder inside texture folder, make sure the images are bmp not jpg, or png

Edited by Yonko
Link to comment
Share on other sites

 

Hello I tried putting the Images in illust folder, but when I talk to the npc the image doesnt show :( any help ?

put the image at illust folder inside texture folder, make sure the images are bmp not jpg, or png

 

Yea Im pretty surs its inside that folder and is bmp. But when I talk to the color game machine the image doesnt show

Link to comment
Share on other sites

prontera,150,188,5	script	Color Machine	100,{
	cutin "color_machine_0", 2;
	if ( countitem(7227) < 5 ) {
		mes "you must have at least 5 TCG to play";
		close2;
		cutin "", 255;
		end;
	}
	mes "how many TCG you want to play ?";
	mes "minimum to bet = 5";
	next;
	input [email protected], 5, countitem(7227);
	mes "betting = "+ [email protected];
	mes "choose a color";
	next;
	[email protected] = select( "Red", "Green", "Blue", "Yellow" ) -1;
	[email protected] = rand(4);
	[email protected] = [email protected] + 4*5 +1; // 4 choices * 10 loops
	for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) {
		cutin "color_machine_"+( [email protected]%4 +1 ), 2;
		sleep2 250;
	}
	if ( [email protected] == [email protected] ) {
		mes "Correct !";
		getitem 7227, [email protected];
	}
	else {
		mes "Wrong";
		delitem 7227, [email protected];
	}
	close2;
	cutin "", 255;
	end;
}
I got a pm regarding this topic, so I want to say something

in this script request section we supporters only write the system

if you want this npc looks more interesting, you have to learn how to edit the dialog

like add mes,next,progressbar ... these stuff you have to do it yourself

if you edited this script and its not working, feel free to post your edited script in script support section

 

Hi Annie I'm digging up this script and it works fine on my server but actually i need something to modify since the pattern of cutins are Red Green Blue Yellow and when it rolls it starts from R-G-B-Y (like consecutives) how will i make this starts at random color let say G-Y-B-R / B-Y-R-G and so forth different combinations thank you :)

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

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



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.