I have a situation where I am sending a command to the mud from a script and the output of that command will generate data that I want to present to the user in a formatted way. For example:
*# CW Mana:Cold>xp
info mmc.XPCounter:update: %x %t %X %T.
--> Gained xp: 460 tp: 0
--> Session xp: 1707 tp: 0
--> Needed xp: 0 tp: 1418
The alias is xp, and it sends a call to a function that sends the command: info mmc.XPCounter:update: %x %t %X %T.
I have a trigger that matches the output of that command and gives me information about XP. That trigger then calls another function that string.format's the information you see above.
I think it is ugly that that "info mmc.XPCounter:update: %x %t %X %T." string is echoed to the main window in this case and would like to gag it. Any ideas?
Thanks.
How do I gag the output of commands from scripts?
Re: How do I gag the output of commands from scripts?
The send() function has an optional parameter to not print the command on the screen. If you use this option you can then echo your replacement command.
Re: How do I gag the output of commands from scripts?
Perfect, thanks!