#!/usr/bin/ruby #todo#write getint##what this is:#a dice roller with dnd 3rd edition sane defaults#this is also a test.#please remain calm.#please see the "copythis" function too.#deroach = 1 #debug mode = 1def helpme() puts "enter in the style of \" 4d6+2 \" you may use . insead of d" puts "enter h for this message, c for copyright, and ^C to quit" puts "" puts ""enddef copythis() puts "This software is completely free, and is released under the" puts "creative commons attribution-sharealike 2.5 license. A copy" puts "of this license can be found at:" puts "http://creativecommons.org/licenses/by-sa/2.5/" puts "" puts ""enddef mainreactorGO() numdic, sides, pip = nil temp = gets if temp == "h" helpme() end if temp == "c" copythis() end numdice, sides, pip = temp.scan(/\d+/) if deroach = 1 print "numdice: ", numdice, "\n" print "sides : ", sides, "\n" print "pip : ", pip, "\n" end #temp = numdice * rand(sides) + pip puts numdice.to_i * rand(sides.to_i) + pip.to_iendhelpmestupid = nilwhile stupid == nilmainreactorGOend