• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

SafetyCheck.inc - Player/GM checker..

EvenLessSpam

Active member
Name:
SafetyCheck.inc


Description:
A simple include to use for all those AFK macroes. Will check for players within specified distance (default 500) as well as GM's. It will return OK if everything checks out fine, GM if a GM is detected and PC if a non-excluded players is in range.


Changes:
2006-08-11
  • Beta 1.
    Untested.
2006-08-12
  • Fixed a copy/paste error in the "All features" example.
2006-12-14
  • Fixed a missing parenthisis set in an /if.
  • Updated macro to use alert lists instead of arrays (Thanks to Peter Waren for the idea).
2007-02-14
  • Moved this out of beta stage :)
  • Changed Radius a bit so -1 will be zonewide player checking, and made that the default Radius.
  • Added it as a zipped attachment to this post.

Syntax:
Rich (BB code):
/call SafetyCheck [int CheckRadius] [int AlertList]
Examples:
Advanced:
Rich (BB code):
#Include SafetyCheck.inc
Sub Main
    |--------------------------------------------------------------------------|
    |- First clear the alert list. Using alert list #1                        -|
    |--------------------------------------------------------------------------|
    /alert clear 1

    |--------------------------------------------------------------------------|
    | Then populate the alert list. Still using alert list #1 ;)              -|
    |--------------------------------------------------------------------------|
    /alert add 1 pc "ThisOneIsOkay"
    /alert add 1 pc "ThisOneCanAlsoBeAroundMe"

    |--------------------------------------------------------------------------|
    | Do the SafetyCheck with a radius of 500 and excluding players on alert  -|
    | list #1                                                                 -|
    |--------------------------------------------------------------------------|
    /call SafetyCheck 500 1
    /if (${Macro.Return.NotEqual[OK]}) {
        /popup There's someone near who isn't welcome...
        /if (${Macro.Return.Equal[GM]}) {
            /popup OMG! It's a GM. Time to bail...
            /quit
            /endmacro
        } else /if (${Macro.Return.Equal[PC]}) {
            /popup Pesky players, they're everywhere...
            /say Beat it! This is my camp.
        }
    }
/return
Simple:
Rich (BB code):
#Include SafetyCheck.inc
Sub Main
    /call SafetyCheck
    /if (${Macro.Return.NotEqual[OK]}) /endmacro
/return
SafetyCheck.inc
Rich (BB code):
|**
 * SafetyCheck.inc - by EvenLessSpam
 *
 * Version: 1.0.0
 *
 * Changes:
 *  0.0.1
 *  - Beta 1. Untested.
 *
 *  0.1.0
 *  - Changed the player exclusion list from array based to alert list based.
 *      thanks to Peter Waren of MMOBugs for the idea.
 *
 *  0.1.0
 *  - Changed the player exclusion list from array based to alert list based.
 *      thanks to Peter Waren of MMOBugs for the idea.
 *
 *  1.0.0
 *  - Moved this out of beta stage :)
 *  - Changed Radius a bit so -1 will be zonewide player checking, and made that the default Radius.
**|

Sub SafetyCheck(int Radius, int Exclude)
    /declare i              int     local   0
    /declare c              int     local   0
    /if (!${Defined[Radius]}) /declare Radius   int     local   -1
    /declare SafeSearch     string  local   pc ${If[${Radius} > -1,radius ${Radius} zradius 50,]} notid ${Me.ID}
    /if (${Defined[Exclude]}) /varset SafeSearch ${SafeSearch} noalert ${Exclude}

    /if (${SpawnCount[${SafeSearch}]} || ${SpawnCount[gm]}) {
        /if (${SpawnCount[gm]}) {
            /return GM
        } else {
            /for i 1 to ${SpawnCount[${SafeSearch}]}
                /if (${Group.Member[${NearestSpawn[${i}, ${SafeSearch}]}]}) /goto :Continue
                /return PC
                :Continue
            /next i
        }
    }
/return OK
 
Last edited:
someoneorsomething said:
So thats how you do it. GJ ELS. i racked my brain on this for a good hour yesterday.
I've still been too lazy to actually test it (busy with other stuff), does this mean you've used it and confirmed it working? :)
 
This is pretty similiar to what I created, one other thing I inlcuded in mine you may like is the use of a custom notification subroutine.

/call SafetyCheck <radius> <alertlist> <notification sub>

This way folks can customize thier reactions for the script they are using.
 
I have been searching for this for so long now!!! Man you get a red cent!

Admin, if there are others like me, can we sticky this? Or make it easier to find, like right out in the open? In all my searching I never found it, it was pointed out to me by another member.

N
 
Copy and paste it into notepad
click on save as
change it from Save as type: "text document" to all files
type the name you want used like
blahblah.inc

(for macro's use .mac)

Macro's do not need to be compiled, it is read by MQ as plain text.
 
SafetyCheck.inc - Player/GM checker..

Users who are viewing this thread

Back
Top
Cart