Trainspell.mac (Working) Spell Trainer.

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

Moderator: MacroQuest Developers

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Trainspell.mac (Working) Spell Trainer.

Post by Fuergrissa » Sun May 09, 2004 3:53 pm

Mem all your spells first, make sure you include *** SpellCast.inc ***

or

Spell_routines.inc ***

Which ever you prefer to use

Once you reach your max skill level the macro will end.

*** It only casts what you have memmed ***

Code: Select all

| trainspell.mac
| Written by Fuergrissa V2.0

#Define ArcaneMax 235
#include spellcast.inc
|#include spell_routines.inc 

Sub Main
   /declare ArcaneLevel int outer
   /declare SpellName string outer
   /declare GemNumber int outer
   /declare WhatSkill string outer
   /declare Maxxed int outer
   /varcalc ArcaneLevel ${Me.Level}*5+5
   /echo Your Spell Cap is ${ArcaneLevel}
   /if (${ArcaneLevel}>ArcaneMax) /varset ArcaneLevel ArcaneMax
   /echo Your Current Spell Cap is ${ArcaneLevel}
   /varset GemNumber 0
   /varset Maxxed 0
   /varset SpellName ""
   /varset WhatSkill ""
 :TrainingLoop
   /if (${Me.PctMana}<10) /goto :SitDown
   /if (${Cursor.ID}) /autoinv
   /goto :CastSpell

 :SitDown
   /echo Mana at ${Me.PctMana}% Medding till over 98%
 :MedLoop
   /if (${Me.State.Equal[STAND]}) /sit
   /if (${Me.PctMana}>98) /goto :FullMana
   /goto :MedLoop
   /return
 :FullMana
   /echo Mana at ${Me.PctMana}% Starting Casting Again.
   /if (${Me.State.Equal[SIT]}) /stand
 :CastSpell
   /Varcalc GemNumber ${GemNumber}+1
   /if (${GemNumber}>8) /varset GemNumber 1
   /varset SpellName ${Me.Gem[${GemNumber}]}
   /if (!${Me.Gem[${SpellName}]}) /goto :TrainingLoop
   /goto :TestSkill
 :StartCasting
   /target myself
   /echo Casting ${SpellName} from GemSlot ${GemNumber} of Type ${Spell[${SpellName}].Skill} (${Me.Skill[${Spell[${SpellName}].Skill}]})
   /varset Maxxed 0
   /call cast "${SpellName}"
   /goto :TrainingLoop
   /return
 :TestSkill
   /if (${Me.Skill[${Spell[${SpellName}].Skill}]}==${ArcaneLevel}) /goto :TooHigh
   /goto :StartCasting
   /return
 :TooHigh
   /varset WhatSkill ${Spell[${SpellName}].Skill}
   /varcalc Maxxed ${Maxxed}+1
   /echo You cannot Increase ${WhatSkill} anymore.
   /if (${Maxxed}==8) /goto :Finished
   /goto :TrainingLoop
   /return
 :Finished
   /echo Ending
   /endmacro
Last edited by Fuergrissa on Fri May 06, 2005 5:51 pm, edited 2 times in total.

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sun May 09, 2004 11:05 pm

0o0o cool, so this is like a Spell Skill Up?

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Mon May 10, 2004 2:59 am

would it be possible to add a way to destroy things?

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Mon May 10, 2004 3:12 am

yes of course, do you allways want to destroy any "Summoned" item you summon ?

Oid
a snow griffon
a snow griffon
Posts: 416
Joined: Thu Oct 17, 2002 3:26 am
Contact:

Post by Oid » Mon May 10, 2004 3:15 am

Bad idea....

/cast blah blah
/delay blahblah.casttime
/destroy

Oh? You were moving bags? TOugh shit.
Smokey the Lax says only you can prevent reproduction.

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Mon May 10, 2004 3:25 am

surely not if i put a check the cursor name first ?

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Mon May 10, 2004 3:31 am

yes, the summoned items was what I was wanting to destroy. as a mage or druid or some other class, the best way to raise conjuration is to cast a spell that conjures things :lol: ..and pretty soon my bags will be full of bread or what not.

yes, so a way to destroy summoned things would be great!

this macro works great. Thanks!

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Mon May 10, 2004 8:10 am

Ok here is a version that will write an ini file of things found on the cursor you can then change the ini file from a 1 to a 0 if you want that item deleted. By default it writes a 1 therefor NOT deleting from default..

******************************************************************

WARNING I hate /destroys in macros, destroying anything in a macro can be deadly, regardless of what code you put in to check, ITS YOUR RESPONSIBILITY to check your EPIC weapon is not in your hand when running this macro.

*******************************************************************

Code: Select all

| trainspell.mac
| Written by Fuergrissa V2.0
| HandleItem routine "Borrowed" from bootyjuice, Thank You.
| Ini File: trainspell.ini
|
| 0 = Destroy
| 1 = Keep
|
| Any summoned items are added to the ini file automatically
| first time around and are kept by default.

#Define ArcaneMax 235
#include spellcast.inc

