Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub EVENT_SAY {
- if($text =~/hail/i)
- {
- ##Message blah blah tell player to input 2 numbers
- }
- elsif($text =~/ /i)
- {
- #Tell player they added too many spaces
- }
- elsif($text =~/^[0-9 ]+$/ && $text =~/ /i) #Text requires numbers and 1 SPACE
- {
- my $strlength = length($text);
- if ($strlength == 5)
- {
- $min = substr($text, 0, 2);
- $max = substr($text, 3, 2);
- }
- elsif($strlength == 4)
- {
- $min = substr($text, 0, 2);
- $max = substr($text, 2, 2);
- }
- elsif($strlength == 3)
- {
- $min = substr($text, 0, 1);
- $max = substr($text, 2, 1);
- }
- else
- {
- #YOU ENTERED TOO Many fucking numbers ADD TEXT HERE
- }
- if($max >= $min)
- {
- if($max <= 80)
- {
- #Scribespells HERE ADD TEXT or something
- print "max is $max -- min is $min \n";
- }
- }
- elsif($min > $max)
- {
- #First number must be lower than 2nd number dipshit!
- #Add text here telling them they are dumbasses
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement