Macro Farm.mac

Where I am so far if anyone understands code enough and wanted to glance at it. This is still a test model. But most of the basic stuff I wanted to work, do in fact work. So that's a plus. :).

At this point I'm moving towards casting spells and doing abilities. We shall see how much I decide to include inside of the plugin and what I hope that will be incorporated via an external plugin.
 

Attachments

  • MQ2FarmTest.cpp
    25.8 KB · Views: 22
Working on the casting routines atm.
 

Attachments

  • MQ2Farm.png
    MQ2Farm.png
    699.2 KB · Views: 39
Last edited:
It's been a couple of months since I've talked about the plugin variation of this. Mostly because I wasn't sure it was every going to be better than the macro version of it as it stands. However, I've recently worked on for a few days a way to gather up 1 Combat Ability for each timer you have and output the highest level CombatAbility and then shuffle them into their respective sections for use. This method is different than what I can tell is the method used for MQ2Bot. With that being said it's a much "Dumber" function to collect the discs.

The output for my 110 RoS Berserker will be pictured here. I still have to implement the use of them into the code. I'm not 100% on how I'm going to handle it.

Most of this has been a learning experience for me. C++ is a relatively new language for me. The classes I took for college were not really giving example of actual usage in a development environment. They were all theoretical. With that said, applying them to practical uses has proved challenging and I have crashed the game more times than I can count producing the current build.

I've separated the plugin into separate files for organization to help me find things easier inside the code. I'm probably still doing that "wrong" by professional standards. But it's functioning as intended at this point. Thus I don't want to poke the bear and break anything trying to improve the organization.

I did attempt to create a TLO for farm, though I didn't have much success. I tried to add ${Farm.TargetID} to get the ID of the current kill target which I could later use for a HUD, and expand to more Farm members for access to more information down the line. But as it stands it's not functional and I'm not entirely sure what I'm doing wrong, but haven't taken the time out to bother someone with helping me fix it.

Casting is still an issue. I need to learn how to create timers. IE: /delay, but in plugin form.

While statements in plugins almost 100% lock up my client, it's rare that it doesn't. I'm not used to that functionality. The current issue with casting is if I'm moving I stop nav, then I issue the casting command. There is a check not to issue another casting command so long as I am casting or I'm moving. Problem with that is it starts moving before it registers that I'm casting. So when a target is fleeing for example. I'm stuck following hit with melee on, stopping to cast, starting to cast and moving back to back which ultimately causes the cast to get interrupted. So I have to learn some things about creating a timer to keep me from moving again.

The upside is Discs shouldn't have a cast time for the most part. Specifically the ones I actually intend to use for this plugin, which is the combat discs. I first programmed this in Macro format. I then recreated it in Plugin format. So that means that I technically have the code to add automatic disc usage to the macro as well. Though that isn't my target project at the moment. For those that are interested in the macro formatted code I'll attach it so you can see what it outputs, and present me with any issues with that output lineup that I'm going to need to take into account.

Currently I'm aware of some issues such as Self Beneficial discs for Zerker's having the highest level Summoned Axe in it's lineup. Single Target Detrimental having Sucker Punch in it's lineup (must be used to initiate combat, not during combat). Hiatus as a self beneficial for Zerker, when it's clearly a crap end regen buff compared to Respite/Reprieve type endurance regens both because of the debuff and because of the recast time. Again, this isn't an intelligent method of gathing the information, it's simply a quick grab for things it -can- use, not what it -should- use. As I learn more about spell information and separating things into specific categories using the information MQ2 has access to use, I'll then use it and try to refine this scenario.


For those that play on test. Discs are not live in my current copy. It's only gathing which ones are available for use and putting them in sections. But I can provide a copy of the test plugin as of 1/3/2019, if test is patched, the file won't work anymore. If you play on test and are interested in the development of this plugin and feel you can provide some assistance via testing, join discord and send me a PM. If you don't join discord, it could be a while before I see your message. This is no way meant to rival MQ2Bot, MQ2Bot despite it's quirks that users bring up is still much more intelligent that what I have created thus far. MQ2Farm is intended to Farm stuff, it is not intended to do current content. With that said, don't expect it to do current content.


It does not heal

It does not buff

It does check health, mana, and endurance for you. Currently it won't return to a "safe spot", though I've considered adding that, when it needs to "med" any of those three things.

If you have questions/comments about MQ2Farm and want to provide that, I again recommend joining discord and sending me a PM. Play a part in the development by providing your input. I can't promise I'll add something you want to the plugin, or that I know how to, but it will be considered.


CWTN
 

