Jump to content
  • 0

Question

Posted

Hello! I did try this slot machine by GmOcean:
 

/* =============================================================
/* Slot Machine - Triple Slot Machine
/* =============================================================
/* Version: v1.9
/* v0.1 - Original Script Created.
/* v0.2 - Added Option for Triple Slot Machine with animations.
/* =============================================================
/* Description
/* =============================================================
/* This script will allow users to spend zeny for a chance to
/* win a prize from the slot machine. Currently there are 2
/* versions. First is a Single Slot Machine, where only 1 slot
/* is rolled. Second is the Triple Slot machine, where 3 slots
/* are rolled. For either version, SUCCESS must be the only
/* thing displayed in order to win.
/* =============================================================
/* Created By: GmOcean
/* ===========================================================*/

prontera,152,176,4	script	SlotMachine	563,{
switch( .mode ){
	case 0: // Single Slot machine mode.
		mes "Do you want to play a game?","It costs: "+ .zeny[0] +" zeny to play.";
		if( select("YES:NO") == 2 || Zeny < .zeny[0] ){ close; }
		while( @menu == 1 ){
		Zeny -= .zeny[0];
		.@a = rand(1,100);
		if( .@a < atoi(.1animate$[0]) ){ .@a = 1; } else { .@a = 2; }
		.@b = 1;
		while( .@b < atoi(.1animate$[.@a]) ) {
			cutin .1animate$[3] + .@b,4; sleep2 ( ( atoi(.1animate$[4]) * 1000 ) / atoi(.1animate$[.@a]) ); .@b++;
			}
		if( .@a == 1 ){ 
			cutin .1animate$[3] + atoi(.1animate$[.@a]),4;
			dispbottom "Failed";
			} 
		else {
			cutin .1animate$[3] + atoi(.1animate$[.@a]),4;
			getitem .1prize[0], .1prize[1];
			}
		if( select("Another Round:I'm done") == 2 || Zeny < .zeny[0] ){ cutin "",255; close; }
		}
	end;
	
	case 1: // Triple Slot machine mode.
		mes "Do you want to play a game?","It costs: "+ .zeny[1] +" zeny to play.";
		if( select("YES:NO") == 2 || Zeny < .zeny[1] ){ close; }
		while( @menu == 1 ){
			Zeny -= .zeny[1];
			// Slot 1 = 100% Chance for success. (Because I didn't make a fail animation for it.
			.@2 = rand(1,100); //Rolls dice for Slot 2
			.@3 = rand(1,100); //Rolls dice for Slot 3
				if( .@2 <= atoi(.3animate$[0]) && .@3 <= atoi(.3animate$[1]) ){ .@a = 8; }
				else if( .@2 <= atoi(.3animate$[0]) && .@3 > atoi(.3animate$[1]) ){ .@a = 6; }
				else if( .@2 > atoi(.3animate$[0]) && .@3 <= atoi(.3animate$[1]) ){ .@a = 4; }
				else { .@a = 2; }
			.@b = 1;
			while( .@b < atoi(.3animate$[.@a+1]) ) {
				cutin .3animate$[.@a] + .@b,4; sleep2 ( ( atoi(.3animate$[10]) * 1000 ) / atoi(.3animate$[.@a+1]) ); .@b++;
				}
			cutin .3animate$[.@a] + atoi(.3animate$[.@a+1]),4;
				if( .@a == 2 ){ getitem .3prize[0], .3prize[1]; }
				else { dispbottom "Failed"; }
			if( select("Another Round:I'm done") == 2 || Zeny < .zeny[1] ){ cutin "",255; close; }
			}
		end;
	}
	

OnInit:
//[ 0 = Single Slot Machine Mode ]_[ 1 = Triple Slot Machine Mode ]
.mode = 1;
//[0] = Fail Rate
//[1] = Fail (Do not change)
//[2] = Success (Do not change)
//[3] = File Name (Do not change)
//[4] = Animation Time (Do not change, for best results )
setarray .1animate$[0],"30","29","33","slot_","3";
//[0] = Fail Rate "Slot 2"
//[1] = Fail Rate "Slot 3"
//[2] = SSS (Do not change)
//[3] = SSS_Count (Do not change)
//[4] = SSF (Do not change)
//[5] = SSF_Count (Do not change)
//[6] = SFS (Do not change)
//[7] = SFS_Count (Do not change)
//[8] = SFF (Do not change)
//[9] = SFF_Count (Do not change)
//[10] = Animation Time (Do not change, for best results )
setarray .3animate$[0],"30","30","SSS_","41","SSF_","37","SFS_","41","SFF_","45","3";
setarray .1prize[0],501,10;
setarray .3prize[0],501,30;
setarray .zeny[0],100,300;
end;
}

