accessing the profile name from a trigger

Post Reply
jimbus
Posts: 14
Joined: Fri Nov 15, 2013 10:19 pm

accessing the profile name from a trigger

Post by jimbus »

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

User avatar
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

Post by SlySven »

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! ;)

User avatar
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

Post by SlySven »

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...! 8-)

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

Re: accessing the profile name from a trigger

Post by Vadi »

As a workaround, you can currently use getMudletHomeDir() to get the profile name - just strip off the path parts.

Post Reply