Got a cool macro idea? Wanna request a macro? Here is the place for you!
Moderator: MacroQuest Developers
-
Epsilon
- a lesser mummy

- Posts: 61
- Joined: Wed Apr 30, 2003 5:46 pm
Post
by Epsilon » Sat Oct 11, 2003 2:06 am
I had this very simple macro for my shammy and it did just what i wanted it to do..tell the bot help and got a menu with buffs that he could cast..but now its broken with the latest MQ and was wondering if someone had an even easier macro laying around..or maybe could make one
here is what my favorite broken macro looks like
Code: Select all
| shaman.mac
| shaman petbot
|
#define ChatCommand p2
#define Fail v94
#define DoAgain v95
#define Remem v75
#define SpellName v98
#define SpellSlot v97
#define CastTime v99
#define DoAgain v95
#define StartCast v96
#define CTimer t39
#include spellsub2.mac
#include routines.mac
#chat tell
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#Event ClarityGone "Your mind returns to normal."
#Event InvisGone "You feel yourself starting to appear"
#Event FollowOff "You are no longer auto-following "
#Event Slowed "yawns."
#turbo 75
Sub Main
:loop
/doevents
/goto :loop
/return
Sub Event_Chat
:Commands
| *** Focus of Soul ***
/if "$ChatCommand"=="fos" {
/press esc
/target $p1
/stand
/call SpellSub "Focus of Soul"
/press esc
| *** Focus of Seventh ***
} else /if "$ChatCommand"=="fo7" {
/press esc
/target $p1
/stand
/call SpellSub "Focus of the seventh"
/press esc
| *** Ferine Avatar ***
} else /if "$ChatCommand"=="avatar!" {
/press esc
/target $p1
/stand
/call SpellSub "Ferine Avatar"
/press esc
| *** Stamina ***
} else /if "$ChatCommand"=="stamina" {
/press esc
/target $p1
/stand
/call SpellSub "Talisman of the boar"
/press esc
| *** Tribunal ***
} else /if "$ChatCommand"=="ToB" {
/press esc
/target $p1
/stand
/call SpellSub "Talisman of the Tribunal"
/press esc
| *** Slow ***
} else /if "$ChatCommand"=="slow" {
/assist $p1
/stand
/delay 20
/r Trying to slow down %t 75%
/call SpellSub "Turgur's Insects"
| *** Report Mana ***
} else /if "$ChatCommand"=="mana" {
/press F1
/say $char(mana,pct)% mana
/press esc
| *** AUTOFOLLOW ***
} else /if "$ChatCommand"=="follow" {
/target $p1
/face
/sit off
/follow
/r Lead on %T
| *** Define Camp Spot ***
} else /if "$ChatCommand"=="setcamp" {
/press F1
/delay 5
/varset XLOC $char(x)
/varset YLOC $char(y)
/g Ok. Here I sit.
| *** AUTORETURN (to camp)***
} else /if "$ChatCommand"=="return" {
:return
/stand
/face loc $YLOC,$XLOC
/call GotoLoc $YLOC,$XLOC
| *** AUTOSTOP ***
} else /if "$ChatCommand"=="stop" {
/press down
/varset v10 1
/r Stopping here.
| *** SIT/STAND ***
} else /if "$ChatCommand"=="sit" {
/sit
| *** MOUNT HORSE ***
} else /if "$ChatCommand"=="mount" {
/sendkey down shift
/press 2
/press shift
/press 0
| *** DISMOUNT HORSE ***
} else /if "$ChatCommand"=="dismount" {
/dismount
| *** LFG ON ***
} else /if "$ChatCommand"=="LFG" {
/delay 10
/press f1
/delay 10
/disband
/delay 10
/lfg on
/r LFG now.
| *** COMMAND HELP ***
} else /if "$ChatCommand"=="help" {
/reply [Fos] - Focus of Soul, [Fo7] - Focus of the Seventh, [Stamina] - Talisman of the Boar, [ToB] - Talisman of the Tribunal, [Mana] - Report Mana, [Slow] - Will attempt to slow your target,
}
/return
Sub Event_Invited
/delay 20
/invite
/return
Sub Event_ClarityGone
/g I'm outa crack and I'm gettin feindish...
/return
Sub Event_Slowed
/g %t <---- SLOWED !
/return
Sub Event_InvisGone
/g Invis is wearing off.
/return
Sub Event_RootGone
/g Root Wore off.
/press f2
/assist
/delay 11
/stand
/g Rooting %T
/call SpellSub 3 40
/press esc
/return
-
Spectre
- orc pawn

