This script works perfectly well, kudos to the owner of this script, I forgot who I apologize but just wondering if we can make the Default prize on random as well?
For example:
Set default prize on random of red, yellow, white potion. instead of 1 default prize of red potion only.
Gotta make setarray .@Default[0],19578,1; random, not just the 19578.
function script Get_MysteryBox {
set .@Total,7;
//<%>,<ItemID>,<Amount>
setarray .@P1[0],50,19543,1;
setarray .@P2[0],90,19525,1;
setarray .@P3[0],90,31171,1;
setarray .@P4[0],90,19620,1;
setarray .@P5[0],90,19527,1;
setarray .@P6[0],90,19733,1;
setarray .@P7[0],90,20057,1;
setarray .@Default[0],19578,1;set.@i, rand(1,.@Total);if(rand(1,100)> getd(".@P"+.@i+"[0]")){for(set.@j,0;.@j<getarraysize(.@Default);set.@j,.@j+2){
getitem .@Default[.@j],.@Default[.@j+1];if(!.@k[0])
setarray .@k[0],.@Default[.@j],.@Default[.@j+1];}}else{for(set.@j,1;.@j<getarraysize(getd(".@P"+.@i));set.@j,.@j+2){
getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]");if(!.@k[0]){set.@gz,.@i;
setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]");break;}}}if(1<=.@gz&&.@gz<=1)
announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from the Mystery Costume Box!",0;
specialeffect2 248;
close;}
Question
Gouki
Hi,
This script works perfectly well, kudos to the owner of this script, I forgot who I apologize but just wondering if we can make the Default prize on random as well?
For example:
Set default prize on random of red, yellow, white potion. instead of 1 default prize of red potion only.
Gotta make setarray .@Default[0],19578,1; random, not just the 19578.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.