However im getting this error:

[Error]: script:op_2: invalid data for operator C_EQ
[Debug] Data: string value="Another Round:I'm done"
[Debug] Data: number=2
[Debug] Source (NPC): SlotMachine at prontera (152,176)

How to fix this?

thank you!

5 answers to this question

Recommended Posts

Posted

I'm not sure if this fixes it, but try this:

/* =============================================================
/* Slot Machine - Triple Slot Machine
/* =============================================================
/* Version: v1.9
/* v0.1 - Original Script Created.
/* v0.2 - Added Option for Triple Slot Machine with animations.
/* =============================================================
/* Description
/* =============================================================
/* This script will allow users to spend zeny for a chance to
/* win a prize from the slot machine. Currently there are 2
/* versions. First is a Single Slot Machine, where only 1 slot
/* is rolled. Second is the Triple Slot machine, where 3 slots
/* are rolled. For either version, SUCCESS must be the only
/* thing displayed in order to win.
/* =============================================================
/* Created By: GmOcean
/* ===========================================================*/

prontera,152,176,4	script	SlotMachine	563,{
switch( .mode ){
	case 0: // Single Slot machine mode.
		mes "Do you want to play a game?","It costs: "+ .zeny[0] +" zeny to play.";
		if( select("YES:NO") == 2 || Zeny < .zeny[0] ){ close; }
		while( @menu == 1 ){
		Zeny -= .zeny[0];
		.@a = rand(1,100);
		if( .@a < atoi(.1animate$[0]) ){ .@a = 1; } else { .@a = 2; }
		.@b = 1;
		while( .@b < atoi(.1animate$[.@a]) ) {
			cutin .1animate$[3] + .@b,4; sleep2 ( ( atoi(.1animate$[4]) * 1000 ) / atoi(.1animate$[.@a]) ); .@b++;
			}
		if( .@a == 1 ){ 
			cutin .1animate$[3] + atoi(.1animate$[.@a]),4;
			dispbottom "Failed";
			} 
		else {
			cutin .1animate$[3] + atoi(.1animate$[.@a]),4;
			getitem .1prize[0], .1prize[1];
			}
		if( select("Another Round:I am done") == 2 || Zeny < .zeny[0] ){ cutin "",255; close; }
		}
	end;
	
	case 1: // Triple Slot machine mode.
		mes "Do you want to play a game?","It costs: "+ .zeny[1] +" zeny to play.";
		if( select("YES:NO") == 2 || Zeny < .zeny[1] ){ close; }
		while( @menu == 1 ){
			Zeny -= .zeny[1];
			// Slot 1 = 100% Chance for success. (Because I didn't make a fail animation for it.
			.@2 = rand(1,100); //Rolls dice for Slot 2
			.@3 = rand(1,100); //Rolls dice for Slot 3
				if( .@2 <= atoi(.3animate$[0]) && .@3 <= atoi(.3animate$[1]) ){ .@a = 8; }
				else if( .@2 <= atoi(.3animate$[0]) && .@3 > atoi(.3animate$[1]) ){ .@a = 6; }
				else if( .@2 > atoi(.3animate$[0]) && .@3 <= atoi(.3animate$[1]) ){ .@a = 4; }
				else { .@a = 2; }
			.@b = 1;
			while( .@b < atoi(.3animate$[.@a+1]) ) {
				cutin .3animate$[.@a] + .@b,4; sleep2 ( ( atoi(.3animate$[10]) * 1000 ) / atoi(.3animate$[.@a+1]) ); .@b++;
				}
			cutin .3animate$[.@a] + atoi(.3animate$[.@a+1]),4;
				if( .@a == 2 ){ getitem .3prize[0], .3prize[1]; }
				else { dispbottom "Failed"; }
			if( select("Another Round:I am done") == 2 || Zeny < .zeny[1] ){ cutin "",255; close; }
			}
		end;
	}
	

OnInit:
//[ 0 = Single Slot Machine Mode ]_[ 1 = Triple Slot Machine Mode ]
.mode = 1;
//[0] = Fail Rate
//[1] = Fail (Do not change)
//[2] = Success (Do not change)
//[3] = File Name (Do not change)
//[4] = Animation Time (Do not change, for best results )
setarray .1animate$[0],"30","29","33","slot_","3";
//[0] = Fail Rate "Slot 2"
//[1] = Fail Rate "Slot 3"
//[2] = SSS (Do not change)
//[3] = SSS_Count (Do not change)
//[4] = SSF (Do not change)
//[5] = SSF_Count (Do not change)
//[6] = SFS (Do not change)
//[7] = SFS_Count (Do not change)
//[8] = SFF (Do not change)
//[9] = SFF_Count (Do not change)
//[10] = Animation Time (Do not change, for best results )
setarray .3animate$[0],"30","30","SSS_","41","SSF_","37","SFS_","41","SFF_","45","3";
setarray .1prize[0],501,10;
setarray .3prize[0],501,30;
setarray .zeny[0],100,300;
end;
}

(Maybe apostrophes are not allowed in this kind of switch)

  • Upvote 1
Posted

I'm not sure if this fixes it, but try this:

/* =============================================================
/* Slot Machine - Triple Slot Machine
/* =============================================================
/* Version: v1.9
/* v0.1 - Original Script Created.
/* v0.2 - Added Option for Triple Slot Machine with animations.
/* =============================================================
/* Description
/* =============================================================
/* This script will allow users to spend zeny for a chance to
/* win a prize from the slot machine. Currently there are 2
/* versions. First is a Single Slot Machine, where only 1 slot
/* is rolled. Second is the Triple Slot machine, where 3 slots
/* are rolled. For either version, SUCCESS must be the only
/* thing displayed in order to win.
/* =============================================================
/* Created By: GmOcean
/* ===========================================================*/

prontera,152,176,4	script	SlotMachine	563,{
switch( .mode ){
	case 0: // Single Slot machine mode.
		mes "Do you want to play a game?","It costs: "+ .zeny[0] +" zeny to play.";
		if( select("YES:NO") == 2 || Zeny < .zeny[0] ){ close; }
		while( @menu == 1 ){
		Zeny -= .zeny[0];
		.@a = rand(1,100);
		if( .@a < atoi(.1animate$[0]) ){ .@a = 1; } else { .@a = 2; }
		.@b = 1;
		while( .@b < atoi(.1animate$[.@a]) ) {
			cutin .1animate$[3] + .@b,4; sleep2 ( ( atoi(.1animate$[4]) * 1000 ) / atoi(.1animate$[.@a]) ); .@b++;
			}
		if( .@a == 1 ){ 
			cutin .1animate$[3] + atoi(.1animate$[.@a]),4;
			dispbottom "Failed";
			} 
		else {
			cutin .1animate$[3] + atoi(.1animate$[.@a]),4;
			getitem .1prize[0], .1prize[1];
			}
		if( select("Another Round:I am done") == 2 || Zeny < .zeny[0] ){ cutin "",255; close; }
		}
	end;
	
	case 1: // Triple Slot machine mode.
		mes "Do you want to play a game?","It costs: "+ .zeny[1] +" zeny to play.";
		if( select("YES:NO") == 2 || Zeny < .zeny[1] ){ close; }
		while( @menu == 1 ){
			Zeny -= .zeny[1];
			// Slot 1 = 100% Chance for success. (Because I didn't make a fail animation for it.
			.@2 = rand(1,100); //Rolls dice for Slot 2
			.@3 = rand(1,100); //Rolls dice for Slot 3
				if( .@2 <= atoi(.3animate$[0]) && .@3 <= atoi(.3animate$[1]) ){ .@a = 8; }
				else if( .@2 <= atoi(.3animate$[0]) && .@3 > atoi(.3animate$[1]) ){ .@a = 6; }
				else if( .@2 > atoi(.3animate$[0]) && .@3 <= atoi(.3animate$[1]) ){ .@a = 4; }
				else { .@a = 2; }
			.@b = 1;
			while( .@b < atoi(.3animate$[.@a+1]) ) {
				cutin .3animate$[.@a] + .@b,4; sleep2 ( ( atoi(.3animate$[10]) * 1000 ) / atoi(.3animate$[.@a+1]) ); .@b++;
				}
			cutin .3animate$[.@a] + atoi(.3animate$[.@a+1]),4;
				if( .@a == 2 ){ getitem .3prize[0], .3prize[1]; }
				else { dispbottom "Failed"; }
			if( select("Another Round:I am done") == 2 || Zeny < .zeny[1] ){ cutin "",255; close; }
			}
		end;
	}
	

OnInit:
//[ 0 = Single Slot Machine Mode ]_[ 1 = Triple Slot Machine Mode ]
.mode = 1;
//[0] = Fail Rate
//[1] = Fail (Do not change)
//[2] = Success (Do not change)
//[3] = File Name (Do not change)
//[4] = Animation Time (Do not change, for best results )
setarray .1animate$[0],"30","29","33","slot_","3";
//[0] = Fail Rate "Slot 2"
//[1] = Fail Rate "Slot 3"
//[2] = SSS (Do not change)
//[3] = SSS_Count (Do not change)
//[4] = SSF (Do not change)
//[5] = SSF_Count (Do not change)
//[6] = SFS (Do not change)
//[7] = SFS_Count (Do not change)
//[8] = SFF (Do not change)
//[9] = SFF_Count (Do not change)
//[10] = Animation Time (Do not change, for best results )
setarray .3animate$[0],"30","30","SSS_","41","SSF_","37","SFS_","41","SFF_","45","3";
setarray .1prize[0],501,10;
setarray .3prize[0],501,30;
setarray .zeny[0],100,300;
end;
}

(Maybe apostrophes are not allowed in this kind of switch)

thanks Antares:

and lastly if its okay? 

how to lower the success rate?

cuz its like 8/10 i won..  thank you!

Posted

 

I'm not sure if this fixes it, but try this:

/* =============================================================
/* Slot Machine - Triple Slot Machine
/* =============================================================
/* Version: v1.9
/* v0.1 - Original Script Created.
/* v0.2 - Added Option for Triple Slot Machine with animations.
/* =============================================================
/* Description
/* =============================================================
/* This script will allow users to spend zeny for a chance to
/* win a prize from the slot machine. Currently there are 2
/* versions. First is a Single Slot Machine, where only 1 slot
/* is rolled. Second is the Triple Slot machine, where 3 slots
/* are rolled. For either version, SUCCESS must be the only
/* thing displayed in order to win.
/* =============================================================
/* Created By: GmOcean
/* ===========================================================*/

prontera,152,176,4	script	SlotMachine	563,{
switch( .mode ){
	case 0: // Single Slot machine mode.
		mes "Do you want to play a game?","It costs: "+ .zeny[0] +" zeny to play.";
		if( select("YES:NO") == 2 || Zeny < .zeny[0] ){ close; }
		while( @menu == 1 ){
		Zeny -= .zeny[0];
		.@a = rand(1,100);
		if( .@a < atoi(.1animate$[0]) ){ .@a = 1; } else { .@a = 2; }
		.@b = 1;
		while( .@b < atoi(.1animate$[.@a]) ) {
			cutin .1animate$[3] + .@b,4; sleep2 ( ( atoi(.1animate$[4]) * 1000 ) / atoi(.1animate$[.@a]) ); .@b++;
			}
		if( .@a == 1 ){ 
			cutin .1animate$[3] + atoi(.1animate$[.@a]),4;
			dispbottom "Failed";
			} 
		else {
			cutin .1animate$[3] + atoi(.1animate$[.@a]),4;
			getitem .1prize[0], .1prize[1];
			}
		if( select("Another Round:I am done") == 2 || Zeny < .zeny[0] ){ cutin "",255; close; }
		}
	end;
	
	case 1: // Triple Slot machine mode.
		mes "Do you want to play a game?","It costs: "+ .zeny[1] +" zeny to play.";
		if( select("YES:NO") == 2 || Zeny < .zeny[1] ){ close; }
		while( @menu == 1 ){
			Zeny -= .zeny[1];
			// Slot 1 = 100% Chance for success. (Because I didn't make a fail animation for it.
			.@2 = rand(1,100); //Rolls dice for Slot 2
			.@3 = rand(1,100); //Rolls dice for Slot 3
				if( .@2 <= atoi(.3animate$[0]) && .@3 <= atoi(.3animate$[1]) ){ .@a = 8; }
				else if( .@2 <= atoi(.3animate$[0]) && .@3 > atoi(.3animate$[1]) ){ .@a = 6; }
				else if( .@2 > atoi(.3animate$[0]) && .@3 <= atoi(.3animate$[1]) ){ .@a = 4; }
				else { .@a = 2; }
			.@b = 1;
			while( .@b < atoi(.3animate$[.@a+1]) ) {
				cutin .3animate$[.@a] + .@b,4; sleep2 ( ( atoi(.3animate$[10]) * 1000 ) / atoi(.3animate$[.@a+1]) ); .@b++;
				}
			cutin .3animate$[.@a] + atoi(.3animate$[.@a+1]),4;
				if( .@a == 2 ){ getitem .3prize[0], .3prize[1]; }
				else { dispbottom "Failed"; }
			if( select("Another Round:I am done") == 2 || Zeny < .zeny[1] ){ cutin "",255; close; }
			}
		end;
	}
	

OnInit:
//[ 0 = Single Slot Machine Mode ]_[ 1 = Triple Slot Machine Mode ]
.mode = 1;
//[0] = Fail Rate
//[1] = Fail (Do not change)
//[2] = Success (Do not change)
//[3] = File Name (Do not change)
//[4] = Animation Time (Do not change, for best results )
setarray .1animate$[0],"30","29","33","slot_","3";
//[0] = Fail Rate "Slot 2"
//[1] = Fail Rate "Slot 3"
//[2] = SSS (Do not change)
//[3] = SSS_Count (Do not change)
//[4] = SSF (Do not change)
//[5] = SSF_Count (Do not change)
//[6] = SFS (Do not change)
//[7] = SFS_Count (Do not change)
//[8] = SFF (Do not change)
//[9] = SFF_Count (Do not change)
//[10] = Animation Time (Do not change, for best results )
setarray .3animate$[0],"30","30","SSS_","41","SSF_","37","SFS_","41","SFF_","45","3";
setarray .1prize[0],501,10;
setarray .3prize[0],501,30;
setarray .zeny[0],100,300;
end;
}

(Maybe apostrophes are not allowed in this kind of switch)

thanks Antares:

and lastly if its okay? 

how to lower the success rate?

cuz its like 8/10 i won..  thank you!

 

 

            .@2 = rand(1,100); //Rolls dice for Slot 2

            .@3 = rand(1,100); //Rolls dice for Slot 3

 

Change it to :

 

            .@2 = rand(1,50); //Rolls dice for Slot 2

            .@3 = rand(1,50); //Rolls dice for Slot 3

  • Upvote 1
Posted (edited)


/* =============================================================

/* Slot Machine - Triple Slot Machine

/* =============================================================

/* Version: v0.7

/* v0.1 - Original Script Created.

/* v0.2 - Added Option for Triple Slot Machine with animations.

/* v0.3 - Added support for item pricing &/or zeny pricing.

/* v0.4 - Cleaned up script variables for easy editing.

/* v0.5 - Tested out some new scripting methods with IF(THEN).

/* v0.6 - Added option to change slot machine modes ingame.

/* v0.7 - Added optional sound effects to slot machines. - NOTE

/* =============================================================

/* Description

/* =============================================================

/* This script will allow users to spend zeny &/or an item for a

/* chance to win a prize from the slot machine. Currently there

/* are 2 versions. First is a Single Slot Machine, where only 1

/* slot is rolled. Second is the Triple Slot machine, where 3

/* slots are rolled. For either version, SUCCESS must be the

/* only thing displayed in order to win.

/* =============================================================

/* NOTE - If using soundeffects you must add the ".wav" files

/* provided in the ".rar" file to your: data/wav folder located

/* in either your: ( Ragnarok folder ) OR ( .grf file )

/* =============================================================

/* Created By: GmOcean

/* ===========================================================*/

