Page 1 of 1

Updating SH Faction.mac by Bad Karma

Posted: Fri Aug 13, 2004 10:01 am
by aChallenged1
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.

Posted: Fri Aug 13, 2004 12:00 pm
by Mimatas
there's always the chance that a "gearo" matches a longer, closer PC trader name. Perhaps you should try /target npc Gearo instead?

Posted: Fri Aug 13, 2004 12:17 pm
by aChallenged1
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.

Posted: Fri Aug 13, 2004 12:58 pm
by aChallenged1
This has all been worked out, posting completed version.

Posted: Fri Aug 13, 2004 5:12 pm
by Mimatas
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.

Posted: Fri Aug 13, 2004 5:18 pm
by aChallenged1
This is no longer an issue, posting completed macro.

Posted: Fri Aug 13, 2004 5:28 pm
by Night Hawk
If worse comes to worse with Advpath, you could always use the move.inc at http://macroquest2.com/phpBB2/viewtopic.php?t=7207

Posted: Fri Aug 13, 2004 5:35 pm
by Mimatas
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

Posted: Fri Aug 13, 2004 5:40 pm
by Night Hawk
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.

Recommended Workspace Management And Moving Solutions Blog

Posted: Tue Aug 12, 2025 4:13 pm
by FrankJScott
why not just google it