2001-07-23 20:52:47 +00:00
|
|
|
|
#include "defs.qh"
|
|
|
|
|
#include "messages.qh"
|
|
|
|
|
#include "menu.qh"
|
2001-07-17 05:58:10 +00:00
|
|
|
|
/*======================================================
|
|
|
|
|
TFORTHLP.QC CustomTeamFortress v3.1
|
|
|
|
|
|
|
|
|
|
(c) TeamFortress Software Pty Ltd 29/2/97
|
|
|
|
|
(c) William Kerney 5/22/00
|
|
|
|
|
parts (c) Craig Hauser
|
|
|
|
|
========================================================
|
|
|
|
|
Functions handling all the help displaying for TeamFortress.
|
|
|
|
|
========================================================*/
|
|
|
|
|
// Prototypes
|
|
|
|
|
// Help Functions
|
|
|
|
|
void() TeamFortress_MOTD;
|
|
|
|
|
void() TeamFortress_HelpMap;
|
|
|
|
|
void() AliasTimer;
|
2001-08-11 10:02:18 +00:00
|
|
|
|
void() Alias_SetBatch;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
//ofN
|
|
|
|
|
void() bprintline;
|
|
|
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
|
// HELP FUNCTIONS
|
|
|
|
|
//=========================================================================
|
|
|
|
|
void() TeamFortress_MOTD =
|
|
|
|
|
{
|
|
|
|
|
local string ya;
|
|
|
|
|
local string st;
|
|
|
|
|
|
|
|
|
|
// check if player already has aliases
|
2001-08-11 10:02:18 +00:00
|
|
|
|
if (self.got_aliases == TF_GOTALIAS_PRECHECK) {
|
|
|
|
|
stuffcmd (self, "alias_checkversion\n");
|
|
|
|
|
stuffcmd (self, "impulse " + ftos (TF_BITNONE) + "\n");
|
|
|
|
|
self.got_aliases = TF_GOTALIAS_CHECKING;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
self.show_hostile = 0;
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (self.got_aliases == TF_GOTALIAS_SETTING)
|
|
|
|
|
Alias_SetBatch ();
|
|
|
|
|
|
|
|
|
|
if (self.motd >= MOTD_FINISHED)
|
|
|
|
|
return;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (self.motd <= MOTD_FINISHED - 2)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (self.show_hostile < time) {
|
2001-07-31 19:11:32 +00:00
|
|
|
|
PrintMOTD ();
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.show_hostile = time + MOTD_REFRESHRATE; //was 1 //.5?
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.menu_count = MENU_REFRESH_RATE;
|
|
|
|
|
self.current_menu = MENU_DEFAULT;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
self.motd = self.motd + 1;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (self.motd == MOTD_FINISHED - 1)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
2001-07-25 21:10:26 +00:00
|
|
|
|
//WK CHECK TO SEE IF WE ARE REDIRECTING PLAYERS
|
|
|
|
|
st = infokey(world, "redir");
|
|
|
|
|
if (st != string_null && st != "off") {
|
|
|
|
|
stuffcmd(self,"connect ");
|
|
|
|
|
stuffcmd(self,st);
|
|
|
|
|
stuffcmd(self,"\n");
|
|
|
|
|
}
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Set Default autozoom
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (DEFAULT_AUTOZOOM == OFF)
|
|
|
|
|
self.tfstate = self.tfstate | TFSTATE_ZOOMOFF;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Set their color to white, so they stand out from teams
|
|
|
|
|
if ((teamplay != 0) && (self.team_no == 0))
|
2001-07-24 20:54:19 +00:00
|
|
|
|
SetPlayerColor (self, WHITE - 1, WHITE - 1);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
/* if (self.got_aliases == FALSE)
|
|
|
|
|
sprint(self, PRINT_HIGH, "\n\n\n");*/
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
//CH prints customTF version. Edit in messages.qc
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint (self, PRINT_HIGH, "\n");
|
|
|
|
|
sprint (self, PRINT_HIGH,MSG_OFTEN_CUTFVERSION);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint (self, PRINT_HIGH, "\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD> "); // was \n
|
|
|
|
|
sprint (self, PRINT_HIGH, MSG_CUTFVERSION);
|
|
|
|
|
sprint (self, PRINT_HIGH, " <20><><EFBFBD><EFBFBD><EFBFBD>\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint (self, PRINT_HIGH, " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n");
|
|
|
|
|
sprint (self, PRINT_HIGH, " www<77>telefragged<65>com<6F>shaka");
|
|
|
|
|
//sprint (self, PRINT_HIGH, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Modified by <20>fte<74> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint (self, PRINT_HIGH, "\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.current_menu = MENU_INTRO;
|
|
|
|
|
self.menu_count = MENU_REFRESH_RATE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.motd = MOTD_FINISHED;
|
2001-08-11 10:02:18 +00:00
|
|
|
|
}
|
|
|
|
|
};
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-08-11 10:02:18 +00:00
|
|
|
|
void() Alias_BitImpulse =
|
|
|
|
|
{
|
|
|
|
|
local float imp = self.impulse;
|
|
|
|
|
self.impulse = 0;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-08-11 10:02:18 +00:00
|
|
|
|
if (self.got_aliases != TF_GOTALIAS_CHECKING)
|
|
|
|
|
return;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-08-11 10:02:18 +00:00
|
|
|
|
if (imp == TF_BITSTART)
|
|
|
|
|
self.got_aliases_bits = 0;
|
|
|
|
|
else if (imp == TF_BIT0)
|
|
|
|
|
self.got_aliases_bits = self.got_aliases_bits << 1;
|
|
|
|
|
else if (imp == TF_BIT1)
|
|
|
|
|
self.got_aliases_bits = (self.got_aliases_bits << 1) | 1;
|
|
|
|
|
else if (imp == TF_BITEND)
|
|
|
|
|
if (self.got_aliases_bits == TF_ALIASVERSION) {
|
|
|
|
|
self.got_aliases = TF_GOTALIAS_DONE;
|
|
|
|
|
sprint (self, PRINT_HIGH, "Alias version matched, keeping old aliases.\n");
|
|
|
|
|
} else {
|
|
|
|
|
self.got_aliases = TF_GOTALIAS_SETTING;
|
|
|
|
|
sprint (self, PRINT_HIGH, "Wrong alias version, resetting aliases. (found " + ftos (self.got_aliases_num) + ", wanted " + ftos (TF_ALIASVERSION) + ")\n");
|
|
|
|
|
self.got_aliases_num = 0;
|
|
|
|
|
}
|
|
|
|
|
else if (imp == TF_BITNONE) {
|
|
|
|
|
self.got_aliases = TF_GOTALIAS_SETTING;
|
|
|
|
|
self.got_aliases_num = 0;
|
|
|
|
|
sprint (self, PRINT_HIGH, "No alias version found, setting aliases.\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
2001-08-11 10:02:18 +00:00
|
|
|
|
else
|
|
|
|
|
error ("Bad impulse " + ftos (imp) + " in Alias_BitImpulse()!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
2001-07-31 19:11:32 +00:00
|
|
|
|
#ifndef MSG_INTRO1
|
|
|
|
|
# define MSG_INTRO1 ""
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef MSG_INTRO2
|
|
|
|
|
# define MSG_INTRO2 ""
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef MSG_INTRO3
|
|
|
|
|
# define MSG_INTRO3 ""
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
void() PrintMOTD =
|
|
|
|
|
{
|
|
|
|
|
local string intro = "";
|
|
|
|
|
local string infostring;
|
|
|
|
|
|
|
|
|
|
if (MSG_INTRO1 != "")
|
|
|
|
|
intro = intro + MSG_INTRO1;
|
|
|
|
|
if (MSG_INTRO2 != "") {
|
|
|
|
|
if (intro != "")
|
|
|
|
|
intro = intro + MSG_INTROBAR;
|
|
|
|
|
intro = intro + MSG_INTRO2;
|
|
|
|
|
}
|
|
|
|
|
if (MSG_INTRO3 != "") {
|
|
|
|
|
if (intro != "")
|
|
|
|
|
intro = intro + MSG_INTROBAR;
|
|
|
|
|
intro = intro + MSG_INTRO3;
|
|
|
|
|
}
|
|
|
|
|
infostring = infokey (world, "motd");
|
|
|
|
|
if (infostring != "") {
|
|
|
|
|
if (intro != "")
|
|
|
|
|
intro = intro + MSG_INTROBAR;
|
|
|
|
|
intro = intro + infostring;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
intro = "\n\n" + intro; // prepend a newline, to make it center better :/
|
|
|
|
|
|
|
|
|
|
CenterPrint(self, intro);
|
|
|
|
|
};
|
|
|
|
|
|
2001-07-17 05:58:10 +00:00
|
|
|
|
//=========================================================================
|
|
|
|
|
// Help displayed when someone types the alias "maphelp"
|
|
|
|
|
void() TeamFortress_HelpMap =
|
|
|
|
|
{
|
|
|
|
|
local entity te;
|
|
|
|
|
|
|
|
|
|
te = find(world, classname, "info_tfdetect");
|
|
|
|
|
if (te)
|
|
|
|
|
{
|
|
|
|
|
if (te.non_team_broadcast != string_null)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint (self, PRINT_HIGH, te.non_team_broadcast);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint (self, PRINT_HIGH, "There is no help for you.\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
2001-08-11 10:02:18 +00:00
|
|
|
|
void() AliasTimer =
|
|
|
|
|
{
|
|
|
|
|
if (self.owner.got_aliases != TF_GOTALIAS_SETTING) {
|
2001-07-17 05:58:10 +00:00
|
|
|
|
self.think = SUB_Remove;
|
|
|
|
|
self.nextthink = time + 0.1;
|
2001-08-11 10:02:18 +00:00
|
|
|
|
return;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
2001-08-11 10:02:18 +00:00
|
|
|
|
if (self.owner.got_aliases_num == floor (self.owner.got_aliases_num)) // prevents conflicting with the impulse
|
|
|
|
|
self.owner.got_aliases_num = self.owner.got_aliases_num + 0.01;
|
|
|
|
|
};
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
2001-08-11 10:02:18 +00:00
|
|
|
|
void () Alias_SetBatch =
|
|
|
|
|
{
|
|
|
|
|
local float num = self.got_aliases_num;
|
|
|
|
|
local entity atimer;
|
|
|
|
|
|
|
|
|
|
if (self.got_aliases != TF_GOTALIAS_SETTING)
|
|
|
|
|
error ("AliasCheck() called with wrong got_aliases setting (" + ftos (self.got_aliases) + ")!\n");
|
|
|
|
|
|
|
|
|
|
if (num == 0) {
|
|
|
|
|
atimer = spawn ();
|
|
|
|
|
atimer.classname = "timer";
|
|
|
|
|
atimer.owner = self;
|
|
|
|
|
atimer.nextthink = time + 0.5;
|
|
|
|
|
atimer.heat = 0;
|
|
|
|
|
atimer.think = AliasTimer;
|
|
|
|
|
} else if (num == 1) {
|
|
|
|
|
//WK CustomTF Commands
|
|
|
|
|
TeamFortress_Alias("custom", (TF_CHANGEPC + PC_CUSTOM), 0);
|
|
|
|
|
TeamFortress_Alias("upgrade", (TF_SELL), 0);
|
|
|
|
|
TeamFortress_Alias("skill", (TF_SKILL), 0);
|
|
|
|
|
TeamFortress_Alias("throwdet", (THROW_DETPACK), 0); // SB new impulse aliases
|
|
|
|
|
//TeamFortress_Alias("buildsensor", (BUILD_SENSOR), 0);
|
|
|
|
|
} else if (num == 2) {
|
|
|
|
|
//TeamFortress_Alias("interface", (IMPULSE_INTERFACE), 0);
|
|
|
|
|
TeamFortress_Alias("holo", (IMPULSE_HOLO), 0);
|
|
|
|
|
//TeamFortress_Alias("debug", (IMPULSE_DEBUG), 0); 193
|
2001-07-17 05:58:10 +00:00
|
|
|
|
// Stuff Aliases
|
|
|
|
|
|
|
|
|
|
// Grenades
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("primeone", TF_GRENADE_1, 0);
|
|
|
|
|
TeamFortress_Alias("primetwo", TF_GRENADE_2, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 3) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("throwgren", TF_GRENADE_T, 0);
|
|
|
|
|
TeamFortress_Alias("+gren1", TF_GRENADE_1, 0);
|
|
|
|
|
TeamFortress_Alias("+gren2", TF_GRENADE_2, 0);
|
|
|
|
|
TeamFortress_Alias("-gren1", TF_GRENADE_T, 0);
|
|
|
|
|
TeamFortress_Alias("-gren2", TF_GRENADE_T, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 4) {
|
2001-07-17 05:58:10 +00:00
|
|
|
|
// Pipebombs
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("detpipe", TF_PB_DETONATE, 0);
|
|
|
|
|
TeamFortress_Alias("uncustom", TF_UNCUSTOM, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
// Reloading
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("reload", TF_RELOAD, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Actions
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("special", TF_SPECIAL_SKILL, 0);
|
|
|
|
|
TeamFortress_Alias("saveme", TF_MEDIC_HELPME, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 5) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("discard", TF_DISCARD, 0);
|
|
|
|
|
TeamFortress_Alias("id", TF_ID, 0);
|
|
|
|
|
TeamFortress_Alias("inv",TF_INVENTORY, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Class Ability Impulses
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("disguise", TF_SPY_SPY, 0);
|
|
|
|
|
TeamFortress_Alias("feign", TF_SPY_DIE, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 6) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("sfeign", TF_SPY_DIE2, 0);
|
|
|
|
|
TeamFortress_Alias("build", TF_ENGINEER_BUILD, 0);
|
|
|
|
|
TeamFortress_Alias("detdispenser", (TF_ENGINEER_BUILD), 7);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// General
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("dropammo", TF_DROP_AMMO, 0);
|
|
|
|
|
TeamFortress_Alias("flaginfo", FLAG_INFO, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 7) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("autozoom", TF_AUTOZOOM, 0);
|
|
|
|
|
TeamFortress_Alias("showloc", TF_DISPLAYLOCATION, 0);
|
|
|
|
|
//TeamFortress_Alias("changeclass",TF_CHANGECLASS, 0);
|
|
|
|
|
//- OfN - it was(TF_CHANGEPC + PC_CUSTOM)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
//Taunts
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("taunt1", TF_TAUNT, 0);
|
|
|
|
|
TeamFortress_Alias("taunt2", TF_TAUNT2, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 8) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("taunt3", TF_TAUNT3, 0);
|
|
|
|
|
TeamFortress_Alias("taunt4", TF_TAUNT4, 0);
|
|
|
|
|
TeamFortress_Alias("taunt5", TF_TAUNT5, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Class Changing
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("scout",(TF_CHANGEPC + PC_SCOUT), 0);
|
|
|
|
|
TeamFortress_Alias("sniper",(TF_CHANGEPC + PC_SNIPER), 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 9) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("soldier",(TF_CHANGEPC + PC_SOLDIER), 0);
|
|
|
|
|
TeamFortress_Alias("demoman",(TF_CHANGEPC + PC_DEMOMAN), 0);
|
|
|
|
|
TeamFortress_Alias("medic",(TF_CHANGEPC + PC_MEDIC), 0);
|
|
|
|
|
TeamFortress_Alias("hwguy",(TF_CHANGEPC + PC_HVYWEAP), 0);
|
|
|
|
|
TeamFortress_Alias("pyro",(TF_CHANGEPC + PC_PYRO), 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 10) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("spy",(TF_CHANGEPC + PC_SPY), 0);
|
|
|
|
|
TeamFortress_Alias("engineer",(TF_CHANGEPC + PC_ENGINEER), 0);
|
|
|
|
|
TeamFortress_Alias("randompc",(TF_CHANGEPC + PC_RANDOM), 0);
|
|
|
|
|
|
|
|
|
|
TeamFortress_Alias("showtf",TF_SHOWTF, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
TeamFortress_Alias("maphelp", TF_HELP_MAP, 0);
|
|
|
|
|
} else if (num == 11) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("dropkey", TF_DROPKEY, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
// Sample aliases for the Scanner
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("scan10", TF_SCAN_10, 0);
|
|
|
|
|
TeamFortress_Alias("scan30", TF_SCAN_30, 0);
|
|
|
|
|
TeamFortress_Alias("scan100", TF_SCAN_100, 0);
|
|
|
|
|
TeamFortress_Alias("scanf", TF_SCAN_FRIENDLY, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 12) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("scane", TF_SCAN_ENEMY, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Team handlers
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("showscores",TF_TEAM_SCORES, 0);
|
|
|
|
|
TeamFortress_Alias("showclasses",TF_TEAM_CLASSES, 0);
|
|
|
|
|
TeamFortress_Alias("query", TF_STATUS_QUERY, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Sample aliases for the Detpack
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("det5", TF_DETPACK_5, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 13) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("det20", TF_DETPACK_20, 0);
|
|
|
|
|
TeamFortress_Alias("det50", TF_DETPACK_50, 0);
|
|
|
|
|
TeamFortress_Alias("+det5", TF_DETPACK_5, 0);
|
|
|
|
|
TeamFortress_Alias("-det5", TF_DETPACK_STOP, 0);
|
|
|
|
|
TeamFortress_Alias("+det20", TF_DETPACK_20, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 14) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("-det20", TF_DETPACK_STOP, 0);
|
|
|
|
|
TeamFortress_Alias("+det50", TF_DETPACK_50, 0);
|
|
|
|
|
TeamFortress_Alias("-det50", TF_DETPACK_STOP, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
//Get rid of silly MegaTF 10 year olds
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("lay", TF_LAY, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
//CH allow dropitems
|
2001-07-23 20:52:47 +00:00
|
|
|
|
//TeamFortress_Alias("dropitems", TF_DROPITEMS, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 15) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
//TeamFortress_Alias("get", TF_ADMIN_KICK_CYCLE, 0);
|
|
|
|
|
//TeamFortress_Alias("kick", TF_ADMIN_KICK_PERSON, 0);
|
|
|
|
|
//TeamFortress_Alias("ban", TF_ADMIN_BAN_PERSON, 0);
|
|
|
|
|
//TeamFortress_Alias("ceasefire", TF_ADMIN_CEASEFIRE, 0);
|
|
|
|
|
//TeamFortress_Alias("cmnd", IMPULSE_STUFFCMD, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 16) {
|
2001-07-17 05:58:10 +00:00
|
|
|
|
#ifdef STATUSBAR
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("sbar_on", TF_STATUSBAR_ON, 0);
|
|
|
|
|
TeamFortress_Alias("sbar_off", TF_STATUSBAR_OFF, 0);
|
|
|
|
|
TeamFortress_Alias("sbar_200", TF_STATUSBAR_RES_START, 0);
|
|
|
|
|
TeamFortress_Alias("sbar_240", TF_STATUSBAR_RES_START + 1, 0);
|
|
|
|
|
TeamFortress_Alias("sbar_300", TF_STATUSBAR_RES_START + 2, 0);
|
2001-08-11 10:02:18 +00:00
|
|
|
|
#endif
|
|
|
|
|
} else if (num == 17) {
|
|
|
|
|
#ifdef STATUSBAR
|
2001-07-23 20:52:47 +00:00
|
|
|
|
TeamFortress_Alias("sbar_350", TF_STATUSBAR_RES_START + 3, 0);
|
|
|
|
|
TeamFortress_Alias("sbar_384", TF_STATUSBAR_RES_START + 4, 0);
|
|
|
|
|
TeamFortress_Alias("sbar_400", TF_STATUSBAR_RES_START + 5, 0);
|
|
|
|
|
TeamFortress_Alias("sbar_480", TF_STATUSBAR_RES_START + 6, 0);
|
|
|
|
|
TeamFortress_Alias("sbar_600", TF_STATUSBAR_RES_START + 7, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
#endif
|
2001-08-11 10:02:18 +00:00
|
|
|
|
} else if (num == 18) {
|
|
|
|
|
#ifdef STATUSBAR
|
|
|
|
|
TeamFortress_Alias("sbar_768", TF_STATUSBAR_RES_START + 8, 0);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
stuffcmd(self, "bind 9 \"impulse 9\"\n");
|
|
|
|
|
stuffcmd(self, "bind 0 \"impulse 10\"\n");
|
2001-08-11 10:02:18 +00:00
|
|
|
|
#endif
|
|
|
|
|
} else if (num == 17) {
|
|
|
|
|
// Set up the alias check
|
|
|
|
|
// TeamFortress_Alias ("prozacalias", TF_ALIAS_CHECK, 0);
|
|
|
|
|
stuffcmd (self, "alias bitstart \"impulse " + ftos(TF_BITSTART) + "; wait\"\n");
|
|
|
|
|
stuffcmd (self, "alias bit0 \"impulse " + ftos(TF_BIT0) + "; wait\"\n");
|
|
|
|
|
stuffcmd (self, "alias bit1 \"impulse " + ftos(TF_BIT1) + "; wait\"\n");
|
|
|
|
|
stuffcmd (self, "alias bitend \"impulse " + ftos(TF_BITEND) + "; wait\"\n");
|
|
|
|
|
} else if (num == 18) {
|
|
|
|
|
// our version alias
|
|
|
|
|
local string bitstring = "";
|
|
|
|
|
local integer i = TF_ALIASVERSION;
|
|
|
|
|
while (i) { // I go through the bits from right to left, thus the wierd string prepending
|
|
|
|
|
if (i & 1)
|
|
|
|
|
bitstring = "bit1;" + bitstring;
|
|
|
|
|
else
|
|
|
|
|
bitstring = "bit0;" + bitstring;
|
|
|
|
|
i >>= 1;
|
|
|
|
|
}
|
|
|
|
|
bitstring = "alias alias_checkversion \"bitstart; " + bitstring;
|
|
|
|
|
bitstring += "bitend\"\n";
|
|
|
|
|
stuffcmd (self, bitstring);
|
|
|
|
|
} else if (num > 18) {
|
2001-07-17 05:58:10 +00:00
|
|
|
|
//WK INTRO THUNDER
|
|
|
|
|
stuffcmd(self, "play ambience/thunder1\n");
|
2001-08-11 10:02:18 +00:00
|
|
|
|
self.got_aliases = TF_GOTALIAS_DONE;
|
|
|
|
|
sprint (self, PRINT_HIGH, "Done setting aliases.\n");
|
|
|
|
|
return;
|
|
|
|
|
} else
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
self.got_aliases_num = floor (self.got_aliases_num) + 0.1;
|
|
|
|
|
stuffcmd (self, "impulse " + ftos (TF_ALIASNEXT) + "\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|