Spell/Song Trainer 1.0

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

overnuker2323
orc pawn
orc pawn
Posts: 18
Joined: Sat Sep 25, 2004 2:06 am

Spell/Song Trainer 1.0

Post by overnuker2323 » Sun Feb 27, 2005 8:16 pm

I've been working on this for awile, I wanted it to work for any class, and work quickly. - edited 2/28, updated to fix prereqs and bard skill names, working on an autoequip for bard instruments while practicing.

Code: Select all

Sub Main
  
  /declare Maxskill int outer
  /declare AlterationSpell outer
  /declare AbjurationSpell outer
  /declare EvocationSpell outer
  /declare DivinationSpell outer
  /declare ConjurationSpell outer
  /declare SingSong outer
  /declare DrumSong outer
  /declare StringSong outer
  /declare WindSong outer
  /declare BrassSong outer

  /varset Maxskill ${Math.Calc[(${Me.Level}*5)+4]}
  

  /if (${Me.Class.Name.Equal[Bard]}) /goto :Brdspells
  /if (${Me.Class.Name.Equal[Beastlord]}) /goto :Bstspells
  /if (${Me.Class.Name.Equal[Cleric]}) /goto :Clrspells
  /if (${Me.Class.Name.Equal[Druid]}) /goto :Druspells
  /if (${Me.Class.Name.Equal[Enchanter]}) /goto :Encspells
  /if (${Me.Class.Name.Equal[Magician]}) /goto :Magspells
  /if (${Me.Class.Name.Equal[Necromancer]}) /goto :Necspells
  /if (${Me.Class.Name.Equal[Paladin]}) /goto :Palspells
  /if (${Me.Class.Name.Equal[Ranger]}) /goto :Rngspells
  /if (${Me.Class.Name.Equal[Shadowknight]}) /goto :Skspells
  /if (${Me.Class.Name.Equal[Shaman]}) /goto :Shmspells
  /if (${Me.Class.Name.Equal[Wizard]}) /goto :Wizspells

:Brdspells
  /varset SingSong Jonthan's Whistling Warsong
  /varset DrumSong Anthem de Arms
  /varset StringSong Hymn of Restoration
  /varset WindSong Tarew`s Aquatic Ayre
  /varset BrassSong Denon`s Disruptive Discord
 /if (${Me.Level}<18) {
    /echo This macro won't function correctly until your ${Me.Class} is level 18.
    /endmacro
  }
/goto :Songreqs

:Bstspells 
  /varset AlterationSpell Minor Healing
  /varset AbjurationSpell Inner Fire
  /varset EvocationSpell Blast of Frost
  /varset DivinationSpell Flash of Light
  /varset ConjurationSpell Sicken
 /if (${Me.Level}<15) {
    /echo This macro won't function correctly until your ${Me.Class} is level 15.
    /endmacro
  }
/goto :Prereqs

:Clrspells 
  /varset AlterationSpell Minor Healing
  /varset AbjurationSpell Courage
  /varset EvocationSpell Strike
  /varset DivinationSpell Flash of Light
  /varset ConjurationSpell Summon Drink
 /if (${Me.Level}<5) {
    /echo This macro won't function correctly until your ${Me.Class} is level 5.
    /endmacro
  }
/goto :Prereqs

:Druspells
  /varset AlterationSpell Minor Healing
  /varset AbjurationSpell Skin like Wood
  /varset EvocationSpell Burst of Flame
  /varset DivinationSpell Sense Animals
  /varset ConjurationSpell Whirling Wind
 /if (${Me.Level}<5) {
    /echo This macro won't function correctly until your ${Me.Class} is level 5.
    /endmacro
  }
/goto :Prereqs

:Encspells
  /varset AlterationSpell Strengthen
  /varset AbjurationSpell Minor Shielding
  /varset EvocationSpell Chaotic Feedback
  /varset DivinationSpell True North
  /varset ConjurationSpell Mesmerize
 /if (${Me.Level}<8) {
    /echo This macro won't function correctly until your ${Me.Class} is level 8.
    /endmacro
  }
/goto :Prereqs

:Magspells 
  /varset AlterationSpell Renew Elements
  /varset AbjurationSpell Minor Shielding
  /varset EvocationSpell Burst of Flame
  /varset DivinationSpell True North
  /varset ConjurationSpell Summon Drink
 /if (${Me.Level}<8) {
    /echo This macro won't function correctly until your ${Me.Class} is level 8.
    /endmacro
  }
/goto :Prereqs

