UI/LUA: General hook into the chat input

G

Guest

Guest
Archived from groups: alt.games.warcraft (More info?)

Hello,

I am currently developing an add-on that should easily realize
role-playing communication. At the moment there is a command named
"/ChatBot" and users are able to specify an argument as like "hello".
Afterwards the add-on generates an expanded hello-message as like "Hello
Maldrakor, my dear friend and fellow. What a nice day here in StormWind
today. Where is your heart you leading to?".

Due the fact it is a bit annoying to use such a long command I would
like to hook the trigger directly without slash. For example an user has
to write "hello" in the chat frame the reaction should be done. A short
"thx" would expand to a much larger and atmospheric "Thank you very
much. If you have any wishes...?"

Thus, how is it possible to register non-slash-commands with LUA, the
WoW API or SEA/Cosmos?

Regards,

Marc

PS.: Such a plugin may be a recommendation of al RP servers ;) !

--
Computer, Technik und Security http://www.computec.ch/
Meine private Webseite http://www.computec.ch/mruef/
 
G

Guest

Guest
Archived from groups: alt.games.warcraft (More info?)

"Marc Ruef" <marc.ruef@computec.ch> skrev i en meddelelse
news:d803ft$10g$1@news.hispeed.ch...
> Hello,
>
> I am currently developing an add-on that should easily realize
> role-playing communication. At the moment there is a command named
> "/ChatBot" and users are able to specify an argument as like "hello".
> Afterwards the add-on generates an expanded hello-message as like "Hello
> Maldrakor, my dear friend and fellow. What a nice day here in StormWind
> today. Where is your heart you leading to?".
>
> Due the fact it is a bit annoying to use such a long command I would like
> to hook the trigger directly without slash. For example an user has to
> write "hello" in the chat frame the reaction should be done. A short "thx"
> would expand to a much larger and atmospheric "Thank you very much. If you
> have any wishes...?"
>
> Thus, how is it possible to register non-slash-commands with LUA, the WoW
> API or SEA/Cosmos?
>
> Regards,
>
> Marc
>
> PS.: Such a plugin may be a recommendation of al RP servers ;) !
>
> --
> Computer, Technik und Security http://www.computec.ch/
> Meine private Webseite http://www.computec.ch/mruef/

If it is just text messages, why not just make a macro that says that?
You can write: "Hello %t how are you?" and it would put your targets name in
the %t place.
Much easier than what you have planned it sounds like?

Mette
 
G

Guest

Guest
Archived from groups: alt.games.warcraft (More info?)

Hello,

> If it is just text messages, why not just make a macro that says that?
> You can write: "Hello %t how are you?" and it would put your targets name in
> the %t place.

First of all I did that. But this was very boring because always the
same responses were used.

So I expanded it to get different strings[1]:

/script R=random(0,3);if(R==0) then M="Verdammte Bestie";end;if(R==1)
then M="Sohn eines Ogers";end;if(R==2) then M="Elende Ausgeburt der
Hölle";end;if(R==3) then M="Dummer Narr";end;SendChatMessage(M..", ich
reiss Dir den Kopf ab!", "SAY")
/verdammnis

But therefore you are limited to the 255 chars and just a bunch of macros.

My add-on will be able to generate much more different and complex
texts. For example I am able to detect the race of my target and say
something like "Best wishes to my friends, the dwarfs."

As you can see this is more just for fun and not to fulfill a specific
goal within a realistic amount of time ;) !

Regards,

Marc

[1] http://wow.gamona.de/index.php?seite=macros&mode=detail&mid=61

--
Computer, Technik und Security http://www.computec.ch/
Meine private Webseite http://www.computec.ch/mruef/