Performing actions on character connection/game init
Moderator: Eowul
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Performing actions on character connection/game init
Hi, all.
I need to perform JS code when game is loaded or character is connected.
I've tried to create GMCP triggers on both core.hello and char.login, but they were never triggered.
What am I missing?
I need to perform JS code when game is loaded or character is connected.
I've tried to create GMCP triggers on both core.hello and char.login, but they were never triggered.
What am I missing?
Re: Performing actions on character connection/game init
for example, if you want to sendGMCP([[Core.Options { "npc_comms" : "off" }]]) on gmcp.char.login you have to put it on some delay, as it doesn't work otherwise. Not sure why, but a few seconds is enough.
Re: Performing actions on character connection/game init
the webclient js triggers and such are loaded with your characters login, as i understand it, so it would be hard to trigger on that part.
Re: Performing actions on character connection/game init
So it seems, the triggers are simply loaded too late.Alisa wrote:the webclient js triggers and such are loaded with your characters login, as i understand it, so it would be hard to trigger on that part.
Any chance we can get a fix? Just trigger the char.login once triggers are loaded, in any case triggers are loaded only after the login?
Re: Performing actions on character connection/game init
fix?
Trigger on a line done after login.. like the "last login was from" or something like that.
Trigger on a line done after login.. like the "last login was from" or something like that.
Re: Performing actions on character connection/game init
Code: Select all
Welcome to Genesis 3.1, maintenance release.
Last login at : Sat Sep 9 11:57:34 2017
Last login from: ::1
This is a big dark hall with rows of beds in it. Every warrior from Angmar's
army has his own bed here and whenever he wishes to, he can sleep here.
There is one obvious exit: east.
>
Loaded 36 triggers (14 enabled)
Loaded 37 aliases (31 enabled)
Re: Performing actions on character connection/game init
You recover? Should be after that, yeah?
Re: Performing actions on character connection/game init
You don't always recover.Alisa wrote:You recover? Should be after that, yeah?
I wonder how hard would it be to trigger char.login event right after loading triggers? Additional line of code, I can do it and send it to whoever needed, if they're THAT busy.
Re: Performing actions on character connection/game init
The order in which those messages appear (You recover *items*, Welcome Gardener, triggers enabled etc) change oftentimes. I decided to just make an "armself" alias to do stuff when im back in the realms manually.
Re: Performing actions on character connection/game init
I initialize mine with alias manually right now as well, but I'm looking for a more consistent way, than relying on messages that might or might not show up during logging on.
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/