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

Code Help (1 Viewer)

dobey

Member
Joined
Jun 18, 2006
RedCents
10¢
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
   }
 
Forgot to add that the loop works, but the check is failing, so all it does is continue to hail over and over reguardless of the npc answering the 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