Jump to content

Artillery Strike


EndUser
 Share

Recommended Posts

Hello,

 

I'm trying to get Artillery Strike to work in my fight class.  Here are my attempts - it doesn't work.  Any suggestions?

    <FightClassSpell>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>count = GetItemCount(162077) ; if count &gt; 0 then vRet = 1 else vRet = 0 end</LuaScript>
            <VarRet>vRet</VarRet>
            <ValueRet>1</ValueRet>
          </Param>
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>HostileUnitNear</ContionType>
          <Param xsi:type="FightClassConditionUnitNear">
            <Number>1</Number>
            <Type>BiggerOrEqual</Type>
            <Radius>10</Radius>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <SpellName>RunMacroText("/use Artillery Strike")</SpellName>
      <Priority>15</Priority>
      <Timer>4000</Timer>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
      <AOESpellMePos>true</AOESpellMePos>
    </FightClassSpell>
    <FightClassSpell>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>count = GetItemCount(162077) ; if count &gt; 0 then vRet = 1 else vRet = 0 end</LuaScript>
            <VarRet>vRet</VarRet>
            <ValueRet>1</ValueRet>
          </Param>
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>CSharpCode</ContionType>
          <Param xsi:type="FightClassConditionString">
            <Value>ObjectManager.GetWoWUnitHostile().Count(u =&gt; u.Position.DistanceTo(ObjectManager.Target.Position) &lt;= 10 &amp;&amp; u.Entry != 77405 &amp;&amp; u.Guid != ObjectManager.Pet.Guid &amp;&amp; wManager.Wow.Helpers.UnitCanAttack.CanAttack(u.GetBaseAddress, ObjectManager.Me.GetBaseAddress)) &gt;= 2</Value>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <SpellName>RunMacroText("/use Artillery Strike")</SpellName>
      <Priority>14</Priority>
      <Timer>6000</Timer>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
      <AOESpell>true</AOESpell>
    </FightClassSpell>

Link to comment
Share on other sites

Hello,
 
 
Remove condition lua with code GetItemCount(162077) and remplace RunMacroText("/use Artillery Strike") by RunMacroText("/cast Artillery Strike").
 
But why you use this spell with RunMacroText (this spell don't works with normal way)?
Link to comment
Share on other sites

Hi,

 

"/cast Artillery Strike" doesn't work, only "/use Artillery Strike" does.  I've retested this and only "/use" works from the cmd line.

 

The attempt at using the GetItemCount was to try and get it to not trigger when the number of artillery uses was zero.  I have had situations in the past where the bot would loop on an item with charges and not progress to another condition test.

 

I've taken the getitemcount out, as well as the c sharp code.  Now back to:

    <FightClassSpell>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>HostileUnitNear</ContionType>
          <Param xsi:type="FightClassConditionUnitNear">
            <Number>1</Number>
            <Type>BiggerOrEqual</Type>
            <Radius>10</Radius>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <SpellName>RunMacroText("/use Artillery Strike")</SpellName>
      <Priority>14</Priority>
      <Timer>4000</Timer>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
      <AOESpellMePos>true</AOESpellMePos>
    </FightClassSpell>

 

    <FightClassSpell>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>HostileUnitNearTarget</ContionType>
          <Param xsi:type="FightClassConditionUnitNear">
            <Number>2</Number>
            <Type>BiggerOrEqual</Type>
            <Radius>10</Radius>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <SpellName>RunMacroText("/use Artillery Strike")</SpellName>
      <Priority>13</Priority>
      <Timer>6000</Timer>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
      <AOESpell>true</AOESpell>
    </FightClassSpell>

Link to comment
Share on other sites

ps: try to run this code in wow chat to check if the result is good:

/run local currentCharges, maxCharges, cooldownStart, cooldownDuration = GetSpellCharges(162077); print(currentCharges);
Link to comment
Share on other sites

  • 2 months later...

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
 Share

×
×
  • Create New...