Post your completed (working) macros here. Only for macros using MQ2Data syntax!
Moderator: MacroQuest Developers
-
lorad
- decaying skeleton

- Posts: 3
- Joined: Mon Feb 16, 2004 12:50 pm
Post
by lorad » Wed Aug 18, 2004 7:01 pm
Well I figured I would share my current simple spell trainer, could not find one I really liked so here you go.
Just mem spells starting at the top, it will figure out the skill on that spell and cast until maxed, then move to the next one.
It does use the SpellCast.inc file I got from here.
Code: Select all
#define MaxArcaneSkill 235
#chat tell
#event lang "tells you"
#include SpellCast.inc
Sub Main
/declare currentSpell
/declare maxSkill
/declare skillName
/declare spellName
/varset currentSpell 1
/varset maxSkill ${Math.Calc[${Me.Level}*5+5]}
/echo maxSkill=${maxSkill}
/if ( ${maxSkill} > 235 ) /varset maxSkill 235
/target myself
:nextSpell
/echo currentspell=${currentSpell}
/echo casting=${Me.Gem[${currentSpell}]}
/if ( ${Bool[${Me.Gem[${currentSpell}]}]} ) {
/varset skillName ${Me.Gem[${currentSpell}].Skill}
: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}) {
/autoinv
/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
-
Pheph
- a hill giant

- Posts: 196
- Joined: Thu Oct 09, 2003 8:15 pm
Post
by Pheph » Thu Aug 19, 2004 5:10 pm
Thanks for this one :)
Makes more sense to reorder these two lines, though:
Code: Select all
/echo maxSkill=${maxSkill}
/if ( ${maxSkill} > 235 ) /varset maxSkill 235
like:
Code: Select all
/if ( ${maxSkill} > 235 ) /varset maxSkill 235
/echo maxSkill=${maxSkill}
so that it outputs your _actual_ cap
-
PhoenixZorn
- Macro Czar
- Posts: 127
- Joined: Fri Dec 12, 2003 2:20 pm
-
Contact:
Post
by PhoenixZorn » Mon Aug 30, 2004 11:48 am
This is good stuff... I want this included with MQ2. Fix it up a bit, make it pretty, and do a bit of commenting. That is all.....
-
Runamuck
- orc pawn

- Posts: 17
- Joined: Fri Aug 27, 2004 3:14 pm
Post
by Runamuck » Sun Sep 05, 2004 2:08 am
Getting errors with this one spellcast.inc errors
-
Runamuck
- orc pawn

- Posts: 17
- Joined: Fri Aug 27, 2004 3:14 pm
Post
by Runamuck » Sun Sep 05, 2004 12:12 pm
Need this version of spell by azum small fixes but I didnt know till I found trying to help others.
Code: Select all
|
| SpellCast.inc
|
| Last Modified: 5/14/2004 9:30pm
| This will cast a spell reliably for you...
|
| Usage:
| /call Cast "spellname|itemname|AA#|AAskillname" [item|activate|gem#] [nocheck|dismount|nodismount]
|
| If no dismount or nodismount is provided it defaults to nodismount.
|
| This would essentially: /cast "Death Peace"
| example: /call Cast "Death Peace"
|
| This would essentially: Check for the spell in your spell slots, if not there mem it to spell
| gem slot 7 and then /cast "Death Peace"
| example: /call Cast "Death Peace" gem7
|
| This would essentially: /cast item "White Rope Bridle"
| example: /call Cast "White Rope Bridle" item
|
| This would essentially: /alt activate 169
| example: /call Cast "169" activate
| or...
| example: /call Cast "Divine Arbitration" activate
|
| This would dismount if your target was lost or dies mid-cast, cast Burn and mem it to spell
| slot 3 if it wasn't already memmed:
| example: /call Cast "Burn" gem3 dismount
|
| This would not dismount but would move you back and forth if your target was lost or dies mid-cast, cast Burn and mem
| it to spell slot 3 if it wasn't already memmed:
| example: /call Cast "Burn" gem3 nodismount
|
| 'nocheck' is the default for the "loss of target/target dying" value. If nocheck is specified (Or nothing was specified)
| no target checking will be performed and spellcast.inc should act like the spellcast.inc of the past.
|
| It will return the following values:
| CAST_SUCCESS
| CAST_UNKNOWNSPELL
| CAST_OUTOFMANA
| CAST_OUTOFRANGE
| CAST_CANNOTSEE
| CAST_STUNNED
| CAST_RESISTED
| CAST_TOOK2LONG
| CAST_ABILITYNOTREADY
| CAST_IMMUNESLOW
| CAST_LOSTTARGET
|
| New Vars Modification
| Plazmic's no globals needed version
|
| Oct 09, 2003 - Updated to work with new vars and $char(casting) -gf
| Oct 11, 2003 - switched some logic, removed defines -gf
| Oct 15, 2003 - Item support added by -EqMule
| XXX xx, xxxx - Modified to add automeming of spells. -Goofmester1
| Dec 26, 2003 - fd fail 1 added -m0nk
| Jan 01, 2004 - timeout(5s) added to stop "dead-time" -m0nk
| Jan 01, 2004 - switchd fdfail to a standing check. -m0nk
| Jan 01, 2004 - added silence checking as a stun check -m0nk
| Feb 17, 2004 - added AA activate capabilities -ml2517
| Apr 11, 2004 - Updated for new Parm system -ml2517
| Apr 12, 2004 - Will spit out a different message on immune to slows. -ml2517
| Apr 16, 2004 - Removed /sendkeys and replaced with /keypress. -ml2517
| Apr 17, 2004 - Various code enhancements. -Wassup
| Apr 20, 2004 - Updated all of the /if's to have parenthesis. -ml2517
| Apr 25, 2004 - Updated to new variable system. -ml2517
| Apr 29, 2004 - Fixed Item problem -ml2517
| Apr 29, 2004 - Changed the alt ability to use AltAbilityReady instead of an event. -ml2517
| May 02, 2004 - Added the ability to specify a gem slot to mem spells to. -ml2517
| May 10, 2004 - Updated for new event system.
| May 12, 2004 - Added suggestions for loss of target and stun handling change. -ml2517
| May 13, 2004 - Activate now accepts AA skill by name or number. -ml2517
| May 14, 2004 - Added the nocheck value, it is the default. This bypasses the target checking code. -ml2517
|
#event Fizzle "#*#Your spell fizzles#*#"
#event Interrupt "#*#Your casting has been interrupted#*#"
#event Interrupt "#*#Your spell is interrupted.#*#"
#event Recover "#*#You haven't recovered yet...#*#"
#event Recover "#*#Spell recovery time not yet met.#*#"
#event Resisted "#*#Your target resisted the #*#"
#event OutOfMana "#*#Insufficient Mana to cast this spell!#*#"
#event OutOfRange "#*#Your target is out of range, get closer!#*#"
#event NoLOS "#*#You cannot see your target.#*#"
#event Stunned "#*#You cannot cast while stunned#*#"
#event Stunned "#*#You *CANNOT* cast spells, you have been silenced!#*#"
#event Standing "#*#You must be standing to cast a spell#*#"
#event Standing "#*#has fallen to the ground.#*#"
#event Collapse "#*#Your gate is too unstable, and collapses.#*#"
#event ImmuneSlow "#*#Your target is immune to changes in its attack speed.#*#"
Sub Cast(SpellName,ItemFlag,DismountFlag)
/declare HaveTarget int local 0
/declare CastBarTime timer local
/declare CastCurrLocY float local 0
/declare CastCurrLocX float local 0
/varset CastCurrLocY ${Me.Y}
/varset CastCurrLocX ${Me.X}
/if (${Target.ID}>0) /varset HaveTarget 1
/if (!${Defined[CastGiveUpTime]}) /declare CastGiveUpTime timer local
/if (!${Defined[ItemFlag]}) /declare ItemFlag string local
/if (!${Defined[DismountFlag]}) {
/declare DismountFlag string local nocheck
/if (${ItemFlag.Find["dismount"]}) /varset DismountFlag ${ItemFlag}
}
/if (!${Me.Standing} && !${Me.Mount.ID}>0) /stand
/if (${Me.Moving}) {
/keypress forward
/keypress back
/delay 8
} else {
/delay 4
}
/if (${ItemFlag.Equal["Item"]} || ${ItemFlag.Equal["Activate"]}) /goto :StartCast
/if (!${Me.Gem["${SpellName}"]}) {
/if (${ItemFlag.Find[gem]}) {
/if (${Int[${ItemFlag.Right[1]}]}>0 && ${Int[${ItemFlag.Right[1]}]}<9) {
/memspell ${ItemFlag.Right[1]} "${SpellName}"
/delay 5s
} else {
/goto :GenericMem
}
} else {
:GenericMem
/memspell 5 "${SpellName}"
/delay 5s
}
}
:StartCast
/varset CastGiveUpTime 5s
:CastNow
/if (${ItemFlag.Equal["Item"]}) {
/call ClearReturnValue
/cast item "${SpellName}"
} else /if (${ItemFlag.Equal["Activate"]}) {
/call ClearReturnValue
/if (!${Me.AltAbilityReady[${SpellName}]}) /return CAST_ABILITYNOTREADY
/alt activate ${AltAbility[${SpellName}].ID}
/varset CastBarTime ${Me.Casting.CastTime}
} else {
/if (!${Me.Gem["${SpellName}"]}) /return CAST_UNKNOWNSPELL
/call ClearReturnValue
/if (!${Me.SpellReady["${SpellName}"]}) {
/if (${CastGiveUpTime}==0) /return CAST_TOOK2LONG
/delay 1
/goto :CastNow
}
/cast "${SpellName}"
/varset CastBarTime ${Math.Calc[${Me.Casting.CastTime}*10]}
}
:WaitCast
/if (${Me.Casting.ID}) {
/if ((!${Target.ID}>0 || ${Target.Type.Equal[CORPSE]}) && !${DismountFlag.Find[nocheck]} && ${HaveTarget}==1) {
/if (${Me.Mount.ID}>0) {
/if (${DismountFlag.Equal[dismount]}) {
/dismount
} else {
/if (!${ItemFlag.Equal["Item"]}) {
/if (${CastBarTime}<7) {
:Interrupt
/keypress FORWARD hold
/delay 6
/keypress FORWARD
/keypress BACK hold
/delay 8
/keypress BACK
} else {
:HoldForSpell
/delay 1
/if (${CastBarTime}<7) /goto :Interrupt
/goto :HoldForSpell
}
} else {
/keypress FORWARD hold
:Forward
/delay 1
/if (${Math.Distance[${CastCurrLocY},${CastCurrLocX}]}<6) /goto :Forward
/keypress FORWARD
/keypress BACK hold
:Backward
/delay 1
/if (${Math.Distance[${CastCurrLocY},${CastCurrLocX}]}>4) /goto :Backward
/keypress BACK
/if (!${Me.Casting.ID}>0) /goto :DuckTime
}
}
}
:DuckTime
/keypress FORWARD
/keypress BACK
/if (!${Me.Ducking}) /keypress DUCK
/delay 1
/if (${Me.Ducking}) /keypress DUCK
/return CAST_LOSTTARGET
}
/delay 1
/goto :WaitCast
}
/delay 4
/doevents Fizzle
/doevents Interrupt
/doevents Interrupt
/doevents Recover
/doevents Standing
/doevents OutOfRange
/doevents OutOfMana
/doevents NoLOS
/doevents Resisted
/doevents ImmuneSlow
/doevents Stunned
/doevents Collapse
/delay 1
/if (${Macro.Return.Equal["CAST_RESTART"]}) /goto :StartCast
/if (!${Macro.Return.Equal["NULL"]}) /return ${Macro.Return}
/return CAST_SUCCESS
Sub ClearReturnValue
/return NULL
Sub Event_Fizzle
/return CAST_RESTART
Sub Event_Interrupt
/return CAST_RESTART
Sub Event_Recover
/delay 5
/return CAST_RESTART
Sub Event_Standing
/stand
/return CAST_RESTART
Sub Event_Collapse
/return CAST_RESTART
Sub Event_OutOfMana
/return CAST_OUTOFMANA
Sub Event_OutOfRange
/return CAST_OUTOFRANGE
Sub Event_NoLOS
/return CAST_CANNOTSEE
Sub Event_Stunned
/delay 2s !${Me.Stunned}
/return CAST_RESTART
Sub Event_Resisted
/return CAST_RESISTED
Sub Event_ImmuneSlow
/return CAST_IMMUNESLOW
-
Wite
- orc pawn

- Posts: 23
- Joined: Tue Mar 16, 2004 6:49 pm
Post
by Wite » Sun Oct 24, 2004 6:46 pm
Thanks for keeping this working Runamuck by suggesting that .inc file. I just stated a new ench and havent used in a while glad to see its not perma broke. Just wanted to let ya know someone appreciates it.
Wite
-
mncat
- orc pawn

- Posts: 21
- Joined: Thu Oct 07, 2004 6:32 pm
Post
by mncat » Thu Oct 28, 2004 6:09 pm
I was very happy to find this macro. It gets so old sitting in POK casting spell over an over for 2 hours working up my skill, gona wearout my keyboard. However I can't seem to get this macro to work. I saved the file as spell.mac and also have the inc file. Both files are in my macro folder, is this correct? When I try to load it with "/macro spell.mac" it just says something like "unable to open blah blah blah" Any help would be great, thank you very much for all your help.
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Thu Oct 28, 2004 6:21 pm
If you save it as spell.mac you start it with /macro spell . Don't add .mac to the command, mq2 does that for you.
-
anon_coward
- a lesser mummy

- Posts: 40
- Joined: Wed Mar 24, 2004 11:11 pm
Post
by anon_coward » Thu Oct 28, 2004 6:28 pm
Also, make sure it's not saved as "spell.mac.txt". Maybe that's just a little too obvious though.
-
mncat
- orc pawn

- Posts: 21
- Joined: Thu Oct 07, 2004 6:32 pm
Post
by mncat » Thu Oct 28, 2004 6:42 pm
oK well thank you for the help. I will look intothings when I get home. I think I may have tried /macro spell, because my friend said that is what he did. also I know it is not saved as a text file because when I creat a new file it now gives me the choice of creating a .mac file. If there is anyone that has been useing this macro I would love to hear from you too.

Thanks again
-
mncat
- orc pawn

- Posts: 21
- Joined: Thu Oct 07, 2004 6:32 pm
Post
by mncat » Thu Oct 28, 2004 9:00 pm
ok I did something diffrent. Not sure what I did but it now says it can not be parsed. Oh well, will keep looking and trying
-
mncat
- orc pawn

- Posts: 21
- Joined: Thu Oct 07, 2004 6:32 pm
Post
by mncat » Thu Oct 28, 2004 9:36 pm
ok now i am getting something along the lines of "subrotine" not found. I will keep looking and trying. But any help would be great. Thank you again to everyone for the wonderful help of macroquest.
/bow
/thank
-
TheUnholy
- a hill giant

- Posts: 269
- Joined: Wed Mar 03, 2004 11:59 pm
Post
by TheUnholy » Thu Oct 28, 2004 9:38 pm
There are some people who should just never use mq2. You might be one of them.
-
mncat
- orc pawn

- Posts: 21
- Joined: Thu Oct 07, 2004 6:32 pm
Post
by mncat » Thu Oct 28, 2004 11:15 pm
~sigh~ How is anyone suposed to learn anything without asking questions? I say this with all due respect but forums can sometimes be so sad.
-
Birdbrain
- a lesser mummy

- Posts: 45
- Joined: Sat Oct 23, 2004 1:40 pm
Post
by Birdbrain » Fri Oct 29, 2004 6:15 pm
Is the file a .mac? Also is it pasted correctly? Also if you have windows xp and the file looks like a txt you have to turn some setting off in tools.