Exemplo n.º 1
0
 public PlayCommand(BotClient testClient)
 {
     Name         = "anim";
     TheBotClient = testClient;
 }
Exemplo n.º 2
0
 public DetachCommand(BotClient testClient)
 {
     Name = "detach";
     TheBotClient = testClient;
 }
Exemplo n.º 3
0
 public PacketLogCommand(BotClient testClient)
 {
     Name = "packetlog";
 }
Exemplo n.º 4
0
 public LowerSimCommand(BotClient testClient)
 {
     Name = "lowersim";
 }
Exemplo n.º 5
0
 public DilationCommand(BotClient testClient)
 {
     Name = "dilation";
 }
Exemplo n.º 6
0
 public AtCommand(BotClient testClient)
 {
     Name = "@";
 }
Exemplo n.º 7
0
 public ScriptCommand(BotClient testClient)
 {
     Name = "Script";
 }
Exemplo n.º 8
0
 public ForwardCommand(BotClient client)
 {
     Name = "forward";
 }
Exemplo n.º 9
0
 public CycShowCommand(BotClient Client)
     : base(Client)
 {
     Name = "CycShow";
 }
Exemplo n.º 10
0
 /// <summary>
 /// Returns if a subscription can run.
 /// They can only run for the client that they were created for.
 /// </summary>
 /// <param name="client">Client to compare against</param>
 /// <returns>True if same bot client; false otherwise</returns>
 public bool CanRun(BotClient client)
 {
     return(client != null && DiscordClient.Clients[_plugin.Name]?.Bot == client);
 }
Exemplo n.º 11
0
 public MovementResynchronizer(BotClient bot)
 {
     _bot = bot;
     _bot.StateChanged  += Bot_StateChanged;
     _bot.ClientChanged += Bot_ClientChanged;
 }
Exemplo n.º 12
0
 public QuestManager(BotClient bot)
 {
     _bot = bot;
     _bot.ClientChanged += Bot_ClientChanged;
 }
Exemplo n.º 13
0
 public AutoReconnector(BotClient bot)
 {
     _bot = bot;
     _bot.ClientChanged += Bot_ClientChanged;
 }
Exemplo n.º 14
0
 public MeCommand(BotClient testClient)
 {
     Name         = "me";
     TheBotClient = testClient;
 }
Exemplo n.º 15
0
 public TurnToCommand(BotClient client)
 {
     Name = "turnto";
 }
 public DumpOutfitCommand(BotClient testClient)
 {
     Name         = "dumpoutfit";
     TheBotClient = testClient;
 }
Exemplo n.º 17
0
 /// <summary>
 ///  The default constructor for BotClient commands
 /// </summary>
 /// <param name="testClient"></param>
 public UploadScriptCommand(BotClient testClient)
 {
     Name = "Upload Script";
 }
Exemplo n.º 18
0
        public PlayersView(BotClient bot)
        {
            InitializeComponent();

            _bot = bot;
        }
Exemplo n.º 19
0
 public CreateScriptCommand(BotClient testClient)
 {
     Name = "Create Script";
 }
Exemplo n.º 20
0
 public TeamView(BotClient bot, MainWindow mWin)
 {
     InitializeComponent();
     _bot       = bot;
     MainWindow = mWin;
 }
Exemplo n.º 21
0
 public ParcelVoiceInfoCommand(BotClient testClient)
 {
     Name = "voiceparcel";
     TheBotClient = testClient;
 }
Exemplo n.º 22
0
 public BackupCommand(BotClient testClient)
     : base(testClient)
 {
     Name         = "backuptext";
     TheBotClient = testClient;
 }
Exemplo n.º 23
0
 public FollowCommand(BotClient testClient)
 {
     Name = "Linden follow";
 }
 public WaitEventCommand(BotClient testClient)
 {
     Name         = "waitevent";
     TheBotClient = testClient;
 }
Exemplo n.º 25
0
 public AnimInfoCommand(BotClient testClient)
 {
     Name = "assetinfo";
     TheBotClient = testClient;
 }
Exemplo n.º 26
0
 public GroupRolesCommand(BotClient testClient)
 {
     Name         = "grouproles";
     TheBotClient = testClient;
 }
Exemplo n.º 27
0
 public HttpGet(BotClient Client)
     : base(Client)
 {
     Name = "HttpGet";
     TheBotClient = Client;
 }
Exemplo n.º 28
0
 public TeamView(BotClient bot)
 {
     InitializeComponent();
     _bot = bot;
 }