:Necspells
  /varset AlterationSpell Lifetap
  /varset AbjurationSpell Minor Shielding
  /varset EvocationSpell Ward Undead
  /varset DivinationSpell True North
  /varset ConjurationSpell Disease Cloud
 /if (${Me.Level}<4) {
    /echo This macro won't function correctly until your ${Me.Class} is level 4.
    /endmacro
  }
/goto :Prereqs

:Palspells
  /varset AlterationSpell Minor Healing
  /varset AbjurationSpell Courage
  /varset EvocationSpell Cease
  /varset DivinationSpell Flash of Light
  /varset ConjurationSpell Hammer of Wrath
 /if (${Me.Level}<15) {
    /echo This macro won't function correctly until your ${Me.Class} is level 15.
    /endmacro
  }
/goto :Prereqs

:Rngspells
  /varset AlterationSpell Minor Healing
  /varset AbjurationSpell Skin like Wood
  /varset EvocationSpell Flame lick
  /varset DivinationSpell Camouflage
  /varset ConjurationSpell Dance of the fireflies
 /if (${Me.Level}<15) {
    /echo This macro won't function correctly until your ${Me.Class} is level 15.
    /endmacro
  }
/goto :Prereqs

:Skspells
  /varset AlterationSpell Lifetap
  /varset AbjurationSpell Numb the dead
  /varset EvocationSpell Ward Undead
  /varset DivinationSpell Sense the Dead
  /varset ConjurationSpell Disease Cloud
 /if (${Me.Level}<22) {
    /echo This macro won't function correctly until your ${Me.Class} is level 22.
    /endmacro
  }
/goto :Prereqs

:Shmspells
  /varset AlterationSpell Minor Healing
  /varset AbjurationSpell Inner Fire
  /varset EvocationSpell Burst of Flame
  /varset DivinationSpell Flash of Light
  /varset ConjurationSpell Tainted Breath
 /if (${Me.Level}<9) {
    /echo This macro won't function correctly until your ${Me.Class} is level 9.
    /endmacro
  }
/goto :Prereqs

:Wizspells 12
  /varset AlterationSpell Fade
  /varset AbjurationSpell Minor Shielding
  /varset EvocationSpell Shock of Frost
  /varset DivinationSpell True North
  /varset ConjurationSpell Halo of Light
  /if (${Me.Level}<12) {
    /echo This macro won't function correctly until your ${Me.Class} is level 12.
    /endmacro
  }
/goto :Prereqs
:Songreqs
 /if (${Bool[${Me.Book[${SingSong}]}]}==FALSE) {
    /echo You don't have ${SingSong}.  
    /echo Please check the songs listed in the macro for what you need.
    /endmacro
  }

  /if (${Bool[${Me.Book[${DrumSong}]}]}==FALSE) {
    /echo You don't have ${DrumSong}.  
    /echo Please check the songs listed in the macro for what you need.
    /endmacro
  }

  /if (${Bool[${Me.Book[${StringSong}]}]}==FALSE) {
    /echo You don't have ${StringSong}.  
    /echo Please check the songs listed in the macro for what you need.
    /endmacro
  }

  /if (${Bool[${Me.Book[${WindSong}]}]}==FALSE) {
    /echo You don't have ${WindSong}.  
    /echo Please check the songs listed in the macro for what you need.
    /endmacro
  }

  /if (${Bool[${Me.Book[${BrassSong}]}]}==FALSE) {
    /echo You don't have ${BrassSong}.  
    /echo Please check the songs listed in the macro for what you need.
    /endmacro
  }
/goto :Bardsongprep
:Prereqs


 

  /if (${Bool[${Me.Book[${AlterationSpell}]}]}==FALSE) {
    /echo You don't have ${AlterationSpell}.  
    /echo Please check the spells listed in the macro for what you need.
    /endmacro
  }

  /if (${Bool[${Me.Book[${AbjurationSpell}]}]}==FALSE) {
    /echo You don't have ${AbjurationSpell}.  
    /echo Please check the spells listed in the macro for what you need.
    /endmacro
  }

  /if (${Bool[${Me.Book[${EvocationSpell}]}]}==FALSE) {
    /echo You don't have ${EvocationSpell}.  
    /echo Please check the spells listed in the macro for what you need.
    /endmacro
  }

  /if (${Bool[${Me.Book[${DivinationSpell}]}]}==FALSE) {
    /echo You don't have ${DivinationSpell}.  
    /echo Please check the spells listed in the macro for what you need.
    /endmacro
  }

  /if (${Bool[${Me.Book[${ConjurationSpell}]}]}==FALSE) {
    /echo You don't have ${ConjurationSpell}.  
    /echo Please check the spells listed in the macro for what you need.
    /endmacro
  }
     
  /if (${Me.Class.Name.Equal[Magician]}) /goto :Getpet
  /if (${Me.Class.Name.Equal[Shadowknight]}) /goto :Getpet
  /if (${Me.Class.Name.Equal[Necromancer]}) /goto :Getpet
  
