• 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

Code Help

dobey

Member
I have a piece of macro here that I want to hail an npc. Sometimes there is lag or whatever and it takes a multiple hail to get them to respond. I am trying to have the macro check for a part of the text the npc replies in /say with and if he doesnt say it to repeat the hail. This is where I am, please forgive me I am trying to learn this by looking at other macros but I just cant get this to work.


Rich (BB code):
Sub Main

/declare Hello      string outer	"#*#Hello there#*#"

   /target a monster
     /delay 1s

:hail
     /keypress h
     /delay 3
     /If (${ChatType.Equal[SAY]} && ${ChatText.Equal[${Hello}]}) {
     /target clear
     /return
   } else {
     /goto :hail
   }
 
You need events

Here's an example based on your code..
When ANYONE says or emotes or whatever, as long as the text contains the text "Hello there", the variable "Hello" will be set to TRUE.

The loop simply just checks if "Hello" is set to true, if not it loops again.

Events should always (IMO) be so specific as possible so that regular says, tells, gsays etc. doesn't trigger it. So if it's only "a monster" that should trigger it then do something like:
#event Hello "a monster says Hello there!"
If there are periods inside the string, then expect there to be a doublespacing after the period. Best way to make sure the line is correct is to C/P it from your EQ log.

Rich (BB code):
#event Hello    "#*#Hello there#*#"
Sub Main
    /declare Hello  bool    outer   FALSE
    /target a monster
    /delay 1s
    :Hail
        /hail
        /doevents
        /delay 3
    /if (!${Hello}) /goto :Hail
    /varset Hello FALSE
    /target clear
/return

Sub Event_Hello
    /varset Hello TRUE
/return
 
Code Help

Users who are viewing this thread

Back
Top
Cart