Jump to content
  • 0

DICE ITEM BET GAME


agamanaros

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

Can I request for a script for a normal dice bet game but instead of betting for zeny, they'll bet for pods. Player also has the option to either bet for 50 pods, 100 pods, 200 pods or Custom Amount. And I also want the npc to spin /dice emotion to both player and npc everytime they play :)


Example:
image.png.c5f93fbab867384cadad1957f860e7a8.png

roll_a_dice.txt

image.png.5659cbc4198a58576e7288a64b211064.png




Thank you!

Edited by agamanaros
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

@Emistry
I was able to get it working! Thank you very much! :)

 

moc_para01,102,20,2	script	Dice Dealer	57,{

set .itemid, 7179;
set .MaxDiceBet,30000;

mes "[Dyceman]";
mes "We each roll two dice and the highest total wins. I will match however much money you put in.";
goto DiceStart;
close;

DiceStart:
next;
if(select("Lets throw some dice!:Not wasting a zeny!")==2) {
	mes "[Dyceman]"; 
	mes "Please come again!"; 
	close;
}
mes "[Dyceman]";
mes "How much Proof of Donations would you like to bet?";
switch(prompt(
	"50 Proof of Donations",
	"100 Proof of Donations",
	"200 Proof of Donations",
	"Custom Amount"
)) {
	case 1: 
		set .@BetAmount,50; 
		break;
	case 2: 
		set .@BetAmount,100; 
		break;
	case 3: 
		set .@BetAmount,200; 
		break;
	case 4: 
		input .@BetInput;
		if(.@BetInput < 1 || .@BetInput > .MaxDiceBet) { 
			next; 
			mes "[Dyceman]"; 
			mes "You must enter a number between ^FF00001^000000 and ^FF0000"+.MaxDiceBet+" Proof of Donations^000000."; 
			goto DiceStart; 
			close; 
		}
		set .@BetAmount,.@BetInput;
		next;
		mes "[Dyceman]";
		mes "You bet ^008800"+.@BetAmount+" Proof of Donations^000000!";
		break;
	default:
	case 255: 
		mes "[Dyceman]"; 
		mes "Please come again!"; 
		close;
}
next;
mes "[Dyceman]";
if(countitem(.itemid) < .@BetAmount) {
	mes "You you don't have enough Proof of Donations to make that bet!"; 
	close; 
}
delitem .itemid, .@BetAmount;
set trustfundbalance, trustfundbalance + (.@BetAmount / 100);
mes "The dice have been thrown...";
next;
set .@DiceRoll,rand(1,3);
if(.@DiceRoll==1) { mes "roll..."; }
if(.@DiceRoll==2) { mes "roll... roll..."; }
if(.@DiceRoll==3) { mes "roll... roll... roll..."; }
next;
set .@DiceRoll,rand(1,3);
if(.@DiceRoll==1) { mes "roll..."; }
if(.@DiceRoll==2) { mes "roll... roll..."; }
if(.@DiceRoll==3) { mes "roll... roll... roll..."; }
next;
set .@DiceRoll,rand(1,3);
if(.@DiceRoll==1) { mes "roll..."; }
if(.@DiceRoll==2) { mes "roll... roll..."; }
if(.@DiceRoll==3) { mes "roll... roll... roll..."; }
set .@diceroll1a,rand(1,6);
set .@diceroll1b,rand(1,6);
set .@dice1numtotal,(.@diceroll1a+.@diceroll1b);
set .@diceroll2a,rand(1,6);
set .@diceroll2b,rand(1,6);
set .@dice2numtotal,(.@diceroll2a+.@diceroll2b);
next;
mes "[Dyceman]";
mes "You rolled a ^0000FF"+.@diceroll2a+"^000000 and ^0000FF"+.@diceroll2b+"^000000!";
mes " ";
mes "I rolled a ^0000FF"+.@diceroll1a+"^000000 and ^0000FF"+.@diceroll1b+"^000000!";
next;
mes "[Dyceman]"; 
if(.@dice1numtotal>.@dice2numtotal) { 
	mes "My ^0000FF"+.@dice1numtotal+"^000000 beats your ^0000FF"+.@dice2numtotal+"^000000!"; 
	next; 
	mes "[Dyceman]"; 
	mes "I win, your ^008800"+.@BetAmount+"z^000000 is mine!"; 
}
else if(.@dice1numtotal<.@dice2numtotal) { 
	mes "Your ^0000FF"+.@dice2numtotal+"^000000 beats my ^0000FF"+.@dice1numtotal+"^000000!"; 
	getitem .itemid, (.@BetAmount * 2); 
	next; 
	mes "[Dyceman]"; 
	mes "You won ^008800"+(.@BetAmount*2)+"z^000000. I will get your Proof of Donations next time!"; 
}
else if(.@dice1numtotal==.@dice2numtotal) { 
	mes "Draw, let's play again!";
	getitem .itemid, .@BetAmount; 
	set trustfundbalance,trustfundbalance - ( .@BetAmount / 100); 
	goto DiceStart;
}
close;
}

 

Link to comment
Share on other sites

  • 0

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

try this.

cmd_in02,181,98,2	script	Dice Dealer	57,{

set .itemid, 501;
set .MaxDiceBet,30000;

mes "[Dyceman]";
mes "We each roll two dice and the highest total wins. I will match however much money you put in.";
goto DiceStart;
close;

DiceStart:
next;
if(select("Lets throw some dice!", "Not wasting a "+getitem(.itemid)+"!") == 2) {
	mes "[Dyceman]"; 
	mes "Please come again!"; 
	close;
}
mes "[Dyceman]";
mes "How much "+getitem(.itemid)+" would you like to bet?";
switch(prompt(
	"50 "+getitem(.itemid),
	"100 "+getitem(.itemid),
	"200 "+getitem(.itemid),
	"Custom Amount"
)) {
	case 1: 
		set .@BetAmount,50; 
		break;
	case 2: 
		set .@BetAmount,100; 
		break;
	case 3: 
		set .@BetAmount,200; 
		break;
	case 4: 
		input .@BetInput;
		if(.@BetInput < 1 || .@BetInput > .MaxDiceBet) { 
			next; 
			mes "[Dyceman]"; 
			mes "You must enter a number between ^FF00001^000000 and ^FF0000"+.MaxDiceBet+" "+getitem(.itemid)+"^000000."; 
			goto DiceStart; 
			close; 
		}
		set .@BetAmount,.@BetInput;
		next;
		mes "[Dyceman]";
		mes "You bet ^008800"+.@BetAmount+" "+getitem(.itemid)+"^000000!";
		break;
	default:
	case 255: 
		mes "[Dyceman]"; 
		mes "Please come again!"; 
		close;
}
next;
mes "[Dyceman]";
if(countitem(.itemid) < .@BetAmount) {
	mes "You you don't have enough "+getitem(.itemid)+" to make that bet!"; 
	close; 
}
delitem .itemid, .@BetAmount;
set trustfundbalance, trustfundbalance + (.@BetAmount / 100);
mes "The dice have been thrown...";
next;
while (.@dice_roll < 3) {
	set .@DiceRoll,rand(1,3);
	if(.@DiceRoll==1) { mes "roll..."; }
	if(.@DiceRoll==2) { mes "roll... roll..."; }
	else { mes "roll... roll... roll..."; }
	next;
}
set .@diceroll1a,rand(1,6);
set .@diceroll1b,rand(1,6);
set .@dice1numtotal,(.@diceroll1a+.@diceroll1b);
set .@diceroll2a,rand(1,6);
set .@diceroll2b,rand(1,6);
set .@dice2numtotal,(.@diceroll2a+.@diceroll2b);
next;
mes "[Dyceman]";
mes "You rolled a ^0000FF"+.@diceroll2a+"^000000 and ^0000FF"+.@diceroll2b+"^000000!";
mes " ";
mes "I rolled a ^0000FF"+.@diceroll1a+"^000000 and ^0000FF"+.@diceroll1b+"^000000!";
next;
mes "[Dyceman]"; 
if(.@dice1numtotal>.@dice2numtotal) { 
	mes "My ^0000FF"+.@dice1numtotal+"^000000 beats your ^0000FF"+.@dice2numtotal+"^000000!"; 
	next; 
	mes "[Dyceman]"; 
	mes "I win, your ^008800"+.@BetAmount+"z^000000 is mine!"; 
}
else if(.@dice1numtotal<.@dice2numtotal) { 
	mes "Your ^0000FF"+.@dice2numtotal+"^000000 beats my ^0000FF"+.@dice1numtotal+"^000000!"; 
	getitem .itemid, (.@BetAmount * 2); 
	next; 
	mes "[Dyceman]"; 
	mes "You won ^008800"+(.@BetAmount*2)+"z^000000. I will get your "+getitem(.itemid)+" next time!"; 
}
else if(.@dice1numtotal==.@dice2numtotal) { 
	mes "Draw, let's play again!";
	getitem .itemid, .@BetAmount; 
	set trustfundbalance,trustfundbalance - ( .@BetAmount / 100); 
	goto DiceStart;
}
close;
}

