Jump to content
  • 0

R> Color Game Machine


Yonko

Question


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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 .@input, 5, countitem(7227);
	mes "betting = "+ .@input;
	mes "choose a color";
	next;
	.@s = select( "Red", "Green", "Blue", "Yellow" ) -1;
	.@r = rand(4);
	.@loop = .@r + 4*5 +1; // 4 choices * 10 loops
	for ( .@i = 0; .@i < .@loop; .@i++ ) {
		cutin "color_machine_"+( .@i%4 +1 ), 2;
		sleep2 250;
	}
	if ( .@s == .@r ) {
		mes "Correct !";
		getitem 7227, .@input;
	}
	else {
		mes "Wrong";
		delitem 7227, .@input;
	}
	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


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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";
	.@r = rand(1,4);
	cutin "color_machine_"+ .@r, 2;
	if ( @menu == .@r ) {
		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


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

i got error if my choose is correct there are no close need to put alt m and type @go 0

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

	if ( @menu == .@r ) {
		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


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

and I mean this too

post-8685-0-01548100-1387538195_thumb.jpg

 

check your map-server.exe for error msg...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

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";
	.@r = rand(1,4);
	cutin "color_machine_"+ .@r, 2;
	if ( @menu == .@r ) {
		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


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

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

 

 

post-20646-0-71236600-1394458569_thumb.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  173
  • Reputation:   0
  • Joined:  06/07/14
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

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

 

change

	.@s = select( "Red", "Green", "Blue", "Yellow" ) -1;
	.@r = rand(4);
	.@loop = .@r + 4*5 +1; // 4 choices * 10 loops
	for ( .@i = 0; .@i < .@loop; .@i++ ) {

to

	set .@s,select( "Red", "Green", "Blue", "Yellow" ) -1;
	set .@r,rand(4);
	set .@loop,( .@r + 4*5 +1 ); // 4 choices * 10 loops
	for ( set .@i,0; .@i < .@loop; set .@i,.@i + 1 ) {

 

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

illust folder

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  05/06/14
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  05/06/14
  • Last Seen:  

 

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


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

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 .@input, 5, countitem(7227);
	mes "betting = "+ .@input;
	mes "choose a color";
	next;
	.@s = select( "Red", "Green", "Blue", "Yellow" ) -1;
	.@r = rand(4);
	.@loop = .@r + 4*5 +1; // 4 choices * 10 loops
	for ( .@i = 0; .@i < .@loop; .@i++ ) {
		cutin "color_machine_"+( .@i%4 +1 ), 2;
		sleep2 250;
	}
	if ( .@s == .@r ) {
		mes "Correct !";
		getitem 7227, .@input;
	}
	else {
		mes "Wrong";
		delitem 7227, .@input;
	}
	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...