Bugreporter 93 Posted March 20, 2015 Share Posted March 20, 2015 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> Krack3n, Droidz and highco 3 Link to comment https://wrobot.eu/forums/topic/2095-iron-trap-how-to-use-it/ Share on other sites More sharing options...
ildoctore 17 Posted July 8, 2016 Share Posted July 8, 2016 hi, thanks for the code! can you tell me where i need to copy it? thanks you! Link to comment https://wrobot.eu/forums/topic/2095-iron-trap-how-to-use-it/#findComment-15357 Share on other sites More sharing options...
Runaro 160 Posted July 8, 2016 Share Posted July 8, 2016 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. Link to comment https://wrobot.eu/forums/topic/2095-iron-trap-how-to-use-it/#findComment-15358 Share on other sites More sharing options...
ogt8211 0 Posted July 26, 2016 Share Posted July 26, 2016 i wanna Breezestrider Talbuk but i cant figure id out. where is it? http://www.wowhead.com/npc=78278/breezestrider-talbuk#drops Link to comment https://wrobot.eu/forums/topic/2095-iron-trap-how-to-use-it/#findComment-16147 Share on other sites More sharing options...
Bugreporter 93 Posted July 28, 2016 Author Share Posted July 28, 2016 Take a look at the URL , you posted: www.wowhead.com/npc=78278/.... Link to comment https://wrobot.eu/forums/topic/2095-iron-trap-how-to-use-it/#findComment-16210 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now