anyway, you should at least try search the forum, these npc scripts are easily can be found on forum.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

Thank you for your response Emistry, I tried your script and it gives me this error:
image.png.c6958d02249b92bb1b03209823bb305b.png

I'm searching for this specific script for about 3 days now and I haven't found 1 that works perfectly. Hope you can help me out. :)

Thank you! :)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

moc_para01,102,20,2	script	Dice Dealer	57,{

set .itemid, 501;
set .MaxDiceBet,30000;

mes "[Dyceman]";
mes "We each roll two dice and the highest total wins. I will match however much money you put in.";
goto DiceStart;
close;

DiceStart:
next;
if(select("Lets throw some dice!:Not wasting a zeny!")==2) {
	mes "[Dyceman]"; 
	mes "Please come again!"; 
	close;
}
mes "[Dyceman]";
mes "How much Proof of Donations would you like to bet?";
switch(prompt(
	"50 Proof of Donations",
	"100 Proof of Donations",
	"200 Proof of Donations",
	"Custom Amount"
)) {
	case 1: 
		set .@BetAmount,50; 
		break;
	case 2: 
		set .@BetAmount,100; 
		break;
	case 3: 
		set .@BetAmount,200; 
		break;
	case 4: 
		input .@BetInput;
		if(.@BetInput < 1 || .@BetInput > .MaxDiceBet) { 
			next; 
			mes "[Dyceman]"; 
			mes "You must enter a number between ^FF00001^000000 and ^FF0000"+.MaxDiceBet+" Proof of Donations^000000."; 
			goto DiceStart; 
			close; 
		}
		set .@BetAmount,.@BetInput;
		next;
		mes "[Dyceman]";
		mes "You bet ^008800"+.@BetAmount+" Proof of Donations^000000!";
		break;
	default:
	case 255: 
		mes "[Dyceman]"; 
		mes "Please come again!"; 
		close;
}
next;
mes "[Dyceman]";
if(countitem(.itemid) < .@BetAmount) {
	mes "You you don't have enough Proof of Donations to make that bet!"; 
	close; 
}
delitem .itemid, .@BetAmount;
set trustfundbalance, trustfundbalance + (.@BetAmount / 100);
mes "The dice have been thrown...";
next;
set .@DiceRoll,rand(1,3);
if(.@DiceRoll==1) { mes "roll..."; }
if(.@DiceRoll==2) { mes "roll... roll..."; }
if(.@DiceRoll==3) { mes "roll... roll... roll..."; }
next;
set .@DiceRoll,rand(1,3);
if(.@DiceRoll==1) { mes "roll..."; }
if(.@DiceRoll==2) { mes "roll... roll..."; }
if(.@DiceRoll==3) { mes "roll... roll... roll..."; }
next;
set .@DiceRoll,rand(1,3);
if(.@DiceRoll==1) { mes "roll..."; }
if(.@DiceRoll==2) { mes "roll... roll..."; }
if(.@DiceRoll==3) { mes "roll... roll... roll..."; }
set .@diceroll1a,rand(1,6);
set .@diceroll1b,rand(1,6);
set .@dice1numtotal,(.@diceroll1a+.@diceroll1b);
set .@diceroll2a,rand(1,6);
set .@diceroll2b,rand(1,6);
set .@dice2numtotal,(.@diceroll2a+.@diceroll2b);
next;
mes "[Dyceman]";
mes "You rolled a ^0000FF"+.@diceroll2a+"^000000 and ^0000FF"+.@diceroll2b+"^000000!";
mes " ";
mes "I rolled a ^0000FF"+.@diceroll1a+"^000000 and ^0000FF"+.@diceroll1b+"^000000!";
next;
mes "[Dyceman]"; 
if(.@dice1numtotal>.@dice2numtotal) { 
	mes "My ^0000FF"+.@dice1numtotal+"^000000 beats your ^0000FF"+.@dice2numtotal+"^000000!"; 
	next; 
	mes "[Dyceman]"; 
	mes "I win, your ^008800"+.@BetAmount+"z^000000 is mine!"; 
}
else if(.@dice1numtotal<.@dice2numtotal) { 
	mes "Your ^0000FF"+.@dice2numtotal+"^000000 beats my ^0000FF"+.@dice1numtotal+"^000000!"; 
	getitem .itemid, (.@BetAmount * 2); 
	next; 
	mes "[Dyceman]"; 
	mes "You won ^008800"+(.@BetAmount*2)+"z^000000. I will get your Proof of Donations next time!"; 
}
else if(.@dice1numtotal==.@dice2numtotal) { 
	mes "Draw, let's play again!";
	getitem .itemid, .@BetAmount; 
	set trustfundbalance,trustfundbalance - ( .@BetAmount / 100); 
	goto DiceStart;
}
close;
}

