X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=help.cfg;h=70b7c8a0f8242dd1391f62421dba748b8d022796;hb=ddd12b1a0e44e6c0272ef84b7a2d811e29f594b1;hp=69bec7c750832e16699013150441ea4f94ad54dc;hpb=3033ee88ad9154c33545be20bdb60280ee7b028e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/help.cfg b/help.cfg index 69bec7c75..70b7c8a0f 100644 --- a/help.cfg +++ b/help.cfg @@ -1,24 +1,25 @@ // Simple help message system -// It prints messages with the configured name and interval to all connected users -// Exec this file and start the help system with the command help_loop -// You can adjust those two settings and change the messages and their count -// help_cfg_time is the time between two messages in seconds -// help_cfg_prefix is prepended to each message, useful to color the nick and message differently -// help_msg_count is from 0 to last message, thus one more then the last message number you want + +// First exec this file, then the correct help-*.cfg for your ruleset. + +// You can start the help system with the command help_loop but this has been found to annoy players. +// A better way is to put `alias sv_hook_gamestart_all "defer 20 help_next"` into your server.cfg, +// that way you get one message per match. + // the messages need to be starting from 0 and be consecutive // for manual use: help_inc switches to the next message, help_doit will print the current message, help_next will do both together // settings -set help_cfg_nick "^2Help System^3" -set help_cfg_time 5 -set help_cfg_prefix "^2" +set help_cfg_nick "^2Help System^3" "the messages will appear in chat coming from the sever using this name" +set help_cfg_time 5 "the time between two messages in seconds when started using help_loop" +set help_cfg_prefix "^2" "prepended to each message, useful to color the nick and message differently" // aliases making up the actual helpsystem -set help_tmp_index 0 // TODO this will get reset with every game on ruleset-votable servers (https://gitlab.com/xonotic/xonotic-data.pk3dir/issues/1973) +set help_tmp_index -1 // -1 since we first increment, then show it alias help_say "set help_tmp_oldnick \"$sv_adminnick\"; set sv_adminnick \"$help_cfg_nick\"; say \"$*\"; help_say2" alias help_say2 "set sv_adminnick \"$help_tmp_oldnick\"" alias help_doit "sv_cmd rpn /help_tmp_msg help_msg_$help_tmp_index def; help_doit2" alias help_doit2 "help_say $help_cfg_prefix$help_tmp_msg" alias help_inc "sv_cmd rpn /help_tmp_index help_tmp_index 1 add $help_msg_count mod def" -alias help_next "help_doit; help_inc" +alias help_next "help_inc; help_doit" // increment first - if the ruleset changed, the number of tips could have too, this avoids overflow alias help_loop "help_next; defer $help_cfg_time help_loop"