Page 1 of 1

Auto Defined Spells and Disc (std and rk.)

Posted: Sun Jan 24, 2016 10:43 pm
by moguay
I just do some minor change in my self configuration function of spells and disc. So I thought of you, it must be able to help you.
I thought it will help some of you to avoid unnecessary configurations in ini or others.

The list is created by priority. check if each is on memed.
I leave you can read and understand, if you need other info you know where to find me

Any contribution to complete this list may be welcome

Code: Select all

Sub DefineSpells

    /if (${Me.Class.Name.Equal[Ranger]}) {
        /call DiscCheck "discArchery" "Perfected Archery"
        /call DiscCheck "discArchery" "Trueshot Discipline"

        /call SpellCheck "spellSingleHeal" "Sylvan Spring Rk. <RANK>"

        /call SpellCheck "spellFieryStream" "Fiery Stream"
        /call SpellCheck "spellFirestormofRo" "Firestorm of Ro Rk. <RANK>"
        /call SpellCheck "spellHawksTalon" "Hawk's Talon Rk. <RANK>"
        /call SpellCheck "spellStrengthoftheWildrunner" "Strength of the Wildrunner Rk. <RANK>"
        /call SpellCheck "spellEmpoweringWater" "Empowering Water <RANK>"
    }

    /if (${Me.Class.Name.Equal[Shadow Knight]}) {
        /call SpellCheck "spellCloakofRallos" "Cloak of Rallos"

        /call SpellCheck "spellPetHeal" "Tactical Renewal"
        /call SpellCheck "spellPetHeal" "Renewal of Chaos"

        /call SpellCheck "spellSeethingAnger" "Seething Anger Rk. <RANK>"
        /call SpellCheck "spellBeholdersGaze" "Beholder's Gaze Rk. <RANK>"
        /call SpellCheck "spellGraspofDeath" "Grasp of Death Rk. <RANK>"

        /call SpellCheck "spellDreadGaze" "Dread Gaze"
        /call SpellCheck "spellTerrorofDiscord" "Terror of Discord"
        /call SpellCheck "spellShroudofDiscord" "Shroud of Discord"
        /call SpellCheck "spellDeathMarch" "Death March <RANK>"
    }

    /if (${Me.Class.Name.Equal[Paladin]}) {
        /call SpellCheck "spellStormofRallos" "Storm of Rallos"

        /call SpellCheck "spellGroupHeal" "Blessed Wave Rk. <RANK>"
        /call SpellCheck "spellGroupCurse" "Blessed Wave Rk. <RANK>"
        /call SpellCheck "spellSingleHeal" "Infusion of Faith Rk. <RANK>"
        /call SpellCheck "spellBlessingNameless" "Blessing of Nameless Rk. <RANK>"

        /call SpellCheck "spellLightbringersWrath" "Lightbringer's Wrath"
        /call SpellCheck "spellTrueCommand" "True Command"
        /call SpellCheck "spellVengefulRetribution" "Vengeful Retribution <RANK>"
        /call SpellCheck "spellSilentStorm" "Silent Storm"

        /call SpellCheck "spellBrellsBarrier" "Brell's Barrier Rk. <RANK>"
        /call SpellCheck "spellDivineCalling" "Divine Calling Rk. <RANK>"
        /call SpellCheck "spellSacredWord" "Sacred Word Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Cleric]}) {
        /call SpellCheck "spellGroupHeal" "Word of Strategy"
        /call SpellCheck "spellGroupHeal" "Word of Vivification"

        /call SpellCheck "spellSingleHeal" "Faithful Light Rk. <RANK>"
        /call SpellCheck "spellHealOverTime" "Faithful Blessing Rk. <RANK>"

        /call SpellCheck "spellUnwaveringFaith" "Unwavering Faith <RANK>"

        /call SpellCheck "spellBlessingofHope" "Blessing of Hope Rk. <RANK>"
        /call SpellCheck "spellEndowedTemperance" "Endowed Temperance Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Shaman]}) {
        /call SpellCheck "spellPoisonofMastery" "Poison of Mastery" "Mute"

        /call SpellCheck "spellHealOverTime" "Chaotic Elixir" "Mute"
        /call SpellCheck "spellSingleHeal" "Spiritual Touch Rk. <RANK>"

        /call SpellCheck "spellPetHeal" "Tactical Renewal"
        /call SpellCheck "spellPetHeal" "Renewal of Chaos"

        /call SpellCheck "spellTalismanofMight" "Talisman of Might"
        /call SpellCheck "spellTinyTerror" "Tiny Terror"
        /call SpellCheck "spellMalos" "Malos"
        /call SpellCheck "spellPutridDecay" "Putrid Decay"
        /call SpellCheck "spellSingleSlow" "Turgur's Deadly Poison"

        /call SpellCheck "spellSpiritualSacrifice" "Spiritual Sacrifice Rk. <RANK>"
        /call SpellCheck "spellGladiator" "Gladiator Rk. <RANK>"
        /call SpellCheck "spellAncestralFocus" "Ancestral Focus Rk. <RANK>"
        /call SpellCheck "spellReflectiveForesight" "Reflective Foresight Rk. <RANK>"
        /call SpellCheck "spellSpiritoftheLion" "Spirit of the Lion Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Druid]}) {
        /call SpellCheck "spellHealedFriends" "Healed Friends" "Mute"

        /call SpellCheck "spellSingleHeal" "Nature's Prayer Rk. <RANK>"
        /call SpellCheck "spellHealOverTime" "Chaotic Elixir" "Mute"

        /call SpellCheck "spellPetHeal" "Tactical Renewal"
        /call SpellCheck "spellPetHeal" "Renewal of Chaos"

        /call SpellCheck "spellFlightofEagles" "Flight of Eagles"
        /call SpellCheck "spellGlacierBreath" "Glacier Breath"

        /call SpellCheck "spellImmolationofSolusek" "Immolation of Solusek Rk. <RANK>"
        /call SpellCheck "spellBlazingInferno" "Blazing Inferno Rk. <RANK>"
        /call SpellCheck "spellDeathSwarm" "Death Swarm Rk. <RANK>"
        /call SpellCheck "spellMoonCurse" "Moon Curse Rk. <RANK>"
        /call SpellCheck "spellNeedleSpine" "Needle Spine Rk. <RANK>"
        /call SpellCheck "spellSingleHeal" "Nature's Prayer Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Wizard]}) {
        /call SpellCheck "spellTacticalFire" "Tactical Fire"
        /call SpellCheck "spellTacticalFire" "Ether Flame"

        /call SpellCheck "spellChaoticDetonation" "Chaotic Detonation"

        /call SpellCheck "spellConcussiveStrike" "Concussive Strike Rk. <RANK>"
        /call SpellCheck "spellGelidStrike" "Gelid Strike Rk. <RANK>"
        /call SpellCheck "spellStormStrike" "Storm Strike Rk. <RANK>"
        /call SpellCheck "spellFlameBlaze" "Flame Blaze Rk. <RANK>"
        /call SpellCheck "spellSorcerersVeil" "Sorcerer's Veil Rk. <RANK>"
        /call SpellCheck "spellInsidiousHarvest" "Insidious Harvest Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Necromancer]}) {
        /call SpellCheck "spellGripofVallon" "Grip of Vallon"

        /call SpellCheck "spellPetHeal" "Tactical Renewal"
        /call SpellCheck "spellPetHeal" "Renewal of Chaos"

        /call SpellCheck "spellLureofFieryDeath" "Lure of Fiery Death"
        /call SpellCheck "spellDeathStalker" "Death Stalker"
        /call SpellCheck "spellDreadPyre" "Dread Pyre"
        /call SpellCheck "spellChaoticFuneral" "Chaotic Funeral"
        /call SpellCheck "spellScentofMastery" "Scent of Mastery"

        /call SpellCheck "spellDesolatePyre" "Desolate Pyre Rk. <RANK>"
        /call SpellCheck "spellCobraVenom" "Cobra Venom Rk. <RANK>"
        /call SpellCheck "spellCurseofUndeath" "Curse of Undeath Rk. <RANK>"
        /call SpellCheck "spellGraspoftheReaper" "Grasp of the Reaper Rk. <RANK>"
        /call SpellCheck "spellCryforBlood" "Cry for Blood Rk. <RANK>"
        /call SpellCheck "spellDeathsEntombment" "Death's Entombment Rk. <RANK>"
        /call SpellCheck "spellVoidofDeath" "Void of Death Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Enchanter]}) {
        /call SpellCheck "spellTacticalEnhancement" "Tactical Enhancement" "Mute"

        /call SpellCheck "spellPetHeal" "Tactical Renewal"
        /call SpellCheck "spellPetHeal" "Renewal of Chaos"

        /call SpellCheck "spellWrathofthePhantasmist" "Wrath of the Phantasmist <RANK>"

        /call SpellCheck "spellOverbearingPower" "Overbearing Power Rk. <RANK>"
        /call SpellCheck "spellEuphoricSpasm" "Euphoric Spasm Rk. <RANK>"
        /call SpellCheck "spellEuphoricNoose" "Euphoric Noose Rk. <RANK>"
        /call SpellCheck "spellEntwiningThoughts" "Entwining Thoughts Rk. <RANK>"
        /call SpellCheck "spellVisionsofPower" "Visions of Power Rk. <RANK>"
        /call SpellCheck "spellManaInferno" "Mana Inferno Rk. <RANK>"
        /call SpellCheck "spellInsightoftheSeer" "Insight of the Seer Rk. <RANK>"
        /call SpellCheck "spellSingleMez" "Euphoric Bliss Rk. <RANK>"
        /call SpellCheck "spellGodlyRune" "Godly Rune Rk. <RANK>"

    }

    /if (${Me.Class.Name.Equal[Magician]}) {
        /call SpellCheck "spellVeilofMastery" "Veil of Mastery" "Mute"

        /call SpellCheck "spellPetHeal" "Tactical Renewal"
        /call SpellCheck "spellPetHeal" "Renewal of Chaos"

        /call SpellCheck "spellTorrentofMalsoin" "Torrent of Malsoin Rk. <RANK>"
        /call SpellCheck "spellBoltofFlamingStone" "Bolt of Flaming Stone Rk. <RANK>"
        /call SpellCheck "spellThunderofIce" "Thunder of Ice"
        /call SpellCheck "spellElementalEssence" "Elemental Essence Rk. <RANK>"
        /call SpellCheck "spellFickleInferno" "Fickle Inferno Rk. <RANK>"
        /call SpellCheck "spellCometStrike" "Comet Strike Rk. <RANK>"
        /call SpellCheck "spellSummonOrnamentsoftheGods" "Summon: Ornaments of the Gods Rk. <RANK>"
        /call SpellCheck "spellCovenantoftheFlamewielder" "Covenant of the Flamewielder Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Beastlord]}) {
        /call SpellCheck "spellSingleHeal" "Nature's Beckon Rk. <RANK>"

        /call SpellCheck "spellPetHeal" "Tactical Renewal"
        /call SpellCheck "spellPetHeal" "Renewal of Chaos"

        /call DiscCheck  "discAnimalisticFury" "Animalistic Fury Rk. <RANK>"
        /call SpellCheck "spellNaturesBeckon" "Nature's Beckon Rk. <RANK>"
        /call SpellCheck "spellTouchoftheBeast" "Touch of the Beast Rk. <RANK>"
        /call SpellCheck "spellIceDisruption" "Ice Disruption"
        /call SpellCheck "spellFocusofNature" "Focus of Nature Rk. <RANK>"
        /call SpellCheck "spellSpiritualEndowment" "Spiritual Endowment Rk. <RANK>"
        /call SpellCheck "spellWildAscendance" "Wild Ascendance Rk. <RANK>"
        /call SpellCheck "spellWildCat" "Wild Cat <RANK>"
   /call SpellCheck "spellWildCompanion" "Wild Companion"
    }

    /if (${Me.Class.Name.Equal[Warrior]}) {
        /call DiscCheck "discEvasiveManeuvers" "Evasive Maneuvers" "Mute"

        /call DiscCheck "discCommandingVoice" "Commanding Voice"

        /call DiscCheck "discDefendersVengeance" "Defender's Vengeance Rk. <RANK>"
        /call DiscCheck "discEnragedScowl" "Enraged Scowl Rk. <RANK>"
        /call DiscCheck "discHurricaneSwipe" "Hurricane Swipe Rk. <RANK>"
        /call DiscCheck "discZephyrofStrength" "Zephyr of Strength Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Berserker]}) {
        /call DiscCheck "discCryofStrategy" "Cry of Strategy" "Mute"

        /call DiscCheck "discVengefulAnger" "Vengeful Anger Rk. <RANK>"
        /call DiscCheck "discFlamingHatred" "Flaming Hatred Rk. <RANK>"
        /call DiscCheck "discVengefulFlurry" "Vengeful Flurry Discipline"
        /call DiscCheck "discTempestFlurry" "Tempest Flurry Rk. <RANK>"
        /call DiscCheck "discEnragedVolley" "Enraged Volley Rk. <RANK>"
        /call DiscCheck "discZephyrofStrength" "Zephyr of Strength Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Bard]}) {
        /call DiscCheck "discPerfectBlade" "Perfect Blade" "Mute"

        /call DiscCheck "discMinstrelsGift" "Minstrel's Gift Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Monk]}) {
        /call DiscCheck "discBlackBelt" "Black Belt" "Mute"

        /call DiscCheck "discHermitsInsight" "Hermit's Insight Rk. <RANK>"
        /call DiscCheck "discInfusedChaos" "Infused Chaos Rk. <RANK>"
        /call DiscCheck "discZephyrofStrength" "Zephyr of Strength Rk. <RANK>"
    }

    /if (${Me.Class.Name.Equal[Rogue]}) {
        /call DiscCheck "discMasteryDiscipline" "Mastery Discipline" "Mute"

        /call DiscCheck "discNightFury" "Night Fury Rk. <RANK>"
        /call DiscCheck "discDeathBringer" "Death Bringer Rk. <RANK>"
        /call DiscCheck "discAssassinsChaos" "Assassin's Chaos Rk. <RANK>"
        /call DiscCheck "discZephyrofStrength" "Zephyr of Strength Rk. <RANK>"
    }

/return

Sub SpellCheck(SpellVarName,SpellCheckName,SpellVerbose)

    /if (${Defined[${SpellVarName}]}) /return
   
    /if (!${SpellCheckName.Right[7].Equal[ <RANK>]}) {

        /if (${Me.Book["${SpellCheckName}"]}) {
            /if (!${Defined[${SpellVarName}]}) {
                /declare ${SpellVarName} string outer
                /varset ${SpellVarName} ${SpellCheckName}
                /docommand /${echo} Spell found "${Co}${SpellCheckName}${Cx}"
                /return
            }
        }
       
        /if (${broadcast}==1 && !${SpellVerbose.Equal[Mute]}) /${broadcastTell} Spell notfound "${SpellCheckName}"
        /return
       
    } else {

        | Setup spell Rank
        /varset SpellCheckName ${SpellCheckName.Left[${Math.Calc[${SpellCheckName.Length}-7]}]}

        | Init Rank variable
        /if (!${Defined[SpellRankString]}) /declare SpellRankString string local X

    :StartSpellsNoHighlander
       
        | Check ranked spell on Book
        /if (${Me.Book["${SpellCheckName} ${SpellRankString}"]}) {
            /if (!${Defined[${SpellVarName}]}) {
                /declare ${SpellVarName} string outer
                /varset ${SpellVarName} ${SpellCheckName} ${SpellRankString}
                /docommand /${echo} Spell found "${Co}${SpellCheckName} ${SpellRankString}${Cx}"
                /return
            }
        }

        | Rank increment
        /if (!${SpellRankString.Length}) {
            /varset SpellRankString X
            /goto :StartSpellsNoHighlander
        }
        /if (${SpellRankString.Equal[X]}) {
            /varset SpellRankString VIII
            /goto :StartSpellsNoHighlander
        }
        /if (${SpellRankString.Equal[VIII]}) {
            /varset SpellRankString VII
            /goto :StartSpellsNoHighlander
        }
        /if (${SpellRankString.Equal[VII]}) {
            /varset SpellRankString VI
            /goto :StartSpellsNoHighlander
        }
        /if (${SpellRankString.Equal[VI]}) {
            /varset SpellRankString V
            /goto :StartSpellsNoHighlander
        }
        /if (${SpellRankString.Equal[V]}) {
            /varset SpellRankString IV
            /goto :StartSpellsNoHighlander
        }
        /if (${SpellRankString.Equal[IV]}) {
            /varset SpellRankString III
            /goto :StartSpellsNoHighlander
        }
        /if (${SpellRankString.Equal[III]}) {
            /varset SpellRankString II
            /goto :StartSpellsNoHighlander
        }
        /if (${SpellRankString.Equal[II]}) {
            /varset SpellRankString I
            /goto :StartSpellsNoHighlander
        }

        | Broadcast if not found
        /if (!${${SpellVarName}.Length} && ${SpellRankString.Equal[I]}) {
            /if (${broadcast}==1 && !${SpellVerbose.Equal[Mute]}) /${broadcastTell} Spell notfound "${SpellCheckName} <RANK>"
            /return
        }
    }
