Jhin 2 Posted September 12, 2016 Share Posted September 12, 2016 Hello, I want to create a small fightclass for BDruid pvp, but I don't know how to dot everyone in a 45y radius with Moonfire and Sunfire :/ any help please ? :) ps I am very beginner in lua programming. Link to comment Share on other sites More sharing options...
galion 0 Posted September 21, 2016 Share Posted September 21, 2016 If you find an answer to this let me know please, looking for a multi dot fighter for Priest can't seem to get any answers on it. Link to comment Share on other sites More sharing options...
Bugreporter 92 Posted September 26, 2016 Share Posted September 26, 2016 I've add a routine in my Rogue Assa Profile. But be aware, you will lose your main target. And @Jhin : You dont want pull all Targets in a range of 45 yard ! Thats a hunter spell and is called barrage. ;-) 2. Line: check if we have a target and if it is in range (in this case a Meele spell, Rupture). Use your spell with the smallest range, that you want provide 3+4 Line: Other Buffs that we want check 6.Line (from the bottom): Check if the DeBuffs are on the target up and running and if they are run long enough. In this case rupture must run longer then 6 seconds 5.Line (from the bottom); next target will be selected In the next Code window i've pasted the XML-Snippet to cut-and-past-and-change it in you fightclass local Rupture=GetSpellInfo(1943) if UnitExists("target") and not UnitIsFriend("player", "target") and (IsSpellInRange(Rupture,"target")==1) then local CripplingPoison=GetSpellInfo(3408) local DeadlyPoison=GetSpellInfo(2823) local t=GetTime(); local buffexp,buff,buffcnt,bufftyp={},{},{},{}; local i,n,c,y,x,id,found=0; repeat i=i+1; n,_,_,c,y,_,x,_,_,_,id=UnitAura("target",i,"PLAYER HARMFUL"); if n then buffcnt[n]=c bufftyp[n]=y buffexp[n]=x-t buff[n]=id; found=true end until (not n) or (i==40); if found then if (buff[Rupture] and buffexp[Rupture] > 6) and buff[CripplingPoison] and buff[DeadlyPoison] then TargetNearestEnemy() result=true end end end; XML-snippet: (dont forget to change the value in "HostileUnitNear") <FightClassSpell> <FightClassConditions> <FightClassCondition> <ContionType>HostileUnitNear</ContionType> <Param xsi:type="FightClassConditionUnitNear"> <Number>2</Number> <Type>BiggerOrEqual</Type> <Radius>5</Radius> </Param> </FightClassCondition> <FightClassCondition> <ContionType>LuaScript</ContionType> <Param xsi:type="FightClassConditionLua"> <LuaScript> local Rupture=GetSpellInfo(1943) if UnitExists("target") and not UnitIsFriend("player", "target") and (IsSpellInRange(Rupture,"target")==1) then local CripplingPoison=GetSpellInfo(3408) local DeadlyPoison=GetSpellInfo(2823) local t=GetTime(); local buffexp,buff,buffcnt,bufftyp={},{},{},{}; local i,n,c,y,x,id,found=0; repeat i=i+1; n,_,_,c,y,_,x,_,_,_,id=UnitAura("target",i,"PLAYER HARMFUL"); if n then buffcnt[n]=c bufftyp[n]=y buffexp[n]=x-t buff[n]=id; found=true end until (not n) or (i==40); if found then if (buff[Rupture] and buffexp[Rupture] > 6) and buff[CripplingPoison] and buff[DeadlyPoison] then TargetNearestEnemy() result=true end end end; </LuaScript> <VarRet>result</VarRet> <ValueRet>true</ValueRet> </Param> </FightClassCondition> </FightClassConditions> <SpellName>--NextEnemy</SpellName> <Priority>2</Priority> <CheckIfKnow>false</CheckIfKnow> <CheckIfSpellUsable>false</CheckIfSpellUsable> <CheckSpellDistance>false</CheckSpellDistance> <CheckIfView>false</CheckIfView> <AddToSettings>true</AddToSettings> <AddToSettingsActiveByDefault>true</AddToSettingsActiveByDefault> <NotSpellIsLuaScript>true</NotSpellIsLuaScript> </FightClassSpell> knights and Jhin 2 Link to comment Share on other sites More sharing options...
adultperson 3 Posted February 2, 2018 Share Posted February 2, 2018 I am super new to this coding and trying to make this work but can't really. What is it that I am doing wrong? Trying to apply Curse of Agony and Corruption to several targets. PVP Warlock test dott.xml Link to comment 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