Attachments

  • Discs.mac
    2.8 KB · Views: 5
  • DiscOutput110RoSZerker.png
    DiscOutput110RoSZerker.png
    36.9 KB · Views: 23
  • MQ2FarmTest.cpp
    29.4 KB · Views: 8
  • MQ2FarmTest.dll
    323 KB · Views: 5
Last edited:
I now have the discs firing in combat. Before a disc will fire it makes sure you have the reagents needed, that it doesn't require your health be under 90%, that it doesn't require more endurance/mana than you have, that it doesn't require your endurance be under 21%, 25%, 29% (Hiatus line of discs) and ensures that the disc can be fired while in combat (IE: Sucker Punch).

Currently have only got it firing off the combat abilities for single target detrimental discs.

TODO:
Add an INI option to add/remove discs from the lineup.
Add automation for summoning items with a default value of 1 (Axe of the Mangler, Axe of the Demolisher etc)
Add automation for usage of Endurance Regen discs.
Move SingleDetrimental abilities that require you're out of combat (Sucker Punch line) to their own section and make them get used first to initiate combat).
Probably should fix spell casting at some point.
 
Including a copy of the plugin for the test server only.

Changelog so far today.


// Chatwiththisname 1/5/2019
// - Got the Farm datatype fixed and added two members. TargetID and Version. ${Farm.TargetID} ${Farm.Version}
// - Cleaned up FarmCommand and it now report invalid command.
// - Made additions to ignorethese and ignorethis.
// - "/farm " Help list of commands updated to show all commands for current build.
// - Now sitting when no target is found to kill while it waits for more things to spawn or wander in range.
// - DiscReady function now makes sure you aren't trying to use an active disc when you already have one running.
// - Added usage of Instant cast beneficial discs while in combat. IE: Ritualistic Scarification, Smoldering Rage, Active Discs etc.
// - Made a HUD for use with the ${Farm.TargetID} to get a display of what it's going after and some information, useful for debugging. :)
// - You can now add and remove Discs with INI entries. [DiscRemove] section for removing. [DiscAdd] section for Additions.
// EXAMPLE DiscAdd DiscRemove sections to follow

[DiscRemove]
DiscRemove1=Hiatus
DiscRemove2=Proactive Retaliation
[DiscAdd]
DiscAdd1=Breather Rk. II
DiscAdd2=Disconcerting Discipline


You must specify ranks. Each section will process up to 30 changes. for a total of 60 changes, 30 adds and 30 removes. You must create this section manually. Removals are processed before additions.

TODO:
Add automation for summoning items with a default value of 1 (Axe of the Mangler, Axe of the Demolisher etc)
Move SingleDetrimental abilities that require you're out of combat (Sucker Punch line) to their own section and make them get used first to initiate combat).
Probably should fix spell casting at some point.
Make INI's a per character thing instead of a global MQ2FarmTest.ini because people play more than one character.
 

Attachments

  • MQ2FarmTest.dll
    358 KB · Views: 3
Last edited:
Copy of the plugin for the test server, plus full source. /drool

Chatwiththisname 1/6/2019 - INI's are now character specific, stored in release folder as MQ2FarmTest_CharacterName.ini
- Discs are now grabbed and sorted when the /farm on command is given instead of when the plugin loads.
Chatwiththisname 1/7/2019 - Added more refined sorting for summmoning discs and Endurance Regenaration Discs.
- Adding abilities base on the INI is no longer Rank Specific.
- Removing Combat Abilities base on the INI is no longer rank specific.
- INI Name now updated when the farm command is used for anything to ensure that the proper file is being written to.
- Added in the casting of Aura Discs and Endurance Regen Discs for use out of combat.
- Refined ActiveDisc detections to eliminate trying to use a disc when there is already an active disc, but allow the use of combat abilities unhindered.

TODO:
Add automation for summoning items with a default value of 1 (Axe of the Mangler, Axe of the Demolisher etc) ->Started, still trying to sort out how to handle this.
Move SingleDetrimental abilities that require you're out of combat (Sucker Punch line) to their own section and make them get used first to initiate combat).
Probably should fix spell casting at some point.
 

Attachments

  • MQ2FarmTest.dll
    361.5 KB · Views: 5
  • MQ2FarmTest.cpp
    45.8 KB · Views: 9
  • NavCommands.h
    3.5 KB · Views: 10
  • Prototypes.h
    1.3 KB · Views: 6
  • FarmType.h
    1.1 KB · Views: 6
  • Variables.h
    1.3 KB · Views: 6
Bug Fixes for Farm.mac

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

Report bugs so they can be looked at. I'm still going to be moving forward with the plugin, but it's a slow road as I learn the language and create the custom functions to do the things I've done in the macro. So until then I still use this when needed.

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.

Converted all /bca /bcaa's to /bcg and /bcga respectively.

