Updating SH Faction.mac by Bad Karma

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Updating SH Faction.mac by Bad Karma

Post by aChallenged1 » Fri Aug 13, 2004 10:01 am

This has been completed and updated, see Macro Depot V3.0.

Code: Select all

|  SH Faction Macro 
|  by Bad Karma updated by aChallenged 1
| 
|  Start this macro from inside the room with Steaon (Alchemy guy) in SH. 
| 

#turbo 40 
#include advpath.inc 


Sub Main 
   /call InitAPFVars 1 13 20 
   /keypress ESC 

:MainLoop 
   /doevents 

| ------------------------------------------------------------------- 
| 1. Make sure we're close enough to Steaon. 
| 2. Give Steaon the items from Gearo. 
| 3. Get item from Steaon to take to Gearo. 
| ------------------------------------------------------------------- 
   /call PlayFunction "Steaon_to_Door 1 cr nopp noz" 
   /call WaitTilThere 
   /delay 1s 


| -------------------------- 
| Get the stuff from Steaon. 
| -------------------------- 
/target Steaon
/face
    /If (${Cursor.ID}) {
      /click left target
      /delay 3s
      /nomodkey /notify MerchantWnd DoneButton leftmouseup
      /delay 3s
   }
/delay 5
/say I will make a trip to the bazaar 
   /delay 3s 
   /keypress ESC 


| --------------------------- 
| Run to Gearo in the Bazaar. 
| --------------------------- 
   /call PlayFunction "Steaon_to_Door 1 cf nopp noz" 
   /call WaitTilThere 
   /delay 1s 
   /face loc 240,1540 
   /delay 3 
   /keypress u 
   /delay 1s 
   /call PlayFunction "Door_to_Bazaar 1 cf nopp z" 
   /call WaitTilThere 
   /delay 1s 
   /face loc -875,-175 
   /delay 2s 
   /call PlayFunction "Gearo_to_SH 1 cr nopp noz" 
   /call WaitTilThere 


| ---------------------------------------------- 
| 1. Give Gearo the item from Steaon 
| 2. Get item from Gearo to take back to Steaon. 
| ---------------------------------------------- 
   /delay 1s 
/target gearo
/face
    /If (${Cursor.ID}) {
      /click left target
      /delay 3s
      /nomodkey /notify MerchantWnd DoneButton leftmouseup
      /delay 3s
   }
/delay 5
/say I will take the gems 
   /delay 3s 
   /keypress ESC 


| ------------------------- 
| Run back to Steaon in SH. 
| ------------------------- 
   /call PlayFunction "Gearo_to_SH 1 cf nopp z" 
   /call WaitTilThere 
   /delay 1s 
   /face loc 300,740 
   /delay 2s 
   /call PlayFunction "Door_to_Bazaar 1 cr nopp noz" 
   /call WaitTilThere 
   /delay 1s 
   /face loc 265,1540 
   /delay 4 
   /keypress u 
   /delay 1s 
| ---------------------------------- 
| Rinse, Repeat, until we /endmacro. 
| ---------------------------------- 
   /goto :MainLoop 
/return 

Sub WaitTilThere 
   :LoopTilThere 
      /if (${PathingFlag}==1) { 
         /call AdvPathPoll 
         /delay 1 
         /doevents 
         /goto :LoopTilThere 
      } 
/return
I actually started running it, ironed out a few problems, but now (asside from needing to update the path files to stop running into walls, lol) have an issue with it CTD when it enters bazaar, last thing I noticed as I was monitoring its progress is that it targeted some named mob. It should not be targeting anyone/thing except Gearo and Steaon. Would someone kindly look at this and see what I missed, please.
Last edited by aChallenged1 on Tue Aug 17, 2004 10:27 am, edited 1 time in total.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

Mimatas
a hill giant
a hill giant
Posts: 262
Joined: Wed Mar 10, 2004 4:22 pm

Post by Mimatas » Fri Aug 13, 2004 12:00 pm

there's always the chance that a "gearo" matches a longer, closer PC trader name. Perhaps you should try /target npc Gearo instead?

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Fri Aug 13, 2004 12:17 pm

While that is possible, it should not have targeted anything at all, at that point. Unless of course I screwed up and the path file is screwed up.

Making a pure path run mac to test the pathing.

Thanks for the input, always appriciated.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Fri Aug 13, 2004 12:58 pm

This has all been worked out, posting completed version.
Last edited by aChallenged1 on Tue Aug 17, 2004 10:23 am, edited 1 time in total.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

Mimatas
a hill giant
a hill giant
Posts: 262
Joined: Wed Mar 10, 2004 4:22 pm

Post by Mimatas » Fri Aug 13, 2004 5:12 pm

I'm not anywhere I can test this... but my first step would be to /mqlog (not sure how to actually use it.. only heard about it) and insert echos at every step.. to narrow down where the CTD is happening.

You also may want to check up on the pathing macro you're using. I know advpath has been around for a while, and MQ has changed quite a bit since it was first written. Not that it doesn't work... but there's a good chance that, if it wasn't updated, it's broken.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Fri Aug 13, 2004 5:18 pm

This is no longer an issue, posting completed macro.
Last edited by aChallenged1 on Tue Aug 17, 2004 10:24 am, edited 1 time in total.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Fri Aug 13, 2004 5:28 pm

If worse comes to worse with Advpath, you could always use the move.inc at http://macroquest2.com/phpBB2/viewtopic.php?t=7207

Mimatas
a hill giant
a hill giant
Posts: 262
Joined: Wed Mar 10, 2004 4:22 pm

Post by Mimatas » Fri Aug 13, 2004 5:35 pm

I found that the problem is /face based. Everytime /face is used it looks up and causes trouble with advpath's ability to move through doors and such. I've put it in as a bug and will look more into it. I'll see if I can find and figure out the /mqlog function.
maybe change all of the /face instances with /face nolook

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Fri Aug 13, 2004 5:40 pm

I wonder if it's maybe the way MQ handles params compared to the way it used to? Just noticed how the /call PlayFunction has parenthasis around all the params, instead of just seperate.

FrankJScott
naggy
naggy
Posts: 2399
Joined: Sun Feb 19, 2023 7:11 am

Recommended Workspace Management And Moving Solutions Blog

Post by FrankJScott » Tue Aug 12, 2025 4:13 pm

why not just google it