• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [FishAssist] Dumb Fishing BotBase

    Discussion in 'Botbases' started by iyake, Apr 30, 2015.

    1. iyake

      iyake Member

      Joined:
      Oct 19, 2014
      Messages:
      143
      Likes Received:
      5
      Trophy Points:
      18
      This BotBase will fish where you're standing. It will stop when it can no longer cast.

      The MoochList setting takes fish names exactly as they're shown in the chatlog. This feature does not work for non English clients. (It parses the chatlog).

      View attachment FishAssist.zip
       
      Mr McGibblets likes this.
    2. Mr McGibblets

      Mr McGibblets Member

      Joined:
      May 20, 2014
      Messages:
      485
      Likes Received:
      12
      Trophy Points:
      18
      Awesome! I'll give this a tinker later tonight. I'm guessing you did not create a workaround for bait. Still could be very good for getting the mooch fish during time windows without having to create a profile for each.
       
    3. hkme

      hkme Member

      Joined:
      May 12, 2014
      Messages:
      197
      Likes Received:
      0
      Trophy Points:
      16
      Thank you. I tried it works ignoring some HQ and only mooch on the MoochList. It is useful for some fishing holes.
      It seems only works to input lower case fish name, as shown in chatlog.

      Another suggestion, people catch certain HQ fish and wait to mooch after certain time or weather. maybe you can implement this behavior into your botbase as well, if you find it useful.
       
    4. Cloud30000

      Cloud30000 New Member

      Joined:
      May 9, 2015
      Messages:
      298
      Likes Received:
      7
      Trophy Points:
      0
      Looks like this needs to be updated to be compatible with the latest changes made to RebornBuddy; currently it throws compiler errors that appear to be related to the "Stop" changes that have been made.

      Here is a quickly updated FishAssist file that eliminates the compiler errors, but I have not tested to make sure it still functions correctly:
      View attachment FishAssist.cs
       
      Last edited: Jun 17, 2015
    5. nosupportgiven

      nosupportgiven New Member

      Joined:
      Jul 8, 2015
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      0
      Slight Improvement to the Botbase.

      Please let me know if you want me to not to use your source.
      But I love the work, and thought I'd make it slightly updated.

      This will allow you to SAVE collectables.

      I only played around with it a little.
      I'll start implementing a proper collectables soon.

      Note: This will save all collectables regardless of their collectability. I'll modify it later since this is just 10min implementation.

      View attachment FishAssist.cs

      Code:
      using Buddy.Coroutines;
      using ff14bot;
      using ff14bot.AClasses;
      using ff14bot.Behavior;
      using ff14bot.Enums;
      using ff14bot.Helpers;
      using ff14bot.Managers;
      using ff14bot.Navigation;
      using System;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.Configuration;
      using System.IO;
      using System.Linq;
      using System.Text;
      using System.Text.RegularExpressions;
      using System.Threading;
      using System.Threading.Tasks;
      using System.Windows.Media;
      using TreeSharp;
      using Action = TreeSharp.Action;
      
      namespace FishAssist {
          public class FishAssistSettings : JsonSettings {
              private static FishAssistSettings _settings;
              public static FishAssistSettings Instance {
                  get { return _settings ?? (_settings = new FishAssistSettings()); }
              }
              public FishAssistSettings() : base(Path.Combine(CharacterSettingsDirectory, "ChocoboTrainerSettings.json")) {
              }
              private string _MoochList;
              [Setting]
              [DisplayName("MoochList")]
      	    [Description("Comma separated list of fish to mooch. Set to 'all' to mooch every fish.")]
              [DefaultValueAttribute("all")]
              public string MoochList {
                  get { return _MoochList; }
                  set {
                      if (_MoochList != value) {
                          _MoochList = value;
                          Save();
                      }
                  }
              }
          }
      
      
          class FishAssist : BotBase {
              #region BotBaseStuff
              public override string Name {
                  get {
                      return EnglishName;
                  }
              }
              public override string EnglishName {
                  get {
                      return "FishAssist";
                  }
              }
              public override bool WantButton {
                  get { return true; }
              }
              public override void Start() {
                  Navigator.PlayerMover = new NullMover();
                  Navigator.NavigationProvider = new NullProvider();
      
                  GamelogManager.MessageRecevied += ReceiveMessage;
      
                  Logging.Write("Starting FishAssist");
              }
      
              public override void Stop() {
              }
      
              public override PulseFlags PulseFlags {
                  get { return PulseFlags.All; }
              }
      
              private SettingsForm settings;
              public override void OnButtonPress() {
                  if (settings == null || settings.IsDisposed)
                      settings = new SettingsForm();
                  try {
                      settings.Show();
                      settings.Activate();
                  } catch (ArgumentOutOfRangeException ee) {
      				Logging.Write("FishAssist Exception Thrown: " + ee.ToString());
                  }
              }
              #endregion
      
              private Composite _root;
              public override Composite Root {
                  get {
                      return _root ?? (_root = CreateBehavior());
                  }
              }
      
              private void ReceiveMessage(object sender, ChatEventArgs e) {
                  if (e.ChatLogEntry.MessageType == (MessageType)2115 && e.ChatLogEntry.Contents == "The fish sense something amiss. Perhaps it is time to try another location.") {
                      TreeRoot.Stop();
      				Logging.Write("The fish sense something amiss. Perhaps it is time to try another location.");
                  } else if (e.ChatLogEntry.MessageType == (MessageType)2115 && e.ChatLogEntry.Contents.StartsWith("You land a")) {
                      ProcessLastCatch(e.ChatLogEntry.Contents);
                  }
              }
      
              private String LastFish = "";
              private Regex MessageRegex = new Regex(@"^You land a ([^]+)( )? measuring ([\d\.]+) ilms!$");
              public void ProcessLastCatch(String message) {
                  Match match = MessageRegex.Match(message);
                  if (match.Success) {
                      LastFish = match.Groups[1].Value;
                  }
              }
      
              private Composite CreateBehavior() {
                  return new PrioritySelector(
                      new Decorator(ret => (FishingManager.State == FishingState.Waitin),
                          new ActionRunCoroutine(ctx => CheckUI())
                      ),
                      new Decorator(ret => FishingManager.State == FishingState.Reelin || FishingManager.State == FishingState.Quit || FishingManager.State == FishingState.PullPoleIn,
                          new ActionRunCoroutine(ctx => AnimationWait())
                      ),
                      new Decorator(ret => FishingManager.CanMooch && MoochLastFish(),
                          new Action(r => {
                              FishingManager.Mooch();
                          })
                      ),
                      new Decorator(ret => (Actionmanager.CanCast(289, Core.Player) && FishingManager.State == FishingState.None) || FishingManager.State == FishingState.PoleReady,
                          new ActionRunCoroutine(ctx => Cast())
                      ),
                      new Decorator(ret => FishingManager.CanHook && FishingManager.State == FishingState.Bite,
                          new Action(r => {
                              FishingManager.Hook();
                          })
                      )
                  );
              }
      
              private bool MoochLastFish() {
                  if (FishAssistSettings.Instance.MoochList == "all") {
                      return true;
                  }
      
                  string[] MoochList = FishAssistSettings.Instance.MoochList.Split(',');
                  if (MoochList.Any(LastFish.Equals)) {
                      return true;
                  }
      
                  return false;
              }
      
              private async Task<bool> AnimationWait() {
                  await Coroutine.Wait(5000, () => FishingManager.State != FishingState.Reelin && FishingManager.State != FishingState.Quit && FishingManager.State != FishingState.PullPoleIn);
      
                  return true;
              }
      
              private async Task<bool> Cast() {
                  FishingManager.Cast();
                  if (await Coroutine.Wait(5000, () => FishingManager.State == FishingState.PoleOut || FishingManager.State == FishingState.Waitin)) {
                      await Coroutine.Wait(5000, () => FishingManager.State == FishingState.Waitin);
                      return true;
                  }
      
                  TreeRoot.Stop();
      			Logging.Write("Could not cast. Maybe out of bait?");
                  return false;
              }
      
              private async Task<bool> CheckUI()
              {
                  if (RaptureAtkUnitManager.GetWindowByName("SelectYesNoItem") != null) {
      				RaptureAtkUnitManager.GetWindowByName("SelectYesNoItem").SendAction(1, 1, 0);
      			}
      			await Coroutine.Wait(1000, () => FishingManager.State == FishingState.Waitin);
                      
                  return true;
              }
      
              public override bool RequiresProfile {
                  get { return false; }
              }
          }
      }
      
       
      Last edited: Jul 11, 2015
    6. Mr McGibblets

      Mr McGibblets Member

      Joined:
      May 20, 2014
      Messages:
      485
      Likes Received:
      12
      Trophy Points:
      18
      Going to give that a try. Thanks for the collectable portion :D
       
    7. iisoloii

      iisoloii Member

      Joined:
      Sep 2, 2014
      Messages:
      64
      Likes Received:
      0
      Trophy Points:
      6
      Where and how do i install this, i cant seem to get anything going...
       
    8. iisoloii

      iisoloii Member

      Joined:
      Sep 2, 2014
      Messages:
      64
      Likes Received:
      0
      Trophy Points:
      6
      Cany anyone help me? i really need this, but unsure hot to set it up, i made a folder in botbase and installed the files there and also tried it in plugins and doesnt work.
       
    9. Mr McGibblets

      Mr McGibblets Member

      Joined:
      May 20, 2014
      Messages:
      485
      Likes Received:
      12
      Trophy Points:
      18
      You should be able to take the zip and place it in the botbase folder. Then replace the fishassist.cs with the updated one on post #5 in this thread.
       
    10. iisoloii

      iisoloii Member

      Joined:
      Sep 2, 2014
      Messages:
      64
      Likes Received:
      0
      Trophy Points:
      6
      Alright ill give it another shot, Should i make a folder for them or just place them like that w/o a folder?
       
    11. Mr McGibblets

      Mr McGibblets Member

      Joined:
      May 20, 2014
      Messages:
      485
      Likes Received:
      12
      Trophy Points:
      18
      I have them in a folder called FishAssist
       
    12. iisoloii

      iisoloii Member

      Joined:
      Sep 2, 2014
      Messages:
      64
      Likes Received:
      0
      Trophy Points:
      6
      Alright i did what you said what am i looking for now? just use fishing bot and hit start, I dont see a new bot base, i guess thats where im getting confused.
       
    13. iisoloii

      iisoloii Member

      Joined:
      Sep 2, 2014
      Messages:
      64
      Likes Received:
      0
      Trophy Points:
      6
      Ok got man man thanks alot, i really apreciate this, and i love you. (no homo)
       
    14. iisoloii

      iisoloii Member

      Joined:
      Sep 2, 2014
      Messages:
      64
      Likes Received:
      0
      Trophy Points:
      6
      Any idea how i can turn off mooching?
       
    15. DarkPietro

      DarkPietro New Member

      Joined:
      Apr 30, 2015
      Messages:
      30
      Likes Received:
      2
      Trophy Points:
      0
      While FishAssist is selected in RB, click BotBase Settings and remove the word 'all' from the MoochList Setting

      Issue I've run into:

      When sitting, Bot seems to stop.

       
      Last edited: Jul 18, 2015
    16. meeee

      meeee New Member

      Joined:
      Jan 7, 2015
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      Additional Update

      I've add this script to using Patience and eating food/cordial on its own.
      Click "BotBase" to see the setting that I've added.

      btw, I copy some part of code from Chanko to make it eating food.

      Not recommend to sit while using this edition.

      Edite: Just realize that the cordial is make bot stop for some reason, I use 'CanUse()' to check that cordial is avilable to use or not but it's only work when bot is not Fishing. Are there any function that I can use to check the recast time of item that's not 'CanUse()' ?
       

      Attached Files:

      Last edited: Jul 19, 2015
    17. Arbeit

      Arbeit New Member

      Joined:
      Jun 29, 2015
      Messages:
      12
      Likes Received:
      0
      Trophy Points:
      1
      This might be really dumb, but I don't understand how to utilize bot bases. I have it extracted to RB > BotBases > FishAssist with the updated .cs file. Go to start up RB, select Fishing, hit Start, and it requests that a profile be selected. Do I need to create a profile to fish in one spot?
       
      Last edited: Jul 19, 2015
    18. meeee

      meeee New Member

      Joined:
      Jan 7, 2015
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      Select 'FishAssist' not 'Fishing'
       
    19. Arbeit

      Arbeit New Member

      Joined:
      Jun 29, 2015
      Messages:
      12
      Likes Received:
      0
      Trophy Points:
      1
      Thanks for the quick reply, +rep. One more question if anyone has the answer. Any idea why it won't mooch any fish? I made sure the mooch botbase setting is set to "all" and still no luck. Does even show any errors in logs. Just Cast/Hook actions.

      EDIT: Nevermind, it's working now for whatever reason. Moved to a different spot on the fishing hole. Weird :confused:
       
      Last edited: Jul 19, 2015
    20. tishat

      tishat Member

      Joined:
      May 29, 2015
      Messages:
      735
      Likes Received:
      7
      Trophy Points:
      18
      Thanks for this :)
       

    Share This Page