Need help with a macro you are writing? Ask here!
Moderator: MacroQuest Developers
-
Toophertwo
- decaying skeleton

- Posts: 7
- Joined: Sat Sep 18, 2004 8:36 pm
Post
by Toophertwo » Sun Sep 19, 2004 10:44 am
First Macro... Flame away.... I was wondering if this would work
Code: Select all
| Chatty.mac
|
| Usage /macro chatty
|
| No more bothersome questions
|
#chat tell
Sub Main
:mainloop
/doevents
/goto :mainloop
/return
Sub Event_Chat(ChatType,Sender,ChatText)
/if ($(ChatText.Equal[whats up]})
{
/tell ${Sender} Hey i am currently in ${Zone.zone} fighting a ${Target.Name}. Let me know if you want to know How many (hps), (mana), (endurance), (guild), how much (money) i am carring, who is my (groupleader)?, or what (level) i am.
}
/if ($(ChatText.Equal[mana]})
{
/tell ${Sender} I currently have ${Me.CurrentMana} out of ${Me.MaxMana}.
}
/if ($(ChatText.Equal[hps]})
{
/tell ${Sender} I currently have ${Me.CurrentHPs} out of ${Me.MaxHPs}.
}
/if ($(ChatText.Equal[level]})
{
/tell ${Sender} I currently am level ${Me.level}.
}
/if ($(ChatText.Equal[endurance]})
{
/tell ${Sender} I currently have ${Me.Endurance} out of ${Me.MaxEndurance}.
}
/if ($(ChatText.Equal[money]})
{
/tell ${Sender} I currently have ${Me.Platinum} pp ${Me.Gold} gp ${Me.Silver} and ${Me.Copper} cps.
}
/if ($(ChatText.Equal[guild]})
{
/tell ${Sender} I currently am in the guild ${Spawn.Guild} and have the status of a ${Spawn.GuildStatus}.
}
/if ($(ChatText.Equal[group]})
{
/tell ${Sender} I currently am in a group being run by ${GroupLeader.Name} and we have ${${Group}} members.
}
/if ($(ChatText.Equal[group]})
{
/tell ${Sender} I currently am in a group being run by ${GroupLeader.Name} and we have ${${Group}} members.
}
/return
Thanks for your imput... Later today i think i might add some group actions and talking if i am feeling risky.....
Last edited by
Toophertwo on Sun Sep 19, 2004 11:17 am, edited 1 time in total.
-
dman
- a hill giant

- Posts: 181
- Joined: Fri Dec 05, 2003 12:54 pm
Post
by dman » Sun Sep 19, 2004 11:00 am
It wouldn't work as written, mainly you forgot to add an event for your event sub to get triggered, something like "#chat tell" at the top will take care of that for you.
On another note, are you sure you want your character responding to anyone who manages to send your key words to you?
-
Toophertwo
- decaying skeleton

- Posts: 7
- Joined: Sat Sep 18, 2004 8:36 pm
Post
by Toophertwo » Sun Sep 19, 2004 11:16 am
Alright heres another question.. If i add lets say a #chat tell and a #chat group this will moniter both group and tells for Sub Event_chat? So if someone in the group acidently said mana instead of someone sending me a tell just saying mana it would send a tell to the last person that sent me one?
Code: Select all
/if ($(ChatText.Equal[mana]})
{
/tell ${Sender} I currently have ${Me.CurrentMana} out of ${Me.MaxMana}.
}
or would it not do anything?
So basically my question is this... How do i Seperate what commands i want the group to be able to accessess and what commands that someone who sends me a tell can acsess?[/code]
-
hiipii
- a ghoul

- Posts: 93
- Joined: Sat Jun 19, 2004 5:01 pm
Post
by hiipii » Sun Sep 19, 2004 4:19 pm
Code: Select all
/if (${ChatType.Equal[Group]) /return
but the way you have it set up right now it is only going to respond to tells becuase of the "#chat tell". If you change it to just "#chat" it will parse every line of incoming chat. Or you can add one for each chat type you want to parse.
Anyhow good luck with your macro writing career and although I don't want to hinder your efforts you may want to take a look at genbot. It's great for running bots.
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Sun Sep 19, 2004 5:00 pm
Toophertwo wrote:Alright heres another question.. If i add lets say a #chat tell and a #chat group this will moniter both group and tells for Sub Event_chat? So if someone in the group acidently said mana instead of someone sending me a tell just saying mana it would send a tell to the last person that sent me one?
It would monitor both and it would send a tell to the person who said mana in group. The variable Sender that you use will get set just the same with group chat as with tells.
Btw, if what you have doesn't work you might want to change the format of your macro. Sometimes the parser can be a bit picky about stuff like starting the { on a different line than the /if for example. It should look like this instead:
Code: Select all
/if ($(ChatText.Equal[mana]}) {
/tell ${Sender} I currently have ${Me.CurrentMana} out of ${Me.MaxMana}.
}