YAST - Yet Another Spell Trainer - none struck my fancy so..

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

Moderator: MacroQuest Developers

matter68
a lesser mummy
a lesser mummy
Posts: 45
Joined: Tue Apr 04, 2006 6:37 pm

Post by matter68 » Fri Apr 14, 2006 3:53 pm

Well I put SpellCast.ini into the main folder. Now when I try the macro it casts really fast, says spell didnt hold and casts again, often when its not even a third done with the first cast. Skill not increasing either. Still working on it though.

Yunto?
a grimling bloodguard
a grimling bloodguard
Posts: 502
Joined: Sat Nov 19, 2005 12:05 pm

Post by Yunto? » Fri Apr 14, 2006 5:17 pm

What spell, in what zone?

Detrimental spells cannot be cast in the Guild Hall, Nexus, or PoK

jamesly
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Mar 31, 2005 8:13 pm

Post by jamesly » Wed May 17, 2006 1:12 am

nevermind I'm an idiot and was using wordpad not notepad =\

brianman
a ghoul
a ghoul
Posts: 114
Joined: Mon Jun 07, 2004 7:46 am

Post by brianman » Fri Aug 04, 2006 3:02 pm

Here's my take on this.

Code: Select all

#Event SkillUp  "You have become better at #1#! (#2#)"
Sub Main
    /declare i              int     local   0
    /declare c              int     local   0
    /declare MaxSkill       int     local   0

    /declare SpellSkill[5]  string  local
    /varset SpellSkill[1] Abjuration
    /varset SpellSkill[2] Alteration
    /varset SpellSkill[3] Conjuration
    /varset SpellSkill[4] Divination
    /varset SpellSkill[5] Evocation

    /varcalc MaxSkill ${Me.Level}*5+5
    /if (${MaxSkill} > 235) /varset MaxSkill 235

    /for i 1 to ${SpellSkill.Size}
        /for c 1 to 8
            /if (${Me.Gem[${c}].Skill.Equal[${SpellSkill[${i}]}]}) /goto :Check
        /next c
        /echo [${Time.Time24}] No ${SpellSkill[${i}]} spells memorized, continuing...
        /next i

        :Check
        /if (${Me.Skill[${SpellSkill[${i}]}]} >= ${MaxSkill}) {
            /echo [${Time.Time24}] Your ${SpellSkill[${i}]} skill is already at it's current maximum: ${Me.Skill[${SpellSkill[${i}]}]}...
        } else {
            /echo [${Time.Time24}] Casting ${Me.Gem[${c}].Name} to skill up ${SpellSkill[${i}]}.
            /echo [${Time.Time24}] Current skill in ${SpellSkill[${i}]}: ${Me.Skill[${SpellSkill[${i}]}]}.
            :Cast
                /doevents
                /if ((${Me.Gem[${c}].TargetType.Equal[Single]} || ${Me.Gem[${c}].TargetType.Equal[Targeted AE]}) && !${Target.ID}) /target myself
                /if (${Me.AFK}) /afk
                /if (${Me.CurrentMana} <= ${Me.Gem[${c}].Mana}) {
                    /call MedBreak
                }
                /if (${Me.PctHPs} < 20) {
                    /call HealBreak
                }
                /if (${Me.SpellReady[${c}]}) {
                    /if (!${Me.Standing}) /stand
                    /cast ${c}
                    /delay ${Math.Calc[${Me.Gem[${c}].MyCastTime}*10+10].Int} (!${Me.Casting.ID})
                    /if (${Me.Standing}) /sit
                }
                :Cursor
                /if (${Cursor.ID}) {
                    /autoinventory
                    /goto :Cursor
                }
            /if (${Me.Skill[${SpellSkill[${i}]}]} < ${MaxSkill}) /goto :Cast
        }
    /next i
    /echo [${Time.Time24}] Done..
    /call MedBreak
    /endmacro
/return

Sub MedBreak
    /if (!${Me.AFK}) /afk
    :Loop
        /if (${Me.Standing}) /sit
        /delay 6s
    /if (${Me.CurrentMana} < ${Me.MaxMana}) /goto :Loop
/return

Sub HealBreak
    /if (!${Me.AFK}) /afk
    :Loop
        /if (${Me.Standing}) /sit
        /delay 6s
    /if (${Me.CurrentHPs} < ${Me.MaxHPs}) /goto :Loop
/return

Sub Event_SkillUp(str Line, string TheSkill, int Amount)
    /echo [${Time.Time24}] ${TheSkill} increased - ${Amount}...
/return

010100110
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Sep 14, 2006 7:41 am

Post by 010100110 » Thu Sep 14, 2006 7:46 am

I think Im ressing a old post...but this macro still works like a charm. I shortened the /tell delay to 1 min instead of 10 and removed the /target self from the macro because I sometimes train on my pet but overall....very nice and still very useful.

chrisben
orc pawn
orc pawn
Posts: 25
Joined: Mon Dec 18, 2006 12:34 am

Post by chrisben » Wed Jan 03, 2007 2:13 pm

Nice macro, I modified it a little bit.

1) get the skillcap's directly instead of calculating them (works with new spellcaps now)
2) Destroy no rent items (previous behavior thought illogical has been aparently corrected.)
3) I'm not setting this to sit inbetween casts because my character has a mount. I'm sure if you want this behavior you can copy out of the above post.

Code: Select all

#chat tell
#event lang "tells you"

#include SpellCast.inc

Sub Main

    /declare currentSpell
    /declare maxSkill
    /declare skillName
    /declare spellName
   
    /varset currentSpell 1

    /target myself
   
    :nextSpell
        /echo currentspell=${currentSpell}
        /echo casting=${Me.Gem[${currentSpell}]}
       
        /if ( ${Bool[${Me.Gem[${currentSpell}]}]} ) {
            /varset skillName ${Me.Gem[${currentSpell}].Skill}
            /varset maxSkill ${Skill[${Me.Gem[${currentSpell}].Skill}].SkillCap}
            /echo maxSkill=${maxSkill}
            :castSpell
                /doevents
                /if ( ${Me.PctMana}<20) {
                    /sit on
                    /call MedBreak
                }
                /echo ${skillName}=${Me.Skill[${skillName}]}
                /if ( ${Me.Skill[${skillName}]} >= ${maxSkill} ) {
                    /varset currentSpell ${Math.Calc[${currentSpell}+1]}
                    /goto :nextSpell
                }
                /call CheckGM
                /call cast "${Me.Gem[${currentSpell}]}"
               
                :checkCursor
                /if (${Cursor.ID}) {
                   /if (!${Cursor.NoRent}) {
                      /autoinv
                   } else {
                       /destroy
                    }
                    /goto :checkCursor
                }
            /goto :castSpell
        }
   
    /sit
    /call MedBreak
    /camp
/return

Sub CheckGM
    :GMCheck
    /if (${Bool[${Spawn[gm].ID}]}) {
       /echo 'Cast Macro' A GM or Guide has been detected in the zone,  the macro will resume  when the zone is clear of GM/Guides
       /delay 600s
       /goto :GMCheck
    }
/return

Sub Event_Chat
  /echo Got a tell, pausing for 1 minute
  /delay 60s
/return

Sub Event_Lang
  /echo Got a tell, pausing for 1 minute
  /delay 60s
/return

Sub MedBreak
    /stand
    /sit
    :MedMore
        /delay 2s
        /if (${Me.CurrentMana}<${Me.MaxMana}) /goto :MedMore
/return

binkey994
orc pawn
orc pawn
Posts: 11
Joined: Sat Nov 26, 2005 10:18 pm

I liked the sit behavior of this macro....

Post by binkey994 » Wed Jan 03, 2007 7:56 pm

For those of us not using horses, the sit behavior in the old macro serves a purpose.

Everytime you sit, even for a small amount, you get a chance for meditate skillups. Using other macros, my spells would be maxxes, but meditate wouldn't. With this macro, my meditate skill is always maxxed at the end of the run.

Maybe not important to others, but important to me.

Hobbyist
decaying skeleton
decaying skeleton
Posts: 4
Joined: Fri Jan 12, 2007 5:35 pm

Post by Hobbyist » Fri Jan 12, 2007 5:43 pm

Here are a few modifications to reduce spam:

Added currentSkill and castCount variables and performs a check for skillup before reporting new skill level.

Code: Select all

#chat tell
#event lang "tells you"

#include SpellCast.inc

Sub Main

    /declare currentSpell
    /declare maxSkill
    /declare skillName
    /declare spellName
    /declare currentSkill
    /declare castCount
   
    /varset currentSpell 1
    /varset castCount 0

    /target myself
   
    :nextSpell
        /echo currentspell=${currentSpell}
        /echo casting=${Me.Gem[${currentSpell}]}
       
        /if ( ${Bool[${Me.Gem[${currentSpell}]}]} ) {
            /varset skillName ${Me.Gem[${currentSpell}].Skill}
	    /varset currentSkill ${Me.Skill[${skillName}]}
	    /varset maxSkill ${Skill[${Me.Gem[${currentSpell}].Skill}].SkillCap}
	    /echo maxSkill=${maxSkill}
	    /echo ${skillName} starting at ${currentSkill}

            :castSpell
                /doevents
                /if ( ${Me.PctMana}<20) {
                    /sit on
                    /call MedBreak
                }
		/if ( ${Me.Skill[${skillName}]} > ${currentSkill} ) {
			/varset currentSkill ${Me.Skill[${skillName}]}
			/echo ${skillName} improved to ${currentSkill} after ${castCount} cast(s)!
			/varset castCount 0
		}
|                /echo ${skillName}=${Me.Skill[${skillName}]}
                /if ( ${Me.Skill[${skillName}]} >= ${maxSkill} ) {
                    /varset currentSpell ${Math.Calc[${currentSpell}+1]}
                    /goto :nextSpell
                }
                /call CheckGM
                /call cast "${Me.Gem[${currentSpell}]}"
		/varset castCount ${Math.Calc[${castCount}+1]}
               
                :checkCursor
                /if (${Cursor.ID}) {
                   /if (!${Cursor.NoRent}) {
                       /autoinv
                   } else {
                       /destroy
                   }
                   /goto :checkCursor
                }
            /goto :castSpell
        }
   
    /sit
    /call MedBreak
    /camp
/return

Sub CheckGM
    :GMCheck
    /if (${Bool[${Spawn[gm].ID}]}) {
       /echo 'Cast Macro' A GM or Guide has been detected in the zone,  the macro will resume  when the zone is 

clear of GM/Guides
       /delay 600s
       /goto :GMCheck
    }
/return

Sub Event_Chat
  /echo Got a tell, pausing for 10 minutes
  /delay 600s
/return

Sub Event_Lang
  /echo Got a tell, pausing for 10 minutes
  /delay 600s
/return

Sub MedBreak
    /stand
    /sit
    :MedMore
        /delay 2s
        /if (${Me.CurrentMana}<${Me.MaxMana}) /goto :MedMore
/return 

MyEmQueTwo
orc pawn
orc pawn
Posts: 14
Joined: Mon Jul 13, 2015 7:15 pm

Re: YAST - Yet Another Spell Trainer - none struck my fancy

Post by MyEmQueTwo » Mon Jul 13, 2015 8:37 pm

Holy necro batman! My apologies =)

Checking @Hobbyist version, the castCount is not accurate. I'm not sure how t fix that but I might poke at it some since I am learning stuff myself.