/goto :Castingprep

:Getpet
  /notify CastSpellWnd CSPW_Spell5 rightmouseup  
  /if (${Me.Class.Name.Equal[Magician]}) {
    /call Cast "Elementalkin: Water" gem6
  } Else {
    /call Cast "Leering Corpse" gem6
  }
  /goto :Castingprep
:Bardsongprep
  /mem 1 "${SingSong}"
  /delay 5s
  /mem 2 "${DrumSong}"
  /delay 5s
  /mem 3 "${StringSong}"
  /delay 5s
  /mem 4 "${WindSong}"
  /delay 5s
  /mem 5 "${BrassSong}"
  /delay 5s
  /goto :Singing

:Singing
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Skill[Sing]}>${MaxSkill}) /goto :Percussion
  /if (${Me.SpellReady[${SingSong}]})   /Cast "${SingSong}"
  /goto :Singing

:Percussion
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Skill[Percussion Instruments]}>${MaxSkill}) /goto :Stringed
  /if (${Me.SpellReady[${DrumSong}]})   /Cast "${DrumSong}"
  /goto :Percussion

:Stringed
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Skill[Stringed Instruments]}>${MaxSkill}) /goto :Wind
  /if (${Me.SpellReady[${StringSong}]})   /Cast "${StringSong}"
  /goto :Stringed

:Wind
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Skill[Wind Instruments]}>${MaxSkill}) /goto :Wind
  /if (${Me.SpellReady[${WindSong}]})   /Cast "${WindSong}"
  /goto :Wind

:Brass
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Skill[Brass Instruments]}>${MaxSkill}) {
    /echo Skills are all at max!
    /endmacro
  }
  /if (${Me.SpellReady[${BrassSong}]})   /Cast "${BrassSong}"
  /goto :Brass

:Castingprep
 
  /memspell 1 "${AlterationSpell}"
  /delay 5s
  /memspell 2 "${AbjurationSpell}"
  /delay 5s
  /memspell 3 "${EvocationSpell}"
  /delay 5s
  /memspell 4 "${DivinationSpell}"
  /delay 5s
  /memspell 5 "${ConjurationSpell}"
  /delay 5s
  /goto :Alteration


:Manacheck
  /if (${Me.CurrentMana}>100) {
    /goto :Alteration
  } Else {
    /goto :Medup
  }  

:Medup
  /if (${Me.Sitting}) {
  } Else {
    /sit
  }
  /if (${Me.CurrentMana}==${Me.MaxMana}) /goto :Manacheck
  /goto :Medup



:Alteration
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet}  
  /if (${Me.Skill[Alteration]}>${MaxSkill}) /goto :Abjuration
  /if (${Me.SpellReady[${AlterationSpell}]})   /Cast "${AlterationSpell}"
  /goto :Manacheck

:Abjuration
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet}
  /if (${Me.Skill[Abjuration]}>${Maxskill}) /goto :Evocation
  /if (${Me.SpellReady[${AbjurationSpell}]})   /Cast "${AbjurationSpell}" 
  /goto :Manacheck

:Evocation
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet}
  /if (${Me.Skill[Evocation]}>${Maxskill}) /goto :Divination
  /if (${Me.SpellReady[${EvocationSpell}]})   /Cast "${EvocationSpell}"
  /goto :Manacheck
    
:Divination
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet}
  /if (${Me.Skill[Divination]}>${Maxskill}) /goto :Conjuration
  /if (${Me.SpellReady[${DivinationSpell}]})   /Cast "${DivinationSpell}" 
  /goto :Manacheck

:Conjuration
  /if (${Me.Sitting}) /sit off
  /targ ${Me}
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet}
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet}
  /if (${Me.Skill[Conjuration]}>${Maxskill}) {
    /echo All spellcasting skills are at max!
    /endmacro
  }
  /if (${Me.Class.Name.Equal[Ranger]}) {
    /if (${Time.Night}) {
    } Else { 
      /echo It's daytime and you can't summon globes now. 
      /echo Try again when it's nighttime, 
      /echo or get level 30 and use stinging swarm as your conjuration spell.
      /endmacro
    }
  }
  /if (${Me.SpellReady[${ConjurationSpell}]}) {
    /Cast "${ConjurationSpell}"
    /delay 1s
  }
  /if (${Cursor.Name.Find[Halo of Light]}) /destroy
  /if (${Cursor.Name.Find[Globe of Water]}) /destroy
  /if (${Cursor.Name.Find[Firefly Globe]}) /destroy
  /if (${Cursor.Name.Find[Hammer of Wrath]}) /destroy
  
  /goto :Manacheck
 
/Endmacro  
Last edited by overnuker2323 on Mon Feb 28, 2005 6:01 pm, edited 4 times in total.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Feb 28, 2005 12:26 pm

Nice looking macro, however it will never run. The problem is with your prereqs sub. The fact that you have Bard songs and caster spells all in the same list without handling for bards not having spells and casters not having songs means there is no way to successfully pass this sub. Also there are three of the bard songs names spelled wrong the two ` have the wrong one in the name. EQ is habitiual about using ` instead of '. The proper list is
/varset SingSong Jonthan's Whistling Warsong
/varset DrumSong Chant of Battle Anthem de Arms =singing
/varset StringSong Hymn of Restoration
/varset WindSong Tarew`s Aquatic Ayre
/varset BrassSong Denon`s Disruptive Discord

I also rewrote the Prereqs sub to help you out on this.

Code: Select all

:Prereqs 


  /if (${Me.Class.Name.Equal[Bard]}) {
    /if (${Bool[${Me.Book[${SingSong}]}]}==FALSE) { 
    /echo You don't have ${SingSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  }

     /if (${Bool[${Me.Book[${DrumSong}]}]}==FALSE) { 
    /echo You don't have ${DrumSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  }

    /if (${Bool[${Me.Book[${StringSong}]}]}==FALSE) { 
    /echo You don't have ${StringSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

    /if (${Bool[${Me.Book[${WindSong}]}]}==FALSE) { 
    /echo You don't have ${WindSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

    /if (${Bool[${Me.Book[${BrassSong}]}]}==FALSE) { 
    /echo You don't have ${BrassSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  }
 }

  /if (${Me.Class.Name.Equal[Bard]}) /goto :Bardsongprep 

  /if (${Bool[${Me.Book[${AlterationSpell}]}]}==FALSE) { 
    /echo You don't have ${AlterationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${AbjurationSpell}]}]}==FALSE) { 
    /echo You don't have ${AbjurationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${EvocationSpell}]}]}==FALSE) { 
    /echo You don't have ${EvocationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${DivinationSpell}]}]}==FALSE) { 
    /echo You don't have ${DivinationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${ConjurationSpell}]}]}==FALSE) { 
    /echo You don't have ${ConjurationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 
      
  /if (${Me.Class.Name.Equal[Magician]}) /goto :Getpet 
  /if (${Me.Class.Name.Equal[Shadowknight]}) /goto :Getpet 
  /if (${Me.Class.Name.Equal[Necromancer]}) /goto :Getpet 
/goto :Castingprep 
The next thing is that Bard songs require instruments to be equiped. Only higher end bards get all the instrument types on gear that they can equip all at one time so you either need handling for equiping instrument types or something since skill will not go up if one is not equiped.

Enchanter seems to work good after changing Prereq so it not stop on the bard songs.
Edit : correction on spell list.
Last edited by Goofmester1 on Mon Feb 28, 2005 1:37 pm, edited 2 times in total.

Virtuoso65
a hill giant
a hill giant
Posts: 150
Joined: Wed Oct 15, 2003 2:29 pm

Post by Virtuoso65 » Mon Feb 28, 2005 12:58 pm

Very few bard songs require the instrument to equipped, the only two ones that are really used would be songs like invis and hos.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Feb 28, 2005 1:10 pm

But to get Skill ups they do require the instruments else you just get singing skill ups.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Feb 28, 2005 1:27 pm

Also need to make couple more changes for Bard skills

Code: Select all

:Bardsongprep 
  /mem 1 "${SingSong}" 
  /delay 5s 
  /mem 2 "${DrumSong}" 
  /delay 5s 
  /mem 3 "${StringSong}" 
  /delay 5s 
  /mem 4 "${WindSong}" 
  /delay 5s 
  /mem 5 "${BrassSong}" 
  /delay 5s 
  /goto :Singing 

:Singing 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Skill[Sing]}>${MaxSkill}) /goto :Percussion 
  /if (${Me.SpellReady[${SingSong}]})   /Cast "${SingSong}" 
  /goto :Singing 

:Percussion 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Skill[Percussion Instruments]}>${MaxSkill}) /goto :Stringed 
  /if (${Me.SpellReady[${DrumSong}]})   /Cast "${DrumSong}" 
  /goto :Percussion 

The skill check for singing needs to be sing and the one for percussion needs to be percussion instruments.

overnuker2323
orc pawn
orc pawn
Posts: 18
Joined: Sat Sep 25, 2004 2:06 am

cool

Post by overnuker2323 » Mon Feb 28, 2005 6:00 pm

This is the first macro I've ever written, so forgive me if it's got mistakes :)

Thanks for the heads up on the bard part, I hadn't had a chance to test it on my bard since he's only level 14 and can't use the brass yet lol.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Mon Feb 28, 2005 8:00 pm

He won't be able to use it until lvl 18.

That's when bards get Denon's Disruptive Discord.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Feb 28, 2005 8:36 pm

Please understand I only post to help show you how to improve it not to pick on you. There were some more changes I made to get it to work that had to do with max skill checks. On all the Bard checks you have the Maxskill variable as MaxSkill and since the S is capitalized it will never see it as at the maxskill since all letter capitilization is important.

notadruid
a ghoul
a ghoul
Posts: 143
Joined: Mon Dec 08, 2003 6:02 pm

Post by notadruid » Tue Mar 01, 2005 10:26 pm

Update your skill max algorithm to take into account skill caps for high levels using a different formula. (or take the easy way out and set the skill cap to 235 if your formula would make it higher, a la YAST.mac)

Also: add in checks to click off superior buffs blocking the ones you are casting on yourself, otherwise they will not cast.

A check to prevent yourself from suiciding with your evocation nukes would be a good addition as well.
I am not a druid.

TheNewGuy
a snow griffon
a snow griffon
Posts: 307
Joined: Sat Jul 10, 2004 9:33 am
Contact:

Post by TheNewGuy » Wed Mar 02, 2005 7:03 am

A check to prevent yourself from suiciding with your evocation nukes would be a good addition as well.
Just do you skillups in an obscure part of PoK, the Nexus, Guild Lobby, or my personal favorite, the Hottub in the Guild Hall.
[quote="dont_know_at_all"][quote="sybarite"]Um.. search works fine for me (used spell_routines.inc)... Try scrolling down you lazy fuck.

http://www.macroquest2.com/phpBB2/viewtopic.php?t=8964&highlight=spellroutines+inc[/quote]

That's great but he's looking for move.inc, you fucking spastic colon.[/quote]

overnuker2323
orc pawn
orc pawn
Posts: 18
Joined: Sat Sep 25, 2004 2:06 am

Post by overnuker2323 » Fri Mar 11, 2005 9:15 am

I'll write the changes for all your suggestions hopefully today- just got back from Florida spring break, tired as hell :)

User avatar
Soul Hunter
orc pawn
orc pawn
Posts: 13
Joined: Wed May 04, 2005 8:59 am

Post by Soul Hunter » Mon Sep 05, 2005 1:09 pm

I tried this with my SK and it seemed not to do any of the class checks as it went straight to the Bard songs saying that I don't have any of them. I would think it would be a problem with the /if (${Me.Class.Name.Equal if I change the .Equal to a .Find , would that help or would I need to change something else as well? Thanks for reading.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Sep 05, 2005 8:58 pm

Soul Hunter wrote:I tried this with my SK and it seemed not to do any of the class checks as it went straight to the Bard songs saying that I don't have any of them. I would think it would be a problem with the /if (${Me.Class.Name.Equal if I change the .Equal to a .Find , would that help or would I need to change something else as well? Thanks for reading.

Try this:

Code: Select all

Sub Main 
  
  /declare Maxskill int outer 
  /declare AlterationSpell outer 
  /declare AbjurationSpell outer 
  /declare EvocationSpell outer 
  /declare DivinationSpell outer 
  /declare ConjurationSpell outer 
  /declare SingSong outer 
  /declare DrumSong outer 
  /declare StringSong outer 
  /declare WindSong outer 
  /declare BrassSong outer 

  /varset Maxskill ${Math.Calc[(${Me.Level}*5)+4]} 
  

  /if (${Me.Class.Name.Equal[Bard]}) /goto :Brdspells 
  /if (${Me.Class.Name.Equal[Beastlord]}) /goto :Bstspells 
  /if (${Me.Class.Name.Equal[Cleric]}) /goto :Clrspells 
  /if (${Me.Class.Name.Equal[Druid]}) /goto :Druspells 
  /if (${Me.Class.Name.Equal[Enchanter]}) /goto :Encspells 
  /if (${Me.Class.Name.Equal[Magician]}) /goto :Magspells 
  /if (${Me.Class.Name.Equal[Necromancer]}) /goto :Necspells 
  /if (${Me.Class.Name.Equal[Paladin]}) /goto :Palspells 
  /if (${Me.Class.Name.Equal[Ranger]}) /goto :Rngspells 
  /if (${Me.Class.Name.Equal[Shadowknight]}) /goto :Skspells 
  /if (${Me.Class.Name.Equal[Shaman]}) /goto :Shmspells 
  /if (${Me.Class.Name.Equal[Wizard]}) /goto :Wizspells 

:Brdspells 
  /varset SingSong Jonthan's Whistling Warsong 
  /varset DrumSong Anthem de Arms 
  /varset StringSong Hymn of Restoration 
  /varset WindSong Tarew`s Aquatic Ayre 
  /varset BrassSong Denon`s Disruptive Discord 
 /if (${Me.Level}<18) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 18. 
    /endmacro 
  } 
/goto :Songreqs 

:Bstspells 
  /varset AlterationSpell Minor Healing 
  /varset AbjurationSpell Inner Fire 
  /varset EvocationSpell Blast of Frost 
  /varset DivinationSpell Flash of Light 
  /varset ConjurationSpell Sicken 
 /if (${Me.Level}<15) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 15. 
    /endmacro 
  } 
/goto :Prereqs 

:Clrspells 
  /varset AlterationSpell Minor Healing 
  /varset AbjurationSpell Courage 
  /varset EvocationSpell Strike 
  /varset DivinationSpell Flash of Light 
  /varset ConjurationSpell Summon Drink 
 /if (${Me.Level}<5) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 5. 
    /endmacro 
  } 
/goto :Prereqs 

:Druspells 
  /varset AlterationSpell Minor Healing 
  /varset AbjurationSpell Skin like Wood 
  /varset EvocationSpell Burst of Flame 
  /varset DivinationSpell Sense Animals 
  /varset ConjurationSpell Whirling Wind 
 /if (${Me.Level}<5) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 5. 
    /endmacro 
  } 
/goto :Prereqs 

:Encspells 
  /varset AlterationSpell Strengthen 
  /varset AbjurationSpell Minor Shielding 
  /varset EvocationSpell Chaotic Feedback 
  /varset DivinationSpell True North 
  /varset ConjurationSpell Mesmerize 
 /if (${Me.Level}<8) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 8. 
    /endmacro 
  } 
/goto :Prereqs 

:Magspells 
  /varset AlterationSpell Renew Elements 
  /varset AbjurationSpell Minor Shielding 
  /varset EvocationSpell Burst of Flame 
  /varset DivinationSpell True North 
  /varset ConjurationSpell Summon Drink 
 /if (${Me.Level}<8) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 8. 
    /endmacro 
  } 
/goto :Prereqs 

:Necspells 
  /varset AlterationSpell Lifetap 
  /varset AbjurationSpell Minor Shielding 
  /varset EvocationSpell Ward Undead 
  /varset DivinationSpell True North 
  /varset ConjurationSpell Disease Cloud 
 /if (${Me.Level}<4) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 4. 
    /endmacro 
  } 
/goto :Prereqs 

:Palspells 
  /varset AlterationSpell Minor Healing 
  /varset AbjurationSpell Courage 
  /varset EvocationSpell Cease 
  /varset DivinationSpell Flash of Light 
  /varset ConjurationSpell Hammer of Wrath 
 /if (${Me.Level}<15) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 15. 
    /endmacro 
  } 
/goto :Prereqs 

:Rngspells 
  /varset AlterationSpell Minor Healing 
  /varset AbjurationSpell Skin like Wood 
  /varset EvocationSpell Flame lick 
  /varset DivinationSpell Camouflage 
  /varset ConjurationSpell Dance of the fireflies 
 /if (${Me.Level}<15) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 15. 
    /endmacro 
  } 
/goto :Prereqs 

:Skspells 
  /varset AlterationSpell Lifetap 
  /varset AbjurationSpell Numb the dead 
  /varset EvocationSpell Ward Undead 
  /varset DivinationSpell Sense the Dead 
  /varset ConjurationSpell Disease Cloud 
 /if (${Me.Level}<22) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 22. 
    /endmacro 
  } 
/goto :Prereqs 

