It is possible to automatically open the chat when login with KolMafia?

Sarius Skelrets

New member
As the title says, I'm looking for a way to automatically open the ingame chat when login in

I forgot to open it once and got in trouble with my clan for that. I don't want that to happen again so can you tell me if it's possible to auto-open the chat when starting the game?
 

fronobulax

Developer
Staff member
Does Preferences -> Look & Feel -> Main Interface and moving Loathing Chat into one of the Startup Options do what you want?

I hope there's a story behind getting in trouble for not opening chat. Doesn't sound like a clan that would have me ;-)
 

Sarius Skelrets

New member
Does Preferences -> Look & Feel -> Main Interface and moving Loathing Chat into one of the Startup Options do what you want?

I hope there's a story behind getting in trouble for not opening chat. Doesn't sound like a clan that would have me ;-)
My chat wasn't opened so I didn't received the message about not trying to kill that boss. Needing to open the chat while in clan dungeon is also a written rule of my clan

Placing it here just start another page with the chat open. It does not open it in the mainscreen
 

MCroft

Developer
Staff member
Possible? Yes. But it will require relay scripting (documented here: https://wiki.kolmafia.us/index.php/Relay_Override_Scripting)

And the steps are mentioned in this old thread: https://kolmafia.us/threads/character-info-toolbox.7594/page-48#post-95238

This has very little to do with ChIT, but since it now includes game.ash, I thought I'd mention...does anyone else always enter chat immediately upon logging in? Because long, long ago, I made my own game.ash that bypasses chatlaunch.php and goes straight into chat (simply by referring the chatpane to chat.html instead of chatlaunch.php).
I think the URL is different, but the principle is the same.
 

MCroft

Developer
Staff member
I don't understand the difference between what you want and what is happening but since @MCroft seems to understand, you have an answer ;-)
I’m guessing, a bit. I’m trying to answer the user story I just made up; “As a KoLmafia user, I want the relay browser to launch with the chat open as if I’d pressed “Enter the Chat”, but without me taking that step, so that I can not get yelled at for ignoring my clan‘s directives.“

if that’s a bad guess, we can try again…
 

fronobulax

Developer
Staff member
I’m guessing, a bit. I’m trying to answer the user story I just made up; “As a KoLmafia user, I want the relay browser to launch with the chat open as if I’d pressed “Enter the Chat”, but without me taking that step, so that I can not get yelled at for ignoring my clan‘s directives.“

if that’s a bad guess, we can try again…

OK. The relationship between "mainscreen" and "relay browser" was unclear since I consider KoLmafia the main interface, not the relay browser.

The vocabulary gap between people who play without the relay browser and almost exclusively in teh relay browser seems to be growing :). I can see a day when there is no mafia GUI. Everything worth doing is done in a browser thanks to the miracle of Javascript :)
 

Sarius Skelrets

New member
I’m guessing, a bit. I’m trying to answer the user story I just made up; “As a KoLmafia user, I want the relay browser to launch with the chat open as if I’d pressed “Enter the Chat”, but without me taking that step, so that I can not get yelled at for ignoring my clan‘s directives.“

if that’s a bad guess, we can try again…
This is exactly what I want
 

Pazleysox

Member
This is exactly what I want
I think I'm a little late to the party, but can't you make a script like the following, and use it as a login script? This is exactly what I did when I was running my chatbot. This first script can be called to log you in, and open the chat for that character only.

Code:
void main()
{
    cli_execute("login ruby");
cli_execute("clanfortune.ash respond all");
cli_execute("chat");
}

Now the chat box would open every time ruby logged in.

This script would have to be set as a login script, and set it as such under preferences. This script will open the chat every time any character logs in.
Code:
void main()
{
cli_execute("chat");
}
 
Last edited:

Pazleysox

Member
No. That does the same as what fronobulax suggested, which isn't what they want.
Thats what I get for being late to the party then. lol

EDIT: Sounds like he's looking for the old greasemonkey script "auto enter chat". Too bad it's been obsolete for a good long time.
 

Rinn

Developer
@Sarius Skelrets Here you go, save this as relay/chatlaunch.ash
Code:
buffer redirect(buffer source, string url, int timeout_seconds)
{
    source.replace_string("</head>", "<meta http-equiv=\"refresh\" content=\"" + timeout_seconds + "; URL=" + url + "\" /></head>");
    return source;
}

void main()
{
    redirect(visit_url(), "mchat.php", 0).write();
}
 
Top