]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - help.cfg
include tips for overkill
[xonotic/xonotic-data.pk3dir.git] / help.cfg
1 // Simple help message system
2 // It prints messages with the configured name and interval to all connected users
3 // Exec this file and start the help system with the command help_loop
4 // You can adjust those two settings and change the messages and their count
5 // help_cfg_time is the time between two messages in seconds
6 // help_cfg_prefix is prepended to each message, useful to color the nick and message differently
7 // help_msg_count is from 0 to last message, thus one more then the last message number you want
8 // the messages need to be starting from 0 and be consecutive
9 // for manual use: help_inc switches to the next message, help_doit will print the current message, help_next will do both together
10
11 // settings
12 set help_cfg_nick "^2Help System^3"
13 set help_cfg_time 5
14 set help_cfg_prefix "^2"
15
16 // aliases making up the actual helpsystem
17 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)
18 alias help_say "set help_tmp_oldnick \"$sv_adminnick\"; set sv_adminnick \"$help_cfg_nick\"; say \"$*\"; help_say2"
19 alias help_say2 "set sv_adminnick \"$help_tmp_oldnick\""
20 alias help_doit "sv_cmd rpn /help_tmp_msg help_msg_$help_tmp_index def; help_doit2"
21 alias help_doit2 "help_say $help_cfg_prefix$help_tmp_msg"
22 alias help_inc "sv_cmd rpn /help_tmp_index help_tmp_index 1 add $help_msg_count mod def"
23 alias help_next "help_doit; help_inc"
24 alias help_loop "help_next; defer $help_cfg_time help_loop"