• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Weather statement question

    Discussion in 'Rebornbuddy Support' started by The Red Terror, Jun 8, 2015.

    1. The Red Terror

      The Red Terror Member

      Joined:
      Apr 2, 2012
      Messages:
      137
      Likes Received:
      0
      Trophy Points:
      16
      Code:
      <Fish Mooch="2" [B]Weather="Clear or Fair"[/B] Condition="not HqHasAtLeast(7686, 1) and not NqHasAtLeast(7686, 1)">
      Will this work for weather? The bot will only fish if it's clear or fair out and until it catches either 1 HQ or 1 NQ.
       
    2. y2krazy

      y2krazy Community Developer

      Joined:
      Jun 21, 2011
      Messages:
      2,803
      Likes Received:
      70
      Trophy Points:
      48
      I haven't tested this, but you could try:

      Code:
      <If Condition="not HasAtLeast(7686, 1)">
          <If Condition="Managers.WorldManager.CurrentWeatherId == 1">
              <Fish Mooch="2" XYZ="1, 2, 3" Heading="X" >
          </If>
      </If>
      EDIT: I don't see Fair or Overcast in the IDs below, but if you want to set an "OR" operator in the conditional, you can do it as follows (replace "2" with the ID of the weather you want):

      Code:
      <If Condition="not HasAtLeast(7686, 1)">
          <If Condition="Managers.WorldManager.CurrentWeatherId == 1 || Managers.WorldManager.CurrentWeatherId == 2">
              <Fish Mooch="2" XYZ="1, 2, 3" Heading="X" >
          </If>
      </If>
      Here are weather IDs:

      Code:
      Id: 1 Type: Clear Skies
      Id: 2 Type: Sunshine
      Id: 3 Type: Clouds
      Id: 4 Type: Fog
      Id: 5 Type: Wind
      Id: 6 Type: Gales
      Id: 7 Type: Rain
      Id: 8 Type: Showers
      Id: 9 Type: Thunder
      Id: 10 Type: Thunderstorms
      Id: 11 Type: Dust Storms
      Id: 12 Type: Sandstorms
      Id: 13 Type: Hot Spells
      Id: 14 Type: Heat Waves
      Id: 15 Type: Snow
      Id: 16 Type: Blizzards
      Id: 17 Type: Gloom
      Id: 18 Type: Auroras
      Id: 19 Type: Darkness
      Id: 20 Type: Tension
      Id: 21 Type: Clouds
      Id: 22 Type: Storm Clouds
      Id: 23 Type: Rough Seas
      Id: 24 Type: Rough Seas
      Id: 25 Type: Louring
      Id: 26 Type: Heat Waves
      Id: 27 Type: Gloom
      Id: 28 Type: Gales
      Id: 29 Type: Eruptions
      Id: 30 Type: Sunshine
      Id: 31 Type: Sunshine
      Id: 32 Type: Sunshine
      Id: 33 Type: Sunshine
      Id: 34 Type: Sunshine
      Id: 35 Type: Irradiance
      Id: 36 Type: Core Radiation
      Id: 37 Type: Core Radiation
      Id: 38 Type: Core Radiation
      Id: 39 Type: Core Radiation
      Also, you should only need to use this if you don't care if the item is NQ or HQ:

      Code:
      Condition="not HasAtLeast(7686, 1)">
       
      Last edited: Jun 8, 2015
    3. The Red Terror

      The Red Terror Member

      Joined:
      Apr 2, 2012
      Messages:
      137
      Likes Received:
      0
      Trophy Points:
      16
      Did some digging and it looks like Clouds is "Overcast". Have no idea how to use the console, but I figured out how to call the current weather of the zone. Thanks for a lot of this info. Now I'll just need to combine a check of weather and time before it fishes.
       
    4. y2krazy

      y2krazy Community Developer

      Joined:
      Jun 21, 2011
      Messages:
      2,803
      Likes Received:
      70
      Trophy Points:
      48
      Assuming "Fair" = "Sunshine" and "Overcast" = "Clouds," you could give this a go:

      Code:
      <If Condition="not HasAtLeast(7686, 1)">
          <If Condition="IsTimeBetween(0,8)">
              <If Condition="Managers.WorldManager.CurrentWeatherId == 1 || Managers.WorldManager.CurrentWeatherId == 2 || Managers.WorldManager.CurrentWeatherId == 3">
                  <Fish Mooch="2" Weather="Clear Skies" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
                  <Fish Mooch="2" Weather="Sunshine" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
                  <Fish Mooch="2" Weather="Clouds" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
              </If>
              <If Condition="not (Managers.WorldManager.CurrentWeatherId == 1 || Managers.WorldManager.CurrentWeatherId == 2 || Managers.WorldManager.CurrentWeatherId == 3)">
                  <LogMessage="THIS MESSAGE IS TELLING YOU THAT THE WEATHER DOES NOT MATCH YOUR CRITERIA!" />
              </If>
          </If>
          <If Condition="IsTimeBetween(8,16)">
              <If Condition="Managers.WorldManager.CurrentWeatherId == 1 || Managers.WorldManager.CurrentWeatherId == 2 || Managers.WorldManager.CurrentWeatherId == 3">
                  <Fish Mooch="2" Weather="Clear Skies" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
                  <Fish Mooch="2" Weather="Sunshine" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
                  <Fish Mooch="2" Weather="Clouds" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
              </If>
              <If Condition="not (Managers.WorldManager.CurrentWeatherId == 1 || Managers.WorldManager.CurrentWeatherId == 2 || Managers.WorldManager.CurrentWeatherId == 3)">
                  <LogMessage="THIS MESSAGE IS TELLING YOU THAT THE WEATHER DOES NOT MATCH YOUR CRITERIA!" />
              </If>
          </If>
          <If Condition="IsTimeBetween(16,23)">
              <If Condition="Managers.WorldManager.CurrentWeatherId == 1 || Managers.WorldManager.CurrentWeatherId == 2 || Managers.WorldManager.CurrentWeatherId == 3">
                  <Fish Mooch="2" Weather="Clear Skies" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
                  <Fish Mooch="2" Weather="Sunshine" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
                  <Fish Mooch="2" Weather="Clouds" Condition="not HasAtLeast(7686, 1)">
                      <FishSpots>
                          <FishSpot XYZ="1, 2, 3" Heading="X" />
                          <FishSpot XYZ="4, 5, 6" Heading="X" />
                          <FishSpot XYZ="7, 8, 9" Heading="X" />
                      </FishSpots>
                  </Fish>
              </If>
              <If Condition="not (Managers.WorldManager.CurrentWeatherId == 1 || Managers.WorldManager.CurrentWeatherId == 2 || Managers.WorldManager.CurrentWeatherId == 3)">
                  <LogMessage="THIS MESSAGE IS TELLING YOU THAT THE WEATHER DOES NOT MATCH YOUR CRITERIA!" />
              </If>
          </If>
      </If>
      Of course, I can't test this right now, so it may or may not work as intended. :p
       
      Last edited: Jun 8, 2015
    5. The Red Terror

      The Red Terror Member

      Joined:
      Apr 2, 2012
      Messages:
      137
      Likes Received:
      0
      Trophy Points:
      16
      Code:
      <Profile>
          <Name>Fishing: Helmsman's Hand</Name>
          <KillRadius>50</KillRadius>
          <Order>
      		<If Condition="not HasAtLeast(7686, 1)">
      			<If Condition="IsTimeBetween(8,14)">
      				<If Condition="not IsOnMap(138)">
      					<TeleportTo Name="Aleport" AetheryteId="14" />
      				</If>
      				<WaitTimer WaitTime="24" />
      				<LogMessage Message= "Waiting for possible weather change. Stand by..."/>
      				<If Condition="Managers.WorldManager.CurrentWeatherId == 21 || Managers.WorldManager.CurrentWeatherId == 4 || Managers.WorldManager.CurrentWeatherId == 5">
      					<LogMessage Message= "Weather is right. Moving to fish spot."/>
      					<If Condition="Core.Me.CurrentJob != ClassJobType.Fisher">
      						<RunCode Name="FSH"/>
      					</If>
      						<!-- Bait: Pill Bug(Recommended) or Floating Minnow (Lure)-->
      						<Fish Mooch="2" Weather="Overcast" Condition="not HasAtLeast(7686, 1)">
      							<FishSpots>
      							<FishSpot XYZ="-315.4807, -42.25661, 406.1592" Heading="3.567683" />
      							<FishSpot XYZ="-303.1432, -42.26067, 401.543" Heading="3.559305" />
      							<FishSpot XYZ="-292.2877, -42.19418, 396.6089" Heading="3.442018" />
      							<FishSpot XYZ="-328.6712, -42.23929, 413.8593" Heading="4.099654" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="2" Weather="Wind" Condition="not HasAtLeast(7686, 1)">
      							<FishSpots>
      							<FishSpot XYZ="-315.4807, -42.25661, 406.1592" Heading="3.567683" />
      							<FishSpot XYZ="-303.1432, -42.26067, 401.543" Heading="3.559305" />
      							<FishSpot XYZ="-292.2877, -42.19418, 396.6089" Heading="3.442018" />
      							<FishSpot XYZ="-328.6712, -42.23929, 413.8593" Heading="4.099654" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="2" Weather="Fog" Condition="not HasAtLeast(7686, 1)">
      							<FishSpots>
      							<FishSpot XYZ="-315.4807, -42.25661, 406.1592" Heading="3.567683" />
      							<FishSpot XYZ="-303.1432, -42.26067, 401.543" Heading="3.559305" />
      							<FishSpot XYZ="-292.2877, -42.19418, 396.6089" Heading="3.442018" />
      							<FishSpot XYZ="-328.6712, -42.23929, 413.8593" Heading="4.099654" />
      							</FishSpots>
      						</Fish>
      				</If>
      				<If Condition="not (Managers.WorldManager.CurrentWeatherId == 21 || Managers.WorldManager.CurrentWeatherId == 4 || Managers.WorldManager.CurrentWeatherId == 5")>
      				<LogMessage Message= "Weather is wrong. Can't fish right now :("/>
      				</If>
      			</If>
      		</If>
      			
      			
      	</Order>
      	<CodeChunks>
      		<CodeChunk Name="FSH">
      			<![CDATA[
      				await Buddy.Coroutines.Coroutine.Sleep(4000);
      				ff14bot.Managers.ChatManager.SendChat("/gs change 13");
      				await Buddy.Coroutines.Coroutine.Sleep(4000);
      			]]>
      		</CodeChunk>
      	</CodeChunks>	
      </Profile>
      This is currently what I have set-up. So many If statements make me feel icky in the clutter department.

      That aside. I need to:
      Add talking to ferryman to get across to Isles of Umbra.
      Figure out if the bot doesn't catch the fish the first time the weather/time is accurate if it will simply idle at the fish spot until it's right again OR will it exit the loop and give you a "weather is wrong" message and simply stop the bot.

      BIG thanks to you 2kcrazy for helping me on this and on others as well.

      EDIT: Thinking of having both the weather and the time be changed to While loops.
       
      Last edited: Jun 8, 2015
    6. Cloud30000

      Cloud30000 New Member

      Joined:
      May 9, 2015
      Messages:
      298
      Likes Received:
      7
      Trophy Points:
      0
      Changing the first "<If Condition="not HasAtLeast(7686, 1)">" to a While loop should keep it fishing without closing the bot until you catch one. Changing the nested If statements to While loops will not be necessary, as they should get looped with the entire profile. However, leaving the fisrt If statement and changing the others to While statements will only loop until the weather changes, then exit the loops once the conditions are no longer true without repeating them later.
       
      Last edited: Jun 8, 2015
    7. The Red Terror

      The Red Terror Member

      Joined:
      Apr 2, 2012
      Messages:
      137
      Likes Received:
      0
      Trophy Points:
      16
      Code:
          <Profile>
          <Name>Fishing: Caterwauler</Name>
          <KillRadius>50</KillRadius>
          <Order>
      
      		<!-- Name of Fish to catch -->
      		<If Condition="not HasAtLeast(7681, 1)">
      			<LogMessage Message="No Caterwauler fish found in inventory. Checking time..."/>
      			<!-- Time frame of when Fish is available -->
      			<If Condition="IsTimeBetween(0,24)">
      				<!-- What zone said fish is in -->
      				<If Condition="not IsOnMap(135)">
      					<TeleportTo Name="Moraby drydocks" AetheryteId="10" />
      				</If>
      				<!-- Time it takes to load and possible weather to change -->
      				<LogMessage Message= "Waiting 24 seconds for possible weather change. Stand by..."/>
      				<WaitTimer WaitTime="24" />
      				<!-- What type of weather is required for fish to appear -->
      				<If Condition="Managers.WorldManager.CurrentWeatherId == 1 or Managers.WorldManager.CurrentWeatherId == 2 or Managers.WorldManager.CurrentWeatherId == 3 or Managers.WorldManager.CurrentWeatherId == 4 or Managers.WorldManager.CurrentWeatherId == 5 or Managers.WorldManager.CurrentWeatherId == 7">
      					<LogMessage Message= "Weather is right. Moving to fish spot."/>
      					<!-- Swap to Fisher job -->
      					<MoveTo XYZ="124.9819, 39.7319, 95.52234" Name="The Mourning Widow"/>
      					<If Condition="Core.Me.CurrentJob != ClassJobType.Fisher">
      						<RunCode Name="FSH"/>
      					</If>
      				</If>
      					<While Condition="Managers.WorldManager.CurrentWeatherId == 1 or Managers.WorldManager.CurrentWeatherId == 2 or Managers.WorldManager.CurrentWeatherId == 3 or Managers.WorldManager.CurrentWeatherId == 4 or Managers.WorldManager.CurrentWeatherId == 5 or Managers.WorldManager.CurrentWeatherId == 7 and IsOnMap(135) and IsTimeBetween(0,24)">
      					
      						<!-- Bait: Moth Pupa(Recommended)-->
      						<Fish Mooch="0" Weather="Clear" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="0" Weather="Fair" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="0" Weather="Overcast" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="0" Weather="Fog" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="0" Weather="Wind" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="0" Weather="Rain" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<WaitTimer WaitTime="7"/>
      						<RunCode Name="BreakFishing"/>
      					</While>
      				<LogMessage Message="Weather is not correct."/>
      			</If>
      				
      		</If>
      		
      			
      			
      	</Order>
      	<CodeChunks>
      		<CodeChunk Name="FSH">
      			<![CDATA[
      				await Buddy.Coroutines.Coroutine.Sleep(4000);
      				ff14bot.Managers.ChatManager.SendChat("/gs change 13");
      			]]>
      		</CodeChunk>
      		<CodeChunk Name="BreakFishing">
      			<![CDATA[ 
      				SpellData data; 
      				if (Actionmanager.CurrentActions.TryGetValue("Quit", out data) && Actionmanager.CanCast(data, Core.Me)) 
      				{ 
      					await Buddy.Coroutines.Coroutine.Sleep(1000);
      					Actionmanager.DoAction("Quit", Core.Me); 
      					await Buddy.Coroutines.Coroutine.Sleep(1000); 
      				} 
      			]]>
      		</CodeChunk>
      	</CodeChunks>	
      </Profile>
      Currently what I have.
       
      Last edited: Jun 13, 2015
    8. The Red Terror

      The Red Terror Member

      Joined:
      Apr 2, 2012
      Messages:
      137
      Likes Received:
      0
      Trophy Points:
      16
      Code:
      <Fish Mooch="0" Weather="Clear" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="0" Weather="Fair" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="0" Weather="Overcast" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      						<Fish Mooch="0" Weather="Fog" Condition="not HasAtLeast(7681, 1)">
      							<FishSpots>
      							<FishSpot XYZ="133.2167, 37.50251, 53.92446" Heading="2.302059" />
      							<FishSpot XYZ="140.0302, 35.94707, 64.89303" Heading="2.084243" />
      							<FishSpot XYZ="145.4155, 39.38769, 72.60008" Heading="2.25389" />
      							<FishSpot XYZ="152.2279, 35.10902, 77.71847" Heading="2.226665" />
      							<FishSpot XYZ="161.7703, 33.30178, 84.59602" Heading="2.806813" />
      							</FishSpots>
      						</Fish>
      For some reason having multiple instances of different weather will not allow it to fish. Is there a way to have multiple weathers? Or do I have to do it the long way and have multiple if/while statements for each type of possible weathers?
       

    Share This Page