Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /roll {?{How many Dice?}d6!!}>?{What is the Target Number?}
- var DCount=?{How many Dice?}; //asks the user for the number of dice
- var TN=?{What is the Target Number?};//asks the user for the target number
- var BN=TN*2; //defines double the target number (called a Boon)
- var SCount=0; //used to count Successes
- var BCount=0; //used to count Boons
- var CCount=0; //used to count Complications (nat 1)
- var Test=0; //used to store die rolls
- var NTest=0; //used for totaling exploding dice
- //This loop is used to roll and check all the Dice
- var i=1;
- for(i<DCount){
- Test=[[1d6]];
- NTest=Test;
- while(Test=6){ //this loop is for exploding dice
- Test=[[1d6]];
- NTest+=Test;
- };
- if(NTest>=TN){SCount++};
- if(NTest=1){CCount++);
- if(NTest>=BN){BCount++};
- };
- //I then need to output the results, but I don't know the syntax
- //but I want it to be something like this
- //You rolled [SCount] Successes, [CCount] Complications, and [BCount]Boons.
- //If there is an easy way to show the individual die-rolls that would be good too
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement