• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

macro issue (1 Viewer)

zippy42167

New member
Joined
Jan 31, 2006
RedCents
Ok, so I'm finally starting to write macros, or at least edit them, in depth, to use them for what I use them for. So far, I figured out how to have my ranger re-cast spells like Eagle Eye, Ward of the Hunter, and Frost Arrows.

However, I am having trouble setting up how to make him re-cast a haste potion whenever he doesn't have haste, or when it fades. Any constructive criticism would be helpful, as it could very well be that I missed a parenthese, quotation mark or something small. So far, this is what I have for these areas:

Rich (BB code):
         /if (!${Me.Buff[Elixir of Speed X].ID}) /call Haste	 
	 /if (${Me.AltAbilityReady[Frost Arrows]} && !${Me.Buff[Frost of Kesh`yk I].ID}) /call Frost
	 /if (${Me.SpellReady[Eagle Eye]} && !${Me.Buff[Eagle Eye].ID}) /call Event_eagleeye
	 /if (${Me.SpellReady[ward of the hunter]} && !${Me.Buff[ward of the hunter].ID}) /call Event_ward
	 /if (${Me.CombatAbilityReady["Trueshot Discipline"]} && ${Me.AltAbilityReady[Guardian of the Glade]} || ${Me.AltAbilityReady[Guardian of the Forest]} && ${Me.Buff[Elixir of Speed X].ID} || ${Me.Buff[Talisman of Celerity].ID} || ${Me.Buff[Speed of Salik].ID} || ${Me.Buff[Hastening of Salik].ID} || ${Me.Buff[Speed of Vallon].ID} || ${Me.Buff[Vallon's Quickening].ID} || ${Me.Buff[Swift like the Wind].ID}) /call Trueshot
	 /if (${Me.AltAbilityReady[Guardian of the Glade]} || ${Me.AltAbilityReady[Guardian of the Forest]}) /call Glade
	 /if (${Me.AltAbilityReady[Auspice of the Hunter]} && !${Me.Buff[Auspice of the Hunter].ID}) /call Auspice
	 /doevents	 

/goto :mainloop

Sub Haste
	/if (${FindItem[Distillate of Alacrity X].InvSlot}) /call cast "Distillate of Alacrity X" item
	/return

Sub Frost
	/aa act Frost Arrows
	/echo Casting Frost Arrows
	/delay 3s
	/return

|Sub Trueshot
	/disc Trueshot
	/aa act Guardian of the Glade
	/aa act Guardian of the Forest
	/echo Trueshotting
	/return

Sub Glade
	/aa act Guardian of the Glade
	/aa act Guardian of the Forest
	/echo Guardian of the Glades on
	/return

Sub Auspice
	/aa act Auspice of the Hunter
	/echo Auspice of the Hunter on
	/delay 3s
	/return

Sub Event_eagleeye
	/cast "eagle eye" gem6
	/echo Casting Eagle Eye
	/return

Sub Event_ward
	/cast "ward of the hunter" gem8
	/echo Casting Ward of the Hunter
	/return

Sub Event_hunter
	/cast "strength of the hunter" gem3
	/echo Casting Strength of the Hunter
	/return

Sub Event_pred
	/cast "howl of the predator" gem2
	/echo Casting Howl of the Predator
	/return
 
Thanks for the help Devlin.

I plugged that into the macro, and it kinda works, but lists errors.

The setup I have has the potions inside my first bag (first slot). With the line you gave me, it doesn't work, and refers back to Spell_routines.inc.

Any pointers on how to correct this?
 
This is the whole code so far. Not sure why I didn't post it before.

Rich (BB code):
#include spell_routines.inc
#turbo
#event hunter "#*#Your strength of the hunter spell has worn off of#*#"
#event pred "#*#Your howl of the predator spell has worn off of#*#"


Sub Main
	:mainloop
	 /assist <tankname>
	 /if ((${Target.PctHPs}<98) /autofire on
	 	 
	 /if (${FindItem[Distillate of Alacrity X].InvSlot} && !${Me.Buff[Elixir of Speed X].ID}) /call Cast "Distillate of Alacrity X" item 1.5s
	 /if (${Me.AltAbilityReady[Frost Arrows]} && !${Me.Buff[Frost of Kesh`yk I].ID}) /call Frost
	 /if (${Me.PctMana}>4) /call Buff
	 /if ((${Target.PctHPs}<96) && (${Me.CombatAbilityReady["Trueshot Discipline"]}) && (${Me.AltAbilityReady[Guardian of the Glade]} || ${Me.AltAbilityReady[Guardian of the Forest]}) && (${Me.Buff[Elixir of Speed X].ID} || ${Me.Buff[Talisman of Celerity].ID} || ${Me.Buff[Speed of Salik].ID} || ${Me.Buff[Hastening of Salik].ID} || ${Me.Buff[Speed of Vallon].ID} || ${Me.Buff[Vallon's Quickening].ID} || ${Me.Buff[Swift like the Wind].ID})) /call Trueshot
	 /if (${Me.AltAbilityReady[Auspice of the Hunter]} && !${Me.Buff[Auspice of the Hunter].ID}) /call Auspice
	 /if (${Me.AltAbilityReady[Guardian of the Glade]} || ${Me.AltAbilityReady[Guardian of the Forest]}) /call Glade
	 /doevents	 

/goto :mainloop

Sub Buff
	/if (${Me.SpellReady[Eagle Eye]} && !${Me.Buff[Eagle Eye].ID}) /call cast "Eagle Eye" gem6 5s
	/if (${Me.SpellReady[ward of the hunter]} && !${Me.Buff[ward of the hunter].ID}) /call cast "ward of the hunter" gem8 6s
	/return

Sub Frost
	/aa act Frost Arrows
	/echo Casting Frost Arrows
	/delay 3s
	/return

Sub Trueshot
	/disc Trueshot
	/aa act Guardian of the Glade
	/aa act Guardian of the Forest
	/echo Trueshotting
	/return

Sub Glade
	/aa act Guardian of the Glade
	/aa act Guardian of the Forest
	/echo Guardian of the Glades on
	/return

Sub Auspice
	/aa act Auspice of the Hunter
	/echo Auspice of the Hunter on
	/delay 3s
	/return

Sub Event_hunter
	/cast "strength of the hunter" gem3
	/echo Casting Strength of the Hunter
	/return

Sub Event_pred
	/cast "howl of the predator" gem2
	/echo Casting Howl of the Predator
	/return
 
Lets see if I canhelp you out some.

First thing, #turbo really does nothing without a number value with it. It will run plenty fast for what you want without it, but having it won't hurt anything.

The Way it's Written right now, it's going to constantly cast your haste potion. What your telling the macro is "if you find a haste potion => Cast it" need to add a line looking for that buff as well.

Next Question, are you making this as an AFK macro, or like a RangerBot? Or more as an Aid while playing?

I would make some sort of Sub for Buff Checking, and "if Me.Buff /= xxx buff, /call Cast "my buff Here" gem1" or what ever you want it to be.


I can see you putting forth the effort to learn this stuff, so I'm not going to post your answers, but better yet, give you the means and the direction to get them on your own.

I'd also Reccomend looking at my post of Events I've made. It has a lot of good snippets, and might give you some ideas on how to better your macro.(http://www.redguides.com/community/showthread.php?t=11493)

For Spell_Routines.inc this is the proper format:
(Make sure your spell_routines file name Matches your #include exactly, I don't remember if it's case sensitive or not, but worth a shot to verify it)

Taken from my Spell_Routines.inc Front Matter.

Rich (BB code):
|======================================================================================================================
|  Cast: the main subroutine that casts spells or items for you
|     Usage:
|        /call Cast "spellname|itemname|AAname|AA#" [item|alt|gem#] [give up time][s|m] [custom subroutine name]
|     Examples:
|
|     To cast Howl of Tashan and mem it in slot 3 if not memmed:
|       /call Cast "Howl of Tashan" gem3
|
|     To cast Arcane Rune and keep trying for 7 seconds, in case of interrupts.
|       /call Cast "Arcane Rune" gem5 7s
|
|     To click Grim Aura earring that's in a bag:
|       /call Cast "Shrunken Goblin Skull Earring" item
|
|     To use AA ability Eldritch Rune:
|       /call Cast "Eldritch Rune" alt
|         or
|       /call Cast "173" alt
|
|     To call a subroutine that interrupts CH if target gets healed before it lands:
|       /call Cast "Complete Healing" gem1 0 CheckHP
|     Then in your macro have somewhere:
|       Sub CheckHP
|          /if ( ${Target.PctHPs}>=80 ) /call Interrupt
|       /return
|
Hope I could help you out on your quest to creating a macro of your own.
 
You have an extra ( on this line, which will break the macro.
Rich (BB code):
/if ((${Target.PctHPs}<98) /autofire on
Try posting the errors that you get, then it'll be easier for people to help you.
 
I'm wondering. This line below checks to see if I have the item + it checks to see if I don't have the buff right? Then it continues if both are TRUE.

Rich (BB code):
/if (${FindItem[Distillate of Alacrity X].InvSlot} && !${Me.Buff[Elixir of Speed X].ID})

Is that right?

Also, I have a Gobby Earring, and it's in a bag, and I added this line to the macro, but it doesn't seem to do anything. I've looked at the spell_routines.inc to get some ideas of how to go about it, but still doesn't seem to work. I imagine there has to be some switchout of items in order for it to click properly, but I can't seem to find the correct code to switch items out. This might be the same problem I'm having w/ the haste potions. The reason i say that is because I successfully got it to click epic 2.0, with the same coding. It's gotta be something w/ the bags.

Rich (BB code):
/call Cast "Shrunken Goblin Skull Earring" item
 
zippy42167 said:
I'm wondering. This line below checks to see if I have the item + it checks to see if I don't have the buff right? Then it continues if both are TRUE.

That is correct. Although you may want to use the Stacks member to check your bufffs, so that it won't cast it if you have a buff that overwrites Elixir of Speed X.

So try the following:

Rich (BB code):
/if (${FindItem[Distillate of Alacrity X].InvSlot} && ${Spell[Elixir of Speed X].Stacks})

This means "continue if I have a Distillate of Alacrity X on me, and if the Elixir of Speed X spell stacks with my existing buffs".

zippy42167 said:
Also, I have a Gobby Earring, and it's in a bag, and I added this line to the macro, but it doesn't seem to do anything. I've looked at the spell_routines.inc to get some ideas of how to go about it, but still doesn't seem to work. I imagine there has to be some switchout of items in order for it to click properly, but I can't seem to find the correct code to switch items out. This might be the same problem I'm having w/ the haste potions. The reason i say that is because I successfully got it to click epic 2.0, with the same coding. It's gotta be something w/ the bags.

Rich (BB code):
/call Cast "Shrunken Goblin Skull Earring" item

The code there is fine, so it should work. Which version of spell_routines are you using? If it's the one in VIP, then you need MQ2Exchange to allow swapping of items before casting them.
 
I am using the VIP one, yes. Is there one that doesn't require Exchange? I try to use as few plugins as possible, because my system seems to crash when i stack too many of them up.

thank you for the clarification, and help.
 
macro issue

Users who are viewing this thread

Back
Top