Jump to content

Recommended Posts

This "spell" crate restored artefacts . No full bags anymore (not with pandarian or draenor artefacts)

    <FightClassSpell>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>LuaScript</ContionType>
          <Param xsi:type="FightClassConditionLua">
            <LuaScript>
local function UseContainerItemByIDList(search)   --[[ needed below ]]
  local found=nil;
  for bag = 0,4 do
    for slot = 1,GetContainerNumSlots(bag) do
      local itemLink = GetContainerItemLink(bag,slot)
      if itemLink then
        local _, _, Color, Ltype, Id, Enchant, Gem1, Gem2, Gem3, Gem4, Suffix, Unique, LinkLvl, Name = string.find(itemLink,"|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*):?(%d*):?(%-?%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?")      
          if Id then
          search=','..search..',';
          if (search:find(","..Id..",")) then
            if (GetContainerItemCooldown(bag,slot)==0) then
                UseContainerItem(bag,slot)
                found=1;
            end
          end;
        end
      end
    end
  end
  return found;
end


if (GetUnitSpeed("player") == 0) and not (UnitCastingInfo("player")) and not (UnitChannelInfo("player")) and not (UnitAffectingCombat("player")) and not (IsFlying())  and not (IsFalling())  and not (IsResting())  and not (UnitIsAFK("player")) then
    if not IsStealthed() then 
        local goodMountBuff={164222,165803}
        local goodMount=false
        for n=1,#goodMountBuff do goodMount=goodMount or (UnitBuff("player",GetSpellInfo(goodMountBuff[n]))~=nil); end
        if (not IsMounted()) or goodMount then
            --[[ Add your Mob-IDs to the list ]]
            local archlist="114141,114143,114145,114147,114149,114151,114153,114155,114157,114159,114161,114163,114165,114167,114169,114171,114173,114175,114177,114179,114181,114183,114185,114187,114189,114190,114191,114192,114193,114194,114195,114196,114197,114198,114199,114200,114201,114202,114203,114204,114205,114206,114207,79896,79897,79898,79899,79900,79901,79902,79903,79904,79905,79908,79909,79910,79911,79912,79913,79914,79915,79916,79917,95375,95376,95377,95378,95379,95380,95381,95382"
            if (UseContainerItemByIDList(archlist)) then            
               result=true;
            end
        end
    end;
end
</LuaScript>
            <VarRet>result</VarRet>
            <ValueRet>true</ValueRet>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <SpellName>--Use Item, if exist</SpellName>
      <Priority>1</Priority>
      <CombatOnly>false</CombatOnly>
      <CastIfMounted>true</CastIfMounted>
      <CheckIfKnow>false</CheckIfKnow>
      <CheckIfSpellUsable>false</CheckIfSpellUsable>
      <CheckSpellDistance>false</CheckSpellDistance>
      <CheckIfView>false</CheckIfView>
      <AddToSettings>true</AddToSettings>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
    </FightClassSpell>

Link to comment
https://wrobot.eu/forums/topic/2306-add-this-to-your-fightclass-auto-crate/
Share on other sites

  • 7 months later...
  • 1 month later...
4 hours ago, Fyuri13 said:

I would also like to know how to add this to my fight class, xml editor?  Fight Class editor? where does it go, how to you set it up?

use a notepad. If you don't have any experience from xml just ask someone to do it for you

19 hours ago, BetterSister said:

use a notepad. If you don't have any experience from xml just ask someone to do it for you

ok for anyone else trying to add this, i figured it out.  You have to also go into the fight class settings on the general settings tab and turn on the option that says use item, if exists.  Works great

  • 3 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
×
×
  • Create New...