March 20, 201511 yr It works fine in wrotation, but not in grinder, because the mobs mostly doesn't stand still in the trap (i.e. Talbuks) You need the barn in your Garrison It's optional and off by default You need to add the ID of the mobs you want to catch to the Variable KillBeast. (wowhead.com and the Development tools/Target Info will help) This code enable the Iron Trap in your Fightclass. Happy farming <FightClassSpell> <SpellName>--Iron Trap</SpellName> <FightClassConditions> <FightClassCondition> <ContionType>LuaScript</ContionType> <Param xsi:type="FightClassConditionLua"> <LuaScript> local function UseContainerItemByName(search) --[[ needed below ]] local found=nil; for bag = 0,4 do for slot = 1,GetContainerNumSlots(bag) do local item = GetContainerItemLink(bag,slot) if (item and item:find(search)) then if (GetContainerItemCooldown(bag,slot)==0) then UseContainerItem(bag,slot) found=1; end end end end return found; end if not (IsStealthed()) and UnitExists("target") and not UnitIsFriend("player", "target") then local guid=UnitGUID("target"); local type, zero, serverId, instanceId, zoneId, npcId, spawnUid = strsplit("-",guid); npcId=tonumber(npcId); --[[ Add your Mob-IDs to the list ]] local KillBeast="87021,87020" --[[ list of ID's of Mobs to trap, comma seperated ]] local maxHealth=95; --[[ start Trap at 95% of health for non-elite Mobs ]] if (UnitClassification("target") == "elite") then maxHealth=55 --[[ start Trap at 55% of health if it is an Elite Mob ]] end if not (UnitIsPVP("target")) and ((UnitHealth("target") / UnitHealthMax("target") * 100) < maxHealth ) and (string.find(','..KillBeast..',',','..npcId..',')) then if (UnitName("player")==UnitName("targettarget")) then --[[ no Ninjaing, my Mob, my target, my trap ]] result=true if not (UseContainerItemByName(":115010:")) then --[[ Level 3 Trap must be equiped and ready]] if not (UseContainerItemByName(":115009:")) then --[[ Level 2 Trap .. ]] if not (UseContainerItemByName(":113991:")) then --[[ Level 1 Trap .. ]] result=false end end end else --[[ the fight is over, or another User Fight to them ]] ClearTarget(); end end end </LuaScript> <VarRet>result</VarRet> <ValueRet>true</ValueRet> </Param> </FightClassCondition> </FightClassConditions> <Priority>99</Priority> <CheckIfKnowUsableDistance>false</CheckIfKnowUsableDistance> <CheckIfView>false</CheckIfView> <AddToSettings>true</AddToSettings> <NotSpellIsLuaScript>true</NotSpellIsLuaScript> </FightClassSpell>
July 8, 20169 yr 1 minute ago, ildoctore said: hi, thanks for the code! can you tell me where i need to copy it? thanks you! Into your xml FightClass.
July 26, 20169 yr i wanna Breezestrider Talbuk but i cant figure id out. where is it? http://www.wowhead.com/npc=78278/breezestrider-talbuk#drops
Create an account or sign in to comment