- Posts: 21
- Joined: Tue Sep 02, 2003 10:31 am
Post
by Spectre » Sat Oct 11, 2003 11:48 am
Disclaimer1: I don't have a shammy, so I can't test this.
Disclaimer2: You have two includes (spellsub2.mac and routines.mac). I don't have either of these files, and you didn't post them, so this macro won't work until those are updated as well. Post em and I'll do them, too.
Code: Select all
| shaman.mac
| shaman petbot
|
#include spellsub2.mac
#include routines.mac
#chat tell
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#Event ClarityGone "Your mind returns to normal."
#Event InvisGone "You feel yourself starting to appear"
#Event FollowOff "You are no longer auto-following "
#Event Slowed "yawns."
#turbo 75
Sub Main
/declare Fail global
/declare DoAgain global
/declare Remem global
/declare SpellName global
/declare SpellSlot global
/declare CastTime global
/declare DoAgain global
/declare StartCast global
/declare CTimer timer
:loop
/doevents
/goto :loop
/return
Sub Event_Chat (ChatType,Sender,ChatCommand)
:Commands
| *** Focus of Soul ***
/if "@ChatCommand"=="fos" {
/press esc
/target @Sender
/stand
/call SpellSub "Focus of Soul"
/press esc
| *** Focus of Seventh ***
} else /if "@ChatCommand"=="fo7" {
/press esc
/target @Sender
/stand
/call SpellSub "Focus of the seventh"
/press esc
| *** Ferine Avatar ***
} else /if "@ChatCommand"=="avatar!" {
/press esc
/target @Sender
/stand
/call SpellSub "Ferine Avatar"
/press esc
| *** Stamina ***
} else /if "@ChatCommand"=="stamina" {
/press esc
/target @Sender
/stand
/call SpellSub "Talisman of the boar"
/press esc
| *** Tribunal ***
} else /if "@ChatCommand"=="ToB" {
/press esc
/target @Sender
/stand
/call SpellSub "Talisman of the Tribunal"
/press esc
| *** Slow ***
} else /if "@ChatCommand"=="slow" {
/assist @Sender
/stand
/delay 20
/r Trying to slow down %t 75%
/call SpellSub "Turgur's Insects"
| *** Report Mana ***
} else /if "@ChatCommand"=="mana" {
/press F1
/say $char(mana,pct)% mana
/press esc
| *** AUTOFOLLOW ***
} else /if "@ChatCommand"=="follow" {
/target @Sender
/face
/sit off
/follow
/r Lead on %T
| *** Define Camp Spot ***
} else /if "@ChatCommand"=="setcamp" {
/press F1
/delay 5
/varset XLOC $char(x)
/varset YLOC $char(y)
/g Ok. Here I sit.
| *** AUTORETURN (to camp)***
} else /if "@ChatCommand"=="return" {
:return
/stand
/face loc $YLOC,$XLOC
/call GotoLoc $YLOC,$XLOC
| *** AUTOSTOP ***
} else /if "@ChatCommand"=="stop" {
/press down
/varset v10 1
/r Stopping here.
| *** SIT/STAND ***
} else /if "@ChatCommand"=="sit" {
/sit
| *** MOUNT HORSE ***
} else /if "@ChatCommand"=="mount" {
/sendkey down shift
/press 2
/press shift
/press 0
| *** DISMOUNT HORSE ***
} else /if "@ChatCommand"=="dismount" {
/dismount
| *** LFG ON ***
} else /if "@ChatCommand"=="LFG" {
/delay 10
/press f1
/delay 10
/disband
/delay 10
/lfg on
/r LFG now.
| *** COMMAND HELP ***
} else /if "@ChatCommand"=="help" {
/reply [Fos] - Focus of Soul, [Fo7] - Focus of the Seventh, [Stamina] - Talisman of the Boar, [ToB] - Talisman of the Tribunal, [Mana] - Report Mana, [Slow] - Will attempt to slow your target,
}
/return
Sub Event_Invited
/delay 20
/invite
/return
Sub Event_ClarityGone
/g I'm outa crack and I'm gettin feindish...
/return
Sub Event_Slowed
/g %t <---- SLOWED !
/return
Sub Event_InvisGone
/g Invis is wearing off.
/return
Sub Event_RootGone
/g Root Wore off.
/press f2
/assist
/delay 11
/stand
/g Rooting %T
/call SpellSub 3 40
/press esc
/return
-
Epsilon
- a lesser mummy

- Posts: 61
- Joined: Wed Apr 30, 2003 5:46 pm
Post
by Epsilon » Sat Oct 11, 2003 4:46 pm
Wow thanks spectre, i looked thru the routines.mac and i dont even need that, but here is the spellsub2.mac i used..think grimjack made it for some time ago
Code: Select all
|botspell.inc
|Bot spell routines and some spell commands.
|
|Version 1.09 with debug
|
|Commands included in this module:
|sn Cast spell by spell name.
|mana Report current mana to master.
|evac Evac
|loadlist Load spell favorite list by name.
|aftercastsit Toggle sit after cast on/off
|
|Must have a spell favorite list named default
#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!"
|||Main spell mem/cast routine.
Sub SpellSub
/varset Remem 0
/sendkey up up
/if n Combatstatus==1 /delay 3s
/varset Fail 0
/varset SpellName "$p0"
:MemWait
/varset SpellSlot "$char(gem,"$SpellName")"
| Uncoment below for debug
|/echo Spell Slot is $SpellSlot
|/echo Negative value means gem is not ready. Zero means spell is not memed.
/if n $SpellSlot<0 {
|Uncomment below for debug
|/echo Waiting for spell slot to repop
/delay 1s
/goto :MemWait
}
/if n $SpellSlot==0 {
|Uncomment below for debug.
|/echo Meming spell
/memspell 1 "$p0"
/varset SpellSlot 1
/varset Remem 1
:refreshwait
/delay 5
/if n $char(gem,"$SpellName")<=0 /goto :refreshwait
}
/varset CastTime "$spell("$SpellName",mycasttime)"
|Uncomment below for debug.
|/echo Spell Cast time is $spell("$SpellName",casttime)"
|/echo If this value is not being reported properly this script will malfunction.
: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
/return
}
/doevents
/if n $DoAgain==1 /goto :BeginCast
/if n $Fail==1 {
/varset Fail 0
/return
}
/if n $CTimer>0 /goto :TimerLoop
/delay 2
/doevents
/if n $DoAgain==1 /goto :BeginCast
/if n $Remem==1 {
/loadspells "default"
:loadsploop
/delay 5
/if $char(state)=="SIT" /goto :loadsploop
}
/return
|||Wait for spell to start before counting down timer.
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
|||Cast spell by name. Uses SpellSub.
Sub Do-sn
/assist $MasterName
/delay 5
/if n $strlen("$p1")<=0 {
/return
} else /if n $strlen("$p2")<=0 {
/tell "$MasterName" Casting $p1 on %T
/call SpellSub "$p1"
} else /if n $strlen("$p3")<=0 {
/tell "$MasterName" Casting $p1 $p2 on %T
/call SpellSub "$p1 $p2"
} else /if n $strlen("$p4")<=0 {
/tell "$MasterName" Casting $p1 $p2 $p3 on %T
/call SpellSub "$p1 $p2 $p3"
} else {
/tell "$MasterName" Casting $p1 $p2 $p3 $p4 on %T
/call SpellSub "$p1 $p2 $p3 $p4"
}
/stand
/if "$SitAfterCast"=="1" /sit on
/press esc
/return
|||Report mana percent to master.
Sub Do-mana
/dismount
/press F1
/tell $MasterName $char(mana,pct)m
/press esc
/return
Sub Do-loadlist
/if n $strlen("$p1")<=0 {
/return
} else {
/loadspells "$p1"
}
/return
Sub Do-aftercastsit
/if n $SitAfterCast=1 {
/varset SitAfterCast 0
/return
}
/varset SitAfterCast 1
/return
|||Attempt to move to master and evac.
Sub Do-evac
/tell $MasterName Moving to you and casting Evac!
/call Do-moveto evac $MasterName
/delay 2s
/call SpellSub "Evacuate"
/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 $MasterName Auto Follow Off.
/return
Sub Event_Sitting
/stand
/delay 2
/varset DoAgain 1
/return
Sub Event_CastTooFar
/varset Fail 1
/r Too far away.
/varset CTimer 0
/return
Sub Event_Distracted
/tell $MasterName I can't cast. I'm too distracted.
/varset Fail 1
/varset CTimer 0
/return
Sub Event_NoTarget
/varset Fail 1
/tell $MasterName I have no target to cast on.
/varset CTimer 0
/return
Sub Event_NoMem
/tell $MasterName That spell is not memed.
/varset Fail 1
/varset CTimer 0
/return
Sub Event_RootOff
/tell $MasterName Root has worn off.
/return
Sub Event_CastNoMana
/tell $MasterName OOM. Medding 16 seconds and trying again.
/sit off
/sit on
/delay 16s
/sit off
/varset DoAgain 1
/return
Sub Event_Stunned
/tell $MasterName 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 $MasterName Resisted. Trying again.
/varset DoAgain 1
/return
Sub Event_Collapse
/varset DoAgain 1
/return
Sub Event_NoLOS
/tell $MasterName I can't see my target.
/varset Fail 1
/varset CTimer 0
/return
thanks alot
-
Spectre
- orc pawn