Exemplo n.º 29
0
 /// <summary>
 /// Constructor for FriendsCommand class
 /// </summary>
 /// <param name="testClient">A reference to the BotClient object</param>
 public RemoveFriendCommand(BotClient testClient)
 {
     // The name of the command
     Name = "Remove Friend";
     TheBotClient = testClient;
 }
Exemplo n.º 30
0
 public ToBotCommand(BotClient testClient)
 {
     Name         = "tobot";
     TheBotClient = testClient;
 }
Exemplo n.º 31
0
 public StopCommand(BotClient Client)
     : base(Client)
 {
 }
Exemplo n.º 32
0
 public AllBotsCommand(BotClient testClient)
 {
     Name         = "AllBots";
     TheBotClient = testClient;
 }
Exemplo n.º 33
0
 public MeCommand(BotClient testClient)
 {
     Name = "me";
     TheBotClient = testClient;
 }
 public ShowEventDetailsCommand(BotClient testClient)
 {
     Name         = "showevent";
     TheBotClient = testClient;
 }
Exemplo n.º 35
0
 public EchoMasterCommand(BotClient testClient)
     : base(testClient)
 {
     Name = "echoMaster";
 }
Exemplo n.º 36
0
        public MainWindow()
        {
#if !DEBUG
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            TaskScheduler.UnobservedTaskException      += TaskScheduler_UnobservedTaskException;
#endif
            Thread.CurrentThread.Name = "UI Thread";
            Bot = new BotClient();
            Bot.StateChanged                   += Bot_StateChanged;
            Bot.ClientChanged                  += Bot_ClientChanged;
            Bot.ConnectionClosed               += Bot_ConnectionClosed;
            Bot.ConnectionOpened               += Bot_ConnectionOpened;
            Bot.AutoReconnector.StateChanged   += Bot_AutoReconnectorStateChanged;
            Bot.AutoLootBoxOpener.StateChanged += AutoLootBoxOpener_StateChanged;
            Bot.PokemonEvolver.StateChanged    += PokemonEvolver_StateChanged;
            Bot.MessageLogged                  += Bot_MessageLogged;
            Bot.ColorMessageLogged             += Bot_ColorMessageLogged;


            InitializeComponent();
            IntializeCustomeComponent();

            _viewTabs = new Dictionary <string, TabItem>();
            _views    = new Dictionary <string, UserControl>();

            AutoEvolveSwitch.IsChecked    = Bot.Settings.AutoEvolve;
            OpenLootBox.IsChecked         = Bot.Settings.OpenLootBoxes;
            AutoReconnectSwitch.IsChecked = Bot.Settings.AutoReconnect;

            Bot.AutoReconnector.IsEnabled   = Bot.Settings.AutoReconnect;
            Bot.AutoLootBoxOpener.IsEnabled = Bot.Settings.OpenLootBoxes;
            Bot.PokemonEvolver.IsEnabled    = Bot.Settings.AutoEvolve;

            App.InitializeVersion();

            if (!string.IsNullOrEmpty(Bot.Settings.LastScript) && File.Exists(Bot.Settings.LastScript))
            {
                ReloadScriptMenuItem.Header    = "Reload " + System.IO.Path.GetFileName(Bot.Settings.LastScript) + "\tCtrl+R";
                ReloadScriptMenuItem.IsEnabled = true;
            }
            else
            {
                ReloadScriptMenuItem.IsEnabled = false;
                Bot.Settings.LastScript        = null;
            }

            Team      = new TeamView(Bot);
            Inventory = new InventoryView(Bot);
            Chat      = new ChatView(Bot);
            Players   = new PlayersView(Bot);
            Map       = new MapView(Bot);

            FileLog = new FileLogger();

            _refreshPlayers      = DateTime.UtcNow;
            _refreshPlayersDelay = 5000;

            MainView.TabWindow.SelectionChanged += TabWindow_SelectionChanged;

            AddView("Team", Team, TabsWindow.TeamTab);
            AddView("Inventory", Inventory, TabsWindow.InventoryTab);
            AddView("Chat", Chat, TabsWindow.ChatTab);
            AddView("Players", Players, TabsWindow.PlayersTab);
            AddView("Map", Map, TabsWindow.MapTab);

            SetTitle(null);

            LogMessage("Running " + App.Name + " by " + App.Author + ", version " + App.Version);

            Task.Run(() => UpdateClients());
        }
Exemplo n.º 37
0
 public Follow(BotClient Client)
     : base(Client)
 {
 }
Exemplo n.º 38
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="args">Parameters.</param>
 /// <param name="cancellationToken">The cancellation token to cancel operation.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned. on success. If commands aren't set, an empty list is returned.</returns>
 public static async Task <BotCommand[]> GetMyCommandsAsync(this BotClient bot, GetMyCommandsArgs args, [Optional] CancellationToken cancellationToken) => await bot.GetMyCommandsAsync <BotCommand[]>(args, cancellationToken);
Exemplo n.º 39
0
 public GroupMembersCommand(BotClient testClient)
 {
     Name = "groupmembers";
     TheBotClient = testClient;
 }
Exemplo n.º 40
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="scope">A <see cref="BotCommandScope"/> object, describing scope of users. Defaults to <see cref="BotCommandScopeDefault"/>.</param>
 /// <param name="languageCode">A two-letter ISO 639-1 language code or an empty string.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned.</returns>
 public static BotCommand[] GetMyCommands(this BotClient bot, [Optional] BotCommandScope scope, [Optional] string languageCode) => bot.GetMyCommands <BotCommand[]>(scope, languageCode);
Exemplo n.º 41
0
 public GroupInfoCommand(BotClient testClient)
 {
     Name = "groupinfo";
 }
Exemplo n.º 42
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="args">Parameters.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned.</returns>
 public static BotCommand[] GetMyCommands(this BotClient bot, GetMyCommandsArgs args) => bot.GetMyCommands <BotCommand[]>(args);
Exemplo n.º 43
0
 public OnFacingTowards(Primitive mover, BotClient bc)
 {
     Mover = mover;
     Client = bc;
 }
Exemplo n.º 44
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="scope">A <see cref="BotCommandScope"/> object, describing scope of users. Defaults to <see cref="BotCommandScopeDefault"/>.</param>
 /// <param name="languageCode">A two-letter ISO 639-1 language code or an empty string.</param>
 /// <param name="cancellationToken">The cancellation token to cancel operation.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned.</returns>
 public static async Task <BotCommand[]> GetMyCommandsAsync(this BotClient bot, [Optional] BotCommandScope scope, [Optional] string languageCode, [Optional] CancellationToken cancellationToken) => await bot.GetMyCommandsAsync <BotCommand[]>(scope, languageCode, cancellationToken);
Exemplo n.º 45
0
 public WalkToCommand(BotClient client)
 {
     Name = "WalkTo";
 }
Exemplo n.º 46
0
 public TcpServerCommand(BotClient bc)
     : base(bc)
 {
     Name = "tcpserver";
 }
Exemplo n.º 47
0
 public GiveAllCommand(BotClient testClient)
 {
     Name = "Give All Money";
 }
Exemplo n.º 48
0
 static internal string EventToString(CogbotEvent evt, BotClient parent)
 {
     return(string.Format("({0} {1})", evt.Verb, parent.argsListString(evt.GetArgs())));
 }
Exemplo n.º 49
0
 public TreeCommand(BotClient testClient)
 {
     Name = "tree";
 }
Exemplo n.º 50
0
 public AtCommand(BotClient testClient)
 {
     Name = "@";
 }
Exemplo n.º 51
0
 public Describe(BotClient Client)
     : base(Client)
 {
     Name = "Describe";
 }
Exemplo n.º 52
0
 /// <summary>
 /// Construct a new instance of the SearchLandCommand
 /// </summary>
 /// <param name="testClient"></param>
 public SearchLandCommand(BotClient testClient)
 {
     Name         = "searchland";
     TheBotClient = testClient;
 }
Exemplo n.º 53
0
 public MapImagePaths(BotClient client)
 {
     Name = GetType().Name;
 }
 public ParcelSelectObjectsCommand(BotClient testClient)
 {
     Name = "selectobjects";
 }
Exemplo n.º 55
0
 public Logout(BotClient Client)
     : base(Client)
 {
     Name = "Logout";
 }
Exemplo n.º 56
0
 /// <summary>
 /// Quick way to respond to the message
 /// </summary>
 /// <param name="response">What to respond with</param>
 /// <returns></returns>
 public async Task RespondAsync(string response)
 {
     await BotClient.SendTextMessageAsync(ChatId, response);
 }
Exemplo n.º 57
0
 public ShowEventDetailsCommand(BotClient testClient)
 {
     Name = "showevent";
     TheBotClient = testClient;
 }
Exemplo n.º 58
0
 /// <summary>
 /// BotClient command to download and display a notecard asset
 /// </summary>
 /// <param name="testClient"></param>
 public ViewNotecardCommand(BotClient testClient)
 {
     Name = "viewnote";
 }
Exemplo n.º 59
0
 public ChangeDirectoryCommand(BotClient client)
 {
     Name = "cd";
 }
Exemplo n.º 60
0
 public GiveAllCommand(BotClient testClient)
 {
     Name = "Give All Money";
 }