Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System: Message for first time user appeal [Req.] #643

Open
jrotunda opened this issue Feb 27, 2024 · 0 comments
Open

System: Message for first time user appeal [Req.] #643

jrotunda opened this issue Feb 27, 2024 · 0 comments

Comments

@jrotunda
Copy link

jrotunda commented Feb 27, 2024

Request:

As a DM or ADMIN, we see " ### has just logged on for the first time." when a new user logs in.

More often than not it's a newbie, although it may also be an established player on an alternate account - but when in doubt, help!

To continue building the social nature of the game - helped by the additional setting to adjust broadcast mana, this would be a beneficial message to be seen by the players themselves, for veterans who should be meeting and greeting the newbies of Meridian, and for newbies to receive a warm welcome.

current code is below:

% Returns a running count of player's logged in time, across sessions
% Used by quest engine to check how much time a player has spent online
% since performing a quest
GetTimeLoggedIn()
{
if piLastLoginTime = 0
{
return 0;
}

  if pbLogged_on
  {
     return (GetTime() - piLastLoginTime + piTimeLoggedIn);
  }

  return piTimeLoggedIn;

}

SendFirstTimeAppeal()
{
Send(self,@UserAppeal,#first_time=TRUE);

  return;

}

UserLogon(session_id = $)
{
local i;

  poSession = session_id;
  pbLogged_on = TRUE;

  if piLastLoginTime = 0 AND piLast_Restart_Time = 0
  {
     Debug("Sending first time appeal");
     Send(self,@SendFirstTimeAppeal);
  }

  piLastLoginTime = GetTime();
  % Gotta load interface early!
  Send(self,@UserLoadModule,#module=user_interface_module);

  Send(self,@MsgSendUser,#message_rsc=user_logon);

  Send(SYS,@SystemUserLogon,#what=self);

  if NOT (IsClass(self,&DM) AND Send(self,@IsHidden))                            ################### GUT IT?
  {
     % Advertise as normally.
     Send(SYS,@SystemUserLogonAdvertise,#what=self);
  }
  else
  {
     % We don't want to be seen, except by                                     #################
     for i in Send(SYS,@GetUsersLoggedOn)
     {
        % Only do this for admins
        if IsClass(i,&Admin)
        {
           Send(i,@SomeoneLogon,#what=self);   

user_first_time_appeal = "### %s has just logged on for the first time."****

From:
Meridian59/kod/object/active/holder/nomoveon/battler/player/user.kod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant