Getting basic macros to work....?!?

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

EQ_Nutzer
a lesser mummy
a lesser mummy
Posts: 36
Joined: Tue Dec 23, 2003 2:39 pm

Getting basic macros to work....?!?

Post by EQ_Nutzer » Tue Dec 30, 2003 5:40 pm

After reading the help, most of the board and thoroughly using the search function I could not find a solution to my following problem and would really appreciate help if possible:

Whenever I excecute a macro I get the message: "The current macro has ended" in the MQ2 window and nothing happens at all.

MQ2 is correctly installed and functional, all the basic commands work. I can Echo variables and all that without a problem but as soon as I include those things in a macro I get the above mentioned message.
Sub Main
/declare MYVARIABLE global
/declare MYVARIABLE2 global
/declare MYVARIABLE3 global

/varset MYVARIABLE "This scripting stuff is easy as pie."
/varset MYVARIABLE2 "Yep, it sure is."
/varset MYVARIABLE3 123456

/echo @MYVARIABLE
/echo @MYVARIABLE2
/echo @MYVARIABLE3
/return



Put that in notepad and save it as testecho.mac in your macro directly, which is probably c:\mq\release\macros\

Once you've got it saved, go into EverQuest with MacroQuest open, and type /macro testecho.mac

You will see something that looks like this:

[MacroQuest] This scripting stuff is easy as pie.
[MacroQuest] Yep, it sure is.
[MacroQuest] 123456
Named this one test.mac and of course tried this also as most basic macro with the same result: "The current macro has ended" as output.

/echo $macro => says test.mac ist running but I got no output only above mentioned message.

Any ideas?

Just pointing me in the rigth direction as I woudl like to work it out on my own if possible.

Thanks in advance

EQ_Nutzer

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Tue Dec 30, 2003 11:44 pm

RTFM, /filter

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Tue Dec 30, 2003 11:53 pm

doh!
bumped again...
bah...who needs post count. /lol

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Wed Dec 31, 2003 12:09 am

Did you get

[MacroQuest] This scripting stuff is easy as pie.
[MacroQuest] Yep, it sure is.
[MacroQuest] 123456
the macro has ended


or only
the macro has ended.

If you got the first part then it ran correctly. It is written to set those variables up and enter that info to it then put the three lines out to your MQ window, then End. So if you got the first part then you got the correct thing happening. If all you get is the End message then you need to look further.

EQ_Nutzer
a lesser mummy
a lesser mummy
Posts: 36
Joined: Tue Dec 23, 2003 2:39 pm

Post by EQ_Nutzer » Wed Dec 31, 2003 7:04 am

Thanks Goofmester1 for trying to help as I think this is no RTFM question!

Did you get

[MacroQuest] This scripting stuff is easy as pie.
[MacroQuest] Yep, it sure is.
[MacroQuest] 123456
the macro has ended

[MacroQuest] This scripting stuff is easy as pie
or only
the macro has ended.

If you got the first part then it ran correctly. It is written to set those variables up and enter that info to it then put the three lines out to your MQ window, then End. So if you got the first part then you got the correct thing happening. If all you get is the End message then you need to look further.
I of course knew that I should get the first part as output and I also understood what the macro "should" do.

I tried to explain above (maybe misunderstandable due to my lack of being a native speaker) that all I got from running that macro as output in MQ2 window was:

"The current macro has ended" => just that and nothing more (not the above mentioned "[MacroQuest] This scripting stuff is easy as pie" as I should)

So what I wanted to ask is if anybody knows what might be the reason for that (I am of course new to MQ but I understand how macros work, how to compile and I think I would be able to write own basic macro scripts like the ones found in the depot).

MQ is working on the first glance correctly (swho, Echoing variables and all that), like if I say /echo $target(name) I get a correct output in MQ2 window but as soon as I put a

