Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Detect Magic Debuff and cast spell by ID or name

Featured Replies

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

image.thumb.png.3dec486f41a3ce672632ec2ffa9c77c2.png

image.thumb.png.b53233fdd867e0851b174dd70594895a.png

    <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

 

image.thumb.png.86be81811f214b3a95e06850304d2a7c.png

      <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>

  • 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
 

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.