public BarbarianFishing(RunParams startParams) : base(startParams) { RunParams.Run = true; RunParams.FrameTime = 5000; maxFishingPoleDistance = Screen.ArtifactLength(0.0597); emptySlotsSet = false; }
public IronPowerMining(RunParams startParams) : base(startParams) { RunParams.Run = true; RunParams.FrameTime = 1800; minIronBlobPxSize = Screen.ArtifactArea(0.00025); missedRocks = 0; }
protected Point Tinderbox; //location of the tinderbox in the inventory public Firemaking(RunParams startParams) : base(startParams) { BankIconMinSize = 50; BridgeIconMinSize = 100; FireLine = 1; Tinderbox = new Point(0, 0); }
public TanHides(RunParams runParams) : base(runParams) { SpellSlot = new Point(3, 3); HidesBankSlot = new Point(7, 0); FirstHidesInventorySlot = new Point(0, 0); RunParams.Iterations = (RunParams.Iterations / 5) * 5; spellbookClosed = true; }
public Falconry(RunParams startParams) : base(startParams) { RunParams.FrameTime = 0; RunParams.Run = true; RunParams.ClosedChatBox = true; UserSelections = startParams.CustomSettingsData.Falconry; FailedRuns = 0; }
public LesserDemon(RunParams startParams) : base(startParams) { GetReferenceColors(); PickUpStackables = RunParams.CustomSettingsData.LesserDemon.Telegrab; PickUpAlchables = RunParams.CustomSettingsData.LesserDemon.Telegrab && RunParams.CustomSettingsData.LesserDemon.HighAlch; AlchAlchables = RunParams.CustomSettingsData.LesserDemon.HighAlch; LastDemonTime = DateTime.Now; }
public Use1On27(RunParams startParams, int makeTime) : base(startParams) { SingleMakeTime = makeTime; MakeQuantity = 27; UseWithInventorySlot = new Point(0, 0); UseOnInventorySlot = new Point(1, 0); UseWithBankSlot = new Point(7, 0); UseOnBankSlot = new Point(6, 0); }
protected long overloadBoostTime = UnitConversions.MinutesToMilliseconds(5); //milliseconds that a dose of overload lasts for public NightmareZoneD(RunParams startParams) : base(startParams) { startParams.FrameTime = 2000; startParams.ClientType = ScreenScraper.Client.OSBuddy; startParams.SlaveDriver = true; hasOverloads = true; hasAbsorptions = true; rockCake = new Point(0, 0); lastOverload = DateTime.MinValue; }
/// <summary> /// Determines if the active bot is currently idle. /// </summary> /// <returns>true if the current bot is idle, false if active or unknown</returns> public bool ActiveBotIsIdle() { RunParams activeRunParams = ActiveRunParams; if (activeRunParams == null) { return(false); } return(activeRunParams.BotIdle); }
public CamelotHouse(RunParams startParams) : base(startParams) { FailedRuns = 0; RunParams.Run = true; RunParams.LoginWorld = 392; InventoryLawRuneSlot = new Point(0, 0); BankLawRuneSlot = new Point(0, 7); SetColors(); teleportWatch = new Stopwatch(); }
protected Point BlindSpot; //first adjacent grid square to blind search public KnightOfArdougne(RunParams startParams) : base(startParams) { RunParams.AutoEat = true; RunParams.StartEatingBelow = 0.5; RunParams.StopEatingAbove = 0.8; FailedCloakSearches = 0; MinPurpleCloakSize = Screen.ArtifactArea(0.00002); KnightSearchRadius = Screen.ArtifactArea(0.0003); GridSquareHeight = Screen.ArtifactLength(0.055); BlindSpot = new Point(0, 0); }
public SimpleRotation(RunParams runParams, RunParamsList botList) : base(runParams) { BotParamsList = botList; BotParamsList.ActiveBot = -1; for (int i = 0; i < BotParamsList.Count; i++) { BotParamsList[i].SlaveDriver = true; BotParamsList[i].JagexClient = runParams.JagexClient; BotParamsList[i].OSBuddyClient = runParams.OSBuddyClient; } }
/// <summary> /// Takes a break from executing the bot /// </summary> /// <returns>true if execution should stop</returns> private bool Break() { RunParams.BotState = BotState.Break; long breakLength = RandomBreakTime(); RunParams.SetNewState(breakLength); RunParams.BotIdle = true; bool quit = SafeWait(breakLength); RunParams.BotIdle = false; return(quit || (DateTime.Now >= RunParams.RunUntil)); }
/// <summary> /// Don't actually do anything /// </summary> /// <returns>returns false to stop the bot program</returns> protected override bool Run() { RunParams.ActiveBot.BotState = BotState.Running; int timeToRun = (int)(RunParams.RunUntil - DateTime.Now).TotalMilliseconds; RunParams.SetNewState(timeToRun); RunParams.BotIdle = true; SafeWait(timeToRun); RunParams.BotIdle = false; return(false); }
/// <summary> /// Pretends to sleep for the night /// </summary> /// <returns>true if execution should stop</returns> private bool Sleep() { RunParams.BotState = BotState.Sleep; long sleepLength = RandomSleepTime(); RunParams.SetNewState(sleepLength); RunParams.BotIdle = true; bool quit = SafeWait(sleepLength); RunParams.BotIdle = false; return(quit || (DateTime.Now >= RunParams.RunUntil)); }
public ButlerSawmill(RunParams startParams) : base(startParams) { InventoryCashSlot = new Point(2, 0); InventoryLawRuneSlot = new Point(1, 0); InventoryLogSlot = new Point(0, 0); FirstLogSlot = new Point(3, 0); BankCashSlot = new Point(7, 0); BankLawRuneSlot = new Point(6, 0); BankLogSlot = new Point(5, 0); BankPlankSlot = new Point(4, 0); YellowMouseOverText = RGBHSBRangeFactory.MouseoverTextNPC(); }
public Herblore(RunParams startParams) : base(startParams) { SingleMakeTime = MAKE_FINISHED_POTION_TIME; MakeQuantity = HALF_INVENTORY; HerbBankSlot = new Point(7, 0); VialOfWaterBankSlot = new Point(6, 0); SecondaryIngredientBankSlot = new Point(5, 0); FirstHalfInventorySlot = Inventory.InventoryIndexToCoordinates(Inventory.INVENTORY_CAPACITY / 2 - 1); SecondHalfInventorySlot = Inventory.InventoryIndexToCoordinates(Inventory.INVENTORY_CAPACITY / 2); }
public NatureRings(RunParams startParams) : base(startParams) { RunParams.Run = true; RunParams.RunAbove = 0.04; UserSelections = startParams.CustomSettingsData.NatureRings; LowStamina = true; StaminaTimer = new Stopwatch(); SetItemSlots(); FairyRingConfigured = false; FailedRuns = 0; }
/// <summary> /// Clean up. /// </summary> private void Done() { Conversation.Stop(); if (LogoutWhenDone) { Logout(); } BotIsDone = true; Screen.Dispose(); RunParams.TaskComplete(); }
/// <summary> /// Creates an instance of the selected bot /// </summary> /// <param name="runParams"></param> /// <param name="botManager"></param> /// <returns></returns> public static BotProgram GetSelectedBot(RunParams runParams, BotManager botManager) { switch (botManager) { case BotManager.Standard: return(GetSelectedBot(runParams)); case BotManager.Rotation: return(new SimpleRotation(runParams, runParams.RotationParams)); case BotManager.Phasmatys: return(new PhasmatysRotation(runParams, runParams.PhasmatysParams)); default: return(null); } }
/// <summary> /// Sets the time required to make 14 items /// </summary> /// <param name="startParams"></param> /// <param name="makeTime">time needed to make the 14 items being crafted</param> public Use14On14(RunParams startParams, int makeTime) : base(startParams) { UserSelections = startParams.CustomSettingsData.Use14On14; if (UserSelections.MakeTime > 0) { SingleMakeTime = UserSelections.MakeTime; } else { SingleMakeTime = makeTime; } MakeQuantity = Inventory.INVENTORY_CAPACITY / 2; UseOnInventorySlot = new Point(0, 4); UseWithInventorySlot = new Point(0, 3); UseOnBankSlot = new Point(6, 0); UseWithBankSlot = new Point(7, 0); }
public AgilitySeersVillage(RunParams startParams) : base(startParams) { RunParams.StartEatingBelow = 0.4; RunParams.StopEatingAbove = 0.9; RunParams.ClosedChatBox = true; MaxPassObstacleTries = 1; FailedCircuits = 0; FoodBankSlot = new Point(7, 0); Obstacles = new List <Tuple <BasicAction, BasicAction> >(); Obstacles.Add(new Tuple <BasicAction, BasicAction>(ClimbBank, null)); Obstacles.Add(new Tuple <BasicAction, BasicAction>(JumpToTightrope, null)); Obstacles.Add(new Tuple <BasicAction, BasicAction>(CrossTightrope, null)); Obstacles.Add(new Tuple <BasicAction, BasicAction>(JumpToLadderRoof, null)); Obstacles.Add(new Tuple <BasicAction, BasicAction>(JumpToChurchRoof, null)); Obstacles.Add(new Tuple <BasicAction, BasicAction>(JumpOffTreeRoof, null)); FailureLimit = 12; }
/// <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(); }
public FurnacePhasmatys(RunParams startParams) : base(startParams) { RunParams.Run = true; failedRuns = 0; }
/// <param name="startParams"></param> /// <param name="craftingTime">time needed to make the 14 items being crafted</param> public UnfinishedPotions(RunParams startParams) : base(startParams) { SingleMakeTime = MAKE_UNFINISHED_POTION_TIME; }
public ClickAll28(RunParams startParams, int makeTime) : base(startParams) { SingleMakeTime = makeTime; MakeQuantity = 28; WithDrawBankSlot = new Point(7, 0); }
public static BotProgram GetSelectedBot(RunParams runParams) { BotProgram bot = null; switch (runParams.BotAction) { case BotActions.LesserDemon: return(new LesserDemon(runParams)); case BotActions.GoldBracelets: return(new GoldBracelets(runParams)); case BotActions.Cannonballs: return(new Cannonballs(runParams)); case BotActions.NightmareZoneD: return(new NightmareZoneD(runParams)); case BotActions.FletchShortBows: return(new Use1On27(runParams, Use14On14.FLETCH_BOW_TIME)); case BotActions.StringBows: return(new Use14On14(runParams, Use14On14.STRING_BOW_TIME)); case BotActions.MakeUnfinishedPotions: return(new UnfinishedPotions(runParams)); case BotActions.MakePotionsSimple: return(new Use14On14(runParams, Herblore.MAKE_UNFINISHED_POTION_TIME)); case BotActions.MakePotionsFull: return(new MakePotionFull(runParams)); case BotActions.AgilityGnomeStronghold: return(new AgilityGnomeStronghold(runParams)); case BotActions.AgilitySeersVillage: return(new AgilitySeersVillage(runParams)); case BotActions.WillowTrees: return(new WillowChopping(runParams)); case BotActions.TeaStall: return(new TeaStall(runParams)); case BotActions.CutGems: return(new Use1On27(runParams, Use1On27.CUT_GEM_TIME)); case BotActions.EnchantLevel2: return(new Enchant(runParams, 2)); case BotActions.IronOre: return(new IronPowerMining(runParams)); case BotActions.Login: return(new LogInToGame(runParams)); case BotActions.DoNothing: return(new DoNothing(runParams)); case BotActions.ButlerSawmill: return(new ButlerSawmill(runParams)); case BotActions.BarbarianFishing: return(new BarbarianFishing(runParams)); case BotActions.Firemaking: return(new Firemaking(runParams)); case BotActions.KnightOfArdougne: return(new KnightOfArdougne(runParams)); case BotActions.TanHides: return(new TanHides(runParams)); case BotActions.MotherlodeMine: return(new MotherlodeMine(runParams)); case BotActions.NatureRings: return(new NatureRings(runParams)); case BotActions.Serum207: return(new Serum207(runParams)); case BotActions.Falconry: return(new Falconry(runParams)); case BotActions.CleanHerbs: return(new ClickAll28(runParams, ClickAll28.HERB_CLEAN_TIME)); } return(bot); }
public Serum207(RunParams startParams) : base(startParams) { AshesBankSlot = new Point(7, 0); TarrominPotionBankSlot = new Point(6, 0); }
public BankStand(RunParams startParams) : base(startParams) { }
public MotherlodeMine(RunParams startParams) : base(startParams) { RunParams.Run = true; }