Macro Farm.mac

Chatwiththisname

Learning2Code
Joined
Sep 28, 2008
Messages
1,234
Reaction score
54
Points
48
Location
Texas
Code:
	|||||||||||||||||||||||||||||||||||||||||||||||||||
|Farm.mac by Chatwiththisname
|v1.21 ~ Initial release 2/15/2018
|	   ~ Ignores Update 3/15/2018
|	   ~ Now generates a quick list of named, merchants,
|		 bankers, and NPCs, as well as a permanent ignore list
|		 that you can easily copy/paste from other list per zone.
|	   ~ Now features /permignore to add things to the permanent 
|		 ignore list in FarmMobIgnored.ini [${Zone.ShortName}]
|		 Ignores=|mob1|mob2|mob3| etc. NOTE: /ignorethese and 
|		 /ignorethis is temporary and uses alert lists which reset
|		 when you leave. You can access a list of temporarily ignored
|		 mobs by typing /alert list 1
|	  ~ 3/15/2018
|	  ~ Now includes a UseEQBC & assistMe boolean in the declares sub found 
|		in the last sub of the code. UseEQBC will tell your crew to follow
|		you every time you issue a navigation command. assistMe will tell 
|		your crew to target the same mobs, and assist with killing it. 
|		This assumes you are farming lowbie crap, and thus there is no
|		required hp for engaging, it's immediate and often your group will
|		engage first because the macro runner is waiting for the navigation
|		path to finish. If you just want them to follow you for EXP or loot
|		just turn on UseEQBC, if you want them to help kill, turn on assistMe
|		WARNING: You -definitely- look like a bot with assistMe this lol.
|	  ~ Now verifies your starting zone and will end the macro if you change zones
|		now includes useCamp boolean to know if you want to /exit when you leave 
|		your starting zone. If UseEQBC is TRUE it will /exit all other toons on
|		the EQBC Server, that said, make sure that's what you want to do when using
|		this feature. 
|	  ~ 1/15/2019
|	  ~ Was an issue with new PullAbility setup and PullAbilityRange being read when 
|		there was no PullAbility setup. Fixed it so that it wouldn't stop at 150 default 
|		before reissuing nav.
|	  ~ Added a basic check for mob to already have a debuff on it before casting a spell....
|		my BL was chain casting slow. Thought I had added this already, but guess not.
|	  ~ If you cut a name out of the FarmMobIgnored.ini list and paste it into the ignore list, it 
|		won't repopulate into it's respective list again, should help see what you haven't put on the 
|		permanent ignore list.
|	  ~ Creatures on the NamedList should not longer also populate the NPC list in FarmMobIgnored.ini
|	  ~ Found the elusive "there are no spawns matching: (0-200) any" bug, where it would get stuck in 
|		a loop. and made corrections to two while loops to break out if the player didn't have a 
|		target, or the spawn didn't exist anymore.
|
|Usage: /mac Farm radius target ~~ /mac farm 500 pyrilen
|		/mac farm radius ~~ /mac farm 1000
|		
|
|Purpose: Will kill and move anything forever in a radius
|			near you. It -WILL- navigate the entire zone.
|			IE: Used in RSS I started at entrance, come back
|			an hour later and I was doing the raid mobs. 
|			
|		If you provide it a target's partial/full name it will 
|		only hunt down those creatures. But it will react to adds.
|
|		/ignorethis to ignore your current target only.
|		/ignorethese to ignore all spawns with your targets full name.
|		/permignore to permanently ignore all spawns with your targets full name. 
|
	|||||||||||||||||||||||||||||||||||||||||||||||||||

Requires MQ2Nav and Navigation mesh where you intend to use it. Does NOT anchor to a base location, it wanders the zone.

/mac farm 1000 will pretty much kill anything in a zone assuming no mobs are more than 1000 apart. You could also use /mac farm 20000 but I recommend against it as the calculation for the closest mob will lock up your system when it finds 600 mobs to compare navigational distances for.
 

Attachments

  • PullFarm.mac
    31.6 KB · Views: 180
  • Farm.mac
    66.8 KB · Views: 124
Last edited:
what is navigation mesh and how would i get one?
 
what is navigation mesh and how would i get one?

Excellent but complicated to answer question. The short answer is using MeshGenerator.exe in your root mq2 folder (where your character INI files are stored) from that you set the location of the EQ root folder (where eqgame.exe is stored) and then root folder for mq2 (where mmoloader is located).

Once you have the locations set you just open the zone and build a mesh followed by hitting the save button. Then in game you /plugin mq2nav

If you already have mq2nav loaded (preferred method) and you are standing in the zone that you want to make the mesh for (also preferred when making the mesh) it will load doors/objects for the zone into the mesh allowing you to navigate around those as well. I hope this helps.
 
EMU

Will this Macro work with EMU version RoF2? When I tried to load it I got "Unknown # Command: #bind AddToIgnore"
"Unable to add macro line."
 
Will this Macro work with EMU version RoF2? When I tried to load it I got "Unknown # Command: #bind AddToIgnore"
"Unable to add macro line."

Binds are a new feature. If you delete the #Bind lines then it will possibly run. But the aliases are designed to run with binds. So if you use the added commands /ignorethis /ignorethese then it'll likely take a shit on the script.

Sub Bind_AddToIgnore
Code:
	/alert add 1 ${Target.CleanName}
	/varset myTargetID 0
	/squelch /target clear


Sub Bind_AddThisIgnore
Code:
	/alert add 1 ${Target.Name}
	/varset myTargetID 0
	/squelch /target clear

Instead, you can make a social that includes those three lines to reproduce the same thing the aliases do.
 
Is there a place to see where you have added names to ignore? I know there is an ignore mobs file but with the alerts are they stored someplace where you can actually see them? Was always curious about that.
 
Is there a place to see where you have added names to ignore? I know there is an ignore mobs file but with the alerts are they stored someplace where you can actually see them? Was always curious about that.

/alert list 1
 
Thank You

Thanks for the quick response. I spent much of the day searching but only found a reference to /bind, not #Bind. As far as I can tell my mmobugs mq2 is up to date but doesn't seem to support #bind. I am looking at it as an opportunity to get back into scripting as I haven't done it since MQ2 back around 2004. I will be doing more research and may have some questions once I am at a point where I know which questions to ask and what to do with the answers.

Thanks again.
 
Last edited:
I guess I am going to have to ask around why #Bind isn't working in the EMU version (well after I double check I am up to date :cool: ). #Bind looks like a very very useful tool. I did try commenting out the #Bind lines and then it couldn't parse /setchattitle, I am guessing this is because the version of MQ2ChatWnd included with the EMU version is outdated as well. I am still looking into what it actually does, but guessing changing it to /echo will at least get me going.
 
I guess I am going to have to ask around why #Bind isn't working in the EMU version (well after I double check I am up to date :cool: ). #Bind looks like a very very useful tool. I did try commenting out the #Bind lines and then it couldn't parse /setchattitle, I am guessing this is because the version of MQ2ChatWnd included with the EMU version is outdated as well. I am still looking into what it actually does, but guessing changing it to /echo will at least get me going.

EMU Servers don't get updated like the live servers do. They basically stop getting updates to their build much like an EMU server no long receives new expansions. Bind will never work on EMU unless someone includes the feature to the build. When I say that it is a new feature I mean that it is new to Live server MQ2 Build. The method I mentioned using socials will be your likely alternative unless I change the way the aliases handle those binds.
 
Thanks

Thank you I got it all working. I had to make some changes based on my version for EMU. First was issue with #Binds, I just commented them out. I did make the socials but since I haven't needed them, I haven't tested them yet. I could not get it to work with MQ2Navigation, but since I am playing on my friends EMU server that he set up purely to see how far we can solo/bot, I just switched to warp. I was having an issue with it not handling adds until I brought up the Xtarget window. I have no idea why that would matter, I do see you using Xtarget in the macro, but I would expect it to work without the window being open.

I added in some checks to see if I lost any bot members of my group and if I do, it zones to PoK and back then re-summons all of my bots/bot groups and waits for a couple minutes to finish buffing. I also added a slight delay after a kill to allow bots to rebuff, probably about 5 seconds or so. I still had a couple deaths of my group cleric and my chanter, so I added them to my ^healrotation and it runs pretty much flawlessly. I did end up dying one time due to a simple mass of adds, but since there is no "you died" event, it just zoned back to PoK and then went back, summoned up all the bots and went back to it.

It has ran for about 400 AA so far today without a death or zone. This is a really good Macro, thank you.
 
