Exemplo n.º 1
0
        public override void Initialize()
        {
            tPulse = (TPulse)PlugInHandler.GetPluginByType(typeof(TPulse));

            //Loading Friends DB
            if (File.Exists(FriendsDB.DefaultFile))
            {
                FriendsList = FriendsDB.Load(FriendsDB.DefaultFile);
            }
            else
            {
                FriendsList.Save(FriendsDB.DefaultFile);
            }


            //Adding commands

            tPulse.Commands.ChatCommands.Add(new Command("", FriendCommand, "friend"));
            tPulse.Commands.ChatCommands.Add(new Command("", MessageCommand, "fmsg"));
            tPulse.Commands.ChatCommands.Add(new Command("", MessageAllCommand, "fall"));
            //Commands.ChatCommands.Add(new Command("", MessageCommand, "sendcoord"));
            tPulse.Commands.OnPlayerLogin += new PlayerLoginHandler(PlayerLogin);
            //Hooks.WorldHooks.SaveWorld += new Hooks.WorldHooks.SaveWorldD(WorldHooks_SaveWorld);
            tPulse.OnWorldSaved += new WorldSavedHandler(OnWorldSaved);
        }
Exemplo n.º 2
0
        public override void Initialize()
        {
            //Get TPulse instance

            tPulse = (TPulse)PlugInHandler.GetPluginByType(typeof(TPulse));


            //Commands
            //  /join : to join a channel
            //  /channel : super-command
            //      add : add channel (need group < admin)
            //      del : delete a channel (need group < admin)
            //      list : listing
            //  /cmsg : send a message in the channel
            //can be null be aware !

            tPulse.Commands.ChatCommands.Add(new Command("", JoinCommand, "join"));
            tPulse.Commands.ChatCommands.Add(new Command("", LeaveCommand, "leave"));
            tPulse.Commands.ChatCommands.Add(new Command("", ChannelCommand, "channel"));
            tPulse.Commands.ChatCommands.Add(new Command("", ChannelMessage, "cmsg"));

            DefaultChannel = Manager.DefaultChannel;

            Channels.AddRange(Manager.ChatChannels);

            //Connection hooks

            tPulse.OnPlayerJoin  += new PlayerConnectionHandler(PlayerJoinServer);
            tPulse.OnPlayerLeave += new PlayerConnectionHandler(PlayerLeaveServer);

            //World Saved Hooks

            tPulse.OnWorldSaved += new WorldSavedHandler(OnWorldSaved);
        }
Exemplo n.º 3
0
        public override void Initialize()
        {
            tPulse  = (TPulse)PlugInHandler.GetPluginByType(typeof(TPulse));
            Setting = ArenaSetting.Load(ArenaSettingFile);
            //todo

            //commands
            tPulse.Commands.ChatCommands.Add(new Command("", SetPrepare, "asetprepare"));
            tPulse.Commands.ChatCommands.Add(new Command("", SetTeamStart, "asetstart"));
            tPulse.Commands.ChatCommands.Add(new Command("", PreparePlayers, "aprepare"));
            tPulse.Commands.ChatCommands.Add(new Command("", AssignPlayerTeam, "aassign"));
            tPulse.Commands.ChatCommands.Add(new Command("", ResetTeams, "areset"));
            tPulse.Commands.ChatCommands.Add(new Command("", SetArenaHall, "asethall"));
            tPulse.Commands.ChatCommands.Add(new Command("", SetAterMatch, "asetroom"));

            Hooks.GameHooks.Update += new Action(GameHooks_Update);

            //Team Color
            //Console.WriteLine(Main.teamColor.Length);
            Main.teamColor[1] = Color.Blue;
            Main.teamColor[2] = Color.Pink;
        }
Exemplo n.º 4
0
 public override void Initialize()
 {
     tPulse = (TPulse)PlugInHandler.GetPluginByType(typeof(TPulse));
     //chat commands to add
 }