Sub Main
   /declare ArcaneLevel int outer
   /declare SpellName string outer
   /declare GemNumber int outer
   /declare WhatSkill string outer
   /declare Maxxed int outer
   /varcalc ArcaneLevel ${Me.Level}*5+5
   /echo Your Spell Cap is ${ArcaneLevel}
   /if (${ArcaneLevel}>ArcaneMax) /varset ArcaneLevel ArcaneMax
   /echo Your Current Spell Cap is ${ArcaneLevel}
   /varset GemNumber 0
   /varset Maxxed 0
   /varset SpellName ""
   /varset WhatSkill ""
 :TrainingLoop
   /if (${Me.PctMana}<10) /goto :SitDown
   /if (${Cursor.ID}) /call SummonedItem
   /goto :CastSpell

 :SitDown
   /echo Mana at ${Me.PctMana}% Medding till over 98%
 :MedLoop
   /if (${Me.State.Equal[STAND]}) /sit
   /if (${Me.PctMana}>98) /goto :FullMana
   /goto :MedLoop
   /return
 :FullMana
   /echo Mana at ${Me.PctMana}% Starting Casting Again.
   /if (${Me.State.Equal[SIT]}) /stand
 :CastSpell
   /Varcalc GemNumber ${GemNumber}+1
   /if (${GemNumber}>8) /varset GemNumber 1
   /varset SpellName ${Me.Gem[${GemNumber}]}
   /if (!${Me.Gem[${SpellName}]}) /goto :TrainingLoop
   /goto :TestSkill
 :StartCasting
   /target myself
   /echo Casting ${SpellName} from GemSlot ${GemNumber} of Type ${Spell[${SpellName}].Skill} (${Me.Skill[${Spell[${SpellName}].Skill}]})
   /varset Maxxed 0
   /call cast "${SpellName}"
   /goto :TrainingLoop
   /return
 :TestSkill
   /if (${Me.Skill[${Spell[${SpellName}].Skill}]}==${ArcaneLevel}) /goto :TooHigh
   /goto :StartCasting
   /return
 :TooHigh
   /varset WhatSkill ${Spell[${SpellName}].Skill}
   /varcalc Maxxed ${Maxxed}+1
   /echo You cannot Increase ${WhatSkill} anymore.
   /if (${Maxxed}==8) /goto :Finished
   /goto :TrainingLoop
   /return
 :Finished
   /echo Ending
   /endmacro
   
 Sub SummonedItem
 
    /declare ItemSetting int local
    /declare NotFound int local
    /varset NotFound -1
 | Look up this item in trainspell.ini
    /varset ItemSetting ${Ini[trainspell.ini,ItemList,${Cursor.Name},${NotFound}]}
    /delay 5
 | If the item isn't in the .ini file then add it.
    /if (${ItemSetting}==${NotFound}) {
    /ini "trainspell.ini" "ItemList" "${Cursor.Name}" "1"
    /varset ItemSetting 1
    }
 | If we're keeping this item then bag it.
 | Otherwise, just destroy it.
    /if (${ItemSetting}==1) {
  :BagIt
    /autoinventory
    /delay 5
    /if (${Cursor.ID}) /goto :BagIt
      } else {
     /destroy
    }
    /return

******************************************************************

WARNING I hate /destroys in macros, destroying anything in a macro can be deadly, regardless of what code you put in to check, ITS YOUR RESPONSIBILITY to check your EPIC weapon is not in your hand when running this macro.

*******************************************************************
Last edited by Fuergrissa on Fri May 06, 2005 5:53 pm, edited 1 time in total.

Shock
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sat May 15, 2004 12:56 am

Post by Shock » Sat May 15, 2004 1:14 am

Nice work, used, stable many hours now.

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Sat May 15, 2004 2:47 am

Thank you

User avatar
Tel0net
orc pawn
orc pawn
Posts: 14
Joined: Wed May 05, 2004 1:07 pm
Location: California
Contact:

Post by Tel0net » Sat May 15, 2004 1:09 pm

I maxed 4 of my 5 spell skills using this

Someone give this man the nobel peace prize!

Not for conjuration, a rangers worst nightmare
MOO goes the Cow and WOOT goes the Tel0net

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Sat May 15, 2004 2:46 pm

hey if you really feel strongly about it Donate to the developers, even 5bucks from enough people will add up, its not mandatory of course but one day "The Devs" are gonna wake up and say .. Why the fuck do i bother....., now if they say that and then Look at their Nice HiFi, 52" Plasma screen, DTS Surround Amp, REL Sub Woofer and flash car parked in the drive they are gonna say ... Oh yeah thats why :)

Without the Devs EQ is just Plain OLD and Tedious.

SUPPORT the DEVS You know you want too.




(is that enough to send me that AFK 10k plat a day macro)

:lol:

User avatar
Tel0net
orc pawn
orc pawn
Posts: 14
Joined: Wed May 05, 2004 1:07 pm
Location: California
Contact:

Post by Tel0net » Sun May 16, 2004 1:51 am

Fuergrissa wrote:hey if you really feel strongly about it Donate to the developers, even 5bucks from enough people will add up, its not mandatory of course but one day "The Devs" are gonna wake up and say .. Why the fuck do i bother....., now if they say that and then Look at their Nice HiFi, 52" Plasma screen, DTS Surround Amp, REL Sub Woofer and flash car parked in the drive they are gonna say ... Oh yeah thats why :)

Without the Devs EQ is just Plain OLD and Tedious.

SUPPORT the DEVS You know you want too.




(is that enough to send me that AFK 10k plat a day macro)

:lol:
I donated 10 bucks to the devs like 5 seconds ago. (You inspired me actually).

And an AFK 10k plat macro? Why was I not informed?! :(
MOO goes the Cow and WOOT goes the Tel0net

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Thu May 20, 2004 10:44 pm

this may sound like a silly reqest..but here it goes.

is it possible to have this attempt to cast a spell, and if there is insufficient mana, sit down and med, no matter how much mana? :roll:

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Fri May 21, 2004 3:00 am

easy enough to do with more info from you,
cast spell (anySpell) ?
sit and med to max percent ?
stand
cast spell (anyspell) ???

or something else
[quote]"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."[/quote]