Question: The wiki

yarrh

New member
Where is it?

Not the Kingdom of Loathing wiki, but the KOLMafia wiki. I know it exists (I've been there once) but I don't have the link.

If someone could link me that'd be sweet.

Also, is there a command for a script that sends a chat message?
 

heeheehee

Developer
Staff member
It's here, but it's vastly limited.

>ashref chat
yields:
void chat_clan( string )
void chat_private( string, string )

I'm not too sure if those work, but yeah.
 

Grotfang

Developer
>ashref chat
yields:
void chat_clan( string )
void chat_private( string, string )

I'm not too sure if those work, but yeah.

Those do work. More specifically, the commands are:

Code:
chat_private( string recipient , string message );
chat_clan( string message );

So if I wanted to send my good pal Grotfang a PM I would type:

Code:
chat_private( "Grotfang" , "Hello" );
 

Bale

Minion
It should be pointed out that chat_private() will only work if you're sending a message to someone in your clan or your contact list. mafia does not allow you to send private message to just anyone.

At least that is my understanding. I've never actually made use of the command, so if I'm wrong or it has changed, please let me know.
 

Grotfang

Developer
It should be pointed out that chat_private() will only work if you're sending a message to someone in your clan or your contact list. mafia does not allow you to send private message to just anyone.

You are, strictly speaking, correct (although it's been a while since my code did that). I personally don't agree with that limitation - I think it makes it less useful than chat_reply() was. However, it does have its uses and the limitation isn't hard to override.

Actually, that reminds me. I think last time I was trial running a chatbot script we had an issue with the function failing if you didn't have access to the clan whitelist too.

/me goes to have a poke

EDIT: Yep. Confirmed. It requests the clan whitelist page, but in the instance it can't access that, aborts with the "contact Jick" message.
 
Last edited:
Top