Equivalent zMud onConnect

Korus99
Posts: 2
Joined: Tue Aug 04, 2009 7:57 pm

Equivalent zMud onConnect

Post by Korus99 »

zMud has an onConnect alias that is run when the MUD is connected. Is there an equivalent alias or event in Mudlet?

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Equivalent zMud onConnect

Post by Heiko »

Define a simple trigger on the login message of your MUD and run your init scripts from there.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Equivalent zMud onConnect

Post by Vadi »

And it all goes awry when someone fakes that line ;)

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: Equivalent zMud onConnect

Post by Caled »

zMud doesn't exactly have an alias, it has system defined event, called 'onConnect'. I believe this event sort of already exists in Mudlet, but is not accessible in script (I may well be wrong). Still, if it already exists, maybe it wouldn't be hard to have it call an actual Mudlet script event, which would let us create event handler functions for it?

At the moment I just trigger on the text I see on login, but if people faking that line is a problem, as Vadi suggests, then that would be my suggestion for a solution.

eraldo
Posts: 43
Joined: Sun Jul 12, 2009 1:25 am

Re: Equivalent zMud onConnect

Post by eraldo »

Sounds like a great solution :)

FormerZmudUser
Posts: 13
Joined: Fri May 15, 2009 12:52 pm

Re: Equivalent zMud onConnect

Post by FormerZmudUser »

Vadi wrote:And it all goes awry when someone fakes that line ;)
Not if you properly disable your initialization trigger after login and enable them on disconnect.
I'm using a login trigger and it's easy and reliable.

eraldo
Posts: 43
Joined: Sun Jul 12, 2009 1:25 am

Re: Equivalent zMud onConnect

Post by eraldo »

What if someone fakes your disconnect message? ;P

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Equivalent zMud onConnect

Post by Heiko »

You don't have to use a trigger to reenable your init triggers. You can use buttons or aliases to disconnect you from the MUD.

Adding an onConnect system event is no big deal and will be added eventually.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Equivalent zMud onConnect

Post by Vadi »

Eventually! It would still be great heh.

Korus99
Posts: 2
Joined: Tue Aug 04, 2009 7:57 pm

Re: Equivalent zMud onConnect

Post by Korus99 »

It's been a year since I originally posted this. Has there been any progress?

This is the one feature that is keeping me from using mudlet.

I'm unable to use a trigger of the login text, as the MUD has two modes. The mode that I am trying to enable with mudlet requires a special cookie be sent before the login text is printed. This special mode would enable graphical maps, MOB entry and exit notifications, inventory control, etc.

The onConnect event in ZMUD allowed me to send this special cookie before the 'plain' login text displayed.

I can understand if it is not a priority for the overall project, but it is the number one item on my wish list.

Post Reply