mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-10 09:13:20 +00:00
Internal refactor
This commit is contained in:
parent
88b7ac09fc
commit
23cbb7aeac
11 changed files with 967 additions and 697 deletions
|
@ -1,7 +1,7 @@
|
|||
// UP THE VALUE 'MAX_TROLLS' in base.inc before adding new ones!
|
||||
|
||||
int t_slipperyShoesIndex = 0;
|
||||
int t_stickyGooIndex = 0;
|
||||
Troll t_stickyGoo;
|
||||
int t_invertedTrollIndex;
|
||||
int t_randomizeAnglesIndex;
|
||||
int t_randomizeVelocityIndex;
|
||||
|
@ -10,272 +10,270 @@ int t_shakeyCameraIndex;
|
|||
int t_slotRouletteIndex;
|
||||
int t_damageBoostIndex;
|
||||
int t_reverseFFIndex;
|
||||
int t_throwItAllIndex;
|
||||
int t_hideHUDIndex;
|
||||
Troll t_throwItAll;
|
||||
Troll t_voiceMute;
|
||||
Troll t_gunJam;
|
||||
|
||||
void SetupTrolls() {
|
||||
trollKV = new StringMap();
|
||||
categories = new ArrayList(ByteCountToCells(16));
|
||||
gRandomClients = new ArrayList();
|
||||
int index;
|
||||
SetupTroll("Reset User", "Resets the user, removes all troll effects", TrollMod_Instant);
|
||||
TrollBuilder("Reset User", "Resets the user, removes all troll effects", TrollMod_Instant);
|
||||
|
||||
/// CATEGORY: Magnets
|
||||
TrollBuilder troll;
|
||||
SetCategory("Magnets");
|
||||
index = SetupTroll("Special Magnet", "Attracts ALL specials to any alive target with this troll enabled", TrollMod_Constant);
|
||||
AddMagnetFlags(index);
|
||||
index = SetupTroll("Tank Magnet", "Attracts ALL tanks to any alive target with this troll enabled", TrollMod_Constant);
|
||||
AddMagnetFlags(index);
|
||||
troll = TrollBuilder("Special Magnet", "Attracts ALL specials to any alive target with this troll enabled", TrollMod_Constant);
|
||||
AddMagnetFlags(troll);
|
||||
troll = TrollBuilder("Tank Magnet", "Attracts ALL tanks to any alive target with this troll enabled", TrollMod_Constant);
|
||||
AddMagnetFlags(troll);
|
||||
#if defined _actions_included
|
||||
index = SetupTroll("Witch Magnet", "All witches when startled will target any player with this troll", TrollMod_Constant);
|
||||
TrollBuilder("Witch Magnet", "All witches when startled will target any player with this troll", TrollMod_Constant);
|
||||
#endif
|
||||
index = SetupTroll("Projectile Magnet", "Makes all projectiles (biles, molotovs, pipes, tank rocks) go to player", TrollMod_Constant);
|
||||
Trolls[index].AddCustomFlagPrompt("Target Sources", true);
|
||||
// Tied to: ProjectileMagnetType
|
||||
Trolls[index].AddFlag("Infected (rocks/goo)", true);
|
||||
Trolls[index].AddFlag("Teammates (grenades)", false);
|
||||
Trolls[index].AddFlag("Thrown Tank Objects", false);
|
||||
TrollBuilder("Projectile Magnet", "Makes all projectiles (biles, molotovs, pipes, tank rocks) go to player", TrollMod_Constant)
|
||||
.AddPromptMulti("Target Sources")
|
||||
// Tied to: ProjectileMagnetType
|
||||
.AddOption("Infected (rocks/goo)", true)
|
||||
.AddOption("Teammates (grenades)")
|
||||
.AddOption("Thrown Tank Objects");
|
||||
|
||||
/// CATEGORY: Infected
|
||||
SetCategory("Infected");
|
||||
SetupTroll("Swarm", "Swarms a player with zombies. Requires swarm plugin", TrollMod_Instant | TrollMod_Constant);
|
||||
t_vomitPlayerIndex = SetupTroll("Vomit Player", "Shortcut to sm_vomitplayer. vomits the player.", TrollMod_Instant | TrollMod_Constant);
|
||||
index = SetupTroll("Insta Special", "Shortcut to sm_insta", TrollMod_Instant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Around them (Director)", true);
|
||||
Trolls[index].AddFlag("On top / in-face", false);
|
||||
SetupTroll("Goo", "Spawns a spitter puddle underneath them", TrollMod_Instant);
|
||||
index = SetupTroll("Sticky Goo", "Slows player down in goo", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("90% Movement Speed", true);
|
||||
Trolls[index].AddFlag("80% Movement Speed", false);
|
||||
Trolls[index].AddFlag("70% Movement Speed", false);
|
||||
Trolls[index].AddFlag("50% Movement Speed", false);
|
||||
Trolls[index].AddFlag("30% Movement Speed", false);
|
||||
Trolls[index].AddFlag("0% Movement Speed", false);
|
||||
t_stickyGooIndex = index;
|
||||
index = SetupTroll("Vocalize Specials", "Spawn commons on special vocals", TrollMod_Constant)
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Mute Vocalization", true);
|
||||
Trolls[index].AddFlag("Do not mute", false);
|
||||
index = SetupTroll("Instant Commons", "Spawns commons behind or infront", TrollMod_Instant | TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("In Back", true);
|
||||
Trolls[index].AddFlag("In Front", false);
|
||||
index = SetupTroll("Smart Charge", "Waits until coast is clear to charge", TrollMod_Constant);
|
||||
Trolls[index].AddCustomFlagPrompt("Attempt Timeout", false);
|
||||
Trolls[index].AddFlag("15 Seconds", true);
|
||||
Trolls[index].AddFlag("30 Seconds", false);
|
||||
Trolls[index].AddFlag("1 minute", false);
|
||||
Trolls[index].AddFlag("5 minutes", false);
|
||||
TrollBuilder("Swarm", "Swarms a player with zombies. Requires swarm plugin", TrollMod_Instant | TrollMod_Constant);
|
||||
t_vomitPlayerIndex = TrollBuilder("Vomit Player", "Shortcut to sm_vomitplayer. vomits the player.", TrollMod_Instant | TrollMod_Constant).Id;
|
||||
TrollBuilder("Insta Special", "Shortcut to sm_insta", TrollMod_Instant)
|
||||
.AddPrompt()
|
||||
.AddOption("Around them (Director)", true)
|
||||
.AddOption("On top / in-face");
|
||||
TrollBuilder("Goo", "Spawns a spitter puddle underneath them", TrollMod_Instant);
|
||||
t_stickyGoo = TrollBuilder("Sticky Goo", "Slows player down in goo", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOptionFloat("90% Movement Speed", true, 0.9)
|
||||
.AddOptionFloat("80% Movement Speed", false, 0.8)
|
||||
.AddOptionFloat("70% Movement Speed", false, 0.7)
|
||||
.AddOptionFloat("50% Movement Speed", false, 0.5)
|
||||
.AddOptionFloat("30% Movement Speed", false, 0.3)
|
||||
.AddOptionFloat("0% Movement Speed", false, 0.0)
|
||||
.Build();
|
||||
TrollBuilder("Vocalize Specials", "Spawn commons on special vocals", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOption("Mute Vocalization", true)
|
||||
.AddOption("Do not mute", false)
|
||||
TrollBuilder("Instant Commons", "Spawns commons behind or infront", TrollMod_Instant | TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOption("In Back", true)
|
||||
.AddOption("In Front", false);
|
||||
TrollBuilder("Smart Charge", "Waits until coast is clear to charge", TrollMod_Constant)
|
||||
.AddPrompt("Attempt Timeout")
|
||||
.OnPromptActivate(Activate_SmartCharge)
|
||||
.AddOptionInt("15 Seconds", true, 15)
|
||||
.AddOptionInt("30 Seconds", false, 30)
|
||||
.AddOptionInt("1 minute", false, 60)
|
||||
.AddOptionInt("5 minutes", false, 300);
|
||||
|
||||
// CATEGORY: Projectiles
|
||||
SetCategory("Projectiles");
|
||||
index = SetupTroll("Rock Dropper", "Drops on a rock. On their head.", TrollMod_Instant);
|
||||
// Trolls[index].AddFlagPrompt(false);
|
||||
// Trolls[index].AddFlag("Drop From Above", true);
|
||||
// Trolls[index].AddFlag("From behind", false);
|
||||
index = SetupTroll("Car Splat", "Car. splats.", TrollMod_Instant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("On Top", true);
|
||||
Trolls[index].AddFlag("Into (Infront)", false);
|
||||
Trolls[index].AddFlag("Into (Behind)", false);
|
||||
index = SetupTroll("Bad Throw", "Player drops throwables on throw, and biles/molotovs themselves", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(true);
|
||||
Trolls[index].AddFlag("Biles", true);
|
||||
Trolls[index].AddFlag("Molotovs", true);
|
||||
Trolls[index].AddFlag("Pipebombs", true);
|
||||
index = SetupTroll("Molotov Bath", "Throws a molotov on their feet", TrollMod_Instant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Normal", true);
|
||||
Trolls[index].AddFlag("Set the town ablaze", false);
|
||||
TrollBuilder("Rock Dropper", "Drops on a rock. On their head.", TrollMod_Instant);
|
||||
TrollBuilder("Car Splat", "Car. splats.", TrollMod_Instant)
|
||||
.AddPrompt()
|
||||
.AddOption("On Top", true)
|
||||
.AddOption("Into (Infront)", false)
|
||||
.AddOption("Into (Behind)", false);
|
||||
TrollBuilder("Bad Throw", "Player drops throwables on throw, and biles/molotovs themselves", TrollMod_Constant)
|
||||
.AddPromptMulti()
|
||||
.AddOption("Biles", true)
|
||||
.AddOption("Molotovs", true)
|
||||
.AddOption("Pipebombs", true)
|
||||
TrollBuilder("Molotov Bath", "Throws a molotov on their feet", TrollMod_Instant)
|
||||
.AddPrompt()
|
||||
.AddOption("Normal", true)
|
||||
.AddOption("Set the town ablaze", false);
|
||||
|
||||
// CATEGORY: Items
|
||||
SetCategory("Items");
|
||||
index = SetupTroll("Throw It All", "Player throws their item(s) periodically to a nearby player", TrollMod_Instant);
|
||||
Trolls[index].SetTimer(THROWITALL_INTERVAL, Timer_ThrowTimer);
|
||||
index = SetupTroll("Spicy Gas", "Gascans player picks up just ignite. Magic.", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Always (100%)", false);
|
||||
Trolls[index].AddFlag("Half Time (50%)", true);
|
||||
Trolls[index].AddFlag("Rare (10%)", false);
|
||||
index = SetupTroll("No Pickup", "Prevents a player from picking up ANY (new) item. Use ThrowItAll to make them drop", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(true);
|
||||
Trolls[index].AddFlag("No Primary", false);
|
||||
Trolls[index].AddFlag("No Melee", false);
|
||||
Trolls[index].AddFlag("No Throwables", true);
|
||||
Trolls[index].AddFlag("No Kits", true);
|
||||
Trolls[index].AddFlag("No Pills / Adr", true);
|
||||
Trolls[index].AddFlag("No GASCANS", true);
|
||||
index = SetupTroll("UziRules / AwpSmells", "Picking up a weapon gives them a UZI or AWP instead", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("UZI Only", true);
|
||||
Trolls[index].AddFlag("AWP Only", false);
|
||||
SetupTroll("Primary Disable", "Player cannot pickup any weapons, only melee/pistols", TrollMod_Constant);
|
||||
index = SetupTroll("Dull Melee", "Player's melee weapon does 0 damage (based on %). Headshots still work", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Always (100%)", false);
|
||||
Trolls[index].AddFlag("Half Time (50%)", true);
|
||||
Trolls[index].AddFlag("Rare (10%)", false);
|
||||
SetupTroll("Nerf Gun", "When they shoot it does no damage.", TrollMod_Constant);
|
||||
SetupTroll("Randomize Clip Ammo", "Randomly changes their clip ammo downwards", TrollMod_Constant | TrollMod_Instant);
|
||||
SetupTroll("CameTooEarly", "When they shoot, random chance they empty whole clip", TrollMod_Constant);
|
||||
index = SetupTroll("Slot Roulette", "Randomize their slots", TrollMod_Constant);
|
||||
Trolls[index].AddCustomFlagPrompt("Activations:", true);
|
||||
Trolls[index].AddFlag("On Vomitted", false); // 1
|
||||
Trolls[index].AddFlag("On Damage", false); // 2
|
||||
Trolls[index].AddFlag("On Vocalize", false); // 4
|
||||
Trolls[index].AddFlag("Periodically", true); //8
|
||||
Trolls[index].AddCustomFlagPrompt("Frequency:", false, 8);
|
||||
Trolls[index].AddFlag("Subtle", false); // 16
|
||||
Trolls[index].AddFlag("Confusing", false); // 32
|
||||
Trolls[index].AddFlag("Annoying", false); // 64
|
||||
Trolls[index].AddFlag("Unusable", false); // 128
|
||||
Trolls[index].SetTimer(0.2, Timer_SlotRoulette, 8);
|
||||
t_slotRouletteIndex = index;
|
||||
t_throwItAll = TrollBuilder("Throw It All", "Player throws their item(s) periodically to a nearby player", TrollMod_Instant)
|
||||
.SetTimer(THROWITALL_INTERVAL, Timer_ThrowTimer)
|
||||
.Build();
|
||||
TrollBuilder("Spicy Gas", "Gascans player picks up just ignite. Magic.", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOption("Always (100%)", false)
|
||||
.AddOption("Half Time (50%)", true)
|
||||
.AddOption("Rare (10%)", false);
|
||||
TrollBuilder("No Pickup", "Prevents a player from picking up ANY (new) item. Use ThrowItAll to make them drop", TrollMod_Constant)
|
||||
.AddPromptMulti()
|
||||
.AddOption("No Primary", false)
|
||||
.AddOption("No Melee", false)
|
||||
.AddOption("No Throwables", true)
|
||||
.AddOption("No Kits", true)
|
||||
.AddOption("No Pills / Adr", true)
|
||||
.AddOption("No GASCANS", true);
|
||||
TrollBuilder("UziRules / AwpSmells", "Picking up a weapon gives them a UZI or AWP instead", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOption("UZI Only", true)
|
||||
.AddOption("AWP Only", false)
|
||||
TrollBuilder("Primary Disable", "Player cannot pickup any weapons, only melee/pistols", TrollMod_Constant);
|
||||
TrollBuilder("Dull Melee", "Player's melee weapon does 0 damage (based on %). Headshots still work", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOption("Always (100%)", false)
|
||||
.AddOption("Half Time (50%)", true)
|
||||
.AddOption("Rare (10%)", false);
|
||||
TrollBuilder("Nerf Gun", "When they shoot it does no damage.", TrollMod_Constant);
|
||||
TrollBuilder("Randomize Clip Ammo", "Randomly changes their clip ammo downwards", TrollMod_Constant | TrollMod_Instant);
|
||||
TrollBuilder("CameTooEarly", "When they shoot, random chance they empty whole clip", TrollMod_Constant);
|
||||
|
||||
t_slotRouletteIndex = TrollBuilder("Slot Roulette", "Randomize their slots", TrollMod_Constant)
|
||||
.SetTimer(0.2, Timer_SlotRoulette, 8)
|
||||
.AddPromptMulti("Activiations")
|
||||
.AddOption("On Vomitted") // 1 << 0
|
||||
.AddOption("On Damage") // 1 << 1
|
||||
.AddOption("On Vocalize") // 1 << 2
|
||||
.AddOption("Periodically") // 1 << 3
|
||||
.AddPrompt("Frequency", 1 << 3)
|
||||
.AddOption("Subtle") // 1 << 4
|
||||
.AddOption("Confusing") // 1 << 5
|
||||
.AddOption("Annoying") // 1 << 6
|
||||
.AddOption("Unusuable") // 1 << 7
|
||||
.Id;
|
||||
|
||||
/// CATEGORY: Chat
|
||||
SetCategory("Chat");
|
||||
SetupTroll("Typoos", "", TrollMod_Constant);
|
||||
SetupTroll("iCantSpellNoMore", "Chat messages letter will randomly changed with wrong letters", TrollMod_Constant);
|
||||
index = SetupTroll("No Profanity", "Replaces some words with random phrases", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Only Replace Swears", false);
|
||||
Trolls[index].AddFlag("Replace Full Messages", true);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Show Modified to Them", true);
|
||||
Trolls[index].AddFlag("Show Original to Them", false);
|
||||
index = SetupTroll("Vocalize Gag", "Prevents player from sending any vocalizations (even automatic)", TrollMod_Constant);
|
||||
// Trolls[index].AddFlagPrompt(false);
|
||||
// Trolls[index].AddFlag("Mute for All", true);
|
||||
// Trolls[index].AddFlag("Mute For All But Them", false);
|
||||
index = SetupTroll("Honk / Meow / Woof", "Custom sounds", TrollMod_Constant);
|
||||
Trolls[index].AddCustomFlagPrompt("Choose Sound:");
|
||||
Trolls[index].AddFlag("Honk", true);
|
||||
Trolls[index].AddFlag("Meow", false);
|
||||
Trolls[index].AddFlag("Woof", false);
|
||||
Trolls[index].AddCustomFlagPrompt("Choose Chat modifier:", false, 1);
|
||||
Trolls[index].AddFlag("Show Modified to Them", true);
|
||||
Trolls[index].AddFlag("Show Original to Them", false);
|
||||
Trolls[index].AddFlag("Show Modified Only To Them", false);
|
||||
SetupTroll("Reversed", "Reserves their message", TrollMod_Constant);
|
||||
SetupTroll("Voice Mute", "Mutes from voice", TrollMod_Constant);
|
||||
SetupTroll("No Rushing Us", "Decreases player speed everytime they yell hurry up", TrollMod_Constant);
|
||||
TrollBuilder("Typoos", "", TrollMod_Constant);
|
||||
TrollBuilder("iCantSpellNoMore", "Chat messages letter will randomly changed with wrong letters", TrollMod_Constant);
|
||||
TrollBuilder("No Profanity", "Replaces some words with random phrases", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOption("Only Replace Swears")
|
||||
.AddOption("Replace Full Messages", true)
|
||||
.AddPrompt()
|
||||
.AddOption("Show Modified to Them", true)
|
||||
.AddOption("Show Original to Them");
|
||||
TrollBuilder("Vocalize Gag", "Prevents player from sending any vocalizations (even automatic)", TrollMod_Constant);
|
||||
// .AddPrompt()
|
||||
// .AddOption("Mute for All", true);
|
||||
// .AddOption("Mute For All But Them", false);
|
||||
TrollBuilder("Honk / Meow / Woof", "Custom sounds", TrollMod_Constant)
|
||||
.AddPrompt("Choose Sound:")
|
||||
.AddOption("Honk", true)
|
||||
.AddOption("Meow", false)
|
||||
.AddOption("Woof", false)
|
||||
.AddPrompt("Choose Chat modifier:", 1)
|
||||
.AddOption("Show Modified to Them", true)
|
||||
.AddOption("Show Original to Them", false)
|
||||
.AddOption("Show Modified Only To Them", false);
|
||||
TrollBuilder("Reversed", "Reserves their message", TrollMod_Constant);
|
||||
t_voiceMute = TrollBuilder("Voice Mute", "Mutes from voice", TrollMod_Constant).Build();
|
||||
TrollBuilder("No Rushing Us", "Decreases player speed everytime they yell hurry up", TrollMod_Constant);
|
||||
|
||||
/// CATEGORY: Health
|
||||
SetCategory("Health");
|
||||
t_damageBoostIndex = SetupTroll("Damage Boost", "Makes a player take more damage than normal", TrollMod_Constant);
|
||||
SetupTroll("Temp Health Quick Drain", "Makes a player's temporarily health drain very quickly", TrollMod_Constant);
|
||||
SetupTroll("Slow Drain", "Will make the player slowly lose health over time", TrollMod_Constant);
|
||||
SetupTroll("KillMeSoftly", "Make player eat or waste pills whenever possible", TrollMod_Instant | TrollMod_Constant);
|
||||
index = SetupTroll("Reverse FF", "All damage dealt to a player is reversed", TrollMod_Constant);
|
||||
Trolls[index].AddCustomFlagPrompt("Choose Reverse FF", false);
|
||||
Trolls[index].AddFlag("1:1 Ratio", true); //1
|
||||
Trolls[index].AddFlag("2x Ratio", false); //2
|
||||
Trolls[index].AddFlag("0.5x Ratio", false); //4
|
||||
Trolls[index].AddFlag("0.0x Ratio (None)", false); //8
|
||||
Trolls[index].AddFlag("3x Ratio", false); //16
|
||||
Trolls[index].AddCustomFlagPrompt("Modes", true);
|
||||
Trolls[index].AddFlag("Reverse Fire Damage", false); //32
|
||||
Trolls[index].AddFlag("Reverse Explosions", false); //64
|
||||
t_reverseFFIndex = index;
|
||||
t_damageBoostIndex = TrollBuilder("Damage Boost", "Makes a player take more damage than normal", TrollMod_Constant).Id;
|
||||
TrollBuilder("Temp Health Quick Drain", "Makes a player's temporarily health drain very quickly", TrollMod_Constant);
|
||||
TrollBuilder("Slow Drain", "Will make the player slowly lose health over time", TrollMod_Constant);
|
||||
TrollBuilder("KillMeSoftly", "Make player eat or waste pills whenever possible", TrollMod_Instant | TrollMod_Constant);
|
||||
t_reverseFFIndex = TrollBuilder("Reverse FF", "All damage dealt to a player is reversed", TrollMod_Constant)
|
||||
.AddPrompt("Choose Reverse FF", false)
|
||||
.AddOption("1:1 Ratio", true) //1
|
||||
.AddOption("2x Ratio", false) //2
|
||||
.AddOption("0.5x Ratio", false) //4
|
||||
.AddOption("0.0x Ratio (None)", false) //8
|
||||
.AddOption("3x Ratio", false) //16
|
||||
.AddPromptMulti("Modes")
|
||||
.AddOption("Reverse Fire Damage", false) //32
|
||||
.AddOption("Reverse Explosions", false) //64
|
||||
.Id;
|
||||
|
||||
|
||||
index = SetupTroll("Dep Bots", "Makes bots heal a player. At any cost", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Do not spawn extra", true); // 1
|
||||
Trolls[index].AddFlag("Spawn extra bots (broke)", false); // 2
|
||||
Trolls[index].AddCustomFlagPrompt("# Of Bots", false);
|
||||
Trolls[index].AddFlag("1", false); // 4
|
||||
Trolls[index].AddFlag("2", false); // 8
|
||||
Trolls[index].AddFlag("3", false); // 16
|
||||
Trolls[index].AddFlag("4", true); // 32
|
||||
Trolls[index].AddFlag("5", false); // 64
|
||||
Trolls[index].AddCustomFlagPrompt("Auto Timeout", false, 0);
|
||||
Trolls[index].AddFlag("Until Healed / Map Change", false); // 128
|
||||
Trolls[index].AddFlag("15 seconds", true); // 255
|
||||
Trolls[index].AddFlag("30 seconds", false); // 512
|
||||
Trolls[index].AddFlag("1 minute", false); //1024
|
||||
Trolls[index].AddFlag("5 minutes", false); //2048
|
||||
TrollBuilder("Dep Bots", "Makes bots heal a player. At any cost", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOption("Do not spawn extra", true) // 1
|
||||
.AddOption("Spawn extra bots (broke)", false) // 2
|
||||
.AddPrompt("# Of Bots")
|
||||
.AddOption("1", false) // 4
|
||||
.AddOption("2", false) // 8
|
||||
.AddOption("3", false) // 16
|
||||
.AddOption("4", true) // 32
|
||||
.AddOption("5", false) // 64
|
||||
.AddPrompt("Auto Timeout")
|
||||
.AddOption("Until Healed / Map Change", false) // 128
|
||||
.AddOption("15 seconds", true) // 255
|
||||
.AddOption("30 seconds", false) // 512
|
||||
.AddOption("1 minute", false) //1024
|
||||
.AddOption("5 minutes", false); //2048
|
||||
|
||||
/// CATEGORY: Movement
|
||||
SetCategory("Movement");
|
||||
index = SetupTroll("Slow Speed", "Sets player speed to 0.8x of normal speed", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("90% Movement Speed", true);
|
||||
Trolls[index].AddFlag("80% Movement Speed", false);
|
||||
Trolls[index].AddFlag("70% Movement Speed", false);
|
||||
Trolls[index].AddFlag("50% Movement Speed", false);
|
||||
Trolls[index].AddFlag("30% Movement Speed", false);
|
||||
Trolls[index].AddFlag("0% Movement Speed", false);
|
||||
SetupTroll("Higher Gravity", "Sets player gravity to 1.3x of normal gravity", TrollMod_Constant);
|
||||
t_invertedTrollIndex = SetupTroll("Inverted Controls", "Well, aint it obvious", TrollMod_Constant);
|
||||
SetupTroll("Stagger", "Like a slap, but different", TrollMod_Instant);
|
||||
index = SetupTroll("Slippery Shoes", "Periodically stumbles around.", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(true);
|
||||
Trolls[index].AddFlag("Periodically", true);
|
||||
Trolls[index].AddFlag("When using doors", false);
|
||||
Trolls[index].AddFlag("On throwable use", false);
|
||||
Trolls[index].AddFlag("On pills/adrenaline use", false);
|
||||
Trolls[index].AddFlag("On zombie bite", false);
|
||||
t_slipperyShoesIndex = index;
|
||||
index = SetupTroll("Randomize Angles", "Randomly change their angles", TrollMod_Constant);
|
||||
Trolls[index].AddCustomFlagPrompt("Frequency:", false);
|
||||
Trolls[index].AddFlag("Once in a while", true); //1
|
||||
Trolls[index].AddFlag("Periodically", false); //2
|
||||
Trolls[index].AddFlag("A lot", false); //4
|
||||
Trolls[index].AddFlag("Painful", false); //8
|
||||
Trolls[index].AddFlag("Seizure", false); //16
|
||||
t_randomizeAnglesIndex = index;
|
||||
index = SetupTroll("Randomize Velocity", "Randomly change their velocity", TrollMod_Constant);
|
||||
Trolls[index].SetTimer(0.1, Timer_RandomVelocity);
|
||||
Trolls[index].AddCustomFlagPrompt("Frequency:", false);
|
||||
Trolls[index].AddFlag("Loose", true); //1
|
||||
Trolls[index].AddFlag("Slippery", false); //2
|
||||
Trolls[index].AddFlag("Earthquake", false); //4
|
||||
Trolls[index].AddFlag("Severe Earthquake", false); //8
|
||||
Trolls[index].AddFlag("Bouncy Castle", false); //16
|
||||
t_randomizeVelocityIndex = index;
|
||||
TrollBuilder("Slow Speed", "Sets player speed to 0.8x of normal speed", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOptionFloat("90% Movement Speed", true, 0.9)
|
||||
.AddOptionFloat("80% Movement Speed", false, 0.8)
|
||||
.AddOptionFloat("70% Movement Speed", false, 0.7)
|
||||
.AddOptionFloat("50% Movement Speed", false, 0.5)
|
||||
.AddOptionFloat("30% Movement Speed", false, 0.3)
|
||||
.AddOptionFloat("0% Movement Speed", false, 0.0);
|
||||
TrollBuilder("Higher Gravity", "Sets player gravity to 1.3x of normal gravity", TrollMod_Constant);
|
||||
t_invertedTrollIndex = TrollBuilder("Inverted Controls", "Well, aint it obvious", TrollMod_Constant).Id;
|
||||
t_slipperyShoesIndex = TrollBuilder("Slippery Shoes", "Periodically stumbles around.", TrollMod_Constant | TrollMod_Instant)
|
||||
.AddPromptMulti()
|
||||
.AddOption("Periodically", true) // 1 << 0
|
||||
.AddOption("When using doors") // 1 << 1
|
||||
.AddOption("On throwable use")
|
||||
.AddOption("On pills/adrenaline use")
|
||||
.AddOption("On zombie bite")
|
||||
.Id
|
||||
t_randomizeAnglesIndex = TrollBuilder("Randomize Angles", "Randomly change their angles", TrollMod_Constant)
|
||||
.AddPrompt("Frequency:")
|
||||
.AddOption("Once in a while", true) //1
|
||||
.AddOption("Periodically", false) //2
|
||||
.AddOption("A lot", false) //4
|
||||
.AddOption("Painful", false) //8
|
||||
.AddOption("Seizure", false) //16
|
||||
.Id;
|
||||
t_randomizeVelocityIndex = TrollBuilder("Randomize Velocity", "Randomly change their velocity", TrollMod_Constant)
|
||||
.SetTimer(0.1, Timer_RandomVelocity)
|
||||
.AddPrompt("Frequency:")
|
||||
.AddOption("Loose", true) //1
|
||||
.AddOption("Slippery", false) //2
|
||||
.AddOption("Earthquake", false) //4
|
||||
.AddOption("Severe Earthquake", false) //8
|
||||
.AddOption("Bouncy Castle", false) //16
|
||||
.Id;
|
||||
TrollBuilder("Rewind", "Teleports player backwards", TrollMod_Instant | TrollMod_Constant)
|
||||
.SetTimer(10.0, Timer_RandomRewind);
|
||||
|
||||
/// CATEGORY: MISC
|
||||
SetCategory("Misc");
|
||||
SetupTroll("Gun Jam", "On reload, small chance their gun gets jammed - Can't reload.", TrollMod_Constant);
|
||||
SetupTroll("No Shove", "Prevents a player from shoving", TrollMod_Constant);
|
||||
index = SetupTroll("No Button Touchie", "Stops people from pressing buttons", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(true);
|
||||
Trolls[index].AddFlag("Prevent Use", true);
|
||||
Trolls[index].AddFlag("Vomit On Touch", false);
|
||||
Trolls[index].AddFlag("Incap On Touch", false);
|
||||
Trolls[index].AddFlag("Slay On Touch", false);
|
||||
Trolls[index].AddFlag("0.8x Speed", false);
|
||||
t_gunJam = TrollBuilder("Gun Jam", "On reload, small chance their gun gets jammed - Can't reload.", TrollMod_Constant).Build();
|
||||
TrollBuilder("No Shove", "Prevents a player from shoving", TrollMod_Constant);
|
||||
TrollBuilder("No Button Touchie", "Stops people from pressing buttons", TrollMod_Constant)
|
||||
.AddPromptMulti()
|
||||
.AddOption("Prevent Use", true)
|
||||
.AddOption("Vomit On Touch", false)
|
||||
.AddOption("Incap On Touch", false)
|
||||
.AddOption("Slay On Touch", false)
|
||||
.AddOption("0.8x Speed", false);
|
||||
// TODO: setup instant
|
||||
index = SetupTroll("Shakey Camera", "Horrible", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
t_shakeyCameraIndex = TrollBuilder("Shakey Camera", "Horrible", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
// add flag: vomit on touch
|
||||
Trolls[index].AddFlag("Annoying but playable", false);
|
||||
Trolls[index].AddFlag("Bad", true);
|
||||
Trolls[index].AddFlag("Sickness", false);
|
||||
Trolls[index].AddFlag("Violent", false);
|
||||
Trolls[index].AddFlag("Violent XX", false);
|
||||
t_shakeyCameraIndex = index;
|
||||
index = SetupTroll("Hide HUD", "Horrible", TrollMod_Constant);
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("Rare & Short", false);
|
||||
Trolls[index].AddFlag("Sometimes & Medium", false);
|
||||
Trolls[index].AddFlag("Constantly", true);
|
||||
t_hideHUDIndex = index;
|
||||
index = SetupTroll("Meta: Random", "Picks a random troll", TrollMod_Instant);
|
||||
index = SetupTroll("Meta: Inverse", "Uhm you are not supposed to see this...", TrollMod_Instant);
|
||||
Trolls[index].hidden = true;
|
||||
Trolls[index].AddFlagPrompt(false);
|
||||
Trolls[index].AddFlag("100%", true);
|
||||
Trolls[index].AddFlag("50%", false);
|
||||
Trolls[index].AddFlag("10%", false);
|
||||
|
||||
|
||||
|
||||
|
||||
.AddOption("Annoying but playable", false)
|
||||
.AddOption("Bad", true)
|
||||
.AddOption("Sickness", false)
|
||||
.AddOption("Violent", false)
|
||||
.AddOption("Violent XX", false)
|
||||
.Id;
|
||||
t_hideHUDIndex = TrollBuilder("Hide HUD", "Horrible", TrollMod_Constant)
|
||||
.AddPrompt()
|
||||
.AddOption("Rare & Short", false)
|
||||
.AddOption("Sometimes & Medium", false)
|
||||
.AddOption("Constantly", true)
|
||||
.Id;
|
||||
TrollBuilder("Meta: Random", "Picks a random troll", TrollMod_Instant);
|
||||
t_metaReverse = TrollBuilder("Meta: Inverse", "Uhm you are not supposed to see this...", TrollMod_Instant)
|
||||
.Hide()
|
||||
.AddPrompt()
|
||||
.AddOptionFloat("100%", true, 1.0)
|
||||
.AddOptionFloat("50%", false, 0.5)
|
||||
.AddOptionFloat("10%", false, 0.1)
|
||||
.Build();
|
||||
|
||||
// Initialize the default flag values to -1
|
||||
for(int i = 0; i <= MAX_TROLLS; i++) {
|
||||
|
@ -287,16 +285,31 @@ void SetupTrolls() {
|
|||
|
||||
}
|
||||
|
||||
void AddMagnetFlags(int index) {
|
||||
Trolls[index].AddCustomFlagPrompt("Choose Magnet Chance:", false);
|
||||
Trolls[index].AddFlag("Always (100%)", true);
|
||||
Trolls[index].AddFlag("Half Time (50%)", false);
|
||||
Trolls[index].AddFlag("Rare (10%)", false);
|
||||
TrollEffectResponse Activate_SmartCharge(Troll troll, int activator, int victim, int timeout, int flags, trollModifier mod) {
|
||||
if(pdata[victim].smartChargeActivator > 0) {
|
||||
ReplyToCommand(activator, "Target already has smart charge enabled");
|
||||
return TE_Error;
|
||||
}
|
||||
pdata[victim].smartChargeAttempts = 0;
|
||||
pdata[victim].smartChargeMaxAttempts = timeout;
|
||||
pdata[victim].smartChargeActivator = GetClientUserId(activator);
|
||||
CreateTimer(1.0, Timer_CheckForChargerOpportunity, GetClientUserId(victim), TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
|
||||
return TE_Success;
|
||||
}
|
||||
|
||||
TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, trollModifier modifier, int flags) {
|
||||
bool toActive = IsTrollActiveByRawID(victim, troll.id);
|
||||
if(StrEqual(troll.name, "Reset User")) {
|
||||
void AddMagnetFlags(TrollBuilder troll) {
|
||||
PrintToServer("adding: %d", troll.Id);
|
||||
troll.AddPrompt("Choose Magnet Chance:")
|
||||
.AddOptionFloat("Always (100%)", true, 1.0)
|
||||
.AddOptionFloat("Half Time (50%)", false, 0.5)
|
||||
.AddOptionFloat("Rare (10%)", false, 0.1);
|
||||
}
|
||||
|
||||
TrollEffectResponse ApplyAffect(int victim, Troll troll, int activator, trollModifier modifier, int flags) {
|
||||
bool toActive = troll.IsActive(victim);
|
||||
char name[MAX_TROLL_NAME_LENGTH];
|
||||
troll.GetName(name, sizeof(name));
|
||||
if(StrEqual(name, "Reset User")) {
|
||||
LogAction(activator, victim, "\"%L\" reset all effects for \"%L\"", activator, victim);
|
||||
ShowActivityEx(activator, "[FTT] ", "reset effects for %N. ", victim);
|
||||
// for(int i = 0; i <= MAX_TROLLS; i++) {
|
||||
|
@ -306,7 +319,7 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
// SetEntPropFloat(victim, Prop_Send, "m_flLaggedMovementValue", 1.0);
|
||||
ResetClient(victim, true);
|
||||
return TE_Error; // Not an error, but don't want to show activation
|
||||
} else if(StrEqual(troll.name, "Slow Speed")) {
|
||||
} else if(StrEqual(name, "Slow Speed")) {
|
||||
if(toActive) {
|
||||
float movement = 0.0;
|
||||
if(flags & 1) movement = 0.9;
|
||||
|
@ -317,22 +330,22 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
SetEntPropFloat(victim, Prop_Send, "m_flLaggedMovementValue", movement);
|
||||
} else
|
||||
SetEntPropFloat(victim, Prop_Send, "m_flLaggedMovementValue", 1.0);
|
||||
} else if(StrEqual(troll.name, "Higher Gravity"))
|
||||
} else if(StrEqual(name, "Higher Gravity"))
|
||||
SetEntityGravity(victim, toActive ? 1.3 : 1.0);
|
||||
else if(StrEqual(troll.name, "UziRules / AwpSmells")) {
|
||||
else if(StrEqual(name, "UziRules / AwpSmells")) {
|
||||
DisableTroll(victim, "No Pickup");
|
||||
DisableTroll(victim, "Primary Disable");
|
||||
} else if(StrEqual(troll.name, "Primary Disable")) {
|
||||
} else if(StrEqual(name, "Primary Disable")) {
|
||||
DisableTroll(victim, "UziRules / AwpSmells");
|
||||
DisableTroll(victim, "No Pickup");
|
||||
SDKHook(victim, SDKHook_WeaponCanUse, Event_ItemPickup);
|
||||
} else if(StrEqual(troll.name, "No Pickup")) {
|
||||
} else if(StrEqual(name, "No Pickup")) {
|
||||
DisableTroll(victim, "UziRules / AwpSmells");
|
||||
DisableTroll(victim, "Primary Disable");
|
||||
SDKHook(victim, SDKHook_WeaponCanUse, Event_ItemPickup);
|
||||
} else if(StrEqual(troll.name, "CameTooEarly")) {
|
||||
} else if(StrEqual(name, "CameTooEarly")) {
|
||||
ReplyToCommand(activator, "This troll mode is not implemented.");
|
||||
} else if(StrEqual(troll.name, "KillMeSoftly")) {
|
||||
} else if(StrEqual(name, "KillMeSoftly")) {
|
||||
static char wpn[32];
|
||||
GetClientWeaponName(victim, 4, wpn, sizeof(wpn));
|
||||
if(StrEqual(wpn, "weapon_adrenaline") || StrEqual(wpn, "weapon_pain_pills")) {
|
||||
|
@ -344,17 +357,17 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
}
|
||||
//TODO: Implement TrollMod_Constant
|
||||
return TE_Error;
|
||||
} else if(StrEqual(troll.name, "Throw It All")) {
|
||||
} else if(StrEqual(name, "Throw It All")) {
|
||||
if(modifier & TrollMod_Instant) {
|
||||
if(flags & 1) { // Hacky, just throw their kit
|
||||
ThrowItemToPlayer(victim, activator, 3);
|
||||
} else ThrowAllItems(victim);
|
||||
}
|
||||
} else if(StrEqual(troll.name, "Swarm")) {
|
||||
} else if(StrEqual(name, "Swarm")) {
|
||||
if(modifier & TrollMod_Instant) {
|
||||
L4D2_RunScript("RushVictim(GetPlayerFromUserID(%d), %d)", victim, 15000);
|
||||
}
|
||||
} else if(StrEqual(troll.name, "Gun Jam")) {
|
||||
} else if(StrEqual(name, "Gun Jam")) {
|
||||
int wpn = GetClientWeaponEntIndex(victim, 0);
|
||||
if(wpn > -1)
|
||||
SDKHook(wpn, SDKHook_Reload, Event_WeaponReload);
|
||||
|
@ -362,25 +375,25 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
ReplyToCommand(activator, "Victim does not have a primary weapon.");
|
||||
return TE_Error;
|
||||
}
|
||||
} else if(StrEqual(troll.name, "Vomit Player"))
|
||||
} else if(StrEqual(name, "Vomit Player"))
|
||||
L4D_CTerrorPlayer_OnVomitedUpon(victim, victim);
|
||||
else if(StrEqual(troll.name, "Insta Special")) {
|
||||
else if(StrEqual(name, "Insta Special")) {
|
||||
int mode = 0;
|
||||
if(flags & 2) mode = 1;
|
||||
ShowInstaSpecialChooser(activator, GetClientUserId(victim), mode);
|
||||
return TE_Menu;
|
||||
} else if(StrEqual(troll.name, "Goo")) {
|
||||
} else if(StrEqual(name, "Goo")) {
|
||||
static float pos[3], ang[3];
|
||||
GetClientAbsOrigin(victim, pos);
|
||||
GetClientAbsAngles(victim, ang);
|
||||
L4D2_SpitterPrj(victim, pos, ang);
|
||||
} else if(StrEqual(troll.name, "Stagger")) {
|
||||
} else if(StrEqual(name, "Stagger")) {
|
||||
L4D_StaggerPlayer(victim, victim, NULL_VECTOR);
|
||||
} else if(StrEqual(troll.name, "Voice Mute")) {
|
||||
} else if(StrEqual(name, "Voice Mute")) {
|
||||
BaseComm_SetClientMute(victim, toActive);
|
||||
} else if(StrEqual(troll.name, "Spicy Gas")) {
|
||||
} else if(StrEqual(name, "Spicy Gas")) {
|
||||
SDKHook(victim, SDKHook_WeaponCanUse, Event_ItemPickup);
|
||||
} else if(StrEqual(troll.name, "Car Splat")) {
|
||||
} else if(StrEqual(name, "Car Splat")) {
|
||||
if(flags & 1) {
|
||||
if(!SpawnCarOnPlayer(victim)) {
|
||||
ReplyToCommand(activator, "Could not find a suitable area to spawn a car. Requires vertical space above victim.");
|
||||
|
@ -397,7 +410,7 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
return TE_Error;
|
||||
}
|
||||
}
|
||||
} else if(StrEqual(troll.name, "Instant Commons")) {
|
||||
} else if(StrEqual(name, "Instant Commons")) {
|
||||
if(modifier & TrollMod_Instant) {
|
||||
float pos[3];
|
||||
GetHorizontalPositionFromClient(victim, flags & 1 ? -40.0 : 40.0, pos);
|
||||
|
@ -407,7 +420,7 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
L4D2_RunScript("CommandABot({cmd=0,bot=EntIndexToHScript(%i),target=GetPlayerFromUserID(%i)})", c, victimId);
|
||||
}
|
||||
}
|
||||
} else if(StrEqual(troll.name, "Randomize Clip Ammo")) {
|
||||
} else if(StrEqual(name, "Randomize Clip Ammo")) {
|
||||
if(modifier & TrollMod_Instant) {
|
||||
int primaryWpn = GetPlayerWeaponSlot(victim, 0);
|
||||
if(primaryWpn > 0) {
|
||||
|
@ -415,7 +428,7 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
SetEntProp(primaryWpn, Prop_Send, "m_iClip1", GetRandomInt(0, maxCap));
|
||||
}
|
||||
}
|
||||
} else if(StrEqual(troll.name, "Rock Dropper")) {
|
||||
} else if(StrEqual(name, "Rock Dropper")) {
|
||||
float pos[3], dropPos[3];
|
||||
GetClientEyePosition(victim, pos);
|
||||
dropPos = pos;
|
||||
|
@ -428,7 +441,7 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
float ang[3];
|
||||
ang[0] = 90.0;
|
||||
L4D_TankRockPrj(0, dropPos, ang);
|
||||
} else if(StrEqual(troll.name, "Molotov Bath")) {
|
||||
} else if(StrEqual(name, "Molotov Bath")) {
|
||||
int count = 1;
|
||||
if(flags & 2) count = 8;
|
||||
float pos[3], dropPos[3];
|
||||
|
@ -449,7 +462,7 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
for(int i = 0; i < count; i++) {
|
||||
L4D_MolotovPrj(victim, dropPos, vel);
|
||||
}
|
||||
} else if(StrEqual(troll.name, "Dep Bots")) {
|
||||
} else if(StrEqual(name, "Dep Bots")) {
|
||||
if(!toActive) {
|
||||
StopHealingBots();
|
||||
return TE_Success;
|
||||
|
@ -513,7 +526,7 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
wasSbFixEnabled = hSbFixEnabled.BoolValue;
|
||||
hSbFixEnabled.BoolValue = false;
|
||||
}
|
||||
} else if(StrEqual(troll.name, "Smart Charge")) {
|
||||
} else if(StrEqual(name, "Smart Charge")) {
|
||||
if(pdata[victim].smartChargeActivator > 0) {
|
||||
ReplyToCommand(activator, "Target already has smart charge enabled");
|
||||
return TE_Error;
|
||||
|
@ -526,32 +539,36 @@ TrollEffectResponse ApplyAffect(int victim, const Troll troll, int activator, tr
|
|||
pdata[victim].smartChargeMaxAttempts = timeout;
|
||||
pdata[victim].smartChargeActivator = GetClientUserId(activator);
|
||||
CreateTimer(1.0, Timer_CheckForChargerOpportunity, GetClientUserId(victim), TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
|
||||
} else if(StrEqual(troll.name, "No Rushing Us")) {
|
||||
} else if(StrEqual(name, "No Rushing Us")) {
|
||||
SetEntPropFloat(victim, Prop_Send, "m_flLaggedMovementValue", 1.0);
|
||||
} else if(StrEqual(troll.name, "Hide HUD")) {
|
||||
} else if(StrEqual(name, "Hide HUD")) {
|
||||
if(toActive)
|
||||
HideHUDRandom(victim);
|
||||
else
|
||||
SetEntProp(victim, Prop_Send, "m_iHideHUD", 0);
|
||||
} else if(StrEqual(troll.name, "Meta: Random")) {
|
||||
int rndTroll = GetRandomInt(0, MAX_TROLLS);
|
||||
} else if(StrEqual(name, "Rewind")) {
|
||||
if(modifier & TrollMod_Instant) {
|
||||
RewindPlayer(victim);
|
||||
}
|
||||
} else if(StrEqual(name, "Meta: Random")) {
|
||||
Troll rndTroll = Troll(GetRandomInt(0, MAX_TROLLS));
|
||||
int rndFlags = 0;
|
||||
int maxFlags = Trolls[rndTroll].GetFlagCount();
|
||||
int maxFlags = rndTroll.TotalOptionsCount;
|
||||
int numFlags = GetRandomInt(0, maxFlags);
|
||||
while(numFlags > 0) {
|
||||
// Apply a random flag
|
||||
rndFlags |= GetRandomInt(0, maxFlags)
|
||||
numFlags--;
|
||||
}
|
||||
trollModifier rndMod = Trolls[rndTroll].GetDefaultMod();
|
||||
if(Trolls[rndTroll].HasMod(TrollMod_Constant) && GetURandomFloat() > 0.5) {
|
||||
trollModifier rndMod = rndTroll.GetDefaultMod();
|
||||
if(rndTroll.HasMod(TrollMod_Constant) && GetURandomFloat() > 0.5) {
|
||||
rndMod = TrollMod_Instant;
|
||||
} else if(Trolls[rndTroll].HasMod(TrollMod_Instant) && GetURandomFloat() > 0.5) {
|
||||
} else if(rndTroll.HasMod(TrollMod_Instant) && GetURandomFloat() > 0.5) {
|
||||
rndMod = TrollMod_Constant;
|
||||
}
|
||||
Trolls[rndTroll].Activate(victim, activator, rndMod, rndFlags);
|
||||
rndTroll.Activate(victim, activator, rndMod, rndFlags);
|
||||
} else if(~modifier & TrollMod_Constant) {
|
||||
PrintToServer("[FTT] Warn: Possibly invalid troll, no apply action defined for \"%s\"", troll.name);
|
||||
PrintToServer("[FTT] Warn: Possibly invalid troll, no apply action defined for \"%s\"", name);
|
||||
#if defined DEBUG
|
||||
ReplyToCommand(activator, "[FTT/Debug] If nothing occurs, this troll possibly was not implemented correctly. ");
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue