Jump to content
  • 0

R> Zeny Roulette NPC using Cutin.


AyenPanda

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   12
  • Joined:  03/18/20
  • Last Seen:  

i Got my Cutins but the zeny roulette script is all need.  here is the sample cutin 1s_1.bmp

the thing is i am requesting for the roulette paying zeny. if you talk to the npc it will display the default cutin (zeny_rolet.bmp) showing the prize of roulette each level , asking you if you want to play the roulette paying 100k, this roulette has a 7 level. as you can see on the BMP cutin sample. zeny_rolet.bmp
so at the first level, there is a 1s_1 to 1s_9 cutins , if i pay 100k for example it will run the roulette and it will stop on certain cutin that will correspond a prize you can get according what on the cutins (1s_2 to 1s_8 ) and get you to level 2 going to 2s_1 to 2s_8 cutins , after getting to level 2 , you need to pay another 100k to be able to run the roulette at that level after winning a prize will get you on level 3, which if you won a prize it will get you higher until level 7  which is the last level .and if it is at the (/) which is the 1s_1 and 1s_9 which is like a try again button as well as the level 2 where 2s_1 and 2s_8 is the try again (/) , you need to pay 100k again if you want to continue play on that level and get you to higher level.

P.S. : if you win a prize there is a SC effect like Mammonite, and if you won the Jackpot prize at level 7, it announce "Emistry won the jackpot prize (the jackpot prize name) at Zeny Roulette, get yours now!" and if there is possible to put a mp3 while playing the roulette.

 

 

 

Edited by AyenPanda
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Try below

prontera,150,150,6	script	Zeny Roulette	4_F_KAFRA1,{
	function Roll;
	cutin "1s_1", 3;
	mes .npc$;
	mes "Hi " + strcharinfo(0) + ", So do you want to play zeny roulette?";
	next;
	
	if (select("~ Yes:~ No") & 2) {
		mes .npc$;
		mes "Alright!";
		close2;
		cutin "", 255;
		end;
	}
	
	mes .npc$;
	mes "Let's go!";
	next;
	
	@level = 1;
	
	while(1) {
		switch(select("~ Play:~ Exit")) {
			case 1: 
				.@str$ = Roll(@level);
				if (.@str$ == "NZ") {
					mes .npc$;
					mes "You need " + callfunc("F_InsertComma", .zeny_amt_need) + " in order to participate in the roulette.";
					.@a = 1;
					break;
				}
				if (.@str$ == "NA") {
					mes .npc$;
					mes "Seems not your lucky day " + strcharinfo(0);
					if (@level > 1)
						@level--;
					next;
					break;
				}
				.@index = inarray(.item_cutin$, .@str$);
				mes .npc$;
				mes "Congratulations! You won ^FF8000" + getitemname(.item_reward[.@index]) + "^000000!";
				getitem .item_reward[.@index], 1;
				specialeffect 10;
				// Jackpot
				if (.@str$ == "7s_2") {
					announce strcharinfo(0) + " just won the jackpot prize " + getitemname(.item_reward[.@index]) + " at Zeny Roulette, get yours now!", 0;
					@level = 1;
					.@a = 1;
					break;
				}
				@level++;
				next;
				break;
			case 2:
			default:
				.@a = 1;
				break;
		}
		
		if (.@a) { .@a = 0; break; }
	}
	
	close2;
	cutin "", 255;
	end;
	
	function Roll {
		if (.zeny_required && .zeny_amt_need > Zeny)
			return "NZ";
		Zeny -= .zeny_amt_need;
		.@i = getarg(0, 1);
		while(1) {
			.@done = 0;
			for (.@j = 1; .@j <= (10 - .@i); .@j++) {
				cutin .@i + "s_" + .@j, 3;
				if (5 > rand(100)) {
					.@done = 1;
					.@award_cutin$ = .@i + "s_" + .@j;
					if (.@j == 1 || .@j == (10 - .@i))
						.@award_cutin$ = "NA";
					break;
				}
				sleep2 100;
			}
			
			if (.@done)
				break;
		}
		return .@award_cutin$;
	}
	
	OnInit:
		.npc$ = "[^808080 " + strnpcinfo(1) + " ^000000]";
		.zeny_required = 1; // 1 = yes / 0 = no
		.zeny_amt_need = 100000; // zeny amount needed
		setarray .item_cutin$[0], "1s_2", "1s_3", "1s_4", "1s_5", "1s_6", "1s_7", "1s_8", "2s_2", "2s_3", "2s_4", "2s_5", "2s_6", "2s_7", "3s_2", "3s_3", "3s_4", "3s_5", "3s_6", "4s_2", "4s_3", "4s_4", "4s_5", "5s_2", "5s_3", "5s_4", "6s_2", "6s_3", "7s_2";	
		setarray .item_reward[0], 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507;
		end;
}

You have to set the rewards properly

