Jump to content
  • 0
Sign in to follow this  
madtoyz

Make Mini Dice script random prize

Question

prontera,164,172,5	script	Mini Dice	872,{//============================== Settings ============================================set .@dicename$,"[ Dice Master ]";set .cost,"1000000";//CHANGE THIS TO YOUR ZENY COST AMOUNTset .rewardid,7773;//CHANGE THIS TO YOUR REWARDIDset @rewamount,100;//CHANGE THIS TO YOUR REWARD AMOUNT//========================= End of Settings ==========================================OnMenu:mes .@dicename$;mes "Hello " + strcharinfo(0) + " ,do";mes "you want to play a round of dice?";mes "if you want to play you need to ";mes "pay 1.000.000 Zenny every Round.";switch(select("Yes,sure!:No,I'm unlucky!")) {	case 1:	mes .@dicename$;	if(Zeny < .cost) goto l_nozeny;	set Zeny, Zeny - .cost;	mes "Okay we'll start...";	set $@ran, rand(1,6);	if ($@ran == 6) set .@dice1$,"6";	if ($@ran == 5) set .@dice1$,"5";	if ($@ran == 4) set .@dice1$,"4";	if ($@ran == 3) set .@dice1$,"3";	if ($@ran == 2) set .@dice1$,"2";	if ($@ran == 1) set .@dice1$,"1";	set $@ran2, rand(1,6);	if ($@ran2 == 6) set .@dice2$,"6";	if ($@ran2 == 5) set .@dice2$,"5";	if ($@ran2 == 4) set .@dice2$,"4";	if ($@ran2 == 3) set .@dice2$,"3";	if ($@ran2 == 2) set .@dice2$,"2";	if ($@ran2 == 1) set .@dice2$,"1";	next;	mes .@dicename$;	mes "Okay I've got a " + .@dice1$ + ",";	mes "You've got a " + .@dice2$+ " !";	next;	if(.@dice1$ > .@dice2$) goto l_loose;	if(.@dice1$ < .@dice2$) goto l_win;	if(.@dice1$ == .@dice2$) goto l_draw;	close;	case 2:	mes .@dicename$;	mes "Okay bye!";	close;	}	l_nozeny:	mes .@dicename$;	mes "Sorry you need more Zenny!";	close;	l_loose:	mes .@dicename$;	mes "Haha,sorry you lost.";	goto OnMenu;	close;	l_draw:	mes .@dicename$;	mes "Draw,let's play again!";	goto OnMenu;	close;	l_win:	goto OnPrize;	OnPrize:	mes .@dicename$;	mes "Congratulations! You have won...";	mes "Take this as a Prize!";	next;	mes .@dicename$;	getitem .rewardid,@rewamount;	mes "Goodbye!";	close;}

 

Can anyone change the script for random prize around 5items ?

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

From which amount to which amount?

 

P.S.: for using that script you'd have to correct a subtle mistake quesoph made on the rewamount var.

Share this post


Link to post
Share on other sites
  • 0

 

 

prontera,164,172,5    script    Mini Dice    872,{OnMenu:    mes .dicename$,"Hello " + strcharinfo(0) + " ,do","you want to play a round of dice?","if you want to play you need to ","pay 1.000.000 Zenny every Round.";if(select("Yes,sure!:No,I'm unlucky!") == 2 ) close;    if(Zeny < .cost) {        mes " ","Sorry you need more Zeny!";        close;    }        set Zeny, Zeny - .cost;        mes " ","Okay we'll start...";        set .@ran, rand(1,6);        if (.@ran == 6) set .@dice1$,"6";        if (.@ran == 5) set .@dice1$,"5";        if (.@ran == 4) set .@dice1$,"4";        if (.@ran == 3) set .@dice1$,"3";        if (.@ran == 2) set .@dice1$,"2";        if (.@ran == 1) set .@dice1$,"1";        set .@ran2, rand(1,6);        if (.@ran2 == 6) set .@dice2$,"6";        if (.@ran2 == 5) set .@dice2$,"5";        if (.@ran2 == 4) set .@dice2$,"4";        if (.@ran2 == 3) set .@dice2$,"3";        if (.@ran2 == 2) set .@dice2$,"2";        if (.@ran2 == 1) set .@dice2$,"1";        next;        mes .dicename$,"Okay I've got a " + .@dice1$ + ",","You've got a " + .@dice2$+ " !";        next;    if(.@dice1$ > .@dice2$) {        mes .dicename$,"Haha,sorry you lost.";    next; goto OnMenu;        close;    }    if(.@dice1$ == .@dice2$) {        mes .dicename$,"Draw,let's play again!"; next; goto OnMenu;        close;    }    if(.@dice1$ < .@dice2$) {        mes .dicename$;        mes "Congratulations! You have won...","Take this as a Prize!";        next;        mes .dicename$,"Goodbye!";        getitem .rewardid[rand(getarraysize(.rewardid))],.rewamount[rand(getarraysize(.rewamount))];        close;    }OnInit:    set .dicename$,"[ ^ff0000Dice Master^000000 ]";    set .cost,"1";//CHANGE THIS TO YOUR ZENY COST AMOUNT    setarray .rewardid[0],7773,501,502,503,504; //CHANGE THIS TO YOUR REWARDID    setarray .rewamount[0],1,2,3,4,5;    //CHANGE THIS TO YOUR REWARD AMOUNT    end;}

 

 

 

forgot to change the getitem part on my first post.

Edited by quesoph

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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