Advertisement
Wikked

8ball

Apr 21st, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $.on('command', function (event) {
  2.     var sender = event.getSender();
  3.     var username = $.username.resolve(sender);
  4.     var command = event.getCommand();
  5.     var s;
  6.     if (command.equalsIgnoreCase("8ball")) {
  7.     if (args.length == 0) { $.say ("error."); return; }
  8.         var table = new Array();
  9.         table.push("Yes.");
  10.         table.push("No.");
  11.         table.push("Maybe.");
  12.     table.push("I don't think so!");
  13.         table.push("I'll think about it...");
  14.     table.push("Why not?");
  15.         table.push("Simple yes will do from me!");
  16.     table.push("Signs point to yes.");
  17.     table.push("Reply hazy, try again.");
  18.     table.push("Without a doubt.");
  19.     table.push("My sources say no.");
  20.     table.push("As I see it, yes.");
  21.         table.push("You may rely on it.");
  22.         table.push("Concentrate and ask again.");
  23.     table.push("Outlook not so good.");
  24.     table.push("It is decidedly so.");
  25.     table.push("Better not tell you now.");
  26.     table.push("Very doubtful.");
  27.     table.push("Yes - definitely.");
  28.     table.push("It is certain.");
  29.         table.push("Cannot predict now.");
  30.     table.push("Most likely.");
  31.     table.push("Ask again later");
  32.     table.push("My reply is no.");
  33.     table.push("Outlook good.");
  34.     table.push("Don't count on it.");
  35.     table.push("Yes, in due time.");
  36.     table.push("My sources say no.");
  37.     table.push("Definitely not.");
  38.         table.push("You will have to wait.");
  39.     table.push("I have my doubts.");
  40.     table.push("Outlook so so.");
  41.     table.push("Looks good to me!");
  42.     table.push("Who knows?");
  43.     table.push("Looking good!");
  44.     table.push("Are you kidding?");
  45.     table.push("Go for it!");
  46.     table.push("Don't bet on it.");
  47.     table.push("Probably.");
  48.     table.push("Forget about it.");
  49.               do {
  50.                 s = $.randElement(table);
  51.             } while (s.equalsIgnoreCase($var.lastRandom) && table.length > 1);
  52.  
  53.             $.say(s);
  54.     }
  55. });
  56.  
  57. $.registerChatCommand("8ball");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement