Page 1 of 1

Basic. Macros help

Posted: Thu Dec 19, 2013 7:30 am
by Sicrx69
Yo, I was hoping i could get a little lain and explantion of macros.....let me explain a little of what I know or think I know..I am familiar with little script, coding and parameters. Kk first off. 1. When u create a macro and add it to the macro folder, you have to run it from Eq correct? Do you run it everytime,? For instance,,a buff macro that checks ur buffs and recasts if u dont have it...2. Do u have to run it every so often to check my buffs? 3. What does the "macro or snippet " has to be in the "main sub" mean? I see simple snippet /macros that say this but can't seem to get it to work. Does it mean
Sub main

"Macro"

/return

?

4: Does sub main indicate start of macro and / return is end?
5: how can I get a delay/pause to work in a multi line command. Like /multiline ; /bct toon1 //target toon2 //casting "buff name" gem4 -maxtries|3 ; delay 4s ; /bct toon1 //target toon3 //casting..........quick example...I have tried different things...delay...pause....timed and nothing seems to work.../pause on a separate lines works but can't get any delay to work on same multiline...

I am a very active player and constantly have questions..i box 6 atm with simple mq2 commands but would love to simplify buffing, clickies and using translocators...if anyone would be willing to field questions live during the day..I would be eternally grateful.

John
Aka
Twoslittle

Re: Basic. Macros help

Posted: Thu Dec 19, 2013 6:23 pm
by Noren
Posting from my phone, so I'll cover most but not everything.

1) Yes, all macros must be located within a 'macros' folder in your MQ2 directory. Since the macro is a script, you must tell it when to start running by typing /mac <Macro name>.mac in game.

2) You could have a constantly running macro that utilizes a loop. If you do this, you start the mac and then it sustains itself. If there's no loop, then it reads through the macro top to bottom once and ends the script. If your buff macro has no loop, then you will need to /mac buff every time you want to rebuff.

3, 4) Every macro us composed of one or more sub routines. Every macro requires a sub routine called Main. That being said, every macro should begin with Sub Main and every sub must be closed with a /return. In more complicated macros you can put some specific things before the Main sub and you can add limitless sub routines after Main. I can elaborate on this later if you'd like.

5) EQBC server and /delay is somewhat tricky. My recommendation is to use /timed instead of /delay. I would then format a command like this:
/bct <playername> //multiline ; /say action1;/timed 30 /say action2;/timed 10 /say action3

<playername> will receive the command and execute like this...
/say action1
(acknowledge /say action2, but don't execute for 30 more tenths of a second)
(acknowledge /say action3, but don't execute for 10 more tenths of a second)

The result would be
00:00 <playername> says, 'action1'
00:01 <playername> says, 'action3'
00:02
00:03 <playername> says, 'action2'

Re: Basic. Macros help

Posted: Fri Dec 20, 2013 7:17 am
by Sicrx69
Tyvm for taking the time to respond. I will try /timed tomorrow and hopefully it will work, it will help me out so much. I have tried /timed 4s but wouldn't work...guess it should have been /timed 4. Now does /timed keep you from executing another command till it's finished like pause does? So if i do something the. /timed 100, will i have to wait 100 before it will allow another command?

I am still having a little trouble understanding sub routines and sub. See if this is correct. So u have /sub main
/return

So everthing in between /sub main and /return is apart of the main macro...??? When i try some macros i have found online it seems to go thought it really fast and doesn't do anything. So if i /mac "mac name" it reads from /sub main to /return and executes line by line or goes all the way through then executes? One of the main ones i have been trying is the spell_routines.mac and it doesn't seem to work at all! I know that it could be a thousand different things but just using that as an example.

Last one....do conditional statements only work in the mac file? Or can u put them in the /bct toon //casting "spell" command ? I am stil learning them but like if below 80 mana do this or above 20 health do that.

Thx again,
John

Re: Basic. Macros help

Posted: Fri Dec 20, 2013 8:33 am
by Shin Noir
A great way to learn basic macros is by example.
Google macroquest 2 example and you get droves of information.
http://eqtitan.com/forums/viewtopic.php?f=53&t=1678
http://mqemulator.net/forum2/viewtopic. ... 7262bac66d

Googling popular macros will usually net results too. The biggest thing is be prepared to spend a lot of time learning, it isn't the best documented language, especially if you don't have programming experience.. But it's relatively powerful.

Re: Basic. Macros help

Posted: Fri Dec 20, 2013 9:42 am
by Grey
Want some good examples then check out http://code.google.com/p/e3-macro-builds/

Re: Basic. Macros help

Posted: Fri Dec 20, 2013 5:24 pm
by Sicrx69
[/quote] /bct <playername> //multiline ; /say action1;/timed 30 /say action2;/timed 10 /say action3

<playername> will receive the command and execute like this...
/say action1
(acknowledge /say action2, but don't execute for 30 more tenths of a second)
(acknowledge /say action3, but don't execute for 10 more tenths of a second)

The result would be
00:00 <playername> says, 'action1'
00:01 <playername> says, 'action3'
00:02
00:03 <playername> says, 'action2'[/quote]

I have been trying for 30 mins and /timed does not work at all. I test it out by trying /multiline ; /bct twos cleric //casting "Aura of devotion" gem6 ; /timed 100 ; /bct twos cleric //g say working

I see if i have to wait till I see the group say but i dont, its immediate. I tried increasing the time to 10000, I tried /timed 1000s, I tried //timed 1000, I tried without the ; ;. Just doesn't work.. I am using titanium client..not sure if that matters at all.

Ps. I just located this from mq2.com

/timed deciseconds command
executes a command after a specified duration (in deciseconds like pause)
note: this does not "pause" successive commands.
Example

Timed 10 echo 1 second has passed



Thx again
John

Re: Basic. Macros help

Posted: Fri Dec 20, 2013 6:42 pm
by Smoka
I believe you would want like this:

/bct twoscleric //multiline ; /say casting Aura of Devotion;/cast 6;/timed 100;/gsay working

Of course, this is off the top of my head. not sure since I don't have eq open currently.

Re: Basic. Macros help

Posted: Sat Dec 21, 2013 2:12 am
by Noren
Sicrx69 wrote:
Noren wrote:/bct <playername> //multiline ; /say action1;/timed 30 /say action2;/timed 10 /say action3

<playername> will receive the command and execute like this...
/say action1
(acknowledge /say action2, but don't execute for 30 more tenths of a second)
(acknowledge /say action3, but don't execute for 10 more tenths of a second)

The result would be
00:00 <playername> says, 'action1'
00:01 <playername> says, 'action3'
00:02
00:03 <playername> says, 'action2'


I have been trying for 30 mins and /timed does not work at all. I test it out by trying /multiline ; /bct twos cleric //casting "Aura of devotion" gem6 ; /timed 100 ; /bct twos cleric //g say working

I see if i have to wait till I see the group say but i dont, its immediate. I tried increasing the time to 10000, I tried /timed 1000s, I tried //timed 1000, I tried without the ; ;. Just doesn't work.. I am using titanium client..not sure if that matters at all.

Ps. I just located this from mq2.com

/timed deciseconds command
executes a command after a specified duration (in deciseconds like pause)
note: this does not "pause" successive commands.
Example

Timed 10 echo 1 second has passed



Thx again
John


Look at the first part of your command, how many times you use /bct, and what follows "/timed 100":

Code: Select all

/multiline ; /bct twos cleric //casting "Aura of devotion" gem6 ; /timed 100 ; /bct twos cleric //g say working

And compare to the with mine:

Code: Select all

/bct <playername> //multiline ; /say action1;/timed 30 /say action2;/timed 10 /say action3

Yours starts with /multiline and mine starts with /bct.
Yours uses /bct twice and mine uses it once.
Yours doesn't have a command to pair with the /timed command and mine does "/timed 30 /say action2". Hint: you just used the semi-colon too early.
I hope it doesn't sound like I'm picking on you, because you've really got the concept down. It's just some slight changes that will get it right on track.

If you modify yours to be:

Code: Select all

/bct twoscleric //multiline ; /casting "Aura of Devotion" gem6;/timed 100 /gsay working

I believe you will get the result you want.

Re: Basic. Macros help

Posted: Thu Dec 26, 2013 3:43 am
by Sicrx69
Thx again for the response, been out of town and havent had a chance to respond. I will check it out as soon as I get back for sure, and no didn't sound like u were picking at all. I will duplicate ur response to the T and let u know my results...again tyvm for taking the time to help.
John

Re: Basic. Macros help

Posted: Sun Dec 29, 2013 5:23 am
by Sicrx69
I tried your timed line today and it worked as u said it would, tyvm for that. Being able to put a delay in one line makes things so much eAsier. Now if i could figure out some macros i would be sitting on top of the world..its a learning process and I will figure it out eventually lol.

Do u happen to know of anyway,,if possible to control pets dealing with enrage or possibly rogue pets? I know mqmelee works great for enrage and other commands for players but a Ever heard of a way to control pets other then
Pet hold? Whatcha think?

Hiw about a way of having everyone on ur server clicking a link or mimicing one persons command..for example ...if my main toon talks to a npc the other toons say exactly what the main toon says or click. So if i speak to a NPC to take a tl or start a quest, is there a way to make my toons say what I say without typing /bcaa //say "text here" ......

Thx again.

John