• 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 --->

Macro help please. (1 Viewer)

eqsolo99

New member
Joined
Jan 30, 2005
RedCents
This macro is from the soc-music traders of haven faction macro. I editted it to do a different quest involving SH and bazaar. This is supposed to do house os stout faction and run from a guy named Hardam in midget side to Faeroi in bazaar. Problem is when it gets to bazaar it rams wall like i might of messed up a part and it thinks its in SH when its in bazaar? Im not sure i know little about coding could someone help please.
Rich (BB code):
|
| SH.mac
| Works on your Shadow Haven Faction for merchents.
| Version 1.0
| Date: August 18, 2004
|
| Be sure to check out my other macros at http://www.soc-music.com/mq2/index.htm
|
| You WILL need to in front of Gearo in the bazaar before you start it.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
|

Sub Main

  /declare Location int inner

  /call ReadINI goods.ini "Shadow Haven"
  /if (!${Defined[SHArray]}) {
     /echo No SH Array Created...
     /endmacro
  }

  /call ReadINI goods.ini "The Bazaar"
  /if (!${Defined[BazArray]}) {
     /echo No Baz Array Created...
     /endmacro
  }
  :start
  /target Hardam
  /face
  /nomodkey /say ill take the goods
  /delay 1s
  /if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
  /delay 2s
  /autoinv
  /delay 2s
  /call GMCheck
  /for Location 1 to ${Bazarray.Size}
     :MoveLoopBaz
     /if (${Zone.Name.Equal[Shadow Haven]}) /goto :SH
     /face nolook loc ${BazArray[${Location}]}
     /if (${Math.Distance[${BazArray[${Location}]}]}>4) {
        /nomodkey /keypress forward hold
        /face nolook loc ${BazArray[${Location}]}
        /look
     }
     /if (${Math.Distance[${BazArray[${Location}]}]}<=4) {
        /nomodkey /keypress forward
        /goto :next
     }
     /goto :MoveLoopBaz
     :next
     /delay 1s
  /next Location
  :SH
  /for Location 2 to ${SHArray.Size}
     :MoveLoopSH
     /face nolook loc ${SHArray[${Location}]}
     /if (${Math.Distance[${SHArray[${Location}]}]}>4) {
        /nomodkey /keypress forward hold
        /face nolook loc ${SHArray[${Location}]}
        /look
        /if (${Location}==2) /keypress u
     }
     /if (${Math.Distance[${SHArray[${Location}]}]}<=4) {
        /nomodkey /keypress forward
        /goto :nexta
     }
     /goto :MoveLoopSH
     :nexta
     /delay 1s
  /next Location
  /target Hardam
  /face
  /delay 1s
  /call OpenPacks
  /delay 1s
  /nomodkey /itemnotify ${FindItem[=Hardams box of goods].InvSlot} leftmouseup
  /delay 2s
  /click left target
  /delay 2s
  /notify GiveWnd GVW_Give_Button leftmouseup
  /delay 1s
  /call ClosePacks
  /delay 1s
  /say ill take the goods
  /delay 2s
  /autoinv
  /delay 2s
  /varset Location ${SHArray.Size}
  :SHa
  /if (${Location}>0) {   
     :MoveLoopSHa
     /if (${Zone.Name.Equal[The Bazaar]}) /goto :DoneSH
     /face nolook loc ${SHArray[${Location}]}
     /if (${Math.Distance[${SHArray[${Location}]}]}>4) {
        /nomodkey /keypress forward hold
        /face nolook loc ${SHArray[${Location}]}
        /look
        /if (${Location}==13) /keypress u
     }
     /if (${Math.Distance[${SHArray[${Location}]}]}<=4) {
        /nomodkey /keypress forward
        /goto :nextc
     }
     /goto :MoveLoopSHa
     :nextc
     /delay 1s
     /varset Location ${Math.Calc[${Location}-1]}
     /goto :SHa
  }
  :DoneSH
  /varset Location ${Math.Calc[${BazArray.Size}-1]}
  :Baza
  /if (${Location}>0) {   
     :MoveLoopBaza
     /face nolook loc ${BazArray[${Location}]}
     /if (${Math.Distance[${BazArray[${Location}]}]}>4) {
        /nomodkey /keypress forward hold
        /face nolook loc ${BazArray[${Location}]}
        /look
     }
     /if (${Math.Distance[${BazArray[${Location}]}]}<=4) {
        /nomodkey /keypress forward
        /goto :nextb
     }
     /goto :MoveLoopBaza
     :nextb
     /delay 1s
     /varset Location ${Math.Calc[${Location}-1]}
     /goto :Baza
  }
  /target Faeroi
  /face
  /delay 1s
  /call OpenPacks
  /delay 1s
  /nomodkey /itemnotify ${FindItem[=Hardams box of goods].InvSlot} leftmouseup
  /delay 2s
  /click left target
  /delay 2s
  /notify GiveWnd GVW_Give_Button leftmouseup
  /delay 1s
  /call ClosePacks
 
  /goto :start
/return

Sub GMCheck
:gmcheck
   /if (${Spawn[gm].ID}>0) {
      /echo "Waiting on GM to leave zone."
      /delay 10
      /goto :gmcheck
   }
/return



Sub ReadINI(FileName,SectionName)
   /echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}...
   /delay 1s
   
   /if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) {
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro...
      /delay 1s
      /return
   }
   /declare nValues     int local  1
   /declare nArray      int local  0
   /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}

| ****************** Locs ****************************
   :CounterLooplo
   /if (${String[${Ini[${FileName},${SectionName},Loc${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArraylo
   }
   /varcalc nValues ${nValues}+1
   /goto :CounterLooplo
   :MakeArraylo
   /if (!${nValues}) /return
   /if (${nValues}>0) {
      /echo Declaring Loc Array...
      /if (${SectionName.Equal[Shadow Haven]}) /declare SHArray[${nValues}]  string outer
      /if (${SectionName.Equal[The Bazaar]}) /declare BazArray[${nValues}]  string outer
   }
   /for nArray 1 to ${nValues}
      /if (${SectionName.Equal[Shadow Haven]}) /varset SHArray[${nArray}] ${Ini[${FileName},${SectionName},Loc${nArray}]}
      /if (${SectionName.Equal[The Bazaar]}) /varset BazArray[${nArray}] ${Ini[${FileName},${SectionName},Loc${nArray}]}
   /next nArray



   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 1s
/return

Sub OpenPacks
   /declare bag int local 0
   /declare check int local 0
   /newif (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
   /delay 1s
   /for bag 1 to 8 step 1
      /newif (${Window[Pack${bag}].Open}==FALSE) /nomodkey /itemnotify pack${bag} rightmouseup
   /next bag
   /delay 1s
   /for check 1 to 9 step 1
      /if  (${Window[TradeskillWnd].Open}) {
         /nomodkey /notify TradeskillWnd ExperimentButton leftmousehold
         /nomodkey /notify TradeskillWnd ExperimentButton leftmouseup
      }
   /next check
   /delay 1s
/return

Sub ClosePacks
   /declare bag int local 0
   /newif (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
   /delay 1s
   /for bag 1 to 8 step 1
      /newif (${Window[Pack${bag}].Open}==TRUE) /nomodkey /itemnotify pack${bag} rightmouseup
   /next bag
   /delay 1s
   /newif (${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
   /delay 1s
/return



And heres the ini for it. Yes it should work in new bazaar as i have used the traders of haven one already. I put Faeroi's loc at bottom and the ent of bazaar at top thinking that might of been 1 of the problems sense the traders of haven one starts in bazaar and this one starts in SH. It just takes off and rams walls still. Would love any help please =).


Rich (BB code):
[Shadow Haven]
Loc1=-616.42, 1468.97
Loc2=-314.24, 1491.12
Loc3=-334.69, 1521.64
Loc4=-290.73, 1537.36
Loc5=-284.45, 1564.40
Loc6=-258.86, 1568.06
Loc7=-255.96, 1489.43
Loc8=-159.05, 1501.36
Loc9=-109.66, 1544.52
Loc10=61.46, 1563.47
Loc11=99.19, 1138.61
Loc12=162.11, 1084.03
Loc13=138.48, 965.24
Loc14=60.08, 848.48
Loc15=68.94, 637.63
Loc16=88.96, 648.79
Loc17=96.58, 707.85
Loc18=295.44, 740.89
Loc19=350.00, 900.00


[The Bazaar]
Loc1=-183.12, -353.19
Loc2=-153.12, -353.19
Loc3=-155.03, -305.91
Loc4=-110.32, -272.13
Loc5=-0.29, -270.36
Loc6=-1.42, -100.09
Loc7=15.08, -29.04
Loc8=20.13, -11.58
 
I'd like to say because those path files are so choppy.....The number gap in locs goes up to nearly 100 at some times. Might want to fill in more locs etc, make it smoother...and you might stop giving your toon concussions.
 
The gaps are just for the long runs in SH those arnt the problems. Bazaar should work fine as far as locs go i think its something i messed up with in the code itself.
 
if i were you and were set on using this...

I would take out all your movement stuff... the readini etc.. and use advpath

your trying to re invent the wheel....

advpath works .. records and plays the path np.

just 2cp from me
 
I think I am going way beyond what I am able to do now...but..when I was having some pathing problems with a macro...I opened one of the files and saw where it called out to a pathing .ini (I think)...I could use advpath (because it records the path I take??) save it to whatever .ini my current macro is looking for in the path I want to redo?

I am sure there is more to it...but just wondering if I got the main points of advpath?
 
lol

ummm i didn't understand what you wrote.. it all seems jumbles together

Quick Lowdown on Advpath


FIles found here MQ2 forum

First you will make your own advpath files

you need to have advpath.inc and advpath2.inc

use this code letmein posted to record your paths

Rich (BB code):
|--/startrec name_of_pathfile begins the record process.
|--/stoprec stops recording
|--/playfile name_of_saved_pathfile will replay it for you for testing purposes.

#event PlayFile "[MQ2] playfile #1#"

#include advpath.inc

Sub Main
  /call InitAPFVars 1 15 20
  /squelch /alias /startrec /echo record
  /squelch /alias /stoprec  /echo stop
  /squelch /alias /playfile /echo playfile
  :Main_Loop
  /call AdvPathPoll
  /delay 5
  /doevents
  /goto :Main_Loop
/return

Sub WaitTilThere
  :LoopTilThere
  /if (${PathingFlag}==1) {
    /call AdvPathPoll
    /delay 1
    /doevents
    /goto :LoopTilThere
  }
/return

Sub Event_PlayFile(string Line, string PathFile)
  /call PlayFunction "${PathFile} 1 nf nopp noz"
  /call WaitTilThere
/return

/echo startrec filename

walk your path ... and i suggest walk ...

now the path is recorded as filename


put this into your macro where you want to call the path

/call PlayFunction "filename 1 cf nopp noz"
 
So confusing to me lol. Guess ill mess with it some tomarrow sounds like a nice code. Thanks for posting it hehe now its time to see if i can get it to work. I think alot of people would like to use this macro for easy faction.
 
Macro help please.

Users who are viewing this thread

Back
Top