Advertisement
Iire

Untitled

Aug 28th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on *:TEXT:&guess *:#ninja_matt:{
  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: {
  23. if (!%guess [ $+ [ $iif($2,$2,$nick) ] ] ) msg $chan There is no score recorded for $iif($2,$2.,your nick.)
  24. else msg $chan $iif($2,$2 has,You have) %guess [ $+ [ $iif($2,$2,$nick) ] ] points.
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement