| 102 | | irc.sendContextReply(mes, "Random number between 0 and " + max + " is " + new Random().nextDouble()*max + "."); |
|---|
| 103 | | } |
|---|
| 104 | | |
|---|
| 105 | | private void randomReply(final Message mes, final String[] replies ) |
|---|
| 106 | | { |
|---|
| 107 | | irc.sendContextReply(mes, replies[new Random().nextInt(replies.length)]); |
|---|
| | 102 | irc.sendContextReply(mes, "Random number between 0 and " + max + " is " + Math.random()*max + "."); |
|---|
| | 103 | } |
|---|
| | 104 | |
|---|
| | 105 | private void randomReply(final Message mes, final String[] replies) |
|---|
| | 106 | { |
|---|
| | 107 | randomReply(mes, replies, "", ""); |
|---|
| | 108 | } |
|---|
| | 109 | |
|---|
| | 110 | private void randomReply(final Message mes, final String[] replies, String prefix, String suffix) |
|---|
| | 111 | { |
|---|
| | 112 | irc.sendContextReply(mes, prefix + replies[new Random().nextInt(replies.length)] + suffix); |
|---|
| 211 | | randomReply(mes, new String[] {"Signs point to yes.", "Yes.", "Reply hazy, try again.", "Without a doubt.", "My sources say no.", "As I see it, yes.", "You may rely on it.", "Concentrate and ask again.", "Outlook not so good.", "It is decidedly so.", "Better not tell you now.", "Very doubtful.", "Yes - definitely.", "It is certain.", "Cannot predict now.", "Most likely.", "Ask again later.", "My reply is no.", "Outlook good.", "Don't count on it." }); |
|---|
| 212 | | } |
|---|
| | 216 | randomReply(mes, new String[] { "Signs point to yes.", "Yes.", "Reply hazy, try again.", |
|---|
| | 217 | "Without a doubt.", "My sources say no.", "As I see it, yes.", |
|---|
| | 218 | "You may rely on it.", "Concentrate and ask again.", "Outlook not so good.", |
|---|
| | 219 | "It is decidedly so.", "Better not tell you now.", "Very doubtful.", |
|---|
| | 220 | "Yes - definitely.", "It is certain.", "Cannot predict now.", "Most likely.", |
|---|
| | 221 | "Ask again later.", "My reply is no.", "Outlook good.", "Don't count on it." }); |
|---|
| | 222 | } |
|---|
| | 223 | |
|---|
| | 224 | public String[] helpCommandTarot = { "Draw a card from the tarot pack.", }; |
|---|
| | 225 | |
|---|
| | 226 | public void commandTarot(final Message mes) |
|---|
| | 227 | { |
|---|
| | 228 | // http://en.wikipedia.org/wiki/Major_Arcana |
|---|
| | 229 | randomReply(mes, new String[] { "The Fool", "The Magician", "The High Priestess", |
|---|
| | 230 | "The Empress", "The Emperor", "The Hierophant or The Pope", "The Lovers", |
|---|
| | 231 | "The Chariot", "Strength", "The Hermit", "Wheel of Fortune", "Justice", |
|---|
| | 232 | "The Hanged Man", "Death", "Temperance", "The Devil", "The Tower", "The Star", |
|---|
| | 233 | "The Moon", "The Sun", "Judgment", "The World" }, "You drew ", "."); |
|---|
| | 234 | } |
|---|
| | 235 | |
|---|