Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (message.content.startsWith(config.prefix + "d100")) {
- var roll = 0, base = 0, modfr = 0;
- if(params[1]){
- modfr = params[1];
- base = Math.floor((Math.random() * 100) + 1);
- roll = parseInt(base) + parseInt(modfr);
- }
- else {
- roll = Math.floor((Math.random() * 100) + 1);
- }
- message.channel.sendMessage("You rolled: " + roll + " (base:" + base + " mod: " + modfr + ")");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement