Feature - Implemented receive chat

This might be a ridiculously huge request, overly complicated, and possibly against the desires and wishes of the devs (I have no idea what [if any] the attitude is for this) but I was wondering if it would be (if not already) possible to somehow listen to non-pm chat within a script?

Via either passing every single line to something similar to chatbotScript, or perhaps with some sort of function that returns all chat since it was last called in an array, I don't really care how, I was just wondering if it was possible.

At the time I have a ... really ghetto fix for this ("update" to someone I know is on mafia, and parsing the returned kmail, every 15 seconds...). But that leaves guesswork when the given line is an emote, and is... well... hefty.
 
Last edited by a moderator:

Grotfang

Developer
Fantastic. My chatbots currently use a modified version of mafia to send communications between two clans. Now it can be done using purely native code. Cheers
 

StDoodle

Minion
I was thinking along the same lines as Grotfang. I've desired to have an inter-clan chatbot for HCO, HCN & HCS for a while, but up until now it wasn't feasible with stock KoLmafia, and I have no desire to look into other KoL scripting.
 

Grotfang

Developer
The problem I'm having at the moment is that running on a server, I have no means of producing a GUI, and mafia seems pretty dependent on its chat frames. This is producing a lot of errors and not allowing me to continue. I used to have a chunk of code that meant whenever something came into the chat channel, mafia would whack out of an abort state, so "resetting" following an abort was as simple as posting in /clan.

I'll see what I can come up with to resolve this tomorrow. Just thought I'd mention it as an issue.
 
Top