Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function script diceroll {
- set @dicetype, getarg(0);
- set @dice_nr, rand(1,@dicetype);
- return @dice_nr;
- }
- function script dicemod {
- }
- mes "Are you sure you wish to use the d20?";next;menu "Yes",-,"No",L_end;mes "Are you using a positive or negative modifier? If no modifier just enter 0 on either choice.";next;menu"Positive",-,"Negative",L_Neg;input @mod_nr;set @dice_nr, rand(1,20);
- set @result,@dice_nr+@mod_nr;announce ""+strcharinfo(0)+" has rolled a "+@dice_nr+" on a d20 with a mod of "+@mod_nr+" resulting in a roll of "+ @result+".",18;close;L_Neg:input @mod_nr;set @dice_nr, rand(1,20);
- set @result,@dice_nr-@mod_nr;announce ""+strcharinfo(0)+" has rolled a "+@dice_nr+" on a d20 with a mod of "+@mod_nr+" resulting in a roll of "+ @result+".",18;close;L_end:close;
Add Comment
Please, Sign In to add comment