• Visit Rebornbuddy
  • Grindto HasItem issue (keeps grinding)

    Discussion in 'Archives' started by Kickazz006, Feb 1, 2011.

    1. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      Alright, I have some quests in northrend that are giving me issues after you stop the bot and click start again (and pass the if condition) - it stays stuck on the if condition for grinding ...

      PHP:
                  <If Condition="((!HasItem(34984)) &amp;&amp; (!IsQuestCompleted(11729)))" >
                      <
      SetGrindArea><GrindArea>
                              <
      Factions>16</Factions>
                              <
      Hotspots>
                                  <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                  <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                  <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                  <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                  <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />
                              </
      Hotspots>
                          </
      GrindArea></SetGrindArea>
                  <
      GrindTo Condition="((HasItem(34984)) &amp;&amp; (!IsQuestCompleted(11729)))" />
                  </If>
              <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
      basically it went passed it fine, and then i stopped the bot at "Gearmaster" to make a blackspot ... and it went to grind -_-

      Gearmaster is a few quests below the grinding.

      Can anyone tell me what the issue may be?

      And it does it with a lot of quests that have these types of if statements for grinding

      Notes:

      && does say & amp ; & amp ; but in the php code, it just says &&

      I also changed around the !isquestcompleted with (!hasitem) and (hasitem) ... no luck


      my Bugtracker report:

      http://bugtracker.thebuddyforum.com/show_bug.cgi?id=664 <-- bug report
       
      Last edited: Feb 14, 2011
    2. joejoe317

      joejoe317 New Member

      Joined:
      Jan 2, 2011
      Messages:
      341
      Likes Received:
      5
      Trophy Points:
      0
      I had a prob with this and i set it up like this instead, for some reason it worked, but then broke something else... lol

      <code><code>(!HasItem(34984) && !IsQuestCompleted(11729))</code></code>
       
    3. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      yeah i noticed that if you don't enclose certain things, the compiler gets iffy

      i tried that, i also tried "!HasItem() && !IsQuestCompleted()" and other variations
       
      Last edited: Feb 3, 2011
    4. Synik

      Synik Active Member

      Joined:
      Jan 30, 2010
      Messages:
      995
      Likes Received:
      42
      Trophy Points:
      28
      PHP:
      <GrindArea>
                  <
      Name>Collect Count Ungula's Mandible</Name>
                  <TargetMinLevel></TargetMinLevel>
                  <TargetMaxLevel></TargetMaxLevel>
                  <Factions></Factions>
                  <Hotspots>
                      
                  </Hotspots>
              </GrindArea>
              </SetGrindArea>
              <GrindTo Condition="HasItem(25459)" />
              <If Condition="HasItem(25459)">
                  <PickUp QuestName="" GiverType="Item" QuestId="9911" GiverId="25459" />
              </If>
       
    5. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      none of these work :(

      PHP:
      <HBProfile>
          <
      QuestOrder>
                          <
      SetGrindArea>
                              <
      GrindArea>
                                  <
      Name>The Ultrasonic Screwdriver</Name>
                                  <
      TargetMinLevel></TargetMinLevel>
                                  <
      TargetMaxLevel></TargetMaxLevel>
                                  <
      Factions>16</Factions>
                                  <
      Hotspots>
                                      <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                      <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                      <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                      <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                      <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />                
                                  </
      Hotspots>
                              </
      GrindArea>
                          </
      SetGrindArea>
                      <
      GrindTo Condition="(HasItem(34984))" />
                  <If 
      Condition="(HasItem(34984))">
              <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
                  </If>
          </
      QuestOrder>
      </
      HBProfile>


      PHP:
      <HBProfile>
          <
      QuestOrder>
                      <If 
      Condition="((!HasItem(34984)) &amp;&amp; (!IsQuestCompleted(11729)))">
                              <
      SetGrindArea>
                                  <
      GrindArea>
                                      <
      Name>Collect The Ultrasonic Screwdriver</Name>
                                      <
      TargetMinLevel></TargetMinLevel>
                                      <
      TargetMaxLevel></TargetMaxLevel>
                                      <
      Factions>16</Factions>
                                      <
      Hotspots>
                                          <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                          <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                          <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                          <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                          <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />
                                      </
      Hotspots>
                                  </
      GrindArea>
                              </
      SetGrindArea>
                          <
      GrindTo Condition="(HasItem(34984))" />
                      </If>
              <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
          </
      QuestOrder>
      </
      HBProfile>

      PHP:
      <HBProfile>
          <
      QuestOrder>
                      <If 
      Condition="(!IsQuestCompleted(11729))">
                              <
      SetGrindArea>
                                  <
      GrindArea>
                                      <
      Name>Collect The Ultrasonic Screwdriver</Name>
                                      <
      TargetMinLevel></TargetMinLevel>
                                      <
      TargetMaxLevel></TargetMaxLevel>
                                      <
      Factions>16</Factions>
                                      <
      Hotspots>
                                          <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                          <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                          <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                          <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                          <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />
                                      </
      Hotspots>
                                  </
      GrindArea>
                              </
      SetGrindArea>
                          <
      GrindTo Condition="(HasItem(34984))" />
                      </If>
              <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
          </
      QuestOrder>
      </
      HBProfile>

      PHP:
      <HBProfile>
          <
      QuestOrder>
                      <If 
      Condition="!HasItem(34984) &amp;&amp; !IsQuestCompleted(11729)">
                              <
      SetGrindArea>
                                  <
      GrindArea>
                                      <
      Name>Collect The Ultrasonic Screwdriver</Name>
                                      <
      TargetMinLevel></TargetMinLevel>
                                      <
      TargetMaxLevel></TargetMaxLevel>
                                      <
      Factions>16</Factions>
                                      <
      Hotspots>
                                          <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                          <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                          <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                          <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                          <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />
                                      </
      Hotspots>
                                  </
      GrindArea>
                              </
      SetGrindArea>
                          <
      GrindTo Condition="HasItem(34984)" />
                      </If>
              <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
          </
      QuestOrder>
      </
      HBProfile>

       
      Last edited: Feb 3, 2011
    6. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Kick,

      Compound conditionals (those using &amp;amp;&amp;amp; or ||) can be problematical. For each condition you add, you double the number of exit conditions. For your &lt;If&gt; statement with the &amp;amp;&amp;amp;, there are four possible exit conditions--all which must be accounted for--even if some are "don't care".

      As such, your exit condition has to address all four possibilities which is not being done in any of the examples you've tried so far. A 'red flag' for the problem is that your "If" condition and your "GrindTo" condition are not the same (or direct complements) of each other. The formal tools that are used for mathematical analysis are simple truth tables, and Karnaugh Maps.

      If you choose to continue using a compound conditional, you must account for all four exit possibilities:
      • HasItem=false, QuestComplete=false ==> Need to grind, then pick up quest from item
      • HasItem=false, QuestComplete=true ==> Don't need to grind or pick up quest
      • HasItem=true, QuestComplete=false ==> Need to pick up quest from item
      • HasItem=true, QuestComplete=true ==> Don't need to grind or pick up quest

      So, we see from the truth table that if QuestComplete=true, we've nothing to do. But, we've two *different* actions to take if QuestComplete=false.

      You're problem is further compounded by the "changing of state" inside the original If element. Your state changes from !HasItem to HasItem. So when you stop/start Honorbuddy, the re-evaluating of your compounded conditional was not the same as it was originally.

      An easier technique is to just simplify the logic as much as possible by using 'simple' conditionals. For example:
      PHP:
      <HBProfile>
          <
      QuestOrder>
              <If 
      Condition="!IsQuestCompleted(11729)">
                  <If 
      Condition="!HasItem(34984)">
                      <
      SetGrindArea>
                          <
      GrindArea>
                              <
      Name>Collect The Ultrasonic Screwdriver</Name>
                              <
      TargetMinLevel></TargetMinLevel>
                              <
      TargetMaxLevel></TargetMaxLevel>
                              <
      Factions>16</Factions>
                              <
      Hotspots>
                                    <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                    <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                    <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                    <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                    <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />
                               </
      Hotspots>
                           </
      GrindArea>
                      </
      SetGrindArea>
                      <
      GrindTo Condition="HasItem(34984)" />
                      &
      lt;!-- Exit ConditionQuest-giving screwdriver in inventory --&gt;
                   </If>
                   <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
                   <
      TurnIn QuestName="The Ultrasonic Screwdriver" QuestId="11729" ... />
                   &
      lt;!-- Exit ConditionQuest is now complete --&gt;
               </If>
          </
      QuestOrder>
      </
      HBProfile>  
      With that said, I believe IsQuestComplete() may be partially broken at the moment, and I can't run the needed experiments to prove this right now.

      Good luck with your profile!
      chinajade
       
    7. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      CJ, no dice :(


      PHP:
      <HBProfile>
          <
      QuestOrder>
                  <If 
      Condition="(!IsQuestCompleted(11729))">
                      <If 
      Condition="(!HasItem(34984))" >
                              <
      SetGrindArea>
                                  <
      GrindArea>
                                      <
      Name>Collect The Ultrasonic Screwdriver</Name>
                                      <
      TargetMinLevel></TargetMinLevel>
                                      <
      TargetMaxLevel></TargetMaxLevel>
                                      <
      Factions>16</Factions>
                                      <
      Hotspots>
                                          <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                          <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                          <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                          <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                          <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />
                                      </
      Hotspots>
                                  </
      GrindArea>
                              </
      SetGrindArea>
                          <
      GrindTo Condition="(HasItem(34984))" />
                      </If>
              <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
              <
      TurnIn QuestName="What's the Matter with the Transmatter?" QuestId="11710" TurnInName="Mordle Cogspinner" TurnInId="25702" />
                      </If>
          </
      QuestOrder>
      </
      HBProfile>
      PHP:
      <HBProfile>
          <
      QuestOrder>
                  <If 
      Condition="!IsQuestCompleted(11729)">
                      <If 
      Condition="!HasItem(34984)" >
                              <
      SetGrindArea>
                                  <
      GrindArea>
                                      <
      Name>Collect The Ultrasonic Screwdriver</Name>
                                      <
      TargetMinLevel></TargetMinLevel>
                                      <
      TargetMaxLevel></TargetMaxLevel>
                                      <
      Factions>16</Factions>
                                      <
      Hotspots>
                                          <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                          <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                          <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                          <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                          <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />
                                      </
      Hotspots>
                                  </
      GrindArea>
                              </
      SetGrindArea>
                          <
      GrindTo Condition="HasItem(34984)" />
                      </If>
              <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
              <
      TurnIn QuestName="What's the Matter with the Transmatter?" QuestId="11710" TurnInName="Mordle Cogspinner" TurnInId="25702" />
                      </If>
          </
      QuestOrder>
      </
      HBProfile>

       
    8. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      i've also used If and ElseIf, same concept as above... and it looped, too
       
    9. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Okay, one more thing I'll have you check then. :) Did the ItemId for the Sonic Screwdriver change between when it offered the quest, and after the quest was accepted?

      cheers,
      chinajade
       
    10. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      i'll try this:

      PHP:
      <HBProfile>
          <
      QuestOrder>
                      <If 
      Condition="(IsQuestCompleted(11710))" >
                          <
      GrindTo Condition="(HasItem(34984))" >
                              <
      SetGrindArea>
                                  <
      GrindArea>
                                      <
      Name>Collect The Ultrasonic Screwdriver</Name>
                                      <
      TargetMinLevel></TargetMinLevel>
                                      <
      TargetMaxLevel></TargetMaxLevel>
                                      <
      Factions>16</Factions>
                                      <
      Hotspots>
                                          <
      Hotspot X="4150.399" Y="5149.406" Z="13.53131" />
                                          <
      Hotspot X="4188.851" Y="5121.319" Z="13.59069" />
                                          <
      Hotspot X="4228.585" Y="5144.792" Z="13.0798" />
                                          <
      Hotspot X="4259.954" Y="5169.077" Z="13.07616" />
                                          <
      Hotspot X="4216.855" Y="5192.707" Z="17.04152" />
                                      </
      Hotspots>
                                  </
      GrindArea>
                              </
      SetGrindArea>
                              </
      GrindTo>
                      <ElseIf 
      Condition="(HasItem(34984))" >
                  <
      PickUp QuestName="The Ultrasonic Screwdriver" GiverType="Item" QuestId="11729" GiverId="34984" />
                      </ElseIf>
                      </If>
              <
      TurnIn QuestName="What's the Matter with the Transmatter?" QuestId="11710" TurnInName="Mordle Cogspinner" TurnInId="25702" />
              <
      TurnIn QuestName="Re-Cursive" QuestId="11712" TurnInName="Jinky Wingnut" TurnInId="25747" />
              <
      TurnIn QuestName="The Ultrasonic Screwdriver" QuestId="11729" TurnInName="Crafty Wobblesprocket" TurnInId="25477" />
          </
      QuestOrder>
      </
      HBProfile>
      the 11710 is another quest that I turn in before turning in the screwdriver -- it looks like !IsQuestCompleted() doesn't always check to actually see if the damn thing is completed and turned in, only completed if it's in your log (or it seems to be that way, I don't know)
       
      Last edited: Feb 3, 2011
    11. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      This is what I suspected about IsQuestCompleted(). Also, I think if you delete your WoW/Cache or WoW/Data/Cache subdirectory (say to clear another problem), it breaks IsQuestCompleted() also. This is a major problem.

      I'll throw in $0.02. I appreciate what your doing to work around the problem, but think its a very very bad idea. Other people may have already turned in that other quest, or may have futzed with their Cache directories. In either case, your workaround will probably fail.

      We need to get this reported as a bug and addressed pronto. I believe Synik has also mentioned this to be a problem recently. Perhaps, he can supplement any BugTracker that you write up, or vice-versa.

      cheers & thanks for the persistence!
      chinajade
       
    12. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      We need tags that say:

      IsQuestTurnedIn() needs to be "has this quest been completed and turned in and no longer available to pickup"
      !IsQuestTurnedIn() needs to be "Have I completed this quest? or is it available for pickup?"
      IsQuestCompleted() needs to be "is quest completed and in my log?"
      !IsQuestCompleted() needs to be "is this quest in my log, and is it completed?"

      We also need something to deal with daily quests (ie: an option to only do them once, and have that setting in char settings, or to do them when avail -- as it is currently -- or a smarter way and have the profile creator select the toggle switch in their profile)

      **sticks this on my list for devs**

      and CJ, I know it will fail for some ppl... but they'll just have to suck it up
       
    13. Nesox

      Nesox Moderator Staff Member Moderator Buddy Core Dev

      Joined:
      Jan 15, 2010
      Messages:
      1,563
      Likes Received:
      48
      Trophy Points:
      48
      The IsQuestCompleted method runs the lua function 'QueryQuestsCompleted()' and then waits for the event that is raised once it's done.

      You could try run the lua in-game and check if the quest is in the table that GetCompletedQuests retuns.
      Make ? nice little bugreport and i'll take ? look tomorrow when i wake up.
       
    14. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      I don't know how to do lua :(

      and I have a lot of stuff to report :)

      update:

      http://bugtracker.thebuddyforum.com/show_bug.cgi?id=664 <-- bug report
       
      Last edited: Feb 4, 2011

    Share This Page