@Emistry

I was able to debug the script that you gave me however whenever I Choose "Let's roll some dice", It doesn't stop rolling. 

 

Link to comment
Share on other sites

  • 0

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

cmd_in02,181,98,2	script	Dice Dealer	57,{

set .itemid, 501;
set .MaxDiceBet,30000;

mes "[Dyceman]";
mes "We each roll two dice and the highest total wins. I will match however much money you put in.";
goto DiceStart;
close;

DiceStart:
next;
if(select("Lets throw some dice!", "Not wasting a "+getitemname(.itemid)+"!") == 2) {
	mes "[Dyceman]"; 
	mes "Please come again!"; 
	close;
}
mes "[Dyceman]";
mes "How much "+getitem(.itemid)+" would you like to bet?";
switch(prompt(
	"50 "+getitem(.itemid),
	"100 "+getitem(.itemid),
	"200 "+getitem(.itemid),
	"Custom Amount"
)) {
	case 1: 
		set .@BetAmount,50; 
		break;
	case 2: 
		set .@BetAmount,100; 
		break;
	case 3: 
		set .@BetAmount,200; 
		break;
	case 4: 
		input .@BetInput;
		if(.@BetInput < 1 || .@BetInput > .MaxDiceBet) { 
			next; 
			mes "[Dyceman]"; 
			mes "You must enter a number between ^FF00001^000000 and ^FF0000"+.MaxDiceBet+" "+getitem(.itemid)+"^000000."; 
			goto DiceStart; 
			close; 
		}
		set .@BetAmount,.@BetInput;
		next;
		mes "[Dyceman]";
		mes "You bet ^008800"+.@BetAmount+" "+getitem(.itemid)+"^000000!";
		break;
	default:
	case 255: 
		mes "[Dyceman]"; 
		mes "Please come again!"; 
		close;
}
next;
mes "[Dyceman]";
if(countitem(.itemid) < .@BetAmount) {
	mes "You you don't have enough "+getitem(.itemid)+" to make that bet!"; 
	close; 
}
delitem .itemid, .@BetAmount;
set trustfundbalance, trustfundbalance + (.@BetAmount / 100);
mes "The dice have been thrown...";
next;
while (.@dice_roll < 3) {
	set .@DiceRoll,rand(1,3);
	if(.@DiceRoll==1) { mes "roll..."; }
	if(.@DiceRoll==2) { mes "roll... roll..."; }
	else { mes "roll... roll... roll..."; }
	next;
	set .@dice_roll, .@dice_roll + 1;
}
set .@diceroll1a,rand(1,6);
set .@diceroll1b,rand(1,6);
set .@dice1numtotal,(.@diceroll1a+.@diceroll1b);
set .@diceroll2a,rand(1,6);
set .@diceroll2b,rand(1,6);
set .@dice2numtotal,(.@diceroll2a+.@diceroll2b);
next;
mes "[Dyceman]";
mes "You rolled a ^0000FF"+.@diceroll2a+"^000000 and ^0000FF"+.@diceroll2b+"^000000!";
mes " ";
mes "I rolled a ^0000FF"+.@diceroll1a+"^000000 and ^0000FF"+.@diceroll1b+"^000000!";
next;
mes "[Dyceman]"; 
if(.@dice1numtotal>.@dice2numtotal) { 
	mes "My ^0000FF"+.@dice1numtotal+"^000000 beats your ^0000FF"+.@dice2numtotal+"^000000!"; 
	next; 
	mes "[Dyceman]"; 
	mes "I win, your ^008800"+.@BetAmount+"z^000000 is mine!"; 
}
else if(.@dice1numtotal<.@dice2numtotal) { 
	mes "Your ^0000FF"+.@dice2numtotal+"^000000 beats my ^0000FF"+.@dice1numtotal+"^000000!"; 
	getitem .itemid, (.@BetAmount * 2); 
	next; 
	mes "[Dyceman]"; 
	mes "You won ^008800"+(.@BetAmount*2)+"z^000000. I will get your "+getitem(.itemid)+" next time!"; 
}
else if(.@dice1numtotal==.@dice2numtotal) { 
	mes "Draw, let's play again!";
	getitem .itemid, .@BetAmount; 
	set trustfundbalance,trustfundbalance - ( .@BetAmount / 100); 
	goto DiceStart;
}
close;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

Thank you @Emistry, But do you think its possible for both npc and player to do an emotion of /dice every time they roll?

 :D 

Edited by agamanaros
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...