Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //MCCScript 1.0
- MCC.LoadBot(new LottoBot());
- //MCCScript Extensions
- /* The ChatBot class must be defined as an extension of the script in the Extensions section
- * The class can override common methods from ChatBot.cs, take a look at MCC's source code
- * I don't know what any of this means please send help */
- public class LottoBot : ChatBot
- {
- int ticketCount = 0;
- public override void Initialize()
- {
- LogToConsole("Sucessfully Initialized!");
- SendText("/nick &6L&eotto&6B&eot");
- }
- public override void GetText(string text)
- {
- text = GetVerbatim(text);
- Regex rgx1 = new Regex(@"^\[LOTTERY\] (.*) just bought");
- Regex rgx2 = new Regex(@"^\[LOTTERY\] Congratulations go to");
- if (rgx1.IsMatch(text))
- {
- if(ticketCount == 0)
- {
- SendText("/lot buy");
- }
- ticketCount++;
- }
- else if(rgx2.IsMatch(text))
- {
- ticketCount = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment