A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
grimjack
- Macro Author

- Posts: 525
- Joined: Thu Nov 07, 2002 6:51 am
-
Contact:
Post
by grimjack » Fri Oct 03, 2003 3:07 am
Code: Select all
| healwatch.mac
|
| When running will watch whatever you target and if it drops below whatever percent
| Is specified it will cast whatever spell is specified.
|
| Usage: /macro healwatch.mac percent spellname
| Example /macro healwatch.mac 41 Complete Heal
|
| Version 2
| Date: 10/3/2003 02:18
#event Collapse "Your gate is too unstable, and collapses."
#event FollowOff "You are no longer auto-following"
#event RootOff "Your Immobilize spell has worn off."
#event NoLOS "You cannot see your target."
#Event CastStart "You begin casting"
#Event CastFizzle "Your spell fizzles!"
#Event CastInterrupt "Your spell is interrupted."
#Event CastNoMana "Insufficient Mana to cast this spell"
#Event CastTooFar "Your target is out of range, get closer!"
#Event Recovered "You haven't recovered yet..."
#Event CastResist "Your target resisted "
#Event Distracted "You are too distracted to cast a spell now!"
#Event NoTarget "You must first select a target for this spell!"
#Event Sitting "You must be standing to cast a spell."
#Event NoMem "You do not seem to have that spell memorized."
#Event Stunned "You can't cast spells while stunned!"
Sub Main
/declare HealSpell global
/declare HealPct global
/declare Fail global
/declare DoAgain global
/declare StartCast global
/declare Remem global
/declare CastTime global
/declare SpellSlot global
/declare SpellName global
/declare CTimer timer
/declare OOMtimer timer
/if $defined(Param1)==FALSE {
/echo Usage: /macro healwatch.mac Percent Healspell
/echo Example: /macro healwatch.mac 41 Complete Heal
/end
}
/if $defined(Param2)==FALSE {
/varset HealSpell "@Param1"
} else /if $defined(Param3)==FALSE {
/varset HealSpell "@Param1 @Param2"
} else /if $defined(Param4)==FALSE {
/varset HealSpell "@Param1 @Param2 @Param3"
} else {
/varset HealSpell "@Param1 @Param2 @Param3 @Param4"
}
/varset HealPct @Param0
:HealWatchLoop
/delay 1
/if "$target()"=="TRUE" {
/if n $target(hp,pct)<=@HealPct {
/call SpellSub "@HealSpell"
}
}
/goto :HealWatchLoop
/return
Sub SpellSub
/stand
/varset Remem 0
/varset Fail 0
/varset SpellName "@Param0"
:MemWait
/doevents
/if n @Fail==1 {
/varset Fail 0
/if n @Remem==1 {
/memspellset default
:loadsploop
/delay 5
/if $char(spellbook)=="TRUE" /goto :loadsploop
}
/return
}
/varset SpellSlot $char(gem,"@SpellName")
/if n @SpellSlot<0 {
/delay 1s
/goto :MemWait
}
/if n @SpellSlot==0 {
/memspell 2 "@p0"
/varset SpellSlot 2
/varset Remem 1
:refreshwait
/doevents
/if n @Fail==1 {
/varset Fail 0
/if n @Remem==1 {
/memspellset default
:loadsploop
/delay 5
/if $char(spellbook)=="TRUE" /goto :loadsploop
}
/return
}
/delay 5
/if n $char(gem,"@SpellName")<=0 /goto :refreshwait
}
/varset CastTime $spell("@SpellName",mycasttime)
/varadd CastTime 1
:BeginCast
/varset Fail 0
/varset DoAgain 0
/varset StartCast 0
/call WaitForStart
:TimerLoop
/doevents
/if n @DoAgain==1 /goto :BeginCast
/if n @Fail==1 {
/varset Fail 0
/if n @Remem==1 {
/memspellset default
:loadsploop
/delay 5
/if $char(spellbook)=="TRUE" /goto :loadsploop
}
/return
}
/if n @CTimer>0 /goto :TimerLoop
/delay 2
/doevents
/if n @DoAgain==1 /goto :BeginCast
/if n @Remem==1 {
/memspellset default
:loadsploop
/delay 5
/if $char(spellbook)=="TRUE" /goto :loadsploop
}
/return
Sub WaitForStart
/cast @SpellSlot
:StartLoop
/doevents
/if n @Fail==1 /return
/if n @DoAgain==1 /return
/if n @StartCast==0 {
/goto :StartLoop
}
/varset CTimer "@CastTime"s
/return
Sub Event_CastStart
/varset StartCast 1
/return
Sub Event_CastFizzle
/delay 2
/varset DoAgain 1
/return
Sub Event_CastInterrupt
/delay 2
/if n @Fail==1 /return
/varset DoAgain 1
/return
Sub Event_FollowOff
/press esc
/press esc
/delay 5
/tell $target(name) Auto Follow Off.
/return
Sub Event_Sitting
/stand
/delay 2
/varset DoAgain 1
/return
Sub Event_CastTooFar
/varset Fail 1
/tell $target(name) Too far away.
/varset CTimer 0
/return
Sub Event_Distracted
/tell $target(name) I can't cast. I'm too distracted.
/varset Fail 1
/varset CTimer 0
/return
Sub Event_NoTarget
/varset Fail 1
/tell $target(name) I have no target to cast on.
/varset CTimer 0
/return
Sub Event_NoMem
/tell $target(name) That spell is not memed.
/varset Fail 1
/varset CTimer 0
/return
Sub Event_RootOff
/tell $target(name) Root has worn off.
/return
Sub Event_CastNoMana
/if @OOMtimer<=0 {
/tell $target(name) I am OOM!
/varset OOMtimer 100
/return
}
/tell $target(name) OOM. Medding 13 seconds and trying again.
/varset DoAgain 1
/sit off
/sit on
/varset OOMtimer 130
:medingwait
/delay 1
/doevents
/if n @OOMtimer>0 /goto :medingwait
/sit off
/return
Sub Event_Stunned
/tell $target(name) Stunned waiting 3 seconds to try again.
/delay 3s
/varset DoAgain 1
/return
Sub Event_Recovered
/delay 2s
/varset DoAgain 1
/return
Sub Event_CastResist
/tell $target(name) Resisted. Trying again.
/varset DoAgain 1
/return
Sub Event_Collapse
/varset DoAgain 1
/return
Sub Event_NoLOS
/tell $target(name) I can't see my target.
/varset Fail 1
/varset CTimer 0
/return
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.
Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.
My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack
-
cheater
- orc pawn

- Posts: 26
- Joined: Sat Oct 04, 2003 6:06 am
Post
by cheater » Sat Oct 04, 2003 6:07 am
Getting
Couldn't parse /declare HealSpell global
Couldn't parse /declare HealPct global
etc etc
when I try to use this. Am I missing some required subparts?
-
insanitywiz
- a hill giant

- Posts: 250
- Joined: Mon Jul 08, 2002 7:50 am
Post
by insanitywiz » Sat Oct 04, 2003 3:40 pm
You have the newest version of MQ Cheater? The new macs are only for the latest version and beyond, they won't work with anything before that. Look at the Outdated Macro Depot for anything that will work with the older versions.
-
Kaitain
- a ghoul

- Posts: 109
- Joined: Fri Oct 10, 2003 1:49 pm
Post
by Kaitain » Mon Oct 27, 2003 2:36 pm
<deleted>
Last edited by
Kaitain on Thu Apr 15, 2004 5:30 pm, edited 2 times in total.
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Mon Oct 27, 2003 3:00 pm
Kaitain wrote:Code: Select all
#event OnlyAtNight "Spell can only be cast during the night."
Just out of curiosity, when do you get this message? Never seen anything like it :)
-
NotSoCSharp
- a ghoul

- Posts: 85
- Joined: Sat Oct 25, 2003 10:48 am
Post
by NotSoCSharp » Mon Oct 27, 2003 3:26 pm
There is a druid spell that summons an item that can only be cast at a certain time of day.
Can't remember the details.
-
Achy Wrists
- a lesser mummy

- Posts: 36
- Joined: Wed Aug 27, 2003 4:17 pm
Post
by Achy Wrists » Wed Oct 29, 2003 7:28 pm
For some odd reason my events don't seem to be working well. Like I can't get the interrupt event to work, or the AF off event... Not sure what's going on.

I put an /echo in the event sub just to test if the events were firing at all and I get no echo responses either.
-
Achy Wrists
- a lesser mummy

- Posts: 36
- Joined: Wed Aug 27, 2003 4:17 pm
Post
by Achy Wrists » Wed Oct 29, 2003 7:42 pm
NM.... just needed to stick a /doevents in there.... duh. Sorry.
-
Mutter
- a ghoul

- Posts: 105
- Joined: Sat Nov 16, 2002 1:09 pm
Post
by Mutter » Wed Oct 29, 2003 9:08 pm
Code: Select all
| healwatch.mac
|
| When running will watch whatever you target and if it drops below whatever percent
| Is specified it will cast whatever spell is specified.
|
| Usage: /macro healwatch.mac percent spellname
| Example /macro healwatch.mac 41 Complete Heal
|
| Version 2
| Date: 10/3/2003 02:18
#event Collapse "Your gate is too unstable, and collapses."
#event FollowOff "You are no longer auto-following"
#event RootOff "Your Immobilize spell has worn off."
#event NoLOS "You cannot see your target."
#Event CastStart "You begin casting"
#Event CastFizzle "Your spell fizzles!"
#Event CastInterrupt "Your spell is interrupted."
#Event CastNoMana "Insufficient Mana to cast this spell"
#Event CastTooFar "Your target is out of range, get closer!"
#Event Recovered "You haven't recovered yet..."
#Event CastResist "Your target resisted "
#Event Distracted "You are too distracted to cast a spell now!"
#Event NoTarget "You must first select a target for this spell!"
#Event Sitting "You must be standing to cast a spell."
#Event NoMem "You do not seem to have that spell memorized."
#Event Stunned "You can't cast spells while stunned!"
#event HitsYou "YOU for"
Sub Main
/declare HealSpell global
/declare HealPct global
/declare Fail global
/declare DoAgain global
/declare StartCast global
/declare Remem global
/declare CastTime global
/declare SpellSlot global
/declare SpellName global
/declare CTimer timer
/declare OOMtimer timer
/declare tempvar global
/declare GroupMax global
/if $defined(Param1)==FALSE {
/echo Usage: /macro healwatch.mac Percent Healspell
/echo Example: /macro healwatch.mac 41 Complete Heal
/end
}
/if $defined(Param2)==FALSE {
/varset HealSpell "@Param1"
} else /if $defined(Param3)==FALSE {
/varset HealSpell "@Param1 @Param2"
} else /if $defined(Param4)==FALSE {
/varset HealSpell "@Param1 @Param2 @Param3"
} else {
/varset HealSpell "@Param1 @Param2 @Param3 @Param4"
}
/varset HealPct @Param0
:HealWatchLoop
/varcalc GroupMax $group(count)-1
/filter macros none
/for tempvar 0 to @GroupMax
/delay 1
/deoevents
:Healem
/target id $group(@tempvar,Name)
/if "$target()"=="TRUE" {
/if n $target(hp,pct)<=@HealPct {
/call SpellSub "@HealSpell"
}
/if n $target(hp,pct)>@HealPct {
/if "$char(state)"!="SIT" {
/if "$combat"!="TRUE" /sit on
}
}
}
/delay 1s
/if n $target(hp,pct)<=@HealPct /goto :Healem
/next tempvar
/delay 1
/goto :HealWatchLoop
/return
Sub SpellSub
/stand
/varset Remem 0
/varset Fail 0
/varset SpellName "@Param0"
:MemWait
/doevents
/if n @Fail==1 {
/varset Fail 0
/if n @Remem==1 {
/memspellset default
:loadsploop
/delay 5
/if $char(spellbook)=="TRUE" /goto :loadsploop
}
/return
}
/varset SpellSlot $char(gem,"@SpellName")
/if n @SpellSlot<0 {
/delay 1s
/goto :MemWait
}
/if n @SpellSlot==0 {
/memspell 2 "@p0"
/varset SpellSlot 2
/varset Remem 1
:refreshwait
/doevents
/if n @Fail==1 {
/varset Fail 0
/if n @Remem==1 {
/memspellset default
:loadsploop
/delay 5
/if $char(spellbook)=="TRUE" /goto :loadsploop
}
/return
}
/delay 5
/if n $char(gem,"@SpellName")<=0 /goto :refreshwait
}
/varset CastTime $spell("@SpellName",mycasttime)
/varadd CastTime 1
:BeginCast
/varset Fail 0
/varset DoAgain 0
/varset StartCast 0
/call WaitForStart
:TimerLoop
/doevents
/if n @DoAgain==1 /goto :BeginCast
/if n @Fail==1 {
/varset Fail 0
/if n @Remem==1 {
/memspellset default
:loadsploop
/delay 5
/if $char(spellbook)=="TRUE" /goto :loadsploop
}
/return
}
/if n @CTimer>0 /goto :TimerLoop
/delay 2
/doevents
/if n @DoAgain==1 /goto :BeginCast
/if n @Remem==1 {
/memspellset default
:loadsploop
/delay 5
/if $char(spellbook)=="TRUE" /goto :loadsploop
}
/return
Sub WaitForStart
/cast @SpellSlot
:StartLoop
/doevents
/if n @Fail==1 /return
/if n @DoAgain==1 /return
/if n @StartCast==0 {
/goto :StartLoop
}
/varset CTimer "@CastTime"s
/return
Sub Event_CastStart
/varset StartCast 1
/return
Sub Event_CastFizzle
/delay 2
/varset DoAgain 1
/return
Sub Event_CastInterrupt
/delay 2
/if n @Fail==1 /return
/varset DoAgain 1
/return
Sub Event_FollowOff
/press esc
/press esc
/delay 5
/echo $target(name) Auto Follow Off.
/return
Sub Event_Sitting
/stand
/delay 2
/varset DoAgain 1
/return
Sub Event_CastTooFar
/varset Fail 1
/echo $target(name) Too far away.
/delay 2s
/varset CTimer 0
/return
Sub Event_Distracted
/echo $target(name) I can't cast. I'm too distracted.
/varset Fail 1
/varset CTimer 0
/return
Sub Event_NoTarget
/varset Fail 1
/echo $target(name) I have no target to cast on.
/varset CTimer 0
/return
Sub Event_NoMem
/echo $target(name) That spell is not memed.
/varset Fail 1
/varset CTimer 0
/return
Sub Event_RootOff
/echo $target(name) Root has worn off.
/return
Sub Event_CastNoMana
/if @OOMtimer<=0 {
/echo $target(name) I am OOM!
/varset OOMtimer 100
/return
}
/echo $target(name) OOM. Medding 13 seconds and trying again.
/varset DoAgain 1
/sit off
/sit on
/varset OOMtimer 130
:medingwait
/delay 1
/doevents
/if n @OOMtimer>0 /goto :medingwait
/sit off
/return
Sub Event_Stunned
/echo $target(name) Stunned waiting 3 seconds to try again.
/delay 3s
/varset DoAgain 1
/return
Sub Event_Recovered
/delay 2s
/varset DoAgain 1
/return
Sub Event_CastResist
/echo $target(name) Resisted. Trying again.
/varset DoAgain 1
/return
Sub Event_Collapse
/varset DoAgain 1
/return
Sub Event_NoLOS
/echo $target(name) I can't see my target.
/varset Fail 1
/varset CTimer 0
/return
sub Event_HitsYou
/attack on
/delay 10s
/return
-
Plazmic
- The One

- Posts: 800
- Joined: Fri Jun 14, 2002 12:31 am
-
Contact:
Post
by Plazmic » Wed Oct 29, 2003 10:20 pm
blueninja wrote:Kaitain wrote:Code: Select all
#event OnlyAtNight "Spell can only be cast during the night."
Just out of curiosity, when do you get this message? Never seen anything like it :)
"ColdLight" (and some other spells) can only be cast at night.
-
Fuergrissa
- a grimling bloodguard

- Posts: 607
- Joined: Mon Dec 08, 2003 3:46 pm
- Location: UK
Post
by Fuergrissa » Mon Dec 08, 2003 3:52 pm
Can any kind person help at all. I using the The updated healwatch macro called khihealwatch with the spellcast.inc file.
when i type the macro /macro healme.mac 40 "Superior Healing" it looks great, as soon as i click a target it starts to move backwards and says in the MQ2 window this :> There were no matches for: (0-100) any nopredict. over and over untilli end the macro.
Can any kind person help at all.
the original macro works ok but is VERY laggy also i would like the sit and med and follow that this one uses.
Thank you very much in advance for any help at all..
I have the latest version of MQ2.
-
Lane
- a hill giant

- Posts: 201
- Joined: Fri Dec 06, 2002 11:57 am
Post
by Lane » Mon Dec 08, 2003 5:33 pm
Code: Select all
#event OnlyAtNight "Spell can only be cast during the night."
There was also a necro spell called Levant that was night only, but it got changed to any time since it was freaking usless as a self only evac spell being night time only. Opps, I'm fighting during the day, I guess I'm dead.... It is also usless on the moon where you can't tell what time of day it is.
-Lane
-
a9
- orc pawn

- Posts: 12
- Joined: Mon Jan 26, 2004 10:16 am
Post
by a9 » Thu Jan 29, 2004 4:38 am
What do i need to change to get this one to work when i have 2 Eqwindows? (not 2 computers) I suppose it nead a 'master' variable but not sure how i can do that. Any help appriciated.
Syntax Error:
A9 at work.
-
Puretone
- decaying skeleton

- Posts: 7
- Joined: Thu Jan 29, 2004 3:18 am
Post
by Puretone » Fri Jan 30, 2004 6:52 pm
[quote="a9"]What do i need to change to get this one to work when i have 2 Eqwindows? (not 2 computers)[quote]
I'd say you are SOL. I hope I am wrong, but I don't think this will ever work on one machine with 2 EQW instances.