Пример #1
0
        }                                                                               //ex 0.001045

        #endregion

        #region constructors

        internal Banking(GameScreen screen, Vision vision, HandEye handEye, RSClient client, Keyboard keyboard, Inventory inventory, MinimapGauge minimap)
        {
            Screen    = screen;
            Vision    = vision;
            HandEye   = handEye;
            RSClient  = client;
            Keyboard  = keyboard;
            Inventory = inventory;
            Minimap   = minimap;

            PossibleBankTypes = new List <BankLocator>();
            PossibleBankTypes.Add(LocateBankBoothVarrock);
            PossibleBankTypes.Add(LocateBankBoothSeersVillage);
            PossibleBankTypes.Add(LocateBankBoothPhasmatys);
            PossibleBankTypes.Add(LocateBankBoothEdgeville);
            Bank.ResetNAmount();
        }
Пример #2
0
        /// <summary>
        /// Initializes a bot program with a client matching startParams
        /// </summary>
        /// <param name="startParams">specifies how to run the bot</param>
        protected BotProgram(RunParams startParams)
        {
            RunParams                       = startParams;
            RunParams.ClientType            = ScreenScraper.Client.Jagex;
            RunParams.DefaultCameraPosition = RunParams.CameraPosition.NorthAerial;
            RunParams.LoginWorld            = 0;

            RSClient = new RSClient(RunParams);
            Screen   = new GameScreen(RSClient, RunParams);
            RSClient.AddScreen(Screen);

            Vision         = new Vision(Screen, RunParams);
            Keyboard       = new Keyboard(RSClient);
            Mouse.RSClient = RSClient;
            HandEye        = new HandEye(Vision, Screen);
            Inventory      = new Inventory(RSClient, Keyboard, Screen);
            Minimap        = new MinimapGauge(RSClient, Keyboard, Screen);
            Textbox        = new TextBoxTool(RSClient, Keyboard, Screen);
            Banking        = new Banking(Screen, Vision, HandEye, RSClient, Keyboard, Inventory, Minimap);
            Conversation   = new Conversation(Textbox, Screen, RunParams.Conversation);

            RNG = new Random();
        }