Jump to content
  • Conjure Food/Conjure Water


    bonsai
    • Version: All Product: Fight Classes Type: Bug Status: Not a Bug

    Hi, I have conjure food and water set to be cast whenever the "item count" of the water and/or food reaches zero. I'm using the correct item ID and checked both with a bag property dump and on a website. The problem is, the bot repeatedly casts conjure food and conjure water even though I've got a significant amount of both in my inventory. Based on the rule, it should only ever cast when there is zero in my inventory. The specific level of the spell is conjure food rank 3 andthe conjured rye and conjured purified water. Any help/suggestions to correct the issue would be appreciated as it tends to fill my inventory up unnecessarily.



    User Feedback

    Recommended Comments

    3 minutes ago, bonsai said:

    Do I add that lua check to the conditions in the same way that I would the item count?

    The condition "itemcount" is using lua, and he can happen that lua return bad value (when game is loading by sample).

    Link to comment
    Share on other sites

    I'm sorry if I'm being dense. I'm not a programmer, but this is what the XML currently looks like:

     

    <SpellName>Conjure Water</SpellName>
         <Priority>13</Priority>
         <CombatOnly>false</CombatOnly>
       </FightClassSpell>
       <FightClassSpell>
         <FightClassConditions>
           <FightClassCondition>
             <ContionType>ItemCount</ContionType>
             <Param xsi:type="FightClassConditionItemNumber">
               <Id>1114</Id>
             </Param>
           </FightClassCondition>
         </FightClassConditions>
         <SpellName>Conjure Food</SpellName>
         <Priority>12</Priority>
       </FightClassSpell>
       <FightClassSpell>
         <FightClassConditions>
           <FightClassCondition>
             <ContionType>HealthPercent</ContionType>
             <Param xsi:type="FightClassConditionNumber">
               <Type>SmallerOrEqual</Type>
               <Value>90</Value>
             </Param>
           </FightClassCondition>

     

    Link to comment
    Share on other sites

    Okay, full code. Sorry.

     

    <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>ItemCount</ContionType>
              <Param xsi:type="FightClassConditionItemNumber">
                <Number>1</Number>
                <Type>SmallerOrEqual</Type>
                <Id>2136</Id>
              </Param>
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>LuaScript</ContionType>
              <Param xsi:type="FightClassConditionLua">
                <LuaScript>local count = GetItemCount(2136); 
    if (count &lt;= 1) { local name = GetSpellInfo(29975); 
    RunMacroText("/cast " .. name) }</LuaScript>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>Conjure Water</SpellName>
          <Priority>13</Priority>
          <CombatOnly>false</CombatOnly>
        </FightClassSpell>
        <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>ItemCount</ContionType>
              <Param xsi:type="FightClassConditionItemNumber">
                <Id>1114</Id>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>Conjure Food</SpellName>
          <Priority>12</Priority>
        </FightClassSpell>

     

    Link to comment
    Share on other sites

    Does that work for all conjure water and conjure food? I've been editing the XML to reflect my specific conjured food IDs. I copied and pasted and revised the numbers to check the correct item id's based on a property dump.

    Here is my current script that doesn't appear to be working:

     

    <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>ItemCount</ContionType>
              <Param xsi:type="FightClassConditionItemNumber">
                <Number>1</Number>
                <Type>SmallerOrEqual</Type>
                <Id>2136</Id>
              </Param>
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>IsSpellUsable</ContionType>
              <Param xsi:type="FightClassConditionStringBool">
                <Name>Conjure Water</Name>
                <Need>true</Need>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>local count = GetItemCount(2136);
    if (count &lt;= 1)
    {
    	local name = GetSpellInfo(29975);
    	RunMacroText("/cast " .. name) 
    }</SpellName>
          <Priority>18</Priority>
          <IsBuff>true</IsBuff>
          <CombatOnly>false</CombatOnly>
          <Timer>2000</Timer>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
        </FightClassSpell>
        <FightClassSpell>
          <FightClassConditions>
            <FightClassCondition>
              <ContionType>ItemCount</ContionType>
              <Param xsi:type="FightClassConditionItemNumber">
                <Number>1</Number>
                <Type>SmallerOrEqual</Type>
                <Id>1114</Id>
              </Param>
            </FightClassCondition>
            <FightClassCondition>
              <ContionType>IsSpellUsable</ContionType>
              <Param xsi:type="FightClassConditionStringBool">
                <Name>Conjure Food</Name>
                <Need>true</Need>
              </Param>
            </FightClassCondition>
          </FightClassConditions>
          <SpellName>local count = GetItemCount(1114);
    if (count &lt;= 1)
    {
    	local name = GetSpellInfo(42955);
    	RunMacroText("/cast " .. name) 
    }
    </SpellName>
          <Priority>17</Priority>
          <IsBuff>true</IsBuff>
          <CombatOnly>false</CombatOnly>
          <Timer>2000</Timer>
          <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
        </FightClassSpell>

     

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...