- Posts: 21
- Joined: Tue Sep 02, 2003 10:31 am
Post
by Spectre » Sat Oct 11, 2003 5:22 pm
Epsilon wrote:Wow thanks spectre, i looked thru the routines.mac and i dont even need that, but here is the spellsub2.mac i used..think grimjack made it for some time ago
I need spellsub.mac as well, there are some references to it in the code below.
Code: Select all
|botspell.inc
|Bot spell routines and some spell commands.
|
|Version 1.09 with debug
|
|Commands included in this module:
|sn Cast spell by spell name.
|mana Report current mana to master.
|evac Evac
|loadlist Load spell favorite list by name.
|aftercastsit Toggle sit after cast on/off
|
|Must have a spell favorite list named default
#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!"
|||Main spell mem/cast routine.
Sub SpellSub(SplName)
/varset Remem 0
/sendkey up up
/if n Combatstatus==1 /delay 3s
/varset Fail 0
/varset SpellName "@SplName"
:MemWait
/varset SpellSlot "$char(gem,"@SpellName")"
| Uncomment below for debug
|/echo Spell Slot is @SpellSlot
|/echo Negative value means gem is not ready. Zero means spell is not memed.
/if n @SpellSlot<0 {
|Uncomment below for debug
|/echo Waiting for spell slot to repop
/delay 1s
/goto :MemWait
}
/if n @SpellSlot==0 {
|Uncomment below for debug.
|/echo Meming spell
/memspell 1 @SpellName
/varset SpellSlot 1
/varset Remem 1
:refreshwait
/delay 5
/if n $char(gem,"@SpellName")<=0 /goto :refreshwait
}
/varset CastTime "$spell("@SpellName",mycasttime)"
|Uncomment below for debug.
|/echo Spell Cast time is $spell("@SpellName",casttime)"
|/echo If this value is not being reported properly this script will malfunction.
: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
/return
}
/doevents
/if n @DoAgain==1 /goto :BeginCast
/if n @Fail==1 {
/varset Fail 0
/return
}
/if n @CTimer>0 /goto :TimerLoop
/delay 2
/doevents
/if n @DoAgain==1 /goto :BeginCast
/if n @Remem==1 {
/loadspells "default"
:loadsploop
/delay 5
/if $char(state)=="SIT" /goto :loadsploop
}
/return
|||Wait for spell to start before counting down timer.
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
|||Cast spell by name. Uses SpellSub.
Sub Do-sn(SP0, SP1, SP2, SP3, SP4)
/assist @MasterName
/delay 5
/if n $strlen("@SP1")<=0 {
/return
} else /if n $strlen("@SP2")<=0 {
/tell "@MasterName" Casting @SP1 on %T
/call SpellSub "@SP1"
} else /if n $strlen("@SP3")<=0 {
/tell "@MasterName" Casting @SP1 @SP2 on %T
/call SpellSub "@SP1 @SP2"
} else /if n $strlen("@SP4")<=0 {
/tell "@MasterName" Casting @SP1 @SP2 @SP3 on %T
/call SpellSub "@SP1 @SP2 @SP3"
} else {
/tell "@MasterName" Casting @SP1 @SP2 @SP3 @SP4 on %T
/call SpellSub "@SP1 @SP2 @SP3 @SP4"
}
/stand
/if "@SitAfterCast"=="1" /sit on
/press esc
/return
|||Report mana percent to master.
Sub Do-mana
/dismount
/press F1
/tell @MasterName $char(mana,pct)m
/press esc
/return
Sub Do-loadlist(SP0, SP1)
/if n $strlen("@SP1")<=0 {
/return
} else {
/loadspells "@SP1"
}
/return
Sub Do-aftercastsit
/if n @SitAfterCast=1 {
/varset SitAfterCast 0
/return
}
/varset SitAfterCast 1
/return
|||Attempt to move to master and evac.
Sub Do-evac
/tell @MasterName Moving to you and casting Evac!
/call Do-moveto evac @MasterName
/delay 2s
/call SpellSub "Evacuate"
/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 @MasterName Auto Follow Off.
/return
Sub Event_Sitting
/stand
/delay 2
/varset DoAgain 1
/return
Sub Event_CastTooFar
/varset Fail 1
/r Too far away.
/varset CTimer 0
/return
Sub Event_Distracted
/tell @MasterName I can't cast. I'm too distracted.
/varset Fail 1
/varset CTimer 0
/return
Sub Event_NoTarget
/varset Fail 1
/tell @MasterName I have no target to cast on.
/varset CTimer 0
/return
Sub Event_NoMem
/tell @MasterName That spell is not memed.
/varset Fail 1
/varset CTimer 0
/return
Sub Event_RootOff
/tell @MasterName Root has worn off.
/return
Sub Event_CastNoMana
/tell @MasterName OOM. Medding 16 seconds and trying again.
/sit off
/sit on
/delay 16s
/sit off
/varset DoAgain 1
/return
Sub Event_Stunned
/tell @MasterName 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 @MasterName Resisted. Trying again.
/varset DoAgain 1
/return
Sub Event_Collapse
/varset DoAgain 1
/return
Sub Event_NoLOS
/tell @MasterName I can't see my target.
/varset Fail 1
/varset CTimer 0
/return
-
Epsilon
- a lesser mummy

- Posts: 61
- Joined: Wed Apr 30, 2003 5:46 pm
Post
by Epsilon » Sat Oct 11, 2003 8:37 pm
ah sorry but that is the spellsub2.mac...i know it says botspell.inc but dont mind that..i was just too lazy to edit it..i will try this out now and see if it works =)
-
Epsilon
- a lesser mummy

- Posts: 61
- Joined: Wed Apr 30, 2003 5:46 pm
Post
by Epsilon » Sat Oct 11, 2003 8:45 pm
it doesnt work =(
the only output i get when i do /macro shaman is
- Variable name already defined
and does not respond to any commands like "help"