• 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 --->
  • There was an optional eq update. Guest, DO NOT PATCH EQ or you'll have to wait for the next MQ update (no ETA). You can play without the patch by using patchme or autologin (preferred). If you've already patched EQ you're out of luck, unless you find someone to share the older eqgame.exe (don't ask here).
Resource icon

Guide How to Trace Calls in an MQ2 Macro

One could replace /call with a sub that then calls. E.g.
Another implementation:
/call RemoteCall "subname param0 param1..."


Sub RemoteCall(string RemoteSubParams)
    ||| One may need to cache params if needed elsewhere, but you can also use .Arg[] to extract

    /declare MacroReturn string local NULL

    ||| Debug call stack but the value of CurSub is substituted with the subname passed in
    CALLINGSUB
    CALLINGINDEX
  
    ||| Perhaps put a generic debug Entry message in here
    PUSHCALL
  
    ||| Modify the DEBUG define(s) to use the debug flags as vars rather than hardcoded and replace CurSub with name of calling sub
    DEBUGN
  
    /call ${RemoteSubParams}
    /varset MacroReturn ${Macro.Return}
  
    DEBUGN...
  
    ||| Perhaps put a generic Exit messsage in here
    POPCALL
/return ${MacroReturn}

In the remote sub, one still needs to have CALLINGSUB and CALLINGINDEX at the top to make use of DEBUG messages produced therein.

One would need to do a global search/replace for /call with /call RemoteCall, then put quotes around the sub/params.
Back
Top