:Shmspells 
  /varset AlterationSpell Minor Healing 
  /varset AbjurationSpell Inner Fire 
  /varset EvocationSpell Burst of Flame 
  /varset DivinationSpell Flash of Light 
  /varset ConjurationSpell Tainted Breath 
 /if (${Me.Level}<9) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 9. 
    /endmacro 
  } 
/goto :Prereqs 

:Wizspells 12 
  /varset AlterationSpell Fade 
  /varset AbjurationSpell Minor Shielding 
  /varset EvocationSpell Shock of Frost 
  /varset DivinationSpell True North 
  /varset ConjurationSpell Halo of Light 
  /if (${Me.Level}<12) { 
    /echo This macro won't function correctly until your ${Me.Class} is level 12. 
    /endmacro 
  } 
/goto :Prereqs 
:Songreqs 
 /if (${Bool[${Me.Book[${SingSong}]}]}==FALSE) { 
    /echo You don't have ${SingSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${DrumSong}]}]}==FALSE) { 
    /echo You don't have ${DrumSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${StringSong}]}]}==FALSE) { 
    /echo You don't have ${StringSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${WindSong}]}]}==FALSE) { 
    /echo You don't have ${WindSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${BrassSong}]}]}==FALSE) { 
    /echo You don't have ${BrassSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 
/goto :Bardsongprep 
:Prereqs 


  /if (${Me.Class.Name.Equal[Bard]}) { 
    /if (${Bool[${Me.Book[${SingSong}]}]}==FALSE) { 
    /echo You don't have ${SingSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

     /if (${Bool[${Me.Book[${DrumSong}]}]}==FALSE) { 
    /echo You don't have ${DrumSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

    /if (${Bool[${Me.Book[${StringSong}]}]}==FALSE) { 
    /echo You don't have ${StringSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

    /if (${Bool[${Me.Book[${WindSong}]}]}==FALSE) { 
    /echo You don't have ${WindSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 

    /if (${Bool[${Me.Book[${BrassSong}]}]}==FALSE) { 
    /echo You don't have ${BrassSong}.  
    /echo Please check the songs listed in the macro for what you need. 
    /endmacro 
  } 
 } 

  /if (${Me.Class.Name.Equal[Bard]}) /goto :Bardsongprep 

  /if (${Bool[${Me.Book[${AlterationSpell}]}]}==FALSE) { 
    /echo You don't have ${AlterationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${AbjurationSpell}]}]}==FALSE) { 
    /echo You don't have ${AbjurationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${EvocationSpell}]}]}==FALSE) { 
    /echo You don't have ${EvocationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${DivinationSpell}]}]}==FALSE) { 
    /echo You don't have ${DivinationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 

  /if (${Bool[${Me.Book[${ConjurationSpell}]}]}==FALSE) { 
    /echo You don't have ${ConjurationSpell}.  
    /echo Please check the spells listed in the macro for what you need. 
    /endmacro 
  } 
      
  /if (${Me.Class.Name.Equal[Magician]}) /goto :Getpet 
  /if (${Me.Class.Name.Equal[Shadowknight]}) /goto :Getpet 
  /if (${Me.Class.Name.Equal[Necromancer]}) /goto :Getpet 
/goto :Castingprep


:Getpet 
  /notify CastSpellWnd CSPW_Spell5 rightmouseup  
  /if (${Me.Class.Name.Equal[Magician]}) { 
    /call Cast "Elementalkin: Water" gem6 
  } Else { 
    /call Cast "Leering Corpse" gem6 
  } 
  /goto :Castingprep 
:Bardsongprep 
  /mem 1 "${SingSong}" 
  /delay 5s 
  /mem 2 "${DrumSong}" 
  /delay 5s 
  /mem 3 "${StringSong}" 
  /delay 5s 
  /mem 4 "${WindSong}" 
  /delay 5s 
  /mem 5 "${BrassSong}" 
  /delay 5s 
  /goto :Singing 

:Bardsongprep 
  /mem 1 "${SingSong}" 
  /delay 5s 
  /mem 2 "${DrumSong}" 
  /delay 5s 
  /mem 3 "${StringSong}" 
  /delay 5s 
  /mem 4 "${WindSong}" 
  /delay 5s 
  /mem 5 "${BrassSong}" 
  /delay 5s 
  /goto :Singing 

:Singing 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Skill[Sing]}>${MaxSkill}) /goto :Percussion 
  /if (${Me.SpellReady[${SingSong}]})   /Cast "${SingSong}" 
  /goto :Singing 

:Percussion 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Skill[Percussion Instruments]}>${MaxSkill}) /goto :Stringed 
  /if (${Me.SpellReady[${DrumSong}]})   /Cast "${DrumSong}" 
  /goto :Percussion

:Stringed 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Skill[Stringed Instruments]}>${MaxSkill}) /goto :Wind 
  /if (${Me.SpellReady[${StringSong}]})   /Cast "${StringSong}" 
  /goto :Stringed 

