View difference between Paste ID: ZMDSMvqJ and QPWpsLMJ
SHOW: | | - or go back to the newest paste.
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
6
using BattleCore;
7
using BattleCore.Events;
8
using BattleCore.PsyOps;
9
10
namespace FirstBot
11
{
12
    [Behavior("firstModule", "true", "0.01", "mashem", "My first module.")]
13
    public class firstModule:BotEventListener
14
    {
15
        public firstModule()
16
        {
17
            RegisterCommand("!flags", ToggleFlagEvent);
18
        }
19
20
        public void ToggleFlagEvent(ChatEvent c)
21
        {
22-
            ChatEvent newmsg = new ChatEvent();
22+
            c.ChatType = ChatTypes.Private;
23-
            newmsg.PlayerName = c.PlayerName;
23+
            c.Message = "The cake is a lie.";
24-
            newmsg.ChatType = ChatTypes.Private;
24+
25-
            newmsg.Message = "The cake is a lie.";
25+
            SendGameEvent(c);
26
        }
27-
            SendGameEvent(newmsg);
27+
28
        public override void Dispose()
29
        {
30
            throw new NotImplementedException();
31
        }
32
    }
33
}