What to do with Player made macro's

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

Moderator: MacroQuest Developers

gambit69
orc pawn
orc pawn
Posts: 10
Joined: Tue Jul 13, 2004 2:49 pm

What to do with Player made macro's

Post by gambit69 » Tue Jul 13, 2004 3:02 pm

I was wondering what to do with player made macros. Do you have to type the whole thing in by hand and with some that have file links where do you put them after you download them?
I've tried reading the help file but there was so much information that i never found my answer. Maybe if someone made a sticky about what to do with player made macros it might help alot of others too. :) thanks

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

Post by aChallenged1 » Tue Jul 13, 2004 4:15 pm

I will grant that it doesn't seem to specifically walk you through how to do this. However, I'm not going to tell you how either. Consider it a test to see if you should really be using this program. If you figure it out, then cool. If you can't... well... sorry.

You will get help when you get past this point and your questions become more specific. I sure did. The community is willing to help you, but there are limits. Those limits are pretty much individualized. Nobody here will be likely to take you by the hand and walk you step by step on. Then again, I've been wrong before.

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

Post by aChallenged1 » Tue Jul 13, 2004 4:20 pm

One pointer: look in your mq2 directory.

missingfiles
a hill giant
a hill giant
Posts: 224
Joined: Wed Jun 09, 2004 1:15 pm

Post by missingfiles » Tue Jul 13, 2004 4:23 pm

Here is an example:

http://macroquest2.com/phpBB2/viewtopic.php?t=8213

You would make a file called acorn.mac

Then copy all the code into that file

Code: Select all

| Misty Thicket Acorns Macro : acorns.mac 
| Macro by "Caffeine"; 
| DummyMode portion contributed unknowingly by psykotic and BrainDeath 

#chat tell 
#event AcornsOut "[MQ2] NULL" 
Sub Main 
/declare Side int outer 2 
/declare TSide int outer 
/declare Pause timer outer 
/declare X2 int outer 
/declare Y2 int outer 
/declare LocYP2 int outer 
/declare LocYM2 int outer 
/declare LocXP2 int outer 
/declare LocXM2 int outer 
| Time in minutes to wait if GM zones in or person gets too close. 
/declare DummyTime int outer 
/declare DummyTime2 int outer 15 
/declare Count int outer 
/declare X int outer 
/declare Y int outer 
/declare LocX int outer 
/declare LocXP int outer 
/declare LocXM int outer 
/declare LocY int outer 
/declare LocYP int outer 
/declare LocYM int outer 
:Begin 
/varcalc DummyTime ${DummyTime2}*600 
/doevents 
/if (${Spawn[gm].ID}) /call DummyMode 
/varset Count 100 
/itemtarget *Green 
/doevents 
|------------------------Begin Determine Side (Aimed for accuracy)----------------| 
/varset X ${Me.X} 
/varset Y ${Me.Y} 
/if (${X}<-38.51 && ${Y}>-148.95) /varset Side 1 
/if (${Y}<-148.95 && ${Y}>-180.77 && ${X}<-60.01) /varset Side 1 
/if (${Y}<-180.77 && ${Y}>-217.53 && ${X}<-92.28) /varset Side 1 
/if (${Y}<-217.53 && ${Y}>-250.21 && ${X}<-117.23) /varset Side 1 
/if (${Y}<-250.21 && ${Y}>-281.90 && ${X}<-132.30) /varset Side 1 
/if (${Y}<-281.90 && ${Y}>-318.48 && ${X}<-149.63) /varset Side 1 
/if (${Y}<-318.48 && ${Y}>-353.96 && ${X}<-168.68) /varset Side 1 
/if (${Y}<-353.96 && ${Y}>-372.38 && ${X}<-194.76) /varset Side 1 
/if (${Y}<-372.38 && ${Y}>-406.97 && ${X}<-242.62) /varset Side 1 
/if (${Y}<-406.97 && ${Y}>-436.08 && ${X}<-286.41) /varset Side 1 
/if (${Y}<-436.08 && ${Y}>-458.42 && ${X}<-312.38) /varset Side 1 
/if (${Y}<-458.42 && ${Y}>-487.87 && ${X}<-312.73) /varset Side 1 
/if (${Y}<-487.87 && ${Y}>-552.88 && ${X}<-313.52) /varset Side 1 
/if (${Y}<-552.88 && ${Y}>-580.92 && ${X}<-337.42) /varset Side 1 
/if (${Y}<-580.92 && ${Y}>-604.01 && ${X}<-361.09) /varset Side 1 
/if (${Y}<-604.01 && ${Y}>-623.84 && ${X}<-381.41) /varset Side 1 
/if (${Y}<-623.84 && ${Y}>-646.12 && ${X}<-404.25) /varset Side 1 
/if (${Y}<-646.12 && ${Y}>-656.06 && ${X}<-419.88) /varset Side 1 
/if (${Y}<-656.06 && ${Y}>-701.68 && ${X}<-421.05) /varset Side 1 
/if (${Y}<-701.68 && ${Y}>-760.85 && ${X}<-422.01) /varset Side 1 
/if (${Y}<-760.85 && ${Y}>-788.74 && ${X}<-434.44) /varset Side 1 
/if (${Y}<-788.74 && ${Y}>-844.72 && ${X}<-459.62) /varset Side 1 
/if (${Y}<-844.72 && ${Y}>-860.35 && ${X}<-464.97) /varset Side 1 
/if (${Y}<-860.35 && ${X}<-466.83) /varset Side 1 
/if (${X}>-38.51 && ${Y}>-148.95) /varset Side 0 
/if (${Y}<-148.95 && ${Y}>-180.77 && ${X}>-60.01) /varset Side 0 
/if (${Y}<-180.77 && ${Y}>-217.53 && ${X}>-92.28) /varset Side 0 
/if (${Y}<-217.53 && ${Y}>-250.21 && ${X}>-117.23) /varset Side 0 
/if (${Y}<-250.21 && ${Y}>-281.90 && ${X}>-132.30) /varset Side 0 
/if (${Y}<-281.90 && ${Y}>-318.48 && ${X}>-149.63) /varset Side 0 
/if (${Y}<-318.48 && ${Y}>-353.96 && ${X}>-168.68) /varset Side 0 
/if (${Y}<-353.96 && ${Y}>-372.38 && ${X}>-194.76) /varset Side 0 
/if (${Y}<-372.38 && ${Y}>-406.97 && ${X}>-242.62) /varset Side 0 
/if (${Y}<-406.97 && ${Y}>-436.08 && ${X}>-286.41) /varset Side 0 
/if (${Y}<-436.08 && ${Y}>-458.42 && ${X}>-312.38) /varset Side 0 
/if (${Y}<-458.42 && ${Y}>-487.87 && ${X}>-312.73) /varset Side 0 
/if (${Y}<-487.87 && ${Y}>-552.88 && ${X}>-313.52) /varset Side 0 
/if (${Y}<-552.88 && ${Y}>-580.92 && ${X}>-337.42) /varset Side 0 
/if (${Y}<-580.92 && ${Y}>-604.01 && ${X}>-361.09) /varset Side 0 
/if (${Y}<-604.01 && ${Y}>-623.84 && ${X}>-381.41) /varset Side 0 
/if (${Y}<-623.84 && ${Y}>-646.12 && ${X}>-404.25) /varset Side 0 
/if (${Y}<-646.12 && ${Y}>-656.06 && ${X}>-419.88) /varset Side 0 
/if (${Y}<-656.06 && ${Y}>-701.68 && ${X}>-421.05) /varset Side 0 
/if (${Y}<-701.68 && ${Y}>-760.85 && ${X}>-422.01) /varset Side 0 
/if (${Y}<-760.85 && ${Y}>-788.74 && ${X}>-434.44) /varset Side 0 
/if (${Y}<-788.74 && ${Y}>-844.72 && ${X}>-459.62) /varset Side 0 
/if (${Y}<-844.72 && ${Y}>-860.35 && ${X}>-464.97) /varset Side 0 
/if (${Y}<-860.35 && ${X}>-466.83) /varset Side 0 
/echo ${Target.Name} 
/varset X ${Target.X} 
/varset Y ${Target.Y} 
/if (${X}<-38.51 && ${Y}>-148.95) /varset TSide 1 
/if (${Y}<-148.95 && ${Y}>-180.77 && ${X}<-60.01) /varset TSide 1 
/if (${Y}<-180.77 && ${Y}>-217.53 && ${X}<-92.28) /varset TSide 1 
/if (${Y}<-217.53 && ${Y}>-250.21 && ${X}<-117.23) /varset TSide 1 
/if (${Y}<-250.21 && ${Y}>-281.90 && ${X}<-132.30) /varset TSide 1 
/if (${Y}<-281.90 && ${Y}>-318.48 && ${X}<-149.63) /varset TSide 1 
/if (${Y}<-318.48 && ${Y}>-353.96 && ${X}<-168.68) /varset TSide 1 
/if (${Y}<-353.96 && ${Y}>-372.38 && ${X}<-194.76) /varset TSide 1 
/if (${Y}<-372.38 && ${Y}>-406.97 && ${X}<-242.62) /varset TSide 1 
/if (${Y}<-406.97 && ${Y}>-436.08 && ${X}<-286.41) /varset TSide 1 
/if (${Y}<-436.08 && ${Y}>-458.42 && ${X}<-312.38) /varset TSide 1 
/if (${Y}<-458.42 && ${Y}>-487.87 && ${X}<-312.73) /varset TSide 1 
/if (${Y}<-487.87 && ${Y}>-552.88 && ${X}<-313.52) /varset TSide 1 
/if (${Y}<-552.88 && ${Y}>-580.92 && ${X}<-337.42) /varset TSide 1 
/if (${Y}<-580.92 && ${Y}>-604.01 && ${X}<-361.09) /varset TSide 1 
/if (${Y}<-604.01 && ${Y}>-623.84 && ${X}<-381.41) /varset TSide 1 
/if (${Y}<-623.84 && ${Y}>-646.12 && ${X}<-404.25) /varset TSide 1 
/if (${Y}<-646.12 && ${Y}>-656.06 && ${X}<-419.88) /varset TSide 1 
/if (${Y}<-656.06 && ${Y}>-701.68 && ${X}<-421.05) /varset TSide 1 
/if (${Y}<-701.68 && ${Y}>-760.85 && ${X}<-422.01) /varset TSide 1 
/if (${Y}<-760.85 && ${Y}>-788.74 && ${X}<-434.44) /varset TSide 1 
/if (${Y}<-788.74 && ${Y}>-844.72 && ${X}<-459.62) /varset TSide 1 
/if (${Y}<-844.72 && ${Y}>-860.35 && ${X}<-464.97) /varset TSide 1 
/if (${Y}<-860.35 && ${X}<-466.83) /varset TSide 1 
/if (${X}>-38.51 && ${Y}>-148.95) /varset TSide 0 
/if (${Y}<-148.95 && ${Y}>-180.77 && ${X}>-60.01) /varset TSide 0 
/if (${Y}<-180.77 && ${Y}>-217.53 && ${X}>-92.28) /varset TSide 0 
/if (${Y}<-217.53 && ${Y}>-250.21 && ${X}>-117.23) /varset TSide 0 
/if (${Y}<-250.21 && ${Y}>-281.90 && ${X}>-132.30) /varset TSide 0 
/if (${Y}<-281.90 && ${Y}>-318.48 && ${X}>-149.63) /varset TSide 0 
/if (${Y}<-318.48 && ${Y}>-353.96 && ${X}>-168.68) /varset TSide 0 
/if (${Y}<-353.96 && ${Y}>-372.38 && ${X}>-194.76) /varset TSide 0 
/if (${Y}<-372.38 && ${Y}>-406.97 && ${X}>-242.62) /varset TSide 0 
/if (${Y}<-406.97 && ${Y}>-436.08 && ${X}>-286.41) /varset TSide 0 
/if (${Y}<-436.08 && ${Y}>-458.42 && ${X}>-312.38) /varset TSide 0 
/if (${Y}<-458.42 && ${Y}>-487.87 && ${X}>-312.73) /varset TSide 0 
/if (${Y}<-487.87 && ${Y}>-552.88 && ${X}>-313.52) /varset TSide 0 
/if (${Y}<-552.88 && ${Y}>-580.92 && ${X}>-337.42) /varset TSide 0 
/if (${Y}<-580.92 && ${Y}>-604.01 && ${X}>-361.09) /varset TSide 0 
/if (${Y}<-604.01 && ${Y}>-623.84 && ${X}>-381.41) /varset TSide 0 
/if (${Y}<-623.84 && ${Y}>-646.12 && ${X}>-404.25) /varset TSide 0 
/if (${Y}<-646.12 && ${Y}>-656.06 && ${X}>-419.88) /varset TSide 0 
/if (${Y}<-656.06 && ${Y}>-701.68 && ${X}>-421.05) /varset TSide 0 
/if (${Y}<-701.68 && ${Y}>-760.85 && ${X}>-422.01) /varset TSide 0 
/if (${Y}<-760.85 && ${Y}>-788.74 && ${X}>-434.44) /varset TSide 0 
/if (${Y}<-788.74 && ${Y}>-844.72 && ${X}>-459.62) /varset TSide 0 
/if (${Y}<-844.72 && ${Y}>-860.35 && ${X}>-464.97) /varset TSide 0 
/if (${Y}<-860.35 && ${X}>-466.83) /varset TSide 0 
:Z 
/doevents 
/if (${Spawn[gm].ID}) /call DummyMode 
|------------------------End Determine Side (Aimed for accuracy)----------------| 
/if (${Side}==${TSide}) /goto :GoTo 
/if (${Side}!=${TSide}) /goto :Side 
:GoTo 
/if (${Target.Distance}<10) /goto :GoTo2 
/delay 1 
| -----------------------------------STUCK LOOP---------------------| 
   /varset X2 ${Me.X} 
   /varset Y2 ${Me.Y} 
   /varcalc LocXP2 ${X2}+1 
   /varcalc LocXM2 ${X2}-1 
   /varcalc LocYP2 ${Y2}+1 
   /varcalc LocYM2 ${Y2}-1 
   /varset Count 100 
     /if (${Spawn[gm].ID}) /call DummyMode 
   /delay 5 
   /if (${LocXP2}>${Me.X} && ${LocXM2}<${Me.X} && ${LocYP2}>${Me.Y} && ${LocYM2}<${Me.Y}) { 
      /face loc ${Math.Rand[10000], ${Math.Rand[10000] 
      /keypress forward hold 
      /delay 2s 
      /goto :Begin 
      } 
/keypress forward hold 
/face 
/varset Count ${Count}-1 
/goto :GoTo 
:GoTo2 
/keypress forward 
/click left item 
/delay 8 
/autoinv 
  /if (${Spawn[gm].ID}) /call DummyMode 
/goto :Begin 

:Side 
/if (${Side}==0 && ${TSide}==1) { 
/varset   LocY -100.00 
/varset LocX 13.58 
/varcalc LocXP ${LocX}+10 
/varcalc LocXM ${LocX}-10 
/varcalc LocYP ${LocY}+10 
/varcalc LocYM ${LocY}-10 
   /varset X2 ${Me.X} 
   /varset Y2 ${Me.Y} 
   /varset Count 100 
   /delay 3 
   /if (${X2}==${Me.X} && ${Y2}==${Me.Y}) { 
      /face loc ${Math.Rand[10000], ${Math.Rand[10000] 
      /keypress forward hold 
      /delay 2s 
      /goto :Begin 
      }        
        /if (${Spawn[gm].ID}) /call DummyMode          
:Loopa 
/face loc ${LocY}, ${LocX} 
/keypress forward hold 
   /varset X2 ${Me.X} 
   /varset Y2 ${Me.Y} 
   /varcalc LocXP2 ${X2}+1 
   /varcalc LocXM2 ${X2}-1 
   /varcalc LocYP2 ${Y2}+1 
   /varcalc LocYM2 ${Y2}-1 
   /varset Count 100 
   /delay 5 
   /if (${LocXP2}>${Me.X} && ${LocXM2}<${Me.X} && ${LocYP2}>${Me.Y} && ${LocYM2}<${Me.Y}) { 
      /face loc ${Math.Rand[10000], ${Math.Rand[10000] 
      /keypress forward hold 
      /delay 2s 
      /goto :Begin 
      } 
        /if (${Spawn[gm].ID}) /call DummyMode 
/varset X ${Me.X} 
/varset Y ${Me.Y} 
/if (${LocXP}>${Me.X} && ${LocXM}<${Me.X} && ${LocYP}>${Me.Y} && ${LocYM}<${Me.Y}) /goto :Loopb 
/goto :Loopa 
:Loopb 
/varset LocY -100.00 
/varset LocX -88.00 
/varcalc LocXP ${LocX}+10 
/varcalc LocXM ${LocX}-10 
/varcalc LocYP ${LocY}+10 
/varcalc LocYM ${LocY}-10 
   /varset X2 ${Me.X} 
   /varset Y2 ${Me.Y} 
   /varcalc LocXP2 ${X2}+1 
   /varcalc LocXM2 ${X2}-1 
   /varcalc LocYP2 ${Y2}+1 
   /varcalc LocYM2 ${Y2}-1 
   /varset Count 100 
   /delay 5 
   /if (${LocXP2}>${Me.X} && ${LocXM2}<${Me.X} && ${LocYP2}>${Me.Y} && ${LocYM2}<${Me.Y}) { 
      /face loc ${Math.Rand[10000], ${Math.Rand[10000] 
      /keypress forward hold 
      /delay 2s 
      /goto :Begin 
      } 
/face loc ${LocY}, ${LocX} 
/keypress forward hold 
/if (${LocXP}>${Me.X} && ${LocXM}<${Me.X} && ${LocYP}>${Me.Y} && ${LocYM}<${Me.Y}) /goto :Begin 
/goto :Loopb 
} 
/if (${Side}==1 && ${TSide}==0) { 
:Loopc 
/varset LocY -100.00 
/varset LocX -88.00 
/varcalc LocXP ${LocX}+10 
/varcalc LocXM ${LocX}-10 
/varcalc LocYP ${LocY}+10 
/varcalc LocYM ${LocY}-10 
      /varset X2 ${Me.X} 
   /varset Y2 ${Me.Y} 
   /varcalc LocXP2 ${X2}+1 
   /varcalc LocXM2 ${X2}-1 
   /varcalc LocYP2 ${Y2}+1 
   /varcalc LocYM2 ${Y2}-1 
   /varset Count 100 
   /delay 5 
   /if (${LocXP2}>${Me.X} && ${LocXM2}<${Me.X} && ${LocYP2}>${Me.Y} && ${LocYM2}<${Me.Y}) { 
      /face loc ${Math.Rand[10000], ${Math.Rand[10000] 
      /keypress forward hold 
      /delay 2s 
      /goto :Begin 
      } 
        /if (${Spawn[gm].ID}) /call DummyMode 
/face loc ${LocY}, ${LocX} 
/keypress forward hold 
/if (${LocXP}>${Me.X} && ${LocXM}<${Me.X} && ${LocYP}>${Me.Y} && ${LocYM}<${Me.Y}) /goto :Loopd 
/goto :Loopc 
:Loopd 
/varset   LocY -100.00 
/varset LocX 13.58 
/varcalc LocXP ${LocX}+10 
/varcalc LocXM ${LocX}-10 
/varcalc LocYP ${LocY}+10 
/varcalc LocYM ${LocY}-10 
      /varset X2 ${Me.X} 
   /varset Y2 ${Me.Y} 
   /varcalc LocXP2 ${X2}+1 
   /varcalc LocXM2 ${X2}-1 
   /varcalc LocYP2 ${Y2}+1 
   /varcalc LocYM2 ${Y2}-1 
   /varset Count 100 
   /delay 5 
   /if (${LocXP2}>${Me.X} && ${LocXM2}<${Me.X} && ${LocYP2}>${Me.Y} && ${LocYM2}<${Me.Y}) { 
      /face loc ${Math.Rand[10000], ${Math.Rand[10000] 
      /keypress forward hold 
      /delay 2s 
      /goto :Begin 
      }            
/face loc ${LocY}, ${LocX} 
/keypress forward hold 
/varset X ${Me.X} 
/varset Y ${Me.Y} 
/if (${LocXP}>${Me.X} && ${LocXM}<${Me.X} && ${LocYP}>${Me.Y} && ${LocYM}<${Me.Y}) /goto :Begin 
/goto :Loopd 
} 

:Pause 
/echo PAUSE 
/echo PAUSE 
/echo PAUSE 
/echo PAUSE 
/endmacro 
/return 

Sub event_AcornsOut 
/echo Acorns out, entering Delay sequence 
/afk Back in a few my good friends. 
/keypress forward 
/sit 
/delay 4m 
/return 

Sub event_chat 
/call DummyMode 
/return 



Sub DummyMode 
   /beep 
   /beep 
   /beep 
   /echo Entering Dummy Mode... 
   /afk Be back in a wee bit. 
   /sit on 
   :waitabit 
   /delay ${DummyTime} 
   /if (${Spawn[gm].ID}) /call DummyMode 
   /afk off 
   /stand 
   /call Main 
/return 

*Code is the yellow text above.

Then you would place acorn.mac in your macro folder.

In game you would type /macro acorn

Thats it some macros are more involved and you will have to make multiple files. Most names of those files are included in the 1st line of the macro as above | Misty Thicket Acorns Macro : acorns.mac <-- (there).

Im assuming you already followed all the directions and compiled macroquest2 correctly. You do not need to recompile MQ2 to use macros.

gambit69
orc pawn
orc pawn
Posts: 10
Joined: Tue Jul 13, 2004 2:49 pm

Post by gambit69 » Tue Jul 13, 2004 6:18 pm

Yeah it's compiled right. I'm having fun with the some of the map features. Another question i have is why are the macros coming up as quicktime files (i'm suspecting that it's because of the .mac extension) and what do i actually use to make a .mac file.

Averad, thank you for helping me to understand this. Unlike some people who like to be selfish and not help new people. Just because some are new to the program doesn't make us dumb. I'm one that once i get the hang as to how things work I'm off and running. Till then I ask alot of questions if i can't seem to locate the answers on my own or I'm not looking up the right words to find them. It was that way when i built my first computer. I read and if i didn't understand something i kept asking people till i found someone that could help and now i can build a computer mostly on my own (those dang tiny wires for the HD led and reset still give me a headache, lol).

For those that are actually helpful I thank you. Those that basically say "HA, go figure it out yourself" (why you would want to come out and say it instead of just remaining quite is beyond me) to heck with. :p

missingfiles
a hill giant
a hill giant
Posts: 224
Joined: Wed Jun 09, 2004 1:15 pm

Post by missingfiles » Tue Jul 13, 2004 6:21 pm

*.mac is the standard extension for quicktime images.

Just make a txt file (right click - new - text document) the rename it to acorn.txt (as in our example) then add the code inside by opening your new mac file with notepad. Eather open note pad then browse to your mac file and open it OR right click on your max file and use open with... command if its avalible for your OS. Then jsut select word pad or note pad.

L8ter

Av

JWWQ
a lesser mummy
a lesser mummy
Posts: 30
Joined: Sat Jun 19, 2004 4:58 pm

easy tere tiger.

Post by JWWQ » Tue Jul 13, 2004 9:49 pm

I am surprised that averad actually posted that. Nice guy that he is, there is a rite of passage that comes from gutting it out and not being fed on a silver plate.

I am not a coder.

I learned MQ2 (sortof.. /em snickers at his own pathetic uselessness)

you can too.

if people needing a hand-holding were openly coddled here, soon there would be a sub-community of takers with little investment and therefore little care to what happens to MQ. Be wary about labeling people who have been here making a decent name for themselves through hard work, informed posts and intellectual integrity.

Lax helps those who help themselves. I know how you feel, though. And I hope you get your hands really really dirty because it's more fun MQing than it is EQing.

(at least for me)