:Wind 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Skill[Wind Instruments]}>${MaxSkill}) /goto :Wind 
  /if (${Me.SpellReady[${WindSong}]})   /Cast "${WindSong}" 
  /goto :Wind 

:Brass 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Skill[Brass Instruments]}>${MaxSkill}) { 
    /echo Skills are all at max! 
    /endmacro 
  } 
  /if (${Me.SpellReady[${BrassSong}]})   /Cast "${BrassSong}" 
  /goto :Brass 

:Castingprep 
  
  /memspell 1 "${AlterationSpell}" 
  /delay 5s 
  /memspell 2 "${AbjurationSpell}" 
  /delay 5s 
  /memspell 3 "${EvocationSpell}" 
  /delay 5s 
  /memspell 4 "${DivinationSpell}" 
  /delay 5s 
  /memspell 5 "${ConjurationSpell}" 
  /delay 5s 
  /goto :Alteration 


:Manacheck 
  /if (${Me.CurrentMana}>100) { 
    /goto :Alteration 
  } Else { 
    /goto :Medup 
  }  

:Medup 
  /if (${Me.Sitting}) { 
  } Else { 
    /sit 
  } 
  /if (${Me.CurrentMana}==${Me.MaxMana}) /goto :Manacheck 
  /goto :Medup 



:Alteration 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet}  
  /if (${Me.Skill[Alteration]}>${MaxSkill}) /goto :Abjuration 
  /if (${Me.SpellReady[${AlterationSpell}]})   /Cast "${AlterationSpell}" 
  /goto :Manacheck 

:Abjuration 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet} 
  /if (${Me.Skill[Abjuration]}>${Maxskill}) /goto :Evocation 
  /if (${Me.SpellReady[${AbjurationSpell}]})   /Cast "${AbjurationSpell}" 
  /goto :Manacheck 

:Evocation 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet} 
  /if (${Me.Skill[Evocation]}>${Maxskill}) /goto :Divination 
  /if (${Me.SpellReady[${EvocationSpell}]})   /Cast "${EvocationSpell}" 
  /goto :Manacheck 
    
:Divination 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet} 
  /if (${Me.Skill[Divination]}>${Maxskill}) /goto :Conjuration 
  /if (${Me.SpellReady[${DivinationSpell}]})   /Cast "${DivinationSpell}" 
  /goto :Manacheck 

:Conjuration 
  /if (${Me.Sitting}) /sit off 
  /targ ${Me} 
  /if (${Me.Class.Name.Equal[Magician]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Shadowknight]}) /target ${Me.Pet} 
  /if (${Me.Class.Name.Equal[Necromancer]}) /target ${Me.Pet} 
  /if (${Me.Skill[Conjuration]}>${Maxskill}) { 
    /echo All spellcasting skills are at max! 
    /endmacro 
  } 
  /if (${Me.Class.Name.Equal[Ranger]}) { 
    /if (${Time.Night}) { 
    } Else { 
      /echo It's daytime and you can't summon globes now. 
      /echo Try again when it's nighttime, 
      /echo or get level 30 and use stinging swarm as your conjuration spell. 
      /endmacro 
    } 
  } 
  /if (${Me.SpellReady[${ConjurationSpell}]}) { 
    /Cast "${ConjurationSpell}" 
    /delay 1s 
  } 
  /if (${Cursor.Name.Find[Halo of Light]}) /destroy 
  /if (${Cursor.Name.Find[Globe of Water]}) /destroy 
  /if (${Cursor.Name.Find[Firefly Globe]}) /destroy 
  /if (${Cursor.Name.Find[Hammer of Wrath]}) /destroy 
  
  /goto :Manacheck 
  
/Endmacro

User avatar
Soul Hunter
orc pawn
orc pawn
Posts: 13
Joined: Wed May 04, 2005 8:59 am

Post by Soul Hunter » Tue Sep 06, 2005 12:19 am

I'll test it soon, but what exactly did you change?

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Tue Sep 06, 2005 12:24 am

That macro is mildy painful to read through. There are soooooo many things that are just plain bad form.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]