Hey guys,
I'm trying to set up some init stuff for login triggers and was wondering if there was a way to access to profile name or something in the profile launch that I could access in a trigger to identify the character?
I have several alts and create a profile for each largely because our mud allows multi play, but also because I'm a bit pendantic and want this neat and tidy. The latter also wants to have a generic login trigger that will goes through the steps of logging in (post user name and possword) and set some variables. This would be most easily accomplished if I could get the alt name at login.
Thanks,
Jimbus
accessing the profile name from a trigger
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: accessing the profile name from a trigger
Um I think not, at the moment but it is something that recently crossed my mind as needed, I also intend to write a command to SEND the "character" name and the password to the MUD, but without actually telling the script system WHAT the password is (or echoing it on screen) for security (the script cannot "sniff" it) - this would allow a user to script a custom login in system, provided there was also an option on the connection profile dialogue to not send them automagically upon connection if they ARE set (as they currently are upon connection). The need to know the actual character being played is a requirement if it affected the scripts that are to be used and you are using the "module" (package sharing) system to have a common setup across profiles.
I also have medium term ideas to have a system to send "events" in a round-robin manner between all the profiles that are loaded (each currently runs it's own instance of the lua interpreter and they are independent of each other) with a special "sysInterprofileLink" event - where the sending profile would be the last recipient of the event. Prototype code implementing this showed promise but I needed to revise it to take an arbitrary number/type of arguments - however I bet this would be useful in a multi-playing configuration!
I also have medium term ideas to have a system to send "events" in a round-robin manner between all the profiles that are loaded (each currently runs it's own instance of the lua interpreter and they are independent of each other) with a special "sysInterprofileLink" event - where the sending profile would be the last recipient of the event. Prototype code implementing this showed promise but I needed to revise it to take an arbitrary number/type of arguments - however I bet this would be useful in a multi-playing configuration!
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: accessing the profile name from a trigger
Your request will be covered by a current Pull Request 339 against the "development" branch which will add the getProfileName() function which will do what I think you want...!
Re: accessing the profile name from a trigger
As a workaround, you can currently use getMudletHomeDir() to get the profile name - just strip off the path parts.