April 21, 20233 yr Working in XML and cannot get this to work. I have tried both lua script and C#code and still not working. First the lua script <FightClassSpell> <FightClassConditions> <FightClassCondition> <ContionType>LuaScript</ContionType> <Param xsi:type="FightClassConditionLua"> <LuaScript>anyCurse = false; for i=1,40 do local name, rank, icon, count, debuffAuraType = UnitAura("player", i); if debuffAuraType == "Magic" then anyCurse = true; return; end end</LuaScript> <VarRet>anyCurse</VarRet> <ValueRet>true</ValueRet> </Param> </FightClassCondition> </FightClassConditions> <SpellName>CastSpellByID(100503);</SpellName> <Priority>13</Priority> <CombatOnly>false</CombatOnly> <CheckIfKnow>false</CheckIfKnow> <CheckIfSpellUsable>false</CheckIfSpellUsable> <CheckSpellDistance>false</CheckSpellDistance> <CheckIfView>false</CheckIfView> <NotSpellIsLuaScript>true</NotSpellIsLuaScript> <Debug>true</Debug> <WaitDuringCasting>false</WaitDuringCasting> </FightClassSpell> Ive also tried this <FightClassConditions> <FightClassCondition> <ContionType>LuaScript</ContionType> <Param xsi:type="FightClassConditionLua"> <LuaScript>anyCurse = false; for i=1,40 do local name, rank, icon, count, debuffAuraType = UnitAura("player", i); if name and debuffAuraType and debuffAuraType == "Magic" then anyCurse = true; return; end end</LuaScript> <VarRet>anyCurse</VarRet> <ValueRet>true</ValueRet> </Param> </FightClassCondition> </FightClassConditions> <SpellName>CastSpellByID(100503);</SpellName> <Priority>13</Priority> <CombatOnly>false</CombatOnly> <CheckIfKnow>false</CheckIfKnow> <CheckIfSpellUsable>false</CheckIfSpellUsable> <CheckSpellDistance>false</CheckSpellDistance> <CheckIfView>false</CheckIfView> <NotSpellIsLuaScript>true</NotSpellIsLuaScript> <Debug>true</Debug> <WaitDuringCasting>false</WaitDuringCasting> </FightClassSpell>
April 22, 20233 yr Author [D] 08:45:24 - [FightClass] CastSpellByID(100503); - NeedToRun time to execute: 27 [D] 08:45:24 - [FightClass] CastSpellByID(100503); - NeedToRun = false - condition [D] 08:45:24 - [FightClass] CastSpellByID(100503); - NeedToRun time to execute: 33 [D] 08:45:24 - [FightClass] CastSpellByID(100503); - NeedToRun = false - condition
April 23, 20233 yr When you run your Lua code (in "dev... tools"), it works ? try to add a print in you code to debug it, like that : for i=1,40 do local name, rank, icon, count, debuffAuraType = UnitAura("player", i); if debuffAuraType == "Magic" then anyCurse = true; print("true") return; end end print("false")
April 26, 20233 yr Author Its not working. The debuff is custom so i dont think its being picked up. How can i adapt this to use spellID which i know. I can just write a couple of options for different spell ids I confirmed it worked with other magic but not these custom spells.
Create an account or sign in to comment