View difference between Paste ID: wNFtNVrY and ZV6MzFnP
SHOW: | | - or go back to the newest paste.
1
on *:TEXT:&guess *:#ninja_matt:{
2-
  if (($$2 isnum) && ($$3 inum)) {
2+
  if (($$2 isnum) && ($$3 isnum)) {
3
    if (($$2 == 1) && ($$3 == 1)) msg $chan You thought you could get away with that?
4
    elseif (($$2 != $int($$2)) || ($$3 != $int($$3))) msg $chan Please enter only whole numbers.
5
    elseif (($$2 < 1) || ($$3 < 1)) msg $chan You can't input numbers less than 1.
6
    elseif ($$2 < $$3) msg $chan The number you are guessing cannot be higher than maximum value specified.
7
    else {
8
      var %num = $rand(1,$$2)
9
      if (%num == $$3) {
10
        inc %guess [ $+ [ $nick ] ] $$2
11
        msg $chan You guessed correct! You just gained  $+ $$2 points.
12
      }
13
      else {
14
        dec %guess [ $+ [ $nick ] ]
15
        msg $chan Oops. You guessed wrong, the correct answer was  $+ %num $+ . You just lost 1 point.
16
      }
17
      msg $chan You now have %guess [ $+ [ $nick ] ] points.
18
    }
19
  }
20
  else msg $chan Please enter only numbers.
21
}
22-
on *:TEXT:&guessscore *:#ninja_matt: 
22+
on *:TEXT:&guessscore*:#ninja_matt: {
23-
if (!%guess [ $+ [ $$2 ] ] ) msg $chan There is no score recorded for $$2.
23+
if (!%guess [ $+ [ $iif($2,$2,$nick) ] ] ) msg $chan There is no score recorded for $iif($2,$2.,your nick.)
24-
else msg $chan $$2 has %guess [ $+ [ $$2 ] ] points.
24+
else msg $chan $iif($2,$2 has,You have) %guess [ $+ [ $iif($2,$2,$nick) ] ] points.
25
}