Thank you I got it all working. I had to make some changes based on my version for EMU. First was issue with #Binds, I just commented them out. I did make the socials but since I haven't needed them, I haven't tested them yet. I could not get it to work with MQ2Navigation, but since I am playing on my friends EMU server that he set up purely to see how far we can solo/bot, I just switched to warp. I was having an issue with it not handling adds until I brought up the Xtarget window. I have no idea why that would matter, I do see you using Xtarget in the macro, but I would expect it to work without the window being open.

I added in some checks to see if I lost any bot members of my group and if I do, it zones to PoK and back then re-summons all of my bots/bot groups and waits for a couple minutes to finish buffing. I also added a slight delay after a kill to allow bots to rebuff, probably about 5 seconds or so. I still had a couple deaths of my group cleric and my chanter, so I added them to my ^healrotation and it runs pretty much flawlessly. I did end up dying one time due to a simple mass of adds, but since there is no "you died" event, it just zoned back to PoK and then went back, summoned up all the bots and went back to it.

It has ran for about 400 AA so far today without a death or zone. This is a really good Macro, thank you.

Glad this is working out for you. This was never intended as a group macro so it's a good thing that you've got it all sorted out.

As far as navigation goes. MQ2Navigation was the precursor to MQ2Nav written by brianiac. Before the overhaul that made it MQ2Nav I believe the correct Syntax for MQ2Nav was different. /nav loc Y X Z or /nav locxyz X Y Z is what is currently used in the existing live version. However, I believe what you would need is /nav X Y Z as the order for the locations was changed from that version to this version.

Additionally I'm not sure that "PathExists" or "PathLength" are usable Navigation TLO Members in your version of the macro.

At the time I wrote Farm.mac I never included a check to verify that the targets I was scanning through were not already engaged in combat. While I can't say for sure what TLO members would be available to do such checking ${NearestSpawn[1,noalert 1 targetable npc].PctAggro} or some other method of checking such as PctHPs being less than 100 prior to engaging, it would be a good idea to add something like that to the list. The below is what I added in Tutorial.mac to keep it from engaging with other players targets.

Code:
/if (${NearestSpawn[${i},${TargetType} noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].Name.NotEqual[NULL]} && ${If[!${Bool[${NearestSpawn[${i},npc noalert 1 radius ${PullRange} zradius ${ZRange}].AggroHolder}]},TRUE,${If[${Bool[${NearestSpawn[${i},npc noalert 1 radius ${PullRange} zradius ${ZRange}].AggroHolder} && ${Bool[${NearestSpawn[${i},npc noalert 1 radius ${PullRange} zradius ${ZRange}].AggroHolder.Equal[${Me.Mercenary.Name}]},TRUE,FALSE]}]}]}]}) {

Using AggroHolder (a string) check to verify it wasn't me or my mercenary whom had aggro.

To be perfectly honest I threw this macro together in about 10 minutes using snippets of code from other macros I had at the request of someone. I have intentions to improve it's overall functionality as well. I also have a stand alone buff routine that I may add to it. Though I haven't decided when a good time for that to happen would be. I still need to add item buffing to that routine.

As I am able to add to the rotation I will.
 
Tired of hitting that /ignorethis and /ignorethese hotkey? Well I am too. So I decided to do something about it. Farm.mac now features permanent ignore lists by zone.


|||||||||||||||||||||||||||||||||||||||||||||||||| |
|Farm.mac by Chatwiththisname
|v1.11 ~ Initial release 2/15/2018
| ~ Ignores Update 3/15/2018
| ~ Now generates a quick list of named, merchants,
| bankers, and NPCs, as well as a permanent ignore list
| that you can easily copy/paste from other list per zone.
| ~ Now features /permignore to add things to the permanent
| ignore list in FarmMobIgnored.ini [${Zone.ShortName}]
| Ignores=|mob1|mob2|mob3| etc. NOTE: /ignorethese and
| /ignorethis is temporary and uses alert lists which reset
| when you leave. You can access a list of temporarily ignored
| mobs by typing /alert list 1

Format would follow that of the generated list. Ignored=|mob1|mob2|mob3| etc.

Code:
[shardslanding]
Ignored=|a well-groomed oashim corpse|an eerily familiar plant|a broken vase|a poorly crafted vase|Banker Ismena|Craftkeeper Bobus Tindlefoot|Craftkeeper Irus Tindlefoot|Purveyor Eilos Berenzaltek|Purveyor F`Devax|Master Hunter Jilare|Master Armorer Synlaris|Went Steelhaft|Noel Gladestrider|Varille Alyrinshar|Olivia Dawnlight|Gilbert Songcryer|Lirit T`Prakk|Gilab Flamesphere|Tomekeeper Kerkaz|Magus Burlshin|Engineer Eilisia|Treddletek Cogwobbler|Terrance|Councilman Nostulia|Overseer Drent|Director Idris Manaar|Harbinger Glask|Evoker Redwolf|Shardtender V`Rax|Jimothy the Delicious|Sherry Shambleboot|Shardtender Pureglade|Shardtender B`Drynn|Vdrakii|Eldwin Smashmasher|Shardtender Tyvale|Leopold Crunchbasher|Shardtender N`Laris|Shardtender Babblemok|Evoker Slowtail|Takzic of the Dark Circle|Drakk|Vaytok|Soulbound Construct|Evoker Waylight|Evoker Farleap|Grazik Rotscale|Lady Jenine|Camellia Spiretear|Rinaire Salvek|Sir Delvas|Sister Fealcrest|Sister Cyrinvale|Bygral Tamescale|Ashki the Forsaken|Lera the Forsaken|Keeper Nenth|Selya the Forsaken|Bodhessel the Caller|High Guard Stavus|High Guard Verichitek|High Guard Strakiv|High Guard Volintias|supply box|supply barrel|Armorer Jean Wenlaris|Ilana Sunmire|Weaponsmaster Lidelf|an emissary of shadow|Serroth Dantor|
NamedList=Jimothy the Delicious|Sherry Shambleboot|Drakk|Vaytok|Shardtender B`Drynn|Shardtender V`Rax|Vdrakii|Engineer Eilisia|Terrance|Treddletek Cogwobbler|Evoker Redwolf|Shardtender Tyvale|Harbinger Glask|Councilman Nostulia|Overseer Drent|Director Idris Manaar|Shardtender Babblemok|Bygral Tamescale|Grazik Rotscale|Evoker Slowtail|Shardtender N`Laris|Shardtender Pureglade|Evoker Farleap|Eldwin Smashmasher|Leopold Crunchbasher|Camellia Spiretear|Rinaire Salvek|Sister Fealcrest|Evoker Waylight|Sir Delvas|Takzic of the Dark Circle|Soulbound Construct|Sister Cyrinvale|Lady Jenine|Ashki the Forsaken|Lera the Forsaken|Selya the Forsaken|Bodhessel the Caller|Keeper Nenth|High Guard Volintias|High Guard Strakiv|High Guard Verichitek|High Guard Stavus|
Merchants=|Purveyor Eilos Berenzaltek|Purveyor F`Devax|Craftkeeper Irus Tindlefoot|Craftkeeper Bobus Tindlefoot|Master Hunter Jilare|Tomekeeper Kerkaz|Went Steelhaft|Noel Gladestrider|Olivia Dawnlight|Lirit T`Prakk|Master Armorer Synlaris|Varille Alyrinshar|Gilbert Songcryer|Gilab Flamesphere|Magus Burlshin|
Bankers=|Banker Ismena|
Objects=|a well-groomed oashim corpse|an eerily familiar plant|a broken vase|a poorly crafted vase|
NPCs=|Jimothy the Delicious|Sherry Shambleboot|Drakk|Vaytok|Shardtender B`Drynn|Shardtender V`Rax|Banker Ismena|Purveyor Eilos Berenzaltek|Purveyor F`Devax|Craftkeeper Irus Tindlefoot|Craftkeeper Bobus Tindlefoot|supply box|Vdrakii|Engineer Eilisia|Terrance|supply barrel|Treddletek Cogwobbler|Evoker Redwolf|Shardtender Tyvale|Master Hunter Jilare|Harbinger Glask|an emissary of shadow|an adventurer|Councilman Nostulia|Overseer Drent|Director Idris Manaar|Serroth Dantor|Shardtender Babblemok|Tomekeeper Kerkaz|Went Steelhaft|Noel Gladestrider|Weaponsmaster Lidelf|Armorer Jean Wenlaris|Bygral Tamescale|Olivia Dawnlight|Lirit T`Prakk|Master Armorer Synlaris|a venomshell pest|Varille Alyrinshar|Gilbert Songcryer|Grazik Rotscale|Gilab Flamesphere|Ilana Sunmire|Evoker Slowtail|an ivyscale slitherer|Torchbearer Lyrus Sinrathis|a slatescale slitherer|Shardtender N`Laris|a chillclaw wyvern|Shardtender Pureglade|Evoker Farleap|an iceclaw wyvern|Eldwin Smashmasher|Leopold Crunchbasher|Camellia Spiretear|Rinaire Salvek|Sister Fealcrest|Evoker Waylight|Sir Delvas|Takzic of the Dark Circle|Soulbound Construct|an icebeak pup|an impassive clergyman|Sister Cyrinvale|a pious believer|Lady Jenine|a slatescale serpent|a devout believer|a stoic believer|a zealous believer|a silent herald|an ivyscale serpent|a corrupted devourer|an icebeak matriarch|a blightshell scarab|a feeble devourer|a greater slatescale|a clickshell pest|Ashki the Forsaken|a forsaken believer|an oashim hoarder|a forsaken coordinator|a forsaken supervisor|an armory director|a forsaken overseer|a lesser hoarder|a lesser blightshell|a forsaken torchbearer|Lera the Forsaken|a conscripted miner|an armory ward|an armory guard|a greater ivyscale|an armory foreman|a conscripted edgecrafter|an armory sentry|a conscripted dredger|a conscripted ironshaper|a conscripted smith|a plainsdweller wyvern|a lesser plainskeeper|Selya the Forsaken|
Due to the nature of MQ2 the string cannot exceed a certain length without causing a crash. All generated account for this except /permignore currently. Assuming you don't add 2048 characters worth of ignores you should be fine. PS The above NPC list comes in at just over 1900 characters.

You can add them manually by opening FarmMobIgnored.ini to access the file after you've ran farm.mac at least once in the current zone. /mac farm 1 will generate a list and unless you have something in your XTarget window it will just stand around.

Now enjoy the luxury of creating a list of things to ignore one time per zone and then never having to worry about it again.
Missed something that you need to permanently ignore but don't want to restart the macro after updating the INI? No problem. Once they're targeted just type /permignore and it will add it to the list for you.

Remember that donate button. You're donations have made me able to get my toons power leveled to conduct testing in newer zones, and even on occasion help pay the bills. Can't afford to donate your cold hard cash? Donate your time by helping improve our existing macros by making suggestions for improvement or reporting bugs. Remember, if you like it, chances are someone else does too. If you think you would like a feature, chances are someone else does too!

~Chat
 
Last edited:
I've added a 2s delay between hitting the button and checking to see if the mercenary is still dead to avoid reviving it then suspending it accidentally.
Additionally, I've added issuing /pet attack and /pet swarm to the UseEQBC list of assisting commands.
and finally, I've added "/bccmd names" prior to /bct commands to ensure that the most up to date list of users on the server is being used because this isn't updated unless you issue the command.

TODO:
make cleric stop sticking at the start of combat (bc command only. doesn't apply to cleric running the macro)
make pure casters not stick to the target. (unless they are running the macro)

Suggestion:
If you don't want your characters to melee but are ok with them sticking. /melee melee=0
 
PullFarm.mac

So you're a fan of Farm.mac but don't want to wander the zone? Want to stay in a designated radius? I got the cure for your disease. See the first post to help me test PullFarm.mac

Uses a pull ability, so far has been tested for Disc and Ability, IE: Demolishing Volley and Kick. Requires testing using Spell or AA as a pull ability.

New settings.
Code:
/declare PullAbility string outer "Demolishing Volley"
	/declare PullAbilityRange int outer 100
Change this to the spell/ability/disc/AA of your choosing and then give it a range. Will move within range and then fire the spell/ability/disc/aa off to get the pull target and bring it back to camp. If you get summoned, it knows and will run back to the camp again.


Ran for 12 hour straight without any issues last night using a disc to pull. Makes my old pull.mac look like childs play.
 
MQ2Nav folder

Might need to type /nav reload once the file is in the correct location.
 
my mesh files are located c:\macroquest2\mq2nav and they work fine.
 
none of the commands for mq2nav work for me ? and i have plugin loaded might be something wrong