Page 5 of 5

Posted: Fri Apr 14, 2006 3:53 pm
by matter68
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.

Posted: Fri Apr 14, 2006 5:17 pm
by Yunto?
What spell, in what zone?

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

Posted: Wed May 17, 2006 1:12 am
by jamesly
nevermind I'm an idiot and was using wordpad not notepad =\

Posted: Fri Aug 04, 2006 3:02 pm
by brianman
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

Posted: Thu Sep 14, 2006 7:46 am
by 010100110
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.

Posted: Wed Jan 03, 2007 2:13 pm
by chrisben
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

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

Posted: Wed Jan 03, 2007 7:56 pm
by binkey994
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.

Posted: Fri Jan 12, 2007 5:43 pm
by Hobbyist
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 

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

Posted: Mon Jul 13, 2015 8:37 pm
by MyEmQueTwo
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.