From e7622bdb7e41d8505e1221c66433862dc72a6336 Mon Sep 17 00:00:00 2001 From: David Kindl Date: Fri, 27 Mar 2026 17:05:02 +0100 Subject: [PATCH] Configurable options - switch for changing account chatname (relates to https://github.com/Sphereserver/Source-X/issues/1438) --- config.scp | 9 +++++++++ events/e_player_generic_event.scp | 10 ++++++++-- spheretables.scp | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 config.scp diff --git a/config.scp b/config.scp new file mode 100644 index 0000000..c511c8b --- /dev/null +++ b/config.scp @@ -0,0 +1,9 @@ +// +// @file +// ScriptPack configuration file. +// + +// Configurable switches, that can change global behaviour. +[DEFNAME configuration] +// When enabled, account chatname will be set to currently logged character. +config.chatname_char = 0 diff --git a/events/e_player_generic_event.scp b/events/e_player_generic_event.scp index 9ad19d9..f1d5b49 100644 --- a/events/e_player_generic_event.scp +++ b/events/e_player_generic_event.scp @@ -4,7 +4,13 @@ //**************************************************************************** VERSION=X1 +// Generic event to all players. [events e_player_generic_event] -//Generic event to all players -[eof] \ No newline at end of file +on=@login + // If enabled in configuration, chatname will be changed to character name on login. + if ( == 1) + account.chatname = + endif + +[eof] diff --git a/spheretables.scp b/spheretables.scp index 4aa73fd..d2eea22 100644 --- a/spheretables.scp +++ b/spheretables.scp @@ -22,6 +22,7 @@ As a general rule: [RESOURCES] // sphere.ini and spheretable.scp are automatic. // All the other scripts we want to load. +config.scp crafting/ crafting/interface/ crafting/interface/legacy skillmenu/