motd.qc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* Copyright (C) 1996-2022 id Software LLC
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; either version 2 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program; if not, write to the Free Software
  12. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  13. See file, 'COPYING', for details.
  14. */
  15. // Rogue Teamplay Variants Message of the Day function
  16. // Feb'97 by ZOID <zoid@threewave.com>
  17. // Under contract to id software for Rogue Entertainment
  18. .float motd_time;
  19. .float motd_count;
  20. void() MOTD =
  21. {
  22. local string tp;
  23. if (self.motd_count < 5) {
  24. if (teamplay > 3 && teamplay < 7)
  25. {
  26. tp = ftos(teamplay);
  27. stuffcmd(self, "teamplay ");
  28. stuffcmd(self, tp);
  29. stuffcmd(self, "\n");
  30. }
  31. self.motd_time = time + 1;
  32. self.motd_count = self.motd_count + 1;
  33. /*
  34. if (teamplay == TEAM_NORMAL_NODAMAGE)
  35. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nTeam play: No Friendly Fire\n");
  36. else if (teamplay == TEAM_NORMAL_DAMAGE)
  37. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nTeam play: Friendly Fire\n");
  38. */
  39. if (teamplay == TEAM_DMATCH_TAG)
  40. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nDeathmatch Tag!\n");
  41. else if (teamplay == TEAM_CTF)
  42. if (self.steam == TEAM1)
  43. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nCAPTURE THE FLAG!\n\nYou are ��� team!\n");
  44. else
  45. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nCAPTURE THE FLAG!\n\nYou are ���� team!\n");
  46. else if (teamplay == TEAM_CTF_ONEFLAG)
  47. if (self.steam == TEAM1)
  48. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nCAPTURE THE FLAG!\n(One Flag Mode)\n\nYou are ��� team!\n");
  49. else
  50. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nCAPTURE THE FLAG!\n(One Flag Mode)\n\nYou are ���� team!\n");
  51. else if (teamplay == TEAM_CTF_ALT)
  52. if (self.steam == TEAM1)
  53. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nCAPTURE THE FLAG!\n(Three Team Mode)\n\nYou are ��� team!\n");
  54. else if (self.steam == TEAM2)
  55. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nCAPTURE THE FLAG!\n(Three Team Mode)\n\nYou are ���� team!\n");
  56. else
  57. centerprint(self, "Welcome to\nThe Dissolution of Eternity!\nBy Rogue Entertainment\n\nCAPTURE THE FLAG!\n(Three Team Mode)\n\nYou are ���� team!\n");
  58. return;
  59. }
  60. self.motd_time = 0;
  61. };
  62. void() CheckMOTD =
  63. {
  64. // if (self.motd_time && self.motd_time < time)
  65. if (self.motd_time)
  66. {
  67. if(self.motd_time < time)
  68. MOTD();
  69. }
  70. };
  71. void() SetMOTD =
  72. {
  73. self.motd_time = time + 3;
  74. if ( teamplay == 3 )
  75. self.motd_count = 2;
  76. else
  77. self.motd_count = 0;
  78. };