• 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 --->
  • Unfortunately, yes, there is a suspension wave happening around the new tlp launch. :'( Please keep regular discussion to Suspension MegaThread and please consider submitting a Suspension report to RG.

Question about Guild Hall Buff Bot (1 Viewer)

Tiama

New member
Joined
Mar 4, 2005
RedCents
I'm using the following code in an all MQ using guild to buff in the guild hall. What I want to be able to do is buff pets as well. Is there any way to add that in as maybe part of the tell? For example, haste %t , where %t is the person's pet.

Thanks for the help :)

Rich (BB code):
#Chat   tell
#Event  TellMsg "#1# tells you, '#2#'"

Sub Main
    :Loop
        /doevents chat
    /goto :Loop
/return

Sub Event_Chat(string Chat, string Toon, string Msg)
    /if (${Msg.Find[haste]}) {
        /target pc ${Toon}
        /cast "Speed of Salik"
        /delay ${Math.Calc[(${Spell[Speed of Salik].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c6]}) {
        /target pc ${Toon}
        /cast "Clairvoyance"
        /delay ${Math.Calc[(${Spell[Clairvoyance].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c5} || ${Msg.Find[voq}) {
        /target pc ${Toon}
        /cast "Voice of Quellius"
        /delay ${Math.Calc[(${Spell[Voice of Quellius].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c4]} || ${Msg.Find[tranq]}) {
        /target pc ${Toon}
        /cast "Tranquility"
        /delay ${Math.Calc[(${Spell[Tranquility].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c3]} || ${Msg.Find[kei]}) {
        /target pc ${Toon}
        /cast "Koadic's Endless Intellect"
        /delay ${Math.Calc[(${Spell[Koadic's Endless Intellect].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[god]} || ${Msg.Find[mr]} || ${Msg.Find[druzzil]}) {
        /target pc ${Toon}
        /cast "Guard of Druzzil"
        /delay ${Math.Calc[(${Spell[Guard of Druzzil].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    }
/return
 
Yes, you can just recast it using the same lines.

See my edit to previous post. Added something a little more useful.

If the toon has no pet, you'd have no target and the /cast would fail.
 
Here's a reuseable code snippet.

Rich (BB code):
/call BuffToon ${Toon} "Speed of Salik" pc

Rich (BB code):
Sub BuffToon(string ${Toon}, string ${SpellName}, string ${SpawnType})
        /if (${SpawnType.Equal[pc]}) /target ${SpawnType} ${Toon}
        /if (${SpawnType.Equal[pet]}) /target ${SpawnType} ${Spawn[${Toon}].Pet.Name}
        /delay 10
        /if (!${Target.ID}) {
                /echo "Can't find target"
                /return
        }
        /cast ${SpellName}
        /delay ${Math.Calc[(${Spell[${SpellName}].MyCastTime}*10)].Int} (!${Me.Casting.ID})
/return
 
Where inside my code should I put the /call ? I put it here
Rich (BB code):
/if (${Msg.Find[speed]}) {
        /call BuffToon ${Toon} "Speed of Salik" pc

with the sub at the bottom. But when I had someone try to ask for speed, it told me that I don't seem to have that spell memmed, which I did. (I double checked :) )
 
Tiama would you mind updating the finished product in your first post. I would like to have the fdinished product to pick apart to see how it works. Helps me learn the coding faster taht way. Especially if you can put some Rem lines in there explaining diffrent secions. Appreciate it. :)
 
Untested, but should work. Changed a few redundant things.

Rich (BB code):
#Chat   tell
#Event  TellMsg "#1# tells you, '#2#'"

Sub Main
    :Loop
        /doevents chat
    /goto :Loop
/return

Sub Event_Chat(string Chat, string Toon, string Msg)
    /if (${Msg.Find[haste]}) {
        /call BuffToon ${Toon} "Speed of Salik"
        /delay ${Math.Calc[(${Spell[Speed of Salik].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c6]}) {
        /call BuffToon ${Toon} "Clairvoyance"
        /delay ${Math.Calc[(${Spell[Clairvoyance].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c5]}) {
        /call BuffToon ${Toon} "Voice of Quellius"
        /delay ${Math.Calc[(${Spell[Voice of Quellius].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c4]} || ${Msg.Find[tranq]}) {
        /call BuffToon ${Toon} "Tranquility"
        /delay ${Math.Calc[(${Spell[Tranquility].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c3]} || ${Msg.Find[kei]}) {
        /call BuffToon ${Toon} "Koadic's Endless Intellect"
        /delay ${Math.Calc[(${Spell[Koadic's Endless Intellect].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[god]} || ${Msg.Find[mr]} || ${Msg.Find[druzzil]}) {
        /call BuffToon ${Toon} "Guard of Druzzil"
        /delay ${Math.Calc[(${Spell[Guard of Druzzil].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    }
/return

Sub BuffToon(string ${Toon}, string ${SpellName})
	/target pc ${Toon}
        /delay 10
        /if (!${Target.ID}) {
                /echo "Can't find target"
                /return
        }
        /cast "${SpellName}"
        /delay ${Math.Calc[(${Spell[${SpellName}].MyCastTime}*10)].Int} (!${Me.Casting.ID})
	/delay 10
        /if (${Spawn[${Toon}].Pet.ID}) /target ${Spawn[${Toon}].Pet}
        /cast "${SpellName}"
/return
 
Last edited:
Actually, I could never get the sub to work, kept giving me the "You don't seem to have that spell memorized" even when I tried using "" like you suggested Cobalt. I just went with your earlier suggestion, and here is my finished code.

Added an else so that someone can say "buffs" to the bot and the bot will respond with a list of available buffs.

For Enchanter:
Rich (BB code):
#Chat   tell
#Event  TellMsg "#1# tells you, '#2#'"

|---------------------------------------------------------------|
|			GETTING STARTED				|
|You must mem every buff you intend to offer.  I would suggest  |
|saving them as a spell set, possibly named buffbot.  Then all  |
|you have to do is type /mac buffbotenc and you are set to go.  |
|Only use this in the GUILD HALL.    				|
|---------------------------------------------------------------|


Sub Main
    :Loop
        /doevents chat
    /goto :Loop
/return

Sub Event_Chat(string Chat, string Toon, string Msg)
    /if (${Msg.Find[haste]}) {
        /target pc ${Toon}
        /cast "Speed of Salik"
        /delay ${Math.Calc[(${Spell[Speed of Salik].MyCastTime}*10)].Int} (!${Me.Casting.ID})
  	/delay 60
	/target clear
	/target ${Spawn[${Toon}].Pet.Name}
	/cast "Speed of Salik"
        /delay ${Math.Calc[(${Spell[Speed of Salik].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c6]}) {
        /target pc ${Toon}
        /cast "Clairvoyance"
        /delay ${Math.Calc[(${Spell[Clairvoyance].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[speed]}) {
        /target pc ${Toon}
        /cast "Swift like the Wind"
        /delay ${Math.Calc[(${Spell[Swift like the Wind].MyCastTime}*10)].Int} (!${Me.Casting.ID})
  	/delay 70
	/target clear
	/target ${Spawn[${Toon}].Pet.Name}
	/cast "Swift like the Wind"
        /delay ${Math.Calc[(${Spell[Swift like the Wind].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[vallon]}) {
        /target pc ${Toon}
        /cast "Speed of Vallon"
        /delay ${Math.Calc[(${Spell[Speed of Vallon].MyCastTime}*10)].Int} (!${Me.Casting.ID})
  	/delay 70
	/target clear
	/target ${Spawn[${Toon}].Pet.Name}
	/cast "Speed of Vallon"
        /delay ${Math.Calc[(${Spell[Speed of Vallon].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c1]}) {
        /target pc ${Toon}
        /cast "Clarity"
        /delay ${Math.Calc[(${Spell[Clarity].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[c3]} || ${Msg.Find[kei]}) {
        /target pc ${Toon}
        /cast "Koadic's Endless Intellect"
        /delay ${Math.Calc[(${Spell[Koadic's Endless Intellect].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[god]} || ${Msg.Find[mr]} || ${Msg.Find[druzzil]}) {
        /target pc ${Toon}
        /cast "Guard of Druzzil"
        /delay ${Math.Calc[(${Spell[Guard of Druzzil].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[buffs]}) {
        /tell ${Toon} I can cast Haste, c6, c3, vallon, c1 or speed.  You must be 62 for haste and c6, 45 for c3 and vallon.  All the rest ask for c1 or speed.
    }
/return

For Cleric:

Rich (BB code):
#Chat   tell
#Event  TellMsg "#1# tells you, '#2#'"

|---------------------------------------------------------------------------|
|                      EDITS THAT MAY BE NECESSARY                          |
|You may want to change the buffs you are offering.  Also, for temp, I don't|
|have it, so mine returns a tell stating such.  All you need to do is copy  |
|the line starting with /target to the line ending in /delay before the }   |
|else and paste underneath the line that reads }else /if (${Msg.Find[temp]})|
|Also should add temp and the levels for it in the /tell line in the find   |
|buffs else.  								    |
|									    |
|                          GETTING STARTED	                            |  
|You must mem every buff you intend to offer.  I would suggest saving this  |
|as a spell set, possibly called buffbot.  Then all you have to do is type  |
|/mac buffbotcleric and you are set to buff.				    |                                      |
|---------------------------------------------------------------------------|

Sub Main
    :Loop
        /doevents chat
    /goto :Loop
/return

Sub Event_Chat(string Chat, string Toon, string Msg)
    /if (${Msg.Find[Virtue]}) {
        /target pc ${Toon}
        /cast "Virtue"
        /delay ${Math.Calc[(${Spell[Virtue].MyCastTime}*10)].Int} (!${Me.Casting.ID})
	/delay 60
	/target clear
	/target ${Spawn[${Toon}].Pet.Name}
	/cast "Virtue"
        /delay ${Math.Calc[(${Spell[Virtue].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[Conviction]}) {
        /target pc ${Toon}
        /cast "Conviction"
        /delay ${Math.Calc[(${Spell[Conviction].MyCastTime}*10)].Int} (!${Me.Casting.ID})
	/delay 60
	/target clear
	/target ${Spawn[${Toon}].Pet.Name}
	/cast "Conviction"
        /delay ${Math.Calc[(${Spell[Conviction].MyCastTime}*10)].Int} (!${Me.Casting.ID})
    } else /if (${Msg.Find[symbol]}) {
        /target pc ${Toon}
        /cast "symbol of balikor"
        /delay ${Math.Calc[(${Spell[symbol of balikor].MyCastTime}*10)].Int} (!${Me.Casting.ID})
  } else /if (${Msg.Find[temp]}) {
        /tell ${Toon} Sorry I don't have that spell. Please choose from virtue, conviction, or symbol.
  } else /if (${Msg.Find[buffs]}) {
        /tell ${Toon} I can cast virtue, conviction or symbol (of balikor) on you.  Please tell me which you would like. Must be 46 for virtue, 62 for others.
  }
/return

I've tested it and it works for buffing with and without pet.

EDIT: I don't want to take credit for this macro. I copied the original code from this forum, I can't remember who off the top of my head. Credit goes to Cobalt for the suggestions on pet buff fixes.
 
Last edited:
Cobalt, I tried that code that you posted, but I get

There are no spawns matching: (0-100) pc null
[MQ2] "Can't find target"

w/o a pet. If I cast a pet, I get

There are no spawns matching: (0-100) pc null
You do not seem to have that spell memorized.


EDIT: Oh, and to Learningcurve, I really can't do too much explaining of the code. LOL, I really don't understand much myself, I just know enough to be dangerous I suppose. I can look at most stuff and partially understand the logic behind it so as to make minimal changes. But as far as actually writing anything from scratch, or helping someone else to do the same, I'm basically lost. Sorry I couldn't be of more help.
 
Ran into a problem with mine, but was simple to fix. Will fix it above. I had
Rich (BB code):
 } else /if (${Msg.Find[c]}) {
For regular Clarity. Needs to be
Rich (BB code):
 } else /if (${Msg.Find[c1]}) {

Requests for higher c's were triggering that one because it was only looking for a 'c'.
 
Question about Guild Hall Buff Bot

Users who are viewing this thread

Back
Top