SHFaction.mac
Code: Select all
|
| SH Faction Macro
| by Bad Karma
|
| Start this macro from inside the room with Steaon (Alchemy guy) in SH.
|
#turbo 40
#include advpath.inc
Sub Main
/call InitAPFVars 1 15 20
/press 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
/call delay 1s
| --------------------------
| Get the stuff from Steaon.
| --------------------------
/target Steaon
/call delay 2s
/if $cursor()=="TRUE" {
/click left target
/call delay 3s
/click left npctrade give
/call delay 3s
}
/call delay 5s
/say I will make a trip to the Bazaar.
/call delay 5s
/press ESC
| ---------------------------
| Run to Gearo in the Bazaar.
| ---------------------------
/call PlayFunction "Steaon_to_Door 1 cf nopp noz"
/call WaitTilThere
/call delay 1s
/face loc 240,1540
/call delay 2s
/doortarg
/call delay 2s
/press u
/call delay 1s
/call PlayFunction "Door_to_Bazaar 1 cf nopp z"
/call WaitTilThere
/call delay 1s
/face loc -875,-175
/call 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.
| ----------------------------------------------
/call delay 1s
/target Gearo
/call delay 2s
/if $cursor()=="TRUE" {
/click left target
/call delay 3s
/click left npctrade give
/call delay 3s
}
/call delay 5s
/say I will take the gems.
/call delay 5s
/press ESC
| -------------------------
| Run back to Steaon in SH.
| -------------------------
/call PlayFunction "Gearo_to_SH 1 cf nopp z"
/call WaitTilThere
/call delay 1s
/face loc 300,740
/call delay 2s
/call PlayFunction "Door_to_Bazaar 1 cr nopp noz"
/call WaitTilThere
/call delay 1s
/face loc 265,1540
/call delay 2s
/doortarg
/call delay 2s
/press u
/call delay 1s
| ----------------------------------
| Rinse, Repeat, until we /endmacro.
| ----------------------------------
/goto :MainLoop
/return
Sub WaitTilThere
:LoopTilThere
/if n @PathingFlag==1 {
/call AdvPathPoll
/call delay 1
/doevents
/goto :LoopTilThere
}
/returnI found it necessary to make this first part 2 seperate path files, due to problems with targeting and opening the door. When I had it all in one file, I would often get stuck running into the corner of the room, or trying to open the wall just to the right of the door from outside, due to AdvPath's anti-collision code. Using the next 2 pathing files made it 10,000 times more accurate and efficient, especially when using a SOW type spell.
PathFile_Steaon_to_Door.ini
Code: Select all
[PFLocs]
0=265.00 1560.00 -55.25
1=265.00 1540.00 -55.25
2=255.00 1540.00 -55.25PathFile_Door_to_Bazaar.ini
Code: Select all
[PFLocs]
0=240.00 1540.00 -55.25
1=240.00 1390.00 -55.25
2=300.00 1320.00 -55.25
3=300.00 1170.00 -55.25
4=150.00 1075.00 -55.25
5=150.00 980.00 -55.25
6=55.00 860.00 -55.25
7=55.00 630.00 -55.25
8=90.00 630.00 -55.25
9=90.50 740.00 -55.25
10=300.00 740.00 -55.25
11=300.00 670.00 -55.25
12=320.00 670.00 -55.25I don't know how lag will affect this now. I have NPCs (traders) hidden in Bazaar, so I never lagged.
PathFile_Gearo_to_SH.ini
Code: Select all
[PFLocs]
0=-510.00 -175.00 3.75
1=-530.00 -175.00 3.75
2=-595.00 -140.00 3.75
3=-780.00 -140.00 3.75
4=-830.00 -175.00 3.75
5=-875.00 -175.00 3.75
6=-875.00 -215.00 3.75
7=-885.00 -215.00 3.75
