Reconnect

Post Reply
deiccoj
Posts: 1
Joined: Mon Dec 21, 2015 5:11 am

Reconnect

Post by deiccoj »

Is there a way for me to add the ability to reconnect to an alias?
e.g.
Attachments
Screen Shot 2015-12-21 at 12.16.35 AM.png
Screen Shot 2015-12-21 at 12.16.35 AM.png (24.18 KiB) Viewed 2674 times

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Reconnect

Post by SlySven »

There are disconnect() and reconnect() lua commands but I don't think there is anything in place to get/send the login details but I was thinking about something very similar in relation to how a map might be shared between profiles - the current map format stores the position the player is in but that is not helpful if the map is copied/shared for more than one character.

Given that I am/have just added area and whole map userdata elements to the map (and access commands to the Lua subsystem) I intend to add the following:
getPlayerName() - returns the entry stored for the (player character) name on the connection profile dialog.
hasPassword() - returns IF there is an entry stored for the password on the connection profile dialog - note for security it WON'T return what that password is - only that there is one or not.
sendPassword() - sends the stored password to the Mud server - WITHOUT echoing it to the screen.

Also:
getCurrentPlayerRoomId() - the current Player room (red highlight) - where centerview() centres the map.
getViewCenterCoordinates() - will returns five items (multi-return!):
integer: 2 or 3 (Dimension map currently showing)
integer: x
integer: y
integer: z (room coordinates, for the 3D map are the coordinates that the camera is looking at, NOT the camera position)
integer: areaId (Current area being displayed)
setViewCenterCoordinates() - allows lua adjustment of the current map view centre WITHOUT changing the player room (unlike centerview())

Some more work is needed to sort out the details of zoom/scaling...

A combination of the first three of the above should enable (re)login scripts to be made though it may be necessary to also allow the user to disable the automatic (with a simple time delay) sending of the playername and password that is currently done if those entries are filled out.

Also the getPlayerName() and getCurrentPlayerRoomId() would enable a "save/disconnect" script to store the player location in the mapUserData for each player when the player "logs out"/"rents" which could be used on reload to restore that even if that wasn't the player to use the map.

Having a script know the character name that it is being used by will allow a user's packages to be more easily kept in sync for all their profiles on a MUD server (or indeed on more than one) and yet allow character specific specialization to be used as appropriate.

Post Reply