Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Timers;
- using BattleCore;
- using BattleCore.Events;
- using BattleCore.PsyOps;
- namespace Sentinel
- {
- // Add the attribute and the base class
- [Behavior("Main", "true", "0.01", "PsyOps", "Sentinel main module.")]
- public class Main: BotEventListener
- {
- public Main()
- {
- }
- // Is cgf loaded, and sentinel is rdy
- bool activated = false;
- // Custom chat module
- Chat msg = new Chat();
- // Main game timer
- Timer MainGameTimer = new Timer();
- Config Sent = new Config();
- //-------------------------------------\\
- // Main Game Timer |
- //-------------------------------------//
- public void GameTimer(object source, ElapsedEventArgs e)
- {
- if (activated)
- {
- }
- }
- //-------------------------------------\\
- // Game Events |
- //-------------------------------------//
- public void PlayerPositionUpdate(object sender, PlayerPositionEvent p)
- {
- if (activated)
- {
- }
- }
- //-------------------------------------\\
- // BotID Info |
- //-------------------------------------//
- string botname,arena;
- bool identifyed = false;
- // Receive and store BotID info
- public void GetID(object sender, ChatEvent c)
- {
- if (c.Message.StartsWith("!returnID:"))
- {
- // Collect bot info
- string[] info = c.Message.Split(':');
- botname = info[1];
- arena = info[2];
- identifyed = true;
- MainGameTimer.Elapsed += new ElapsedEventHandler(GameTimer);
- MainGameTimer.Interval = 75;
- MainGameTimer.Start();//and start it
- //Sent.LoadCFG(botname);
- Game(msg.arena("BotID confirmed. Main game timer started."));
- }
- }
- public override void Dispose()
- {
- throw new NotImplementedException();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment