Jump to content

EndUser

Members
  • Posts

    44
  • Joined

  • Last visited

Posts posted by EndUser

  1. I know it's not optimal, but I got it to work with this now:

                <LuaScript>m=0;
    w=f;
    local SpellName = GetSpellInfo("Rejuvenation")
    for i=nps,npe do
        if i==0 then
            tt="player"
        else
            tt=t..i
        end;
        
        ue=UnitExists(tt) print(ue)
        isir=IsSpellInRange(SpellName,tt) print(isir)
        uidog=UnitIsDeadOrGhost(tt) print(uidog)
        ub=UnitBuff(tt,SpellName,nil,"PLAYER") print(ub)
        
        print("----------------")
        if ue and isir and not uidog then print("TRUE") else print("FALSE") end
        print("----------------")
        
        if ue and isir and not uidog then
            a=UnitHealth(tt) / UnitHealthMax(tt);
            if a&gt;m then
                m=a w=tt
            end
        end
    end;

    if m &lt;= 1 and not ub then
        CastSpellByName(SpellName, w)
    end;
    </LuaScript>

     

    The part that is driving me crazy - otherwise I like solving puzzles - is that the results are not consistent.  Sometimes it works, then other times it just doesn't.

  2. Well, I figured out that my lua script wasn't working as a spell, but if I used it as a condition then it worked.  Now I'm trying to pass "t" to another 'spell', with the below as a condition:

                <LuaScript>-- Find the unit with the largest health deficit, in range, that is alive, that doesn't have Rejuvenation
    print("t ",t)            
    m=0;
    w=f;
    local SpellName = GetSpellInfo("Rejuvenation")
    for i=nps,npe do
        if i==0 then
            tt="player"
        else
            tt=t..i
        end;
    if UnitExists(tt) and IsSpellInRange(SpellName,tt) and not UnitIsDeadOrGhost(tt) and not UnitBuff(tt,SpellName,nil,"PLAYER") then
            a=UnitHealth(tt) / UnitHealthMax(tt);
            if a&gt;m then
                m=a w=tt
            end
        end
    end;

    -- Heal the unit with the largest deficit
    if m &lt;= .95 then
        CastSpellByName(SpellName, w)
    end
    </LuaScript>

     

    I get nothing, not print, not any action, etc.  Suggestions?

  3. Hello,

    I tried this in my fightclass as a spell:

    t="raid";
    nps=1;
    npe=GetNumGroupMembers();
    if npe<=4 then
        nps=0;
        t="party";
    end;
    print(t," ",npe)

     

    With the spell settings as:

    • Combat only - False
    • Not spell, is lua script - True

     

    I was hoping it would spam something like:

    • "party 0" or "party nil"

     

    But instead I get nothing.  Any suggestions on how to make this work?  Eventually I hope to make a fightclass that can detect if I'm in a party or raid, then using the global var "t" have it run a loop for party2, raid1..40, etc.

  4. Still having some issues:

    08:06:27 - [Fight] Player Attack Leyline Researcher (lvl 110)
    [F] 08:06:27 - [FightClass] Launch LUA script: PetAttack();
    [F] 08:06:27 - [FightClass] Launch LUA script: RunMacroText("/cast [@focus, help] [@pet, nodead, exists] Misdirection")
    [F] 08:06:28 - [Spell] Cast Mend Pet (Mend Pet)
    [F] 08:06:28 - [Spell] Cast Bestial Wrath (Bestial Wrath)
    [F] 08:06:28 - [FightClass] Launch C# code: robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", false);
    [F] 08:06:30 - [Spell] Cast A Murder of Crows (A Murder of Crows)
    [F] 08:06:30 - [FightClass] Launch LUA script: RunMacroText("/use Emmarel's Assault")
    [F] 08:06:31 - [Spell] Cast Cobra Shot (Cobra Shot)
    [F] 08:06:31 - [Spell] Cast Counter Shot (Counter Shot)
    [F] 08:06:32 - [Spell] Cast Dire Beast (Dire Beast)
    [F] 08:06:34 - [Spell] Cast Kill Command (Kill Command)
    [F] 08:06:35 - [Spell] Cast Cobra Shot (Cobra Shot)
    [F] 08:06:35 - [FightClass] Launch C# code: // System.Threading.Thread.Sleep(1000); wManager.Wow.Helpers.Lua.RunMacroText("/targetlastenemy [help][noexists]"); wManager.Wow.Helpers.Lua.RunMacroText("/cast Fetch"); robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", true);
    [F] 08:06:36 - [FightClass] Launch C# code: // System.Threading.Thread.Sleep(1000); wManager.Wow.Helpers.Lua.RunMacroText("/targetlastenemy [help][noexists]"); wManager.Wow.Helpers.Lua.RunMacroText("/cast Fetch"); robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", true);
    [F] 08:06:37 - [FightClass] Launch C# code: // System.Threading.Thread.Sleep(1000); wManager.Wow.Helpers.Lua.RunMacroText("/targetlastenemy [help][noexists]"); wManager.Wow.Helpers.Lua.RunMacroText("/cast Fetch"); robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", true);
    [F] 08:06:38 - [FightClass] Launch C# code: // System.Threading.Thread.Sleep(1000); wManager.Wow.Helpers.Lua.RunMacroText("/targetlastenemy [help][noexists]"); wManager.Wow.Helpers.Lua.RunMacroText("/cast Fetch"); robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", true);
    [F] 08:06:39 - [FightClass] Launch C# code: // System.Threading.Thread.Sleep(1000); wManager.Wow.Helpers.Lua.RunMacroText("/targetlastenemy [help][noexists]"); wManager.Wow.Helpers.Lua.RunMacroText("/cast Fetch"); robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", true);
    [F] 08:06:41 - [FightClass] Launch C# code: // System.Threading.Thread.Sleep(1000); wManager.Wow.Helpers.Lua.RunMacroText("/targetlastenemy [help][noexists]"); wManager.Wow.Helpers.Lua.RunMacroText("/cast Fetch"); robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", true);
    [F] 08:06:42 - [FightClass] Launch C# code: // System.Threading.Thread.Sleep(1000); wManager.Wow.Helpers.Lua.RunMacroText("/targetlastenemy [help][noexists]"); wManager.Wow.Helpers.Lua.RunMacroText("/cast Fetch"); robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", true);
    [F] 08:06:43 - [FightClass] Launch C# code: // System.Threading.Thread.Sleep(1000); wManager.Wow.Helpers.Lua.RunMacroText("/targetlastenemy [help][noexists]"); wManager.Wow.Helpers.Lua.RunMacroText("/cast Fetch"); robotManager.Helpful.Var.SetVar("OnceAfterCombat_SpellCast", true);
    08:06:43 - [AntiAfk] Disposed.
    08:06:44 - Session statistics:
    Elapsed time: 00h:00m:23s
    Kills: 1 (156/hr)
    Deaths: 0 (0/hr)
    Farms: 0 (0/hr)
    Loots: 0 (0/hr)
    Money/HR: 0 G 00 S 00 C (0 G 00 S 00 C)
    Honor/HR: 0 (0)
    Apexis Crystal/HR: 0 (0)

     

     

    Perhaps an edit of the Loot-a-Rang plugin?

  5. Hello,

    I'd like to cast Fetch on my Hunter pet, but only ONCE after combat.  Right now it casts over and over.  I have it set as:

    Spell Settings

    • combat only - false
    • not a spell, is lua script - true
    • once per target - true (doesn't seem to make any difference)

    Spell Conditions

    • me in combat - false

    Here's the script:

    RunMacroText("/targetlastenemy [help][noexists]")
    RunMacroText("/cast Fetch")

    Any ideas?

  6. 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>

  7. 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>

×
×
  • Create New...