Macro depository for macros written before the user variable changes that broke all of them.
Moderator: MacroQuest Developers
-
NotGM
- decaying skeleton

- Posts: 5
- Joined: Thu Aug 29, 2002 4:29 pm
-
Contact:
Post
by NotGM » Thu Aug 29, 2002 4:31 pm
Code: Select all
|
|This macro will save to the log directory
| the code necessary for
|repeating the path you travel after you
|type in /macro RecordPath.mac
|
|Before you begin you must have these
|conditions satisfied otherwise the
|program is unpredictable:
|
|1. Before you begin start running the
|program you must face the
|direction you are going to start traveling in.
|
|2. No speed buffs on.
|
|
|Now when you are done traveling
|a path and you want to stop recording
|just open up your inventory panel
|and the macro will terminate writing to
|the log file the last location and
|heading to file.
|
|
|What I would like to see in the future
|is a parsing program to turn the
|headings,locations, and zones the
|log file into a macro for path traveling.
|Sorry I dont think I will do that
|because school is coming up
|and I dont have the time.
|
|Also I may or may not add a
|standard format for path recording
|through a zone. I do
|have the logic written to do it but I
|am again not sure if i will have the
|time to do it.
|
|Also add the ablitity to record opening
|doors and talking to npcs and
|what not.
|
|If you would like to talk to me i may
|or may not be on #MacroQuest at
|irc.trifocus.net
|
|Also i would like comments to be
|added to the log file by the player so
|that he can say shit about where he is
|and what he is looking at at the
|that moment
|was having trouble with getting #chat
|say to work with the player
|someone try to get this working
|would they and post it.
|
|Macro By: NotGm
|Date: I dont know I am not working
|or going to school and my girlfriend
|is gone to her moms for over a week
|now so I have lost all track of
|time. All I can say is many moons
|have pasted in everquest.
|
Sub Main
/if $invpanel==TRUE /press i
/varset v2 $int($char(x))
/varset v3 $int($char(y))
/mqlog Started Recording in Zone: $zone
/mqlog Heading: $int($char(heading))
/mqlog Location: $v3,$v2
:PathLoop
|
| $v4 is the distance traveled since last saved location.
|
| Sorry about the math here but i
| dont trust this script language
| enough to do more then a two
| variable calculation. I am sure it
| will work faster if you do the
| calculation in one line maybe. But
| I know this works so i go with it ok.
|
/varset v5 $int($char(x))
/varset v6 $int($char(y))
/varcalc v7 $v5*$v5
/varcalc v8 2*$v5*$v2
/varcalc v9 $v2*$v2
/varcalc v10 $v6*$v6
/varcalc v11 2*$v6*$v3
/varcalc v12 $v3*$v3
/varcalc v13 $v7-$v8
/varcalc v14 $v13+$v9
/varcalc v15 $v14+$v10
/varcalc v16 $v15-$v11
/varcalc v4 $v16+$v12
|
| Now if we have traveled a distance
| of greater then or equal to 5 units
| save the new heading to log file.
| Note: Euler had a great method
| for approximating a path travel
| in a field.
| So what i did is use that idea for
| path approximation. Right now
| I use 5 units as the distance
| between saves but the smaller
| the number the better our
| approximation will be in the path
| to travel that we saved to the
| log file.
|
/if n $v4>=5 /mqlog Heading: $int($char(heading))
|
| Now if we have traveled a
| distance of greater then or
| equal to 15 units
| then save the new location
| we are at to the log file,
| and the new y,x location
| becomes the old saved location.
|
/if n $v4>=15 {
/mqlog Location: $v6,$v5
/varset v2 $v5
/varset v3 $v6
}
/if $invpanel==FALSE /goto :PathLoop
/call Quit
/return
Sub Quit
/mqlog Heading: $int($char(heading))
/mqlog Location: $int($char(y)),$int($char(x))
/mqlog Ended Recording in Zone: $zone
/endmacro
/return
|
|Sub PlayerComment
| /echo entered playercomment
| /mqlog |
| /mqlog | Comment by Player:
| /mqlog | Heading: $int($char(heading))
| /mqlog | Location: $int($char(y)),$int($char(x))
| /mqlog |
| /mqlog | $p2
| /mqlog |
| /echo exit playercomment
|/return
|
-
NotGM
- decaying skeleton

- Posts: 5
- Joined: Thu Aug 29, 2002 4:29 pm
-
Contact:
Post
by NotGM » Thu Aug 29, 2002 4:48 pm
[2002/08/29 15:38:34] Started Recording in Zone: Greater Faydark
[2002/08/29 15:38:34] Heading: 347
[2002/08/29 15:38:34] Location: 30,-134
[2002/08/29 15:38:37] Heading: 26
[2002/08/29 15:38:37] Location: 38,-136
[2002/08/29 15:38:38] Heading: 26
[2002/08/29 15:38:38] Location: 57,-134
[2002/08/29 15:38:38] Heading: 31
[2002/08/29 15:38:38] Location: 74,-125
[2002/08/29 15:38:39] Heading: 31
[2002/08/29 15:38:39] Location: 93,-115
[2002/08/29 15:38:40] Heading: 31
[2002/08/29 15:38:40] Location: 111,-104
[2002/08/29 15:38:41] Heading: 117
[2002/08/29 15:38:41] Location: 129,-93
[2002/08/29 15:38:42] Heading: 207
[2002/08/29 15:38:42] Heading: 207
[2002/08/29 15:38:42] Location: 116,-97
[2002/08/29 15:38:43] Heading: 207
[2002/08/29 15:38:43] Location: 91,-110
[2002/08/29 15:38:44] Heading: 197
[2002/08/29 15:38:44] Location: 67,-123
[2002/08/29 15:38:45] Heading: 199
[2002/08/29 15:38:45] Location: 42,-132
[2002/08/29 15:38:46] Heading: 316
[2002/08/29 15:38:46] Location: 29,-136
[2002/08/29 15:38:48] Heading: 18
[2002/08/29 15:38:48] Location: 29,-136
[2002/08/29 15:38:48] Ended Recording in Zone: Greater Faydark
-
NotGM
- decaying skeleton

- Posts: 5
- Joined: Thu Aug 29, 2002 4:29 pm
-
Contact:
Post
by NotGM » Thu Aug 29, 2002 4:52 pm
This is the item farming macro with path traveling through zones,
selling of evergreens, and avoiding of trees and what not with new routines for GotoLoc and GotoTarg for more intelligent movement.
Code: Select all
| - Farming.mac -
| use /macro farming.mac "item name" |without the "s
| press F9 once and make sure ur char is in the center
| and zoom out as much as possible
#include routines.mac
Sub Main
/press F9
varset v85 0
varset v87 1
varset v90 0
/varset v54 30s
/mqlog
:again
/call StatStuff
/delay 5
/itemtarget $p0
/call Runto
/call AutoRun 0
/delay 10
/delay 20
/doevents
/call Pickup
/if n $char(hp,pct)<50 /call BeingAttacked
/if $freeinv(space)==0 {
/if $invpanel==TRUE /press i
/press F9
/press F9
/press F9
/press F9
/call NeedToSell
/press F9
}
/goto :again
/return
Sub Runto
/echo running
/face fast item
/call AutoRun 1
:runningto
/doevents
/varadd v85 1
/varset v67 "$char(x)"
/varset v68 "$char(y)"
/if n "$v67"=="$char(x)" /if "$v68"=="$char(y)" /call Tree
/if n "$v85"=="50" /face item
/if n "$v85"=="50" /varset v85 0
/if n "$distance(item)"<"10" /goto :done
/goto :runningto
:done
/return
sub Pickup
/if $invpanel==TRUE /press i
/echo picking up
/face fast item
/cleanup
/delay 20
/click left item
/delay 30
/click left auto
/delay 5
/varadd v87 1
/if $invpanel==TRUE /press i
/doevents
/return
sub Tree
/delay 10
/varcalc v69 $char(heading)+135
/press space
/sendkey down up
/sendkey down up
/face fast heading $v69
/delay 5
/call runto
/return
sub StatStuff
/echo starting to look for the $v87 , $p0
/if n "$V87"=="10 /varadd V90 10
/if n "$v87"=="10" /mqlog You have found $v90 , $p0
/if n "$v87"=="10" /varset v87 1
/return
Sub Event_Timer
/if n $t54==0 {
/doability 4
/varset t54 30s
}
/return
Sub NeedToSell
| Going to go sell to dwarf in BB
/call GotoLoc -1535,2357
/face heading 90
/call GotoLoc -1554,2559
/face heading 120
/call GotoLoc -1581,2642
/face heading 190
/call GotoLoc -1639,2632
/face heading 105
/call GotoLoc -1650,2673
/face heading 105
/sendkey down up
/sendkey down up
| Note that the secret to zoning and not crashing is the delay
| Because i belive when you are zoning the memory location for
| the name of the zone will not have anything in it for a while
| because it must be cleared out for the new zone string to go in.
| Thus is you do not delay you will be looking in a memory location
| that has garbage in it and you will crash everquest so remember to
| use a little delay below is the code i use regularly.
/delay 50
:WaitForBB
/if "$zone"~~"lock" /goto :InBB
/goto :WaitForBB
:InBB
/delay 10
/face heading 105
/call GotoLoc -1331,-3073
/face heading 45
/call GotoLoc -1299,-3043
/face heading 325
/call GotoLoc -1240,-3089
/face heading 0
/call GotoLoc -1154,-3062
/face heading 45
/call GotoLoc -1100,-3000
/target izbal
/face izbal
/call GotoTarg izbal
/face izbal
| Selling to dwarf
/if $invpanel==TRUE /press i
/click right target
:WaitForMerchantWindowToOpenBeforeSelling
/if $merchant!=TRUE /goto :WaitForMerchantWindowToOpenBeforeSelling
/sendkey down shift
/delay 10
/call SellItems "Evergreen Leaf"
/sendkey up shift
/press esc
| Back to GF
/call GotoLoc -1100,-3000
/face heading 225
/call GotoLoc -1154,-3062
/face heading 225
/call GotoLoc -1171,-3079
/face heading 145
/call GotoLoc -1299,-3043
/face heading 225
/call GotoLoc -1331,-3073
/face heading -75
/call GotoLoc -1320,-3082
/sendkey down up
/sendkey down up
| Note that the secret to zoning and not crashing is the delay
| Because i belive when you are zoning the memory location for
| the name of the zone will not have anything in it for a while
| because it must be cleared out for the new zone string to go in.
| Thus is you do not delay you will be looking in a memory location
| that has garbage in it and you will crash everquest so remember to
| use a little delay below is the code i use regularly.
/delay 50
:WaitForGF
/if "$zone"~~"fay" /goto :InGF
/goto :WaitForGF
:InGF
/delay 10
/face heading -75
/call GotoLoc -1639,2632
/face heading 10
/call GotoLoc -1581,2642
/face heading -60
/call GotoLoc -1554,2559
/face heading 270
/call GotoLoc -1535,2357
/return
Sub GotoLoc
/varset v91 $rand(5)
:GotoLocLoop
/varset v5 "$char(x)"
/varset v6 "$char(y)"
/face fast loc $p0
/call AutoRun 1
| Check to make sure where not stuck. If we are try to get out.
/if "$v5"=="$char(x)" /if "$v6"=="$char(y)" {
/varset v7 $char(heading)+135
/press space
/sendkey down up
/sendkey down up
}
| Are we close enough? If not Keep going to location
| havent gotten to close enough yet.
/if n $distance($p0)>$v91 /goto :GotoLocLoop
| We are now close enough so stop.
/call AutoRun 0
/return
| ----------------------------
Sub GotoTarg
| Now this function needs to be passed the name of the target
| so it can do a fast face on it so you dont get caught up in
| running circles around the target especially will happen with
| targets that dont move like merchants.
/varset v91 $rand(5)
:GotoTargLoop
/varset v33 "$char(x)"
/varset v34 "$char(y)"
/face fast $p0
/call AutoRun 1
| Check to make sure where not stuck. If we are try to get out.
/if "$v33"=="$char(x)" /if "$v34"=="$char(y)"{
/varset v35 $char(heading)+135
/press space
/sendkey down up
/sendkey down up
}
| Are we close enough? If not Keep going to target
| havent gotten to close enough yet.
/if n $target(distance)>$v91 /goto :GotoTargLoop
| We are now close enough so stop.
/call AutoRun 0
/return
| ----------------------------
Sub SellItems
:SellItem
/finditem $p0
/if $find()==FALSE /return
/click left merchant sell
/delay 10
/goto :SellItem
/return
| ----------------------------
Sub BeingAttacked
/target fayfear
/call GotoTarg fayfear
/press /
/press y
/press enter
:Heal
/doevents
/if n $char(hp,pct)<10 {
/press /
/press q
/press u
/press i
/press t
/press enter
/endmacro
}
/if n $char(hp,pct)<90 /goto :Heal
/return
-
NotGM
- decaying skeleton

- Posts: 5
- Joined: Thu Aug 29, 2002 4:29 pm
-
Contact:
Post
by NotGM » Thu Aug 29, 2002 5:10 pm
The above code for farming has everything necessary to be left without needing to be at your computer except for spawns of items in locations unattainable is not builit in to it yet. But dont worry people are working at it.
-
macrolover
- a ghoul

- Posts: 107
- Joined: Sun Jul 14, 2002 9:19 am
Post
by macrolover » Sat Aug 31, 2002 9:15 am
i have one question. i use the view where you can't see your char to play everquest. how many times would i hit f9? i think thats why i couldn't get the other farming mac to work. i will really apreciate any help on this
-
NotGM
- decaying skeleton

- Posts: 5
- Joined: Thu Aug 29, 2002 4:29 pm
-
Contact:
Post
by NotGM » Sat Aug 31, 2002 1:42 pm
For the farming macro to work you need to be in the first person view and the macro will take you to the view you need to be in. The first person view is where you are looking out of the eyes it seems of the character you are playing.