• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Order Bot Check for Number of Item

    Discussion in 'Community Developer Forum' started by kagepande, Nov 24, 2014.

    1. kagepande

      kagepande Community Developer

      Joined:
      Oct 20, 2014
      Messages:
      289
      Likes Received:
      11
      Trophy Points:
      18
      Hey guys, still pretty new to all of this so between looking at other peoples profiles, looking at the documentation I started making a simple profile to go and gather the items need for the level 1-50 miner quest. So far I have:
      Code:
      <Profile>
          <Name>Mining: Class Quest Items</Name>
          <KillRadius>50</KillRadius>
          <Order>
      		<While Condition="True">
      			<If Condition="(ItemCount(5124) &lt; 99)">
      				<TeleportTo Name="Horizon" AetheryteId="17" />
      				<Gather while ="(ItemCount(5124) &lt; 99)">
      					<GatherObject>Mineral Deposit</GatherObject>
      					<HotSpots>
      						<HotSpot Radius="95" XYZ="44.84496,57.39461,354.8458" />
      					</HotSpots>
      					<ItemNames>
      						<ItemName>Obsidian</ItemName>
      					</ItemNames>
      					<GatheringSkillOrder>
      						<GatheringSkill SpellName="King's Yield" TimesToCast="1" />
      					</GatheringSkillOrder>
      				</Gather>
      			</If>
      		</While>
          </Order>
      </Profile>
      I got the item ID for Obsidian off of XIVDB and all that, so my first question is:

      Is there a way to check for a item like I did with Obsidan but to check if it is High Quality?

      Second question is first time I ran my profile, I hit 99 Obsidian, then when the node finished my game crashed.
      View attachment 7000 2014-11-24 09.52.txt

      EDIT: Tried running it again, and game froze as soon as it hit 99 and finished the node.
       
      Last edited: Nov 24, 2014
    2. ZaneMcFate

      ZaneMcFate Member

      Joined:
      Nov 17, 2014
      Messages:
      137
      Likes Received:
      2
      Trophy Points:
      18
      I am not aware of anywhere in the interface where it sums up high quality items with a function like ItemCount. The values are there if you parse the bags (BagSlot.HqFlag), but I am implementing HQ support in my plugin by parsing all bags and adding if HqFlag is on.
       
    3. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      if you add 1000000 to the itemid it should return the value for HQ only items. Let me know if that works.
       
    4. kagepande

      kagepande Community Developer

      Joined:
      Oct 20, 2014
      Messages:
      289
      Likes Received:
      11
      Trophy Points:
      18
      Alright, ill try that, but I still need help resolving the issue of the game freezing after the bot collect the number of item I set, 99. Once it finishes the node it was on it will just freeze the game and crash. No idea why. Log is posted in the first post.
       
    5. Yasuko

      Yasuko Member

      Joined:
      Oct 28, 2010
      Messages:
      314
      Likes Received:
      6
      Trophy Points:
      18
      Mastahg,

      I tried that same thing after I first read his post.. When I tried it, it was throwing exception errors at one time, and when I just tried again, its not even returning anything.

      ItemCount() fetches from DataManager.GetItem(uint itemId) correct?

      when I try this in reborn console:

      Code:
      Item item = ff14bot.Managers.DataManager.GetItem(5533);
      Log(item);
      it returns: Garlean Rubber

      but when I add the HQ modifier to it and do:
      Code:
       Item item = ff14bot.Managers.DataManager.GetItem(1005533);
      Log(item);
      It does not return anything, is the datamanager set to retrieve the trueitemid or just the rawitemid?

      Edit: Which leads me to my next question: I've messed around for a while last night trying to add custom ConditionParser conditions, and just can not figure out how to add it to the ConditionParser class, because I was going to make a HQItemCount() condition to simplify some things.. does the api not support adding conditions to that class? .. I tried through extension methods as well, which i could get to show up in intellesense, but RB kept throwing iron python errors about it not being a globally defined name.
       
      Last edited: Nov 25, 2014
    6. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      C# doesn't support doing something like that.

      I've added a bunch of new functions for the next release, all the normal funcs plus Hq and Nq variations.
       

    Share This Page