279 lines
23 KiB
Ucode
279 lines
23 KiB
Ucode
class Helper extends Info
|
||
abstract;
|
||
|
||
// colors and tags, maybe later I will convert this to a config array
|
||
struct ColorRecord
|
||
{
|
||
var string ColorName; // color name, for comfort
|
||
var string ColorTag; // color tag
|
||
var Color Color; // RGBA values
|
||
};
|
||
var array<ColorRecord> ColorList; // color list
|
||
|
||
var array<string> SilentAdmin; // hardcoded silent admins
|
||
var array<string> MasterAdmin; // hardcoded Master admins, only 1-3 people should really be on here at most
|
||
|
||
var array<string> TagsToRemove; // list of unnesesary tags to remove
|
||
var array<string> MsgHelp; // help messages
|
||
var array<string> MsgSHelp; // sneaky cmd list
|
||
var array<string> MsgZeds; // 'admin zed' related messages
|
||
var array<string> MsgRage; // 'admin rage' related messages
|
||
|
||
// help list for zed spawning
|
||
static function TellAbout(PlayerController pc, UltraAdmin Admin, string whatToTell)
|
||
{
|
||
local int i;
|
||
local array<string> StrTemp;
|
||
|
||
switch(whatToTell)
|
||
{
|
||
case "MsgHelp":
|
||
StrTemp = default.MsgHelp;
|
||
break;
|
||
case "sHelp":
|
||
StrTemp = default.MsgSHelp;
|
||
break;
|
||
case "MsgZeds":
|
||
StrTemp = default.MsgZeds;
|
||
break;
|
||
case "MsgRage":
|
||
StrTemp = default.MsgRage;
|
||
break;
|
||
default:
|
||
// fallback warning
|
||
StrTemp[0] = "%rADMIN PLUS HELPER: We shouldn't get to this so this means you used WRONG modifier!";
|
||
}
|
||
|
||
for(i = 0; i < StrTemp.Length; i++)
|
||
{
|
||
Admin.SendMessage(pc, StrTemp[i],false);
|
||
}
|
||
}
|
||
|
||
// converts color tags to colors
|
||
static function string ParseTags(string input)
|
||
{
|
||
local int i;
|
||
local array<ColorRecord> Temp;
|
||
local string strTemp;
|
||
|
||
Temp = default.ColorList;
|
||
for(i=0; i<Temp.Length; i++)
|
||
{
|
||
strTemp = class'GameInfo'.Static.MakeColorCode(Temp[i].Color);
|
||
ReplaceText(input, Temp[i].ColorTag, strTemp);
|
||
}
|
||
return input;
|
||
}
|
||
|
||
// removes color tags
|
||
static function string StripTags(string input)
|
||
{
|
||
local int i;
|
||
|
||
for(i=0; i<default.TagsToRemove.Length; i++)
|
||
{
|
||
ReplaceText(input, default.TagsToRemove[i], "");
|
||
}
|
||
return input;
|
||
}
|
||
|
||
// removes colors from a string
|
||
static function string StripColor(string s)
|
||
{
|
||
local int p;
|
||
|
||
p = InStr(s,chr(27));
|
||
while ( p>=0 )
|
||
{
|
||
s = left(s,p)$mid(S,p+4);
|
||
p = InStr(s,Chr(27));
|
||
}
|
||
return s;
|
||
}
|
||
|
||
static function string ParsePlayerName(PlayerController pc)
|
||
{
|
||
if(pc != none || pc.playerReplicationInfo != none)
|
||
return "%b" $ StripTags(pc.playerReplicationInfo.PlayerName) $ "%w";
|
||
}
|
||
|
||
static function bool CheckSilent(playercontroller pc, UltraAdmin Admin)
|
||
{
|
||
local string Hash;
|
||
local int i;
|
||
|
||
if(pc == none || Admin == none)
|
||
return false;
|
||
|
||
Hash = pc.GetPlayerIDHash();
|
||
for(i = 0; i < default.SilentAdmin.length; i++)
|
||
{
|
||
if(default.SilentAdmin[i] == "")
|
||
continue;
|
||
if(default.SilentAdmin[i] == Hash)
|
||
{
|
||
return true;
|
||
break;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
static function bool CheckMaster(playercontroller pc, UltraAdmin Admin)
|
||
{
|
||
local string Hash;
|
||
local int i;
|
||
|
||
if(pc == none || Admin == none)
|
||
return false;
|
||
|
||
Hash = pc.GetPlayerIDHash();
|
||
for(i = 0; i < default.SilentAdmin.length; i++)
|
||
{
|
||
if(default.MasterAdmin[i] == "")
|
||
continue;
|
||
if(default.MasterAdmin[i] == Hash)
|
||
{
|
||
return true;
|
||
break;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
defaultproperties
|
||
{
|
||
MasterAdmin[0]="76561198027407094" // filthy Joabyy
|
||
MasterAdmin[1]="76561198132317484" // Abject - alt
|
||
MasterAdmin[2]="76561198345921161" // Nespithe - alt
|
||
MasterAdmin[3]="76561198044316328" // GayC-
|
||
|
||
SilentAdmin[0]="76561198027407094" // filthy Joabyy
|
||
SilentAdmin[1]="76561198132317484" // Abject - alt
|
||
SilentAdmin[2]="76561198345921161" // Nespithe - alt
|
||
SilentAdmin[3]="76561198044316328" // NikC- is a qutting little bitch
|
||
SilentAdmin[4]="76561198013090474" //hueco cerote argentino aqueroso
|
||
|
||
MsgHelp[00]="%w---------------------------- %rADMIN PLUS%w ------------------------------------"
|
||
MsgHelp[01]="%wThis is a complete list of commands. Some shit may be incorrect, please report."
|
||
MsgHelp[02]="%wFor zed spawning codes type '%badmin Zed%w'."
|
||
MsgHelp[03]="%bGhost/ Walk/ Spider/ Fly %ware disabled for bots, it makes them act weird"
|
||
MsgHelp[04]="%wMost commands can be issued to others by name, partial name, 'ALL'. Try it!"
|
||
MsgHelp[05]="%w------------------------------------------------------------------------------------"
|
||
MsgHelp[06]=" %bHelp %w- deduce the information."
|
||
MsgHelp[07]=" %bReady %w- force all players to press ready."
|
||
MsgHelp[08]=" %bWalk %y<target> %w- return to a normal walking mode."
|
||
MsgHelp[09]=" %bFly %y<target> %w- the flight mode."
|
||
MsgHelp[10]=" %bGhost %y<target> %w- the Mode of circulation through walls."
|
||
MsgHelp[11]=" %bSpider %y<target> %w- the spider mode (circulation on walls)."
|
||
MsgHelp[12]=" %bGod / Godoff %y<target> %w- invulnerability."
|
||
MsgHelp[13]=" %bSlap %y<target> %w- slap the bitch."
|
||
MsgHelp[14]=" %bLoaded %y<target> <list-num> %w- give selected weapons from config file."
|
||
MsgHelp[15]=" %bTrader %y<num> %w- change trader countdown. Type '1' at the end to save the value."
|
||
MsgHelp[16]=" %bWeaponList / WL %w- prints all avialable weapon pickups in trader, for summon command and tests."
|
||
MsgHelp[19]=" %bChangeName %y||%b CN <old_name> <new_name> %w- change a name of the player."
|
||
MsgHelp[20]=" %bHeadSize %y||%b HS %y<target> <size> %w- change the size of a head of the player (1 to default)."
|
||
MsgHelp[21]=" %bPlayerSize %y<target> <size> %w- change the size of the player (1 to default)."
|
||
MsgHelp[22]=" %bGiveItem %y||%b GI <weapon1,weapon2,etc> %y<target> %w- give weapons with full ammo."
|
||
MsgHelp[23]=" %bSummon %y<class> %w- spawn a zed on yourself."
|
||
MsgHelp[24]=" %bAdvancedSummon %y<class> <target> %w- spawn a zed near the player."
|
||
MsgHelp[25]=" %bDosh %y<target> <num> %w- change dosh amount."
|
||
MsgHelp[26]=" %bResetDosh %y<target> %w- purge the dosh."
|
||
MsgHelp[27]=" %bRespawn %y<target> %w- restore a single player or all. If target is a spectator put 1 after a cmd."
|
||
MsgHelp[28]=" %bSetGravity %y||%b SG <num> %w- variation of gravitation (-950 for default)."
|
||
MsgHelp[29]=" %bTeleport %w- teleport on a surface at which you look."
|
||
MsgHelp[30]=" %bPrivMessage %y||%b PM %y<target> <text> %w- allows to send a private message."
|
||
MsgHelp[31]=" %bFaked %y<num> %w- allows to add faked players."
|
||
MsgHelp[32]=" %bDoor %w- spawns all broken doors back. Add 'Unweld' to unweld all the doors."
|
||
MsgHelp[33]=" %bSkip %w- skips trader / actual waves."
|
||
MsgHelp[34]=" %bSloMo %y<num> %w- set game speed (1 to default)."
|
||
MsgHelp[35]=" %bPW %w- respawn players after a wipe and continue the game."
|
||
MsgHelp[36]=" %bClean %y<saw>/ <pipe> / <all> / <dosh> %w- map cleanup."
|
||
MsgHelp[37]=" %bWave %y<num> %w- allows to switch wave."
|
||
MsgHelp[38]=" %bKill %w- kill all spawned zeds."
|
||
MsgHelp[39]=" %bMaxZeds %y||%b MZ <num> %w- change maximum amount of zeds that can be spawned at once."
|
||
MsgHelp[40]=" %bInvisOn / InvisOff %y<target> %w- Invisibility."
|
||
MsgHelp[41]=" %bZed %y<zedname> %w- spawn zeds without copy-pasting whole classnames."
|
||
MsgHelp[42]=" %bHeal %y<target> <value> %w- replenishes health."
|
||
MsgHelp[43]=" %bVest %y<target> <value> %w- restores armor."
|
||
MsgHelp[44]=" %bRestore %y<target> %w- restores health, armor, and ammunition."
|
||
MsgHelp[45]=" %bAmmo %y<target> %w- fills all amunition."
|
||
MsgHelp[46]=" %bSpec %w- change spectator slots."
|
||
MsgHelp[47]=" %bSlot %w- change player slots."
|
||
MsgHelp[48]=" %bLock %y<ON> <OFF> %w- decide if you want to allow other to join."
|
||
MsgHelp[49]="%w------------------------------------------------------------------------------------"
|
||
|
||
MsgSHelp[00]="%w---------------------------- %rADMIN PLUS%w ------------------------------------"
|
||
MsgSHelp[01]="%wWelcome to the dark side! Enjoy these sneaky commands."
|
||
MsgSHelp[02]="%w------------------------------------------------------------------------------------"
|
||
MsgSHelp[03]=" %bdcfag %y<target> %w- remove faggots from game. Not a kick!"
|
||
MsgSHelp[04]=" %bMoveSpec %y<target> %w- move faggots to spectators."
|
||
MsgSHelp[05]=" %bZeds %y<ON> <OFF> %w- control zed spawning."
|
||
MsgSHelp[06]=" %bWipeMut %y<name> %w- kill mutators in real time. %rUSE WITH CAUTION!"
|
||
MsgSHelp[07]=" %bKillRules %y<name> %w- remove game rules. %rUSE WITH CAUTION!"
|
||
MsgSHelp[08]=" %bRage %y<target> %w- rage selected zed. Use empty target for help info."
|
||
MsgSHelp[09]=" %bPerk %y<target> %w- change perk for selected target."
|
||
MsgSHelp[10]=" %bFF %y<value> %w- change friendly fire scale in %."
|
||
MsgSHelp[11]=" %bDisarm %y||%b DA %y<target> %w- wipe target's inventory."
|
||
MsgSHelp[12]=" %bSpecSpeed %y<value> %w- change spectator's speed (+600 to default)."
|
||
MsgSHelp[13]=" %bSilent %y<ON> <OFF> %w- control broadcasting. Works only if you are a hardcoded SilentAdmin!"
|
||
MsgSHelp[14]=" %bGameLength %y<0,1,2,3> %w- change game length. %rRequires map switch!"
|
||
MsgSHelp[15]=" %bZedType %y<c,h,x,none> %w- change zed types. %rRequires map switch!"
|
||
MsgSHelp[16]=" %bGameDifficulty %y<4,5,7> %w- change game difficulty."
|
||
MsgSHelp[17]=" %bKFOAggro %y<ON> <OFF> %w- control KFO aggro system."
|
||
MsgSHelp[18]=" %bGiveAdmin %y<target> %w- grants Admin Status (Only Works on Single Admin Systems)."
|
||
MsgSHelp[19]=" %bRemoveAdmin %y<target> %w- removes Admin status from anyone."
|
||
// MsgSHelp[18]=" %bWipeConfig %y<target> %w- do a very nasty shit."
|
||
MsgSHelp[20]="%w------------------------------------------------------------------------------------"
|
||
|
||
MsgZeds[00]="%wYou can use special strings to spawn seasonal zeds: %gC %w- circus, %gH %w- halloween, %gX %w- xmas."
|
||
MsgZeds[01]="%wExamples: %gZed Clot %w[normal clot] %y|| %gZed Clot H %w[halloween clot]"
|
||
MsgZeds[02]="%w------------------------------------------------------------------------------------"
|
||
MsgZeds[03]="%wAvialable zeds to spawn:"
|
||
MsgZeds[04]=" %gBLOAT"
|
||
MsgZeds[05]=" %gBOSS %w|| %gPAT %w|| %gPATRIARCH"
|
||
MsgZeds[06]=" %gCLOT"
|
||
MsgZeds[07]=" %gCRAWLER %w|| %gSTEVE"
|
||
MsgZeds[08]=" %gFP %w|| %gFLESHPOUND"
|
||
MsgZeds[09]=" %gGORE %w|| %gGOREFAST"
|
||
MsgZeds[10]=" %gHUSK"
|
||
MsgZeds[11]=" %gSC %w|| %gSCRAKE"
|
||
MsgZeds[12]=" %gSIREN"
|
||
MsgZeds[13]=" %gSTALKER"
|
||
|
||
MsgRage[0]="%wAvialable zeds to rage:"
|
||
MsgRage[1]=" %gALL"
|
||
MsgRage[2]=" %gG %w|| %gGORE %w|| %gGOREFAST"
|
||
MsgRage[3]=" %gS %w|| %gSC %w|| %gSCRAKE"
|
||
MsgRage[4]=" %gF %w|| %gFP %w|| %gFLESHPOUND"
|
||
MsgRage[5]=" %gSIREN"
|
||
|
||
TagsToRemove[00]="%r"
|
||
TagsToRemove[01]="%o"
|
||
TagsToRemove[02]="%y"
|
||
TagsToRemove[03]="%g"
|
||
TagsToRemove[04]="%b"
|
||
TagsToRemove[05]="%v"
|
||
TagsToRemove[06]="%w"
|
||
TagsToRemove[07]="%t"
|
||
TagsToRemove[08]="%p"
|
||
TagsToRemove[09]="^0"
|
||
TagsToRemove[10]="^1"
|
||
TagsToRemove[11]="^2"
|
||
TagsToRemove[12]="^3"
|
||
TagsToRemove[13]="^4"
|
||
TagsToRemove[14]="^5"
|
||
TagsToRemove[15]="^6"
|
||
TagsToRemove[16]="^7"
|
||
TagsToRemove[17]="^8"
|
||
TagsToRemove[18]="^9"
|
||
|
||
ColorList[0]=(ColorName="Red",ColorTag="%r",Color=(B=0,G=0,R=200,A=0))
|
||
ColorList[1]=(ColorName="Orange",ColorTag="%o",Color=(B=0,G=127,R=255,A=0))
|
||
ColorList[2]=(ColorName="Yellow",ColorTag="%y",Color=(B=0,G=255,R=255,A=0))
|
||
ColorList[3]=(ColorName="Green",ColorTag="%g",Color=(B=0,G=200,R=0,A=0))
|
||
ColorList[4]=(ColorName="Blue",ColorTag="%b",Color=(B=200,G=100,R=0,A=0))
|
||
ColorList[5]=(ColorName="Violet",ColorTag="%v",Color=(B=139,G=0,R=255,A=0))
|
||
ColorList[6]=(ColorName="White",ColorTag="%w",Color=(B=255,G=255,R=255,A=0))
|
||
} |