Page 2 of 2

Posted: Thu Dec 03, 2009 9:34 pm
by stupac2
Turias, did you change the way emotes work? Looking through now it seems like they bots are spitting out: "[emote_text]", although that may vary by channel. I'm now trying to make this update work and mostly have it (unless you, for some reason, do a /whois on any of the bots, that's a little weird and I might fix it eventually...), but these emotes are way broken. Looking through the code for tabbed chat I can't see where it would fix these emotes.

Posted: Thu Dec 03, 2009 9:44 pm
by Turias
Emotes used to be:

<username text>

Now they just use the same characters as normal chat. So AFH should be:

[username text]

while AFHk is:

(username text)

When I tested it earlier it was working. Let me know if it isn't.

Posted: Thu Dec 03, 2009 10:48 pm
by stupac2
No it's definitely working, the problem is that I now have no way to differentiate emotes from normal messages (well, I can't think of one at any rate).

For instance, the difference between:

Code: Select all

AFH: (stupac2) butt butt butt
and:

Code: Select all

AFH: (stupac2 butt butt butt)
is really hard for me to pick out. Like, I'd want to try to and find if the last character is a )}], which I can do, but then I'd miss something like:

Code: Select all

AFH: (stupac2) (I like parentheses!)
I don't know, maybe it would be doable, but I feel like it would make the code a lot more quirky and introduce more weird bugs (that is, make it easier for a false positive or negative, right now you'd need to be saying something kind of silly in order to fuck up other people, like:

Code: Select all

stupac2: AFHobo 1736458 [lalalala]
would look really weird, but who would paste the bot's name and PID but not in the AFHobo (#1736458) form? (That last form won't trigger anything). Even then that wouldn't fuck up through the bots, only in the same clan.

Long story short, since those don't get replaced with a bot name, could we change it back? I think the <> worked fine.

Posted: Thu Dec 03, 2009 10:54 pm
by Turias
stupac2 wrote:Long story short, since those don't get replaced with a bot name, could we change it back? I think the <> worked fine.
But then you can't know which clan the person is emoting from, right? Doesn't that break what we were trying to accomplish with this change in the first place?

Posted: Thu Dec 03, 2009 10:58 pm
by lostcalpolydude
Maybe a character like ~ could be put in front of emotes, allowing some way to distinguish for a text parser?

Posted: Thu Dec 03, 2009 11:05 pm
by stupac2
Not really, since I can't think of a way to put that in for emotes that's not really awkward. The line would have to look like:

Code: Select all

AFH: AFHk: [i]stupac2 emotes[/i]
That looks weird to me (I'd italicize it to replace the brackets). I much prefer the old form, personally.

My main purpose (which has been accomplished) is that the majority of communications show clan of origin. Emotes not showing that (as well as not making the playername clickable) seems fine to me. If people want me to change emotes to something else I could do that. Honestly, I'd kind of like to do:

Code: Select all

AFH: [i]stupac2 emotes[/i]
That's much more in line with the way the game does it. Actually, come to think of it, it might be able to do something like this:

Code: Select all

[AFH|AFHk|AFHobo]: [i][b]stupac2[/b] emotes[/i]
I'll try to think of a way to get that to work without introducing too many places where someone could break it.

...A few seconds of thinking about it and I don't think I can do it, because sending:

Code: Select all

/me )(lalala
would break it, or at least wouldn't register, at least if:

Code: Select all

stupac2: (lalala)
also doesn't register.


...Fuck, emotes suck. I can't think of any good way to do it. I'll continue to think about it, and if anyone else can think of anything please let me know.


ETA: Lost, I don't like adding a symbol because it starts to get less readable to people not using the script, and I'm not sure if it accomplishes our goal. Although, I guess it would since there's no other way to put a tilde right after something a bot says, so we'd be back to needing to say:

Code: Select all

stupac2: AFH: ~ (botid#) stuff
in order to break it. I could probably work with that.

Posted: Thu Dec 03, 2009 11:23 pm
by Turias
What about:

[*Turias emotes about something*]
{*HoboKiller emotes about something else*}
(*AnAFHker emotes*}

Posted: Thu Dec 03, 2009 11:27 pm
by stupac2
I think that would work, since those combinations are kind of rare, whereas some of the others might be reasonable.

Posted: Thu Dec 03, 2009 11:31 pm
by Turias
Is it possible for there to be an ambiguous chat message this way? I agree that before, this would be ambiguous:

AFH: [The Big Man] jumps up and down]

Is "The Big Man" saying "jumps up and down]"?
Is "The Big" emoting "Man] jumps up and down"?

Both are possible.

Though I can't think of an ambiguous situation with the new proposition. Especially if the script is hardcoded with the userIDs of our bots and only looks for bot-like constructs from those users.

Posted: Fri Dec 04, 2009 12:01 am
by stupac2
Yeah, it only fires if the bot's ID and name are both in it. What would be really nice for me is if we could somehow note when the player's name ends. I'd really like to be able to add back the functionality of bolded and linked usernames. Right now I'm going to italicize it, but would really like to add that back.

Posted: Tue Dec 08, 2009 10:17 am
by tannenzaepfle
Does having the bots emote work?

AFHk would say "/me [Pantsless] is not wearing pants"
which would appear as

"AFHk [Pantsless] is not wearing pants"

Or has this been tried?

Posted: Tue Dec 08, 2009 10:19 am
by stupac2
That would make it easier to do some of the parsing I set up. In fact, it would make the code identical to non-emotes, I'm fairly sure.

Posted: Tue Dec 08, 2009 7:53 pm
by Eleron
tannenzaepfle wrote:Does having the bots emote work?

AFHk would say "/me [Pantsless] is not wearing pants"
which would appear as

"AFHk [Pantsless] is not wearing pants"

Or has this been tried?
I like this. It's in italic for everyone, and the name is nicely bracketed, all good.

Re: Clan Chatbot

Posted: Wed Mar 10, 2010 8:30 pm
by stupac2
Quick question, would it be easy to have the bots auto-send stuff back to you when you fuck up and right-click them when the person's not in the system? If it would be at all hard don't bother, but with kbay doing kmailing stuff I'm guessing it might not be.

Re: Clan Chatbot

Posted: Thu Mar 11, 2010 1:33 pm
by Turias
It wouldn't be that hard at all. It would just take a little time to implement. The main thing to consider is that right now the clan chatbots don't check kmail at all, so there would definitely be a bandwidth increase in doing this. I'd prefer for the code to be written such that the kmail page is not downloaded very often. Right now the bots cycle every five seconds or so looking for new chat messages.

As always, if someone wants to tackle writing this feature I'd be happy to merge it in. Baby is still eating up way too much of my time right now for me to do it myself. I don't even have time to play my turns anymore! :)

Re: Clan Chatbot

Posted: Thu Mar 11, 2010 8:24 pm
by stupac2
Well, if it were implemented something like once/hour would definitely be enough, perhaps too much. But if you're too busy it's probably not worth the time in any meaningful sense.

(And thanks for sending the thingie back >.>)

Re: Clan Chatbot

Posted: Fri Mar 12, 2010 1:08 pm
by NardoLoopa
I think you can get notification of arrival of a kmail -- then you only need to check on an event driven basis -- or maybe just on log-in. Either way would probably solve stu's problem.

Re: Clan Chatbot

Posted: Fri Mar 12, 2010 3:21 pm
by smanoli
Couldn't you just have a command that the user can send to the bot (via pm) that will have the chatbot check its kmail and return anything? Might be easier than monitoring for kmails.

Re: Clan Chatbot

Posted: Fri Apr 02, 2010 3:33 pm
by Turias
New feature!

Code: Select all