Sub Main
....code.... (e.g. /echo $target(name)
/return

in and try to run that macro (named e.g. test.mac) all I get is: "The current macro has ended"

Interestingly when I do a /echo $macro MQ2 tells me that the macro (e.g. test.mac) is running but NOTHING at all happened besides the message: "The current macro has ended"

Any ideas on that as I cannot explain to me why this is happening and did not find a reference to this kind of thing while searching the forum.

If the "developers" (who did a damn fine job with getting MQ to work) think this is RTFM well give me that status, I think its a legitimate problem and would really appreciate help or just a "try probabaly this".

Thanks in advance, I wish all of you a good start in 2004

EQ_Nutzer

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Wed Dec 31, 2003 10:08 am

You need to read what he just told you...

The macro is obviously running, therefore your filters are filtering it out.

If you can in deed /echo $char(name) and all that stuff... Type

Code: Select all

/filter macros all
That should fix your problem... Lax did help you, and you should've gone to read the manual.

EQ_Nutzer
a lesser mummy
a lesser mummy
Posts: 36
Joined: Tue Dec 23, 2003 2:39 pm

Post by EQ_Nutzer » Wed Dec 31, 2003 11:26 am

Well, I have read the manual thoroughly and I had done /filter macros all ;)

To simplify it again I have done a clean/fresh compile + install exactly following the instructions and doing /filter macros all (gave me the following output in the MQ2chatwindow: "Filtering of macros changed to: all")

=> as aboce the commands work but the problem remains the same, whenever I excecute a complex macro (with Sub MAin....code... /return) I get the message "The current macro has ended" and NOTHING else happens, no other output and no error messages (even with /filter macros set to all).

=> Interestingly I can /echo $macro (showing the macro as running in MQ2chatwindow) and I can also /endmacro and /echo $macro it again (showing the message [MQ2] None... for no running macro).

=> But whenever I run a "macro" regardless of it being selfwritten and most basic or from the depot I get "The current macro has ended" and nothing more no output/no actions/no errors.

=> e.g. "/click right rfinger" on e.g.Dain ring DOES work and give me the effect but as soon as I do a macro like
Sub main
/click right rfinger
/return

I get => "The current macro has ended"

Ideas?

Really appreciate the input given and am trying to find out myself what is happening ;)

Thansk in advance

EQ_Nutzer

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Wed Dec 31, 2003 2:16 pm

Are you on an English server/client?

EQ_Nutzer
a lesser mummy
a lesser mummy
Posts: 36
Joined: Tue Dec 23, 2003 2:39 pm

Post by EQ_Nutzer » Wed Dec 31, 2003 3:51 pm

I am playing on one of the european servers (Kael Drakkal/the german one => due to working for an US firm over here and it being a fun server).

I know that MQ2 was basically written for the US servers but the offsets for the german eq.exe are the same (at least those I checked myself) and as mentioned above the commands work.

The european servers are just one or two patches behind usually, so atm I use the MQ2.zip from 12/07/03 which is working fine (offsets match) besides my above mentioned problem.

MQ1 could be "adjusted" by just modifying old EQLib_Hooks.cpp and changing
class CChatHook
{
public:
VOID Trampoline(PCHAR szMsg, DWORD dwColor, DWORD dwUnknown);
VOID Detour(PCHAR szMsg, DWORD dwColor, DWORD dwUnknown)
{
DebugSpew("CChatHook::Detour(%s)",szMsg);
gbInChat = TRUE;
if ((!strncmp(szMsg,"You have entered ",17)) || (strstr(szMsg," saved."))) {
if (gZoning) {
gDelayZoning += gZoneDelay;
gZoning=FALSE;
}
to
if ((!strncmp(szMsg,"You have entered ",17)) || (strstr(szMsg," saved."))) {

And change the "you have entred" , '17' & " saved"
Is there any way to adjust MQ2 or am I missing something?

If there is I would be willing to keep track of the changes after each patch and of course post them here for the fellow european players.

Thanks for the replies so far.

EQ_Nutzer