From ef9f37e12f9ae47b8d1e9475be262b9a97d07b12 Mon Sep 17 00:00:00 2001 From: Christian Kroll Date: Thu, 14 Jun 2012 00:23:25 +0200 Subject: [PATCH] chat gem added --- src/de/ctdo/crashtest/game/TheGame.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/de/ctdo/crashtest/game/TheGame.java b/src/de/ctdo/crashtest/game/TheGame.java index 65df967..3eeec3f 100644 --- a/src/de/ctdo/crashtest/game/TheGame.java +++ b/src/de/ctdo/crashtest/game/TheGame.java @@ -274,6 +274,18 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent disco(); } else if(message.startsWith("disco stop")) { discoStop(); + } else if(message.startsWith("gem activate")) { + java.util.Random random = new java.util.Random(); + int scry = random.nextInt(100); + if (scry >= 98) { + ircClient.say("Perfect Gem Activated"); + } else if (scry >= 90) { + ircClient.say("Moooooooo!"); + } else { + ircClient.say("Gem Activated"); + } + } else if(message.startsWith("gem deactivate")) { + ircClient.say("Gem Deactivated"); } else { ircClient.say("y u no use valid command?"); }