Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:&guess *:#ninja_matt:{
- if (($$2 isnum) && ($$3 isnum)) {
- 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 ($$3 < $$2) msg $chan The number you are guessing cannot be higher than maximum value specified.
- else {
- var %num = $rand(1,$$3)
- if (%num == $$2) {
- inc %guess [ $+ [ $nick ] ] $$3
- msg $chan You guessed correct! You just gained $+ $$3 $+ points.
- msg $chan You now have %guess [ $+ [ $nick ] ] points.
- }
- else {
- dec %guess [ $+ [ $nick ] ] 1
- 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