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

Lua - Watchforstrangers.lua - Pause macro if someone else is near (1 Viewer) 1.2

Joined
Nov 23, 2006
RedCents
359¢
neophys submitted a new resource:

Watchforstrangers.lua - Pause macro if someone else is near - Pause macro if someone else is near (Watches for # of people inradius or people not in guild)

Found myself powerleveling 2 casters and wanted to train skills while leveling.

Configure the variables in the top of the script and run it with /lua run watchforstrangers
-- EDIT FROM HERE local radius = 300 local people = 6 local guild = "GUILDNAME" -- EDIT TO HERE


Script will pause the running macro if one of the following is true
  • Someone from another guild is near you
  • There are more than the specified amount of people within the specified radius

Read more about this resource...
 
It might be worth considering updating the message and the search parameters to be dynamic based upon your search settings, which saves hard coding and repeats
 
I'm all for supporting learning and sharing; do you know about MQ2Posse ?

I feel like this is adding duplicate functionality or duplicate resources for the wrong reason...

Here's a redcent, for the right reason.
 
I'm all for supporting learning and sharing; do you know about MQ2Posse ?

I feel like this is adding duplicate functionality or duplicate resources for the wrong reason...

Here's a redcent, for the right reason.
There are a few resources that do similar things either in a more or less expanded capacity
 
Couple tips:

1.) Consider using a table for your "guild" parameter given that it's meant to block specific guilds.
2.) Rather than doing it by count of people, consider having a safe list of people (another table).
3.) Since I'm recommending tables, you might want to do a guild safe list as well (in a table).
4.) If you decide not to do that -- your "people" parameter is currently able to be edited by the user, but your print message says that there are more than "7" people rather than using the parameter from the user.
5.) While it's not a big deal, any changes users make would get overwritten by your updates if they were watching your resource. Consider separating out the config from the script so that this doesn't happen. Something like local config = require(mq.TLO.MacroQuest.Path('Config') .. 'watchforstrangers.config.lua') would allow you to have your config in the config folder (at the expense of a little more complexity).
 
@Knightly Thanks for the good feedback.

For me all toons are in the same guild, so if anyone from another guild is near, it should react. I have uploaded a new version with a dynamic message where people variable is inputted into the message using string.format.

Will start to look into config files, but currently looking at ButtonMaster for some reference and learing points.
 
Lua - Watchforstrangers.lua - Pause macro if someone else is near

Users who are viewing this thread

Back
Top