Removed previous versions. Beta is and technically has been official for a while now. Just no bug reports to speak of (even though the above shows it had some).
 
Last edited:
This is a really good macro. If you pick say a bard or monk that does not self buff you can even run bot plugin with it. I have gotten this to work just fine until it runs out of mobs. It then sits and waits and goes through a mana,endurance and hp check until attacked by a respawn. if a new mob walks into the radius after it has cleared it does not start back up until attacked then clears the area again. Really nice work
 
Hey Chat! Would you please start using a version/update number on these wonderful goodies? Thanks bro .... :)��������
 
/bc versus /echo

Hey Chat,

If I wanted to send the results of your mana/health/end check to eqbcs for all to see would I change:

Code:
/echo \ar${Group.Member[${i}].Name} is low on Endurance!

to 

/bc \ar${Group.Member[${i}].Name} is low on Endurance!

Thanks,
Lugnut
 
Hey Chat,

If I wanted to send the results of your mana/health/end check to eqbcs for all to see would I change:

Code:
/echo \ar${Group.Member[${i}].Name} is low on Endurance!

to 

/bc \ar${Group.Member[${i}].Name} is low on Endurance!

Thanks,
Lugnut

\ar is a color code, color codes for EQBC is different. Replace that with [+R+]

So the message would be
Code:
 /bc [+R+]${Group.Member[${i}].Name} is low on Endurance!

If you want to see all color code for EQBC type /bccmd colors
 
Last edited:
I have been having issues of it getting stuck in a loop when it runs out of mobs in a given radius. I tried a short fix to have it go back to targetshortest after a pause when the mobsinrange was less than one. I think im missing something in the code. Any suggestions ?

/if (${MobsInRange}<1) {/pause 40
:goto TargetShortest}

thanks
 
I've been having this same issue. When there are no mobs in the area set by te command line, pullfarm.mac goes into an endless loop.

I have been having issues of it getting stuck in a loop when it runs out of mobs in a given radius. I tried a short fix to have it go back to targetshortest after a pause when the mobsinrange was less than one. I think im missing something in the code. Any suggestions ?

/if (${MobsInRange}<1) {/pause 40
:goto TargetShortest}

thanks
 
I just set the radius higher and it will keep farming and pulling. I hope the author has not abandoned the project. This macro is almost perfect. I wish I had noticed when he was working on this at the time.
 
Author mostly spends his time at another site now. Hasn't posted much lately. I've had some issues but never got a response either.
 
How are you guys using farm?
Are you just setting a radius, or looking for a mob type?

I've been using this successfully to farm mobs as in
Code:
/mac farm 10000 spider
and it will continually find mobs as they repop without an issue.
 
I been using as /mac pullfarm 500. The macro gets hung up if it runs out of mobs and I don't think the author supports it anymore. But it works just fine with the command listed above.
TheIcon
 
Macro not working after 5/6 patch

UPDATE: 05/11/2018 - This issue is resolved with the last patch.

I was running this macro for most of the day on 05/06. Rebooted for good measure, then performed the 05/06 update. When I logged in and entered in
Code:
 /mac pullfarm 550
the macro starts up then spams:

Code:
There are no spawns matching: (0-200) any ID:16959.

UPDATE: 05/07/2018

After today's update the macro is still non-functional and spams the following when executing
Code:
 /mac pullfarm 550
:

Code:
Target Cleared (five times) then  [MQ2]Attacking anything I can get my grubby paws on.

Thanks,
Lugnut
 
Last edited:
I'm around, just been a bit busy as I've transitioned to writing plugins. You'll find that the easiest way to get in touch with me is Via discord. I'm Chatwiththisname#5795 and I am currently a member of the MMOBugs discord as well as a member in the other channel. I do accept private messages but since I have been writing plugins for a profit (as I sorely needed additional income) the things that I have released for free have kind of taken the back burner and haven't garnered a lot of attention. I did give permission to htw/fry to release MQ2Farm which is a plugin variation that was still in development here on MMOBugs, however I haven't gotten around to doing any finishing touches or optimization on that as my berzerker plugin and rogue plugin have currently taken the majority of my time.

Please do understand that MQ2 is constantly changing, and as such it's hard to keep up with all the things that I maintain. Until such a time as I feel that my paid work is complete, I will not have an opportunity to work on the things that I currently have released without charge. But I do plan to revisit this soon, but likely in the form of the plugin that I was working on as I'd like to transition away from the macro logic and move into the plugin logic as macros can be limiting in that you can only run one at a time, where-as with plugins I can have as many of them running as I so choose.

With that said, I don't get around to checking the forums as often as I should, so that's my fault. But know I still venture into the forums on occasion when I can find the time to take a break.

CWTN