/return

Sub DiscCheck(DiscVarName,DiscCheckName,DiscVerbose)

    /if (${Defined[${DiscVarName}]}) /return
   
    /if (!${Defined[countGem]}) /declare countGem int local 0

    /if (!${DiscCheckName.Right[7].Equal[ <RANK>]}) {

        | Check disc on Combat Ability Window
        /for countGem 1 to 8
            /if (${Window[CombatAbilityWnd].Child[CAW_Button${countGem}].Text.Find[${DiscCheckName}]}) {
                /declare ${DiscVarName} string outer
                /varset ${DiscVarName} ${Window[CombatAbilityWnd].Child[CAW_Button${countGem}].Text}
                /docommand /${echo} Disc found "${Co}${${DiscVarName}}${Cx}"
                /return
            }
        /next countGem
       
        /if (${broadcast}==1 && !${DiscVerbose.Equal[Mute]}) /${broadcastTell} Disc notfound or memorized "${DiscCheckName}"
        /return
       
    } else {

        | Setup disc Rank
        /varset DiscCheckName ${DiscCheckName.Left[${Math.Calc[${DiscCheckName.Length}-7]}]}

        | Init Rank variable
        /if (!${Defined[SpellRankString]}) /declare SpellRankString string local X

    :StartDiscNoHighlander
       
        | Check ranked disc on Combat Ability Window
        /for countGem 1 to 8
            /if (${Window[CombatAbilityWnd].Child[CAW_Button${countGem}].Text.Equal[${DiscCheckName} ${SpellRankString}]}) {
                /declare ${DiscVarName} string outer
                /varset ${DiscVarName} ${Window[CombatAbilityWnd].Child[CAW_Button${countGem}].Text}
                /docommand /${echo} Disc found "${Co}${${DiscVarName}}${Cx}"
                /return
            }
        /next countGem

        | Rank increment
        /if (!${SpellRankString.Length}) {
            /varset SpellRankString X
            /goto :StartDiscNoHighlander
        }
        /if (${SpellRankString.Equal[X]}) {
            /varset SpellRankString VIII
            /goto :StartDiscNoHighlander
        }
        /if (${SpellRankString.Equal[VIII]}) {
            /varset SpellRankString VII
            /goto :StartDiscNoHighlander
        }
        /if (${SpellRankString.Equal[VII]}) {
            /varset SpellRankString VI
            /goto :StartDiscNoHighlander
        }
        /if (${SpellRankString.Equal[VI]}) {
            /varset SpellRankString V
            /goto :StartDiscNoHighlander
        }
        /if (${SpellRankString.Equal[V]}) {
            /varset SpellRankString IV
            /goto :StartDiscNoHighlander
        }
        /if (${SpellRankString.Equal[IV]}) {
            /varset SpellRankString III
            /goto :StartDiscNoHighlander
        }
        /if (${SpellRankString.Equal[III]}) {
            /varset SpellRankString II
            /goto :StartDiscNoHighlander
        }
        /if (${SpellRankString.Equal[II]}) {
            /varset SpellRankString I
            /goto :StartDiscNoHighlander
        }

        | Broadcast if not found
        /if (!${${DiscVarName}.Length} && ${SpellRankString.Equal[I]}) {
            /if (${broadcast}==1 && !${DiscVerbose.Equal[Mute]}) /${broadcastTell} Spell notfound "${DiscCheckName} <RANK>"
            /return
        }
    }
/return