prontera,152,176,4 script SlotMachine::1slot 563,{

if( getgmlevel() == 99 ) {

mes "Welcome Administrator.","What would you like to do?";

menu "Play Game",-,"Change Slot Machine Mode",iMode;

next;

}

switch( getd(".mode"+strnpcinfo(3)+"") ){

case 0: // Single Slot machine mode.

mes "Do you want to play a game?";

if( !.payment ) { mes "It costs: "+ .ssm_payment_message$[0] +" to play."; }

else if ( .payment == 1 ) { mes "It costs: "+ .ssm_payment_message$[1] +" to play."; }

else if ( .payment == 2 ) { mes "It costs: "+ .ssm_payment_message$[0] +" & "+ .payment_message$[1] +" to play."; }

if( select("YES:NO") == 2 || Zeny < .ssm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.ssm_payment[1]) < .ssm_payment[2] && .payment ){ close; }

while( @menu == 1 ){

if( !.payment || .payment == 2 ) { Zeny -= .ssm_payment[0]; }

if( .payment ) { delitem( .ssm_payment[1], .ssm_payment[2] ); }

if( .soundeffects ) { soundeffect "slot_pay_coin.wav",0; }

.@a = rand(1,100);

if( .@a < atoi(.ssm_animate$[0]) ){ .@a = 1; } else { .@a = 2; }

.@b = 1;

while( .@b < atoi(.ssm_animate$[.@a]) ) {

cutin .ssm_animate$[3] + .@b,4; sleep2 ( ( atoi(.ssm_animate$[4]) * 1000 ) / atoi(.ssm_animate$[.@a]) ); .@b++;

}

if( .@a == 1 ){

cutin .ssm_animate$[3] + atoi(.ssm_animate$[.@a]),4;

dispbottom "Failed";

}

else {

cutin .ssm_animate$[3] + atoi(.ssm_animate$[.@a]),4;

if( !.prize || .prize == 2 ) { Zeny += .ssm_prize[0]; }

if( .prize ) { getitem .ssm_prize[1], .ssm_prize[2]; }

if( .soundeffects ){ soundeffect "slot_jackpot.wav",0; }

}

if( select("Another Round:I'm done") == 2 || Zeny < .ssm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.ssm_payment[1]) < .ssm_payment[2] && .payment ){ cutin "",255; close; }

}

end;

case 1: // Triple Slot machine mode.

mes "Do you want to play a game?";

if( !.payment ) { mes "It costs: "+ .tsm_payment_message$[0] +" to play."; }

else if ( .payment == 1 ) { mes "It costs: "+ .tsm_payment_message$[1] +" to play."; }

else if ( .payment == 2 ) { mes "It costs: "+ .tsm_payment_message$[0] +" & "+ .tsm_payment_message$[1] +" to play."; }

if( select("YES:NO") == 2 || Zeny < .tsm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.tsm_payment[1]) < .tsm_payment[2] && .payment ){ close; }

while( @menu == 1 ){

if( !.payment || .payment == 2 ) { Zeny -= .tsm_payment[0]; }

if( .payment ) { delitem( .tsm_payment[1], .tsm_payment[2] ); }

if( .soundeffects ) { soundeffect "slot_pay_coin.wav",0; }

// Slot 1 = 100% Chance for success. (Because I didn't make a fail animation for it.

.@2 = rand(1,50); //Rolls dice for Slot 2

.@3 = rand(1,50); //Rolls dice for Slot 3

if( .@2 <= atoi(.tsm_animate$[0]) && .@3 <= atoi(.tsm_animate$[1]) ){ .@a = 8; }

else if( .@2 <= atoi(.tsm_animate$[0]) && .@3 > atoi(.tsm_animate$[1]) ){ .@a = 6; }

else if( .@2 > atoi(.tsm_animate$[0]) && .@3 <= atoi(.tsm_animate$[1]) ){ .@a = 4; }

else { .@a = 2; }

.@b = 1;

while( .@b < atoi(.tsm_animate$[.@a+1]) ) {

cutin .tsm_animate$[.@a] + .@b,4; sleep2 ( ( atoi(.tsm_animate$[10]) * 1000 ) / atoi(.tsm_animate$[.@a+1]) ); .@b++;

}

cutin .tsm_animate$[.@a] + atoi(.tsm_animate$[.@a+1]),4;

if( .@a == 2 ){

if( !.prize || .prize == 2 ) { Zeny += .tsm_prize[0]; }

if( .prize ) { getitem .tsm_prize[1], .tsm_prize[2]; }

if( .soundeffects ){ soundeffect "slot_jackpot.wav",1; }

} else { dispbottom "Failed"; }

if( select("Another Round:I'm done") == 2 || Zeny < .tsm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.tsm_payment[1]) < .tsm_payment[2] && .payment ){ cutin "",255; close; }

}