/msg AFH uneffect EFFECT_ID
As long as the bot has a SGEEA in its inventory, it will use it to remove the specified effect! Hooray for defenses against clubbing!

(This feature has also been added to kbay.)

Re: Clan Chatbot

Posted: Tue Apr 27, 2010 12:43 pm
by lostcalpolydude
Sending
oh, apparently you have to use || and && instead of OR and AND

turns into
oh, apparently you have to use || and

The bots eat everything starting with &&, which apparently was never noticed before chat macros.

Re: Clan Chatbot

Posted: Tue Apr 27, 2010 3:22 pm
by p4n1q
I'm pretty sure that's KoL chat.

Re: Clan Chatbot

Posted: Tue Apr 27, 2010 3:49 pm
by lostcalpolydude
Even when people in the same channel see the whole message?

Re: Clan Chatbot

Posted: Tue Apr 27, 2010 5:09 pm
by p4n1q
I don't know. But putting && in a message cuts off the rest of it in /hc, for example.

Re: Clan Chatbot

Posted: Tue Apr 27, 2010 5:50 pm
by lostcalpolydude
After some experimenting, it turns out that if your message starts with a / (such as /clan, /hardcore, /msg whoever), it terminates at && because that's assumed to be the start of a new message. If you just send a message to the channel you're in, no / is needed and the && goes through (I tested this in an unused clan with two characters). I'm guessing the bots put /clan in front of the messages they're sending. Or there's some other reason for it, which would probably be harder to change.

Re: Clan Chatbot

Posted: Tue Apr 27, 2010 6:10 pm
by slaphappy snark
lostcalpolydude wrote:I'm guessing the bots put /clan in front of the messages they're sending. Or there's some other reason for it, which would probably be harder to change.
I assume the bots put /msg or similar in front of them when they send them to each other.

Re: Clan Chatbot

Posted: Tue Apr 27, 2010 8:11 pm
by Turias
No need for the bots to /msg each other as they are all run from the same process.

But yeah, thanks for looking into this. The bots indeed prefix all of their chats with /clan. I wanted to make sure the bots never started to broadcast clan chat to /newbie, so I did that. However, I could also just "/channel clan" whenever the bots log in. This isn't a huge priority, but I'll try to do it when I have the chance. Thanks!

Re: Clan Chatbot

Posted: Tue Apr 27, 2010 8:53 pm
by slaphappy snark
That is much neater than what I pictured them doing. I'll go back to just thinking they are magic!

Re: Clan Chatbot

Posted: Wed Apr 28, 2010 1:51 pm
by Turias
Alright, the bots should now join /clan on login (just in case) and thus no longer prefix all of their chat messages with "/clan"

Re: Clan Chatbot

Posted: Thu Apr 29, 2010 12:59 pm
by Antipasta
Turias wrote:New feature!

Code: Select all

/msg AFH uneffect EFFECT_ID
As long as the bot has a SGEEA in its inventory, it will use it to remove the specified effect! Hooray for defenses against clubbing!

(This feature has also been added to kbay.)
For what little it's worth, I run a PSA bot (for mall bargains) in the clan where my other char lives, and since people liked snowballing him and jawbruising him, I just put in a periodic check for any nefarious chat effects... and it hits the guilty party with some toilet paper or a nerf dart in hopes of starting a big fight.

I just assume that people will forget what exactly is it that they need to do if it's not automatic.

Re: Clan Chatbot

Posted: Thu Apr 29, 2010 1:30 pm
by lostcalpolydude
Antipasta wrote:I just assume that people will forget what exactly is it that they need to do if it's not automatic.
There's enough of us that have this forum memorized that it shouldn't be an issue, I think.

Re: Clan Chatbot

Posted: Wed Aug 11, 2010 1:49 am
by vampirewolf3
One day, the chat bots got a lot less snarky when you bragged about being welcomed back to the Kingdom.

How can we reignite their pugnacious tendency?