Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:&guess *:#ninja_matt:{
- if (($$2 isnum) && ($$3 inum)) {
- if (($$2 == 1) && ($$3 == 1)) msg $chan You thought you could get away with that?
- elseif (($$2 != $int($$2)) || ($$3 != $int($$3))) msg $chan Please enter only whole numbers.
- elseif (($$2 < 1) || ($$3 < 1)) msg $chan You can't input numbers less than 1.
- elseif ($$2 < $$3) msg $chan The number you are guessing cannot be higher than maximum value specified.
- else {
- var %num = $rand(1,$$2)
- if (%num == $$3) {
- inc %guess $+ $nick $$2
- msg $chan You guessed correct! You just gained $+ $$2 points.
- }
- else {
- dec %guess $+ $nick
- msg $chan Oops. You guessed wrong, the correct answer was $+ %num $+ . You just lost 1 point.
- }
- msg $chan You now have %guess [ $+ [ $nick ] ] points.
- }
- }
- else msg $chan Please enter only numbers.
- }
- on *:TEXT:&guessscore *:#ninja_matt:{
- if (!%guess [ $+ [ $$2 ] ] ) msg $chan There is no score recorded for $$2.
- else msg $chan $$2 has %guess [ $+ [ $$2 ] ] points.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement