• Visit Rebornbuddy
  • failure in simple profile causing rebornbuddy not to work and game have to restart

    Discussion in 'Community Developer Forum' started by Emaki, Mar 11, 2016.

    1. Emaki

      Emaki Member

      Joined:
      Mar 30, 2015
      Messages:
      68
      Likes Received:
      6
      Trophy Points:
      8
      I decide to write my own profile today... but I can't get it to work at all! It is in the <While>. If I take the while out it will switch job or complain if I don't have Goblin Jig or inventory place like usual. The profile will act like it works, but do nothing. When you go to stop the bot, it will hang up a little bit, then throw error. When error hapens i have to log out ffxiv and try again because it looses connection with RB:

      Code:
      [22:00:55.101 N] Stopping the bot. Reason:Pushed the stop button.
      [22:01:00.109 D] Clean shutdown was not possible for some unknown reason. Forcing shutdown of main bot thread.
      [22:01:00.109 D] Exception generated from line 32
      [22:01:00.110 D] Traceback (most recent call last):
        File "<string>", line 4, in Execute
      SystemError: Thread was being aborted.
      
      [22:01:00.110 D] Cannot stop a bot when it is not running.
      [22:01:00.110 D] Bot Thread Aborted Thread was being aborted.
      Here's the code for the profile (i will release it to help others when it works):
      Code:
      <?xml version="1.0" encoding="utf-8"?>
      
      <!DOCTYPE Profile [
          <!-- Where do you want to stand while waiting for PiraPira weather -->
          <!ENTITY Waiting_AetheryteId "8">
      ]>
      
      <Profile>
          <Name>Fishing: PipiraPira v.1.0</Name>
          <Author>Emaki</Author>
          <KillRadius>50</KillRadius>
          <CodeChunks>
              <CodeChunk Name="Fisher">
                  <![CDATA[ff14bot.Managers.ChatManager.SendChat("/gs change 16");]]>
              </CodeChunk>
          </CodeChunks>
          <Order>
              <ExEnablePlugins Names="Skywatcher,EnableFlight"/> 
              <!-- if you dont have inventory space, go to teleport and stop -->
              <If Condition="FreeItemSlots() &lt; 1">
                  <ExLog Color="#00e4ff" Name="PipiraPira v.1.0" Message="No inventory spots!"/>
              </If>
              <!-- if you dont have required bait, go to teleport and stop -->
              <If Condition="not HasAtLeast(12706,1)">
                  <ExLog Color="#00e4ff" Name="PipiraPira v.1.0" Message="Bait Goblin Jig is missing!"/>
              </If>
              <!-- make sure we're actually on fisher so we dont try to fish otherwise -->
              <If Condition="Core.Me.CurrentJob != ClassJobType.Fisher">
                  <ExLog Color="#00e4ff" Name="PipiraPira" Message="Not on fisher, so going to change to fisher now."/>
                  <WaitTimer waitTime="3"/>
                  <RunCode Name="Fisher"/>
                  <WaitTimer waitTime="3"/>
              </If>
              <!-- while i'm on fisher, and have inventory space, and i have a Goblin Jig.. continue the profile. -->
              <While Condition="Core.Me.CurrentJob == ClassJobType.Fisher and HasAtLeast(12706,1) and FreeItemSlots() &gt; 1">
                  <!-- good weather for Pipira Pira wait -->
                  <If Condition="SkywatcherPlugin.IsWeatherInZone(398, 3, 4, 11)1">
                      <ExLog Color="#00e4ff" Name="PipiraPira" Message="Weather is perfect, teleporting to Pipira Pira location!"/>
                      <TeleportTo Force="True" Name="Tailfeather" AetheryteId="76"/>
                      <ExFish Condition="SkywatcherPlugin.IsWeatherInZone(398, 3, 4, 11) and HasAtLeast(12706,1) and FreeItemSlots() &gt; 1" MinFish="21" MaxFish="42" ShuffleFishSpots="True" sitRate=".69" Bait="Goblin Jig">
                          <Keepers>
                              <Keeper name="Pipira pira"/>
                          </Keepers>
                          <FishSpots>
                              <FishSpot XYZ="397.8219, -26.5559, -510.3493" Heading="2.68"/>
                              <FishSpot XYZ="385.3249, -26.25389, -546.3416" Heading="1.25"/>
                              <FishSpot XYZ="427.1414, -24.97816, -591.9777" Heading="0.92"/>
                              <FishSpot XYZ="497.8525, -26.25389, -586.8606" Heading="5.67"/>
                          </FishSpots>
                      </ExFish>
                  </If>
              </While> 
          </Order>
      </Profile>
       
    2. Emaki

      Emaki Member

      Joined:
      Mar 30, 2015
      Messages:
      68
      Likes Received:
      6
      Trophy Points:
      8
      I find one problem,

      <If Condition="SkywatcherPlugin.IsWeatherInZone(398, 3, 4, 11)1">

      should be

      <If Condition="SkywatcherPlugin.IsWeatherInZone(398, 3, 4, 11)">

      Ooops.

      But it still doesn't fix main issue.
       
    3. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      4,676
      Likes Received:
      253
      Trophy Points:
      83
      If you do a while loop where there are only conditionals ie if or whiles and none of their children execute you can deadlock the game. Add a <LogMessage Message="whatever"/> to the bottom of your while loop or add a waitwhile to the top that waits until the conditions are correct.
       
    4. Emaki

      Emaki Member

      Joined:
      Mar 30, 2015
      Messages:
      68
      Likes Received:
      6
      Trophy Points:
      8
      Thank you mastahg, that was the issue!!
       
    5. ExMatt

      ExMatt Active Member

      Joined:
      Jul 5, 2015
      Messages:
      1,030
      Likes Received:
      14
      Trophy Points:
      38
      @Emaki

      I wanted to add that over time, something has changed to cause a bug with the original way I developed the skywatcher plugin and it becomes out of sync. The best thing to do is to disable and re-enable it after each loop until I can get it working properly again.
       
    6. Emaki

      Emaki Member

      Joined:
      Mar 30, 2015
      Messages:
      68
      Likes Received:
      6
      Trophy Points:
      8
      Thank you ExMatt, and mastahg for your hard work.

      I will release soon when i know everything works on it. Maybe I will make different fish profiles too!! Thanks.
       

    Share This Page