alias attack {
set %damage 0
set %dice 1
while (%dice <= $gettok($gettok($hget(weapons,$1).data,1,32),1,100)) {
set %damage $calc(%damage + $rand(1,$gettok($gettok($gettok($hget(weapons,$1).data,1,32),2,100),1,43)) + $gettok($hget(weapons,$1),2,43))
inc %dice
}
unset %dice
}