View difference between Paste ID: P4Fca2E5 and Mb1BW5ux
SHOW: | | - or go back to the newest paste.
1
on *:TEXT:&guess *:#ninja_matt:{
2-
  if (($$2 isnum) && ($$3 isnum)) {
2+
  if (($$2 isnum) && ($$3 inum)) {
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 ($$3 < $$2) msg $chan The number you are guessing cannot be higher than maximum value specified.
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,$$3)
8+
      var %num = $rand(1,$$2)
9-
      if (%num == $$2) {
9+
      if (%num == $$3) {
10-
        inc %guess [ $+ [ $nick ] ] $$3
10+
        inc %guess $+ $nick $$2
11-
        msg $chan You guessed correct! You just gained  $+ $$3 $+  points.
11+
        msg $chan You guessed correct! You just gained  $+ $$2 points.
12-
        msg $chan You now have %guess [ $+ [ $nick ] ] points.
12+
13
      else {
14
        dec %guess $+ $nick
15-
        dec %guess [ $+ [ $nick ] ] 1
15+
16
      }
17-
        msg $chan You now have %guess [ $+ [ $nick ] ] points.
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:{
23
  if (!%guess [ $+ [ $$2 ] ] ) msg $chan There is no score recorded for $$2.
24-
  if (!%guess [ $+ [ $$2 ] ]) msg $chan There is no score recorded for $$2 $+ .
24+
25
}