Goto page Previous  1, 2, 3  Next Public Macros Macro basics - a tutorial
Reply
How does one actually use the code?
I am completely new to the use of macros and in order to get my feet wet. Can someone connect the dots from the examples in this post to actually using it in the game? Let's say I wanted to make all the toons say hello as indicated above (or whatever) but the total of the process was going to require more than just writing it into a hotkey/social button. What does one do to integrate these bits of code written on the web and ultimately interact with them in game?

Can someone walk me through the process of adding this into the programs and all the steps necessary to make it run? I apologize for my complete lack of understanding, but I just can't find a post here that I can understand regarding how to actually integrate the code into the programs and use them.

I have successfully installed and run the mqemu with successful echo's on all my instances.

I am running the "classic" set-up and am presently running on EZ server.

The limit of my understanding of macros is writing stuff in a social and copying it to a hotkey. I have figured out how to do the very basic stuff (with some variations). They are all obscenely simple things like:

/bca //target TOON
/bca //stick

and

/bc TOON //target TOON
/bc TOON //cast 1

I don't understand 99% of everything written in here, nor do I really understand how to make use of the eqbcserver, the HUD, and the various supporting plug-ins.

I want to learn how to make use of these fantastic tools. Although I have no background nor experience in writing the elaborate and beautiful code you all so effectively work with... I do appreciate it. I would like to understand the code at a simple level and how integrating the ini files, etc... into the software works. I get by with these types of small hotkeys, but really am intrigued by the more complex code you are working with. I simply don't understand any but the most basic facets of it.

Thank you for your time and the consideration of helping me. Surely if I figure out the simple pieces like this one, I will try something more complex. I certainly hope so. There was a "group scan heal" thread (in locked macro area) that looked interesting, and definitely a complexity step up without taking me way outside my realm of ability to learn... The fantastically complex code threads just totally lose me at this point, but I do hope to learn.

Again, thanks for your time and the excellent tools.

Adam
Mon Feb 20, 2012 11:22 pm
Sent you a PM with the basics and some intermediate steps for hot keys.

Hot keys are snippets of code that can be combined into macros as you gain comprehension of how the code interacts with the game and MQ2 plugins. One thing that helped me along the way was to think of /bct as a (tell) to a toon (or channel of toons) and /bca as a command to all toons.

There are some folks here that can address creating and integrating macros much better than I can, but the snippets I sent will get you started enjoying MQ2 very quickly. And once you hit a wall with those you can always get a gold membership here and gain access to much more elegant code and capability for your team.
Tue Feb 21, 2012 9:20 am
To run a macro, copy the code or write your code in a basic text file. In the macroquest folder create a folder called "Macros". Put your text file in there and give it a .mac extension. It should look something like:

c:/blah/Macroquest/Macros/NewMacro.mac

To run it execute /mac NewMacro


EQBCHud is kind of old and is mostly replaced by MQ2EmuCharacters. To get that up and running you should just have to follow the quick start guide in the gold->general forum. Basically you just need to start EQBC and connect. If you are sending /bc commands then you are connected. Then using netbots do "/netbots send on" and "/netbots grab on". Netbots will use EQBC to send information about characters back and forth over EQBC. Netbots houses all that data about characters in some variables, it's these variables that populate the EmuCharacter hud. You also need to be logged in using MQ2VMQNET, this is the plugin that verifies your membership.

The first thing you should read up on is the MQ2EQBC documentation. Simply having a grasp on this plugin will let you send those remote commands to your characters. The second step is reading up on the plugins that add more command and control that you can send over EQBC. Check out MoveUtils for follow commands and commands to stick your toons on mobs or to have camps made. Check out EmuNetAdvPath for a cool follow routine that uses netbots location data which is more accurate than the in game data. Check out MQ2Meele and MQ2Cast for some commands to help automate your fighting.

The main gold plugin emumap, emucharacters, emuinventory, emutiler are all mostly ambient... you set them up and forget about them, and most of them work with little effort out of the box (once you are logged in with netbots and eqbc activated). The primary difficulty with them arises when you try to modify emucharacters and emuinventory; their ini files resemble code, but it is done to make them highly customizable. You can actually put new graphics in, entirely change the layout and display whatever data you want. You might get comfortable with using plugins and setting up hotkeys before you delve into macro writing or modifying the ini on emucharacter/emuinventory.
Tue Feb 21, 2012 9:33 am
Project Lead
Thank you both very much
I appreciate your quick responses, and I look forward to digging into the details.

I'd suggest a sticky for noobs like me that has this sort of very basic info in it. If there is one, I am sorry I couldn't find it!

Adam
Tue Feb 21, 2012 10:02 am
stick code problems
I haven't been able to make the code posted a few post back in this thread work for me:

/pause 2, /bca //squelch /target clear
/bca //stick ID ${Me.ID} hold !front uw

That is a cut and paste of the code from the prior post and I am cut and pasting it into my UI... I'd love to get this working!


Oh, and I have used them as separate buttons and the first line works as it is intended - wipes the group target to nothing.

The second line works as its own button only if I manually assign their targets to me before clicking it.

Is it possibly //squelch /target clear?
I have been able to get:

/bca //target TOON
/bca /bca //stick ID ${Me.ID} hold !front uw

to work.

Additionally,
Let's say my casters are autocasting and I want to make them stop before they get the stick command. What macro kills/stops a macro?

For example let's say all my casters are training up their Div skills by autocasting True North (or whatever) with something like this:

/pause 2, /casting # gem1 -maxrtries|5-targetid|${Target.ID} -kill

But I want them all to stop and stick to my main to go someplace else. Is there a way to cancel that autocast macro from my main toon?

Adam
Last edited by peasanthero on Thu Feb 23, 2012 9:32 am; edited 1 time in total
Thu Feb 23, 2012 9:07 am
But I want them all to stop and stick to my main to go someplace else. Is there a way to cancel that autocast macro from my main toon?

No because that is not a macro, it is simply a command. once a command is issued it is done. there is nothing else you can do with it.

As for your stick issue.
Increasing the /pause generally takes care of the problem. /pause 10 = 1 second.

Macro
More +
/bca //stick ID ${Me.ID} hold !front uw
This works best when the toon has no current target. If the toon has a target when a stick command comes thorugh it will generally stick to the target instead of the specified ID. That is why the /target clear is in there first.

Instead of doing a /target clear you could simply change it to
Macro
More +
/pause 2, /bca //target ID ${Me.ID}
/bca //stick hold !front uw


I personally always preferred to use /target clear because that way i know there is no accidental sticking going on to another target. But both methods work.
_________________
Sorvani
Thu Feb 23, 2012 11:19 am
Senior Project Member
I make a button on my main.

Follow
/bca //target ID ${Me.ID}
/pause 2
/bca //stick


and the stop button.

Stop
/bca //stick off
Thu Feb 23, 2012 12:32 pm
Listen to This Guy
HELP ME UNDERSTAND MACROS MORE, PLEASE!
Okay, I read the posts here and PM'd a few people. I need help.


I understand how to create a .txt file and save it as a .mac file and then copy into the right folder. I THINK I understand how to load that once I'm in the game or whatever (/plugin (name of file here). But that is it.

I am VERY new to this and know how to use the /bca, /bct to get my toons to sit, cast spell slot 1 or 2 or whatever, stick, but that is about it. Currently, I have hot keys made for everyone in party to stick to me, everyone sit at same time, everyone attack the mob I have targeted (but they are all grouped up and its a mess). But I have my enchanter trying to pierce along with my cleric half the time.

Can you tell me (or link the sites) that explain in a simple manner in regards to:

1) How do I see that macro I have saved as a .mac in the game (I am used to a "macro" that I have created on those 5 lines being there that I have used as a hotkey)? How do I know who is using what and how do I know my guys will heal properly etc once that macro is written? OR is the purpose of me loading that macro (like a healing one) to have my cleric always heal my toons when they are less than 70% health? They just do it all the time without me telling them to do anything?

2) Here are the guys in my group to 6-box with. Pally, Beastlord, Enchanter, CLeric, Shaman, Mage. I may replace enchanter with a warrior or something someday, but for now this is my setup. Here is what I would like to be able to do and I am sure there are ways to make it better:

I use the mage as my "main". I like to pet pull, then send in the tanks etc. I would like pally to always taunt to hold aggro. This way I can pull off my pet and go get another MOB to bring back etc. Rinse repeat. In the mean time, my beastlord (because he has a good weapon) is pulling the aggro, because I can't hit the taunt hot hey on pally and play my mage at the same time. Then, while Pally or beastlord gets ass kicked, I would like Shaman and or Cleric to heal them up why I am pulling another mob. How can I do this without using hot keys that have /bct macros tied to them? Because then when I think the cleric is medding, he isn't he has been standing for 5 minutes etc.

Are there some basic macros I can utilize to accomplish some simple things I am trying to do or do I just need to polish up on all of my /bca and /bct hotkeys? They might already be written but since I don't understand computer codes (IF commands and all that) this is overwhelming. It would be nice to just rename the toons in the already written code to my guys names etc. I THINK I could adjust the numbers to have them heal when I want (say when tank is at 60% vs. 50% cast higher level healing spell).

THoughts or am I dreaming?
Fri Mar 09, 2012 12:24 pm
The cOmmand to run test.mac would be "/Mac test"

1. A macro can do pretty much whatever you want it too. It can be 20 lines that only heals or 3000 lines that runs your character while you sleep. As far as knowing it will work... You dont... Every macro has issues just like every program has bugs. The longer you use it the more bugs you find. The more bugs you fix the more reliable it will be.

2. This isn't exactly my department but hotkeys can handle almost everything. One of the most common places a macro fills in is with auto heals.

We can describe macros till we are blue in the face and you'll make limited prOgress towards understanding them. However if you just start writing one, something small, you'll be a decent script written in just a week or so. There's nothing better than jumping in head first.
Fri Mar 09, 2012 12:56 pm
Project Lead
1) How do I see that macro I have saved as a .mac in the game

You don't. You can see that a macro exists by using the /listmacros command but you can't see the contents of the macro in game. You have to use a third party program (text editor like notepad, wordpad, etc) to view the macro.

(I am used to a "macro" that I have created on those 5 lines being there that I have used as a hotkey)?

Those are hotkeys. They are part of the EQ client and not part of MQ. EQ called them macros at one time, but the difference between an EQ hotkey and a MQ macro is night and day.

How do I know who is using what

Characters use the macro you tell them to use (/macro name_of_macro). Each character can use a different MQ macro. Each character can only use 1 MQ macro at a time. If you want a character to use a different MQ macro, then you have to stop the current macro (/endmacro) then start the new one (/macro name_of_new_macro).

To check which macro a character is using, type in: /echo ${Macro.Name}

If the character is using a macro at that time, the name of the macro will appear in the MQ window. If NULL appears, then that character isn't using a macro.

how do I know my guys will heal properly etc once that macro is written

If the macro works it works. If the macro doesn't work it doesn't work. There is no way to "prove" a macro will do what you want it to do until you try it.

is the purpose of me loading that macro (like a healing one) to have my cleric always heal my toons when they are less than 70% health? They just do it all the time without me telling them to do anything?

This is the goal of a good macro. The macro tells your character to watch for certain conditions (example: player health less than 70%) then issues commands based on those conditions (example: cast heal spell on that player with less than 70% health). The macro will run that loop over and over and over until you tell it to stop or until you quit the game.

I would like pally to always taunt to hold aggro.

Check out MQ2Melee. It's not a macro, but a plugin. All your melee characters should be using MQ2Melee to do stuff like taunt, backstab, kick, send in pets, etc.

Then, while Pally or beastlord gets ass kicked, I would like Shaman and or Cleric to heal them up why I am pulling another mob. How can I do this without using hot keys that have /bct macros tied to them? Because then when I think the cleric is medding, he isn't he has been standing for 5 minutes etc.

Are there some basic macros I can utilize to accomplish some simple things I am trying to do or do I just need to polish up on all of my /bca and /bct hotkeys? They might already be written but since I don't understand computer codes (IF commands and all that) this is overwhelming. It would be nice to just rename the toons in the already written code to my guys names etc. I THINK I could adjust the numbers to have them heal when I want (say when tank is at 60% vs. 50% cast higher level healing spell).

Look for a healing macro that suits your needs. There are many sources of macros. The public macro section has one that will work after a little editing (simple level 10 druid macro). The private macro section has several available: read the sticky for obtaining access. The original MacroQuest forums still have macros available in their Macro Depot v3.0 section.
Fri Mar 09, 2012 2:50 pm
Senior Project Member
While I have a target and I am using, 4 songs and 4 debuffs.

/if (!${Me.Casting.ID}) /twist 1 2 3 4 5 6 7 8

When the target dies, the debuffs stop working and the next sub picks up:


/if (!${Me.Casting.ID}) /twist 1 2 3 4

However when I again acquire a new target, since I am already singing

/if (!${Me.Casting.ID}) /twist 1 2 3 4 5 6 7 8 no longer works.

Using

/if (${Target.PctHPs}<0.97 && ${Target.Type.Equal[NPC]} && $(Target.Type.NotEqual[CORPSE])) /twist stop

Does not work, I don't want to do anything complicated and I don't want"/twist stop" repeated over and over again.

Would /if (${Target.PctHPs}> 0.97 && ${Target.Type.Equal[NPC]} && $(Target.Type.NotEqual[CORPSE])) /twist stop work to stop the "/twist 1 2 3 4" song, and then start the be "/if (!${Me.Casting.ID}) /twist 1 2 3 4 5 6 7 8" song.
Thu Jan 10, 2013 7:34 am
If you use MQ2Melee:
Macro
More +
/if (${Melee.Combat} && ${Twist.List.NotEqual[<list of combat numbers>]}) /twist <list of combat numbers>

...

/if (!${Melee.Combat} && ${Twist.List.NotEqual[<list of non-combat numbers>]}) /twist <list of non-combat numbers>
If not:
Macro
More +
/if (${Me.Combat} && ${Twist.List.NotEqual[<list of combat numbers>]}) /twist <list of combat numbers>

...

/if (!${Me.Combat} && ${Twist.List.NotEqual[<list of non-combat numbers>]}) /twist <list of non-combat numbers>


Short description:
When your bard turns attack on and isn't using the combat twist, it will issue the combat /twist. If attack is off and it's not using the non-combat twist it will issue the non-combat twist. The lists of combat and non-combat twists can be defined/used as a variable.
Thu Jan 10, 2013 11:01 am
Senior Project Member
I tried the latter, because i don't use MQ2melee. It almost worked, the twist was turning off before it finished the 1st song.

So i combined my 1st mac with that one.

Macro
More +

Sub Song


/if (${Target.PctHPs}> 0.97) /goto :L
/if (${Me.Combat}) /twist stop
/if (!${Me.Casting.ID}) /twist 2 3 8 9
/return
:L
/if (!${Me.Combat}) /twist stop
/if (!${Me.Casting.ID}) /twist 1 2 3 4 5 6 8 9
 }
/return


That works with Titanium Client. Now I am good! Thanks!

[/syntax]
Thu Jan 10, 2013 11:36 pm
Macro
More +
#define CMBT_SONGS "1 2 3 4 5 6 8 9"
#define REST_SONGS "2 3 8 9"

Sub Song
   | if you are in combat and your twists don't match
   | what they should be when in combat...
   /if        (${Me.Combat}  && ${Twist.List.NotEqual[CMBT_SONGS]})) {
      /twist stop
      /delay 2s (!${Me.Casting.ID})
      /twist CMBT_SONGS

   | else if you are NOT in combat and your twists don't
   | match what they should be when NOT in combat...
   } else /if (!${Me.Combat} && ${Twist.List.NotEqual[REST_SONGS]})) {
      /twist stop
      /delay 2s (!${Me.Casting.ID})
      /twist REST_SONGS      
   }
/return


Give this a shot. Your's looks like it might go into a spam of stopping and starting...

If you target a merchant at full life it will jump to L, you won't be in combat so it will twist stop, you won't be casting so it will start your combat twist. Then it'll do it again next time through cause nothing has changed.

I don't know if it is important to wait until you stop casting to start twisting again. If it's not important you can remove the delay...

EDIT: this is mostly grumbles code, i don't know diddly about bards or /twist
Fri Jan 11, 2013 10:08 am
Project Lead
I tried MQ2Melee and this seems to work, will try the one above TY Maudigan.

Macro
More +

Sub Song
/if (${Target.PctHPs}<97 && ${Target.Type.Equal[NPC]} && ${Target.Type.NotEqual[CORPSE]})  /goto :L
/if (${Melee.Combat}) /twist stop
/if (!${Me.Casting.ID}) /twist 2 3 8 9
/return

:L

/if (!${Melee.Combat}) /twist stop
/if (!${Me.Casting.ID}) /twist 1 2 3 4 5 6 8 9
 }
/return
[/syntax]
Fri Jan 11, 2013 10:12 pm
Goto page Previous  1, 2, 3  Next Public Macros Macro basics - a tutorial
Reply