end;

}

OnSingleSlot:

setd ".mode"+strnpcinfo(3)+"",0;

end;

OnTripleSlot:

setd ".mode"+strnpcinfo(3)+"",1;

end;

iMode:

next;

mes "Which did you want to do?";

menu "Change THIS machine's mode:Change ALL machine's mode",-;

if( @menu == 1 ) {

next;

mes "What mode would you like this machine to have?";

menu "Single Slot Machine Mode:Triple Slot Machine Mode",-;

if( @menu == 1 ) {

setd ".mode"+strnpcinfo(3)+"",0;

} else {

setd ".mode"+strnpcinfo(3)+"",1;

}

close;

} else {

next;

mes "What mode would you like to change all slot machines to?";

menu "Single Slot Machine Mode:Triple Slot Machine Mode",-;

if( @menu == 1 ) {

donpcevent "::OnSingleSlot";

} else {

donpcevent "::OnTripleSlot";

}

close;

}

OnInit:

// 0 = Disabled, 1 = Enabled.

.soundeffects = 1;

//[ 0 = Single Slot Machine Mode ]_[ 1 = Triple Slot Machine Mode ]

setd ".mode"+strnpcinfo(3)+"",0;

//[0] = Fail Rate

//[1] = Fail (Do not change)

//[2] = Success (Do not change)

//[3] = File Name (Do not change)

//[4] = Animation Time (Do not change, for best results :D)

setarray .ssm_animate$[0],"30","29","33","slot_","3";

//[0] = Fail Rate "Slot 2"

//[1] = Fail Rate "Slot 3"

//[2] = SSS (Do not change)

//[3] = SSS_Count (Do not change)

//[4] = SSF (Do not change)

//[5] = SSF_Count (Do not change)

//[6] = SFS (Do not change)

//[7] = SFS_Count (Do not change)

//[8] = SFF (Do not change)

//[9] = SFF_Count (Do not change)

//[10] = Animation Time (Do not change, for best results :D)

setarray .tsm_animate$[0],"30","30","SSS_","41","SSF_","37","SFS_","41","SFF_","45","3";

// Prize Settings

// Prize Type

// 0 = Zeny, 1 = Item, 2 = Zeny&Item

.prize = 2;

// [0] = Zeny, [1] = Item ID, [2] = Item Amount;

setarray .ssm_prize[0],125,501,10;

setarray .tsm_prize[0],450,501,30;

// Payment Settings

// Payment Type

// 0 = Zeny, 1 = Item, 2 = Zeny&Item

.payment = 2;

// [0] = Zeny, [1] = Item ID, [2] = Item Amount;

setarray .ssm_payment[0],100,501,1; // Single Slot Machine Payment Price

setarray .tsm_payment[0],300,501,3; // Triple Slot Machine Payment Price

// DO NOT CHANGE BELOW

// Payment Text Syntax

setarray .ssm_payment_message$[0],""+ .ssm_payment[0] +" zeny",""+ getitemname(.ssm_payment[1]) +" x"+ .ssm_payment[2] +"";

setarray .tsm_payment_message$[0],""+ .tsm_payment[0] +" zeny",""+ getitemname(.tsm_payment[1]) +" x"+ .tsm_payment[2] +"";

end;

}

//Duplicates

prontera,154,176,4 duplicate(1slot) SlotMachine#2slot 563

prontera,156,176,4 duplicate(1slot) SlotMachine#3slot 563

Edited by Emistry
codebox
  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...