setarray .item_cutin$[0], "1s_2", "1s_3", "1s_4", "1s_5", "1s_6", "1s_7", "1s_8", "2s_2", "2s_3", "2s_4", "2s_5", "2s_6", "2s_7", "3s_2", "3s_3", "3s_4", "3s_5", "3s_6", "4s_2", "4s_3", "4s_4", "4s_5", "5s_2", "5s_3", "5s_4", "6s_2", "6s_3", "7s_2";	
setarray .item_reward[0], 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507, 501, 502, 503, 504, 505, 506, 507;

 

Edited by Patskie
add specialeffect
  • Upvote 1
Link to comment
Share on other sites

  • 0

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

prontera,155,181,5	script	Sample	4_F_KAFRA1,{
	cutin "1s_1", 3;
	for (.@level = 1; .@level <= 7; .@level++)
		for (.@i = 0; .@i < (10 - .@level); .@i++) {
			cutin .@level+"s_"+.@i, 3;
			sleep2 (.@level * 100) + (.@i * 100);
		}
	close2;
	cutin "", 255;
	end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   12
  • Joined:  03/18/20
  • Last Seen:  

On 4/18/2020 at 11:39 PM, Emistry said:

prontera,155,181,5	script	Sample	4_F_KAFRA1,{
	cutin "1s_1", 3;
	for (.@level = 1; .@level <= 7; .@level++)
		for (.@i = 0; .@i < (10 - .@level); .@i++) {
			cutin .@level+"s_"+.@i, 3;
			sleep2 (.@level * 100) + (.@i * 100);
		}
	close2;
	cutin "", 255;
	end;
}

 

boss can you apply it with roullette paying for zeny ? for example 100k.

up!

Link to comment
Share on other sites

  • 0

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

prontera,155,181,5	script	Sample	4_F_KAFRA1,{
	mes "Pay "+.zeny+" Zeny to play?";
	cutin "1s_1", 3;
	if (select("Pay", "Cancel") == 1) {
		if (Zeny < .zeny) {
			mes "Not enough zeny.";
		}
		else {
			for (.@level = 1; .@level <= 7; .@level++)
				for (.@i = 0; .@i < (10 - .@level); .@i++) {
					cutin .@level+"s_"+.@i, 3;
					sleep2 (.@level * 100) + (.@i * 100);
				}
		}
	}
	close2;
	cutin "", 255;
	end;
	
	OnInit:
		.zeny = 100000;
		end;
}

in future, please write everything in your first post rather than keep asking for changes.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   12
  • Joined:  03/18/20
  • Last Seen:  

On 4/26/2020 at 12:51 AM, Emistry said:

prontera,155,181,5	script	Sample	4_F_KAFRA1,{
	mes "Pay "+.zeny+" Zeny to play?";
	cutin "1s_1", 3;
	if (select("Pay", "Cancel") == 1) {
		if (Zeny < .zeny) {
			mes "Not enough zeny.";
		}
		else {
			for (.@level = 1; .@level <= 7; .@level++)
				for (.@i = 0; .@i < (10 - .@level); .@i++) {
					cutin .@level+"s_"+.@i, 3;
					sleep2 (.@level * 100) + (.@i * 100);
				}
		}
	}
	close2;
	cutin "", 255;
	end;
	
	OnInit:
		.zeny = 100000;
		end;
}

in future, please write everything in your first post rather than keep asking for changes.

i am so sorry boss @Emistry. i thought that i explain it well on the first post. it is indeed my fault. forgive me. the thing is i am requesting for the roulette paying zeny. if you talk to the npc it will display the default cutin (zeny_rolet.bmp) showing the prize of roulette each level , asking you if you want to play the roulette paying 100k, this roulette has a 7 level. as you can see on the BMP cutin sample. zeny_rolet.bmp
so at the first level, there is a 1s_1 to 1s_9 cutins , if i pay 100k for example it will run the roulette and it will stop on certain cutin that will correspond a prize you can get according what on the cutins (1s_2 to 1s_8 ) and get you to level 2 going to 2s_1 to 2s_8 cutins , after getting to level 2 , you need to pay another 100k to be able to run the roulette at that level after winning a prize will get you on level 3, which if you won a prize it will get you higher until level 7  which is the last level .and if it is at the (/) which is the 1s_1 and 1s_9 which is like a try again button as well as the level 2 where 2s_1 and 2s_8 is the try again (/) , you need to pay 100k again if you want to continue play on that level and get you to higher level.

P.S. : if you win a prize there is a SC effect like Mammonite, and if you won the Jackpot prize at level 7, it announce "Emistry won the jackpot prize (the jackpot prize name) at Zeny Roulette, get yours now!" and if there is possible to put a mp3 while playing the roulette.

Thank you so much boss in advance.

Thank you

up! 

Edited by AyenPanda
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   12
  • Joined:  03/18/20
  • Last Seen:  

Good evening everyone, i just want to up this topic, it's been two weeks now. ? hopefully some kind heart might help me. 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...