File changes
This commit is contained in:
1 parent
b4c288edae
commit
9af84c3e62
2 files changed
+37
-19
No files matched your search
@@ -25,13 +25,16 @@ namespace StarsiegeBot
|
||||
class DeathMessages : BaseCommandModule
|
||||
{
|
||||
private readonly Random rnd = new Random();
|
||||
private readonly string[] ActiveDeathMessages = new string[] { "{0} ventilated {1}.", "{0} donated {1}'s body to science.", "{0} introduces {1} to the agony of defeat.", "{0} punched {1}'s ticket.", "{0} demonstrates death without dignity to {1}.", "{0} invites {1} to explore the past tense of being.", "{0} offs {1}.", "{0} gives {1} an out of body experience. ", "{0} burns {1} to smelly jelly.", "{0} makes a righteous mess of {1}.", "{0} composts {1}.", "{0} invites {1} to join the scenery.", "{0} gets medieval on {1}.", "{0} wipes the floor with {1}.", "{0} parties down on {1}.", "{0} opens a can of whoopaz on {1}.", "{0} massacred {1}.", "{0} inflicts a coup de grace on {1}.", "{0} showed {1} how its done.", "{0} donated {1}'s body to big dick Leon.", "{0} introduced {1} to God.", "{0} spanked {1} in front of everyone.", "{0} abused {1}.", "{0} invites {1}'s insides to explore the outside.", "{0} farmed {1} for points.", "{0} ruined {1}.", "{0} got a footshot on {1}.", "{0} makes a splattered mess of {1}.", "{0} tapped {1}'s tenderness.", "{0} didnt go easy on {1}.", "{0} raped, pillaged, and savaged {1}.", "{0} wipes their ass with {1}.", "{0} put {1} out of their misery.", "{0} made {1} shutup.", "{0} made {1} look like a noob.", "{0} owns {1}.", "{0} punked out {1}.", "{0} trolled {1} hard.", "{0} flashy-thinged {1} to death.", "{0} neuralyzed {1}.", "{0} gave {1} a close encounter of the MIB kind.", "{0} blew off one of {1}'s heads.", "{0}'s Noisy Cricket misfired in {1}'s direction.", "{0} shoved a Series 4 De-Atomizer in {1}'s mouth & pulled the trigger.", "{0} shot {1} where it don't grow back.", "{0} shot down an Arquillian Battle Cruiser and it crash-landed on {1}. ", "{0} spilled coffee on {1}'s new suit.", "{0} stepped on {1}'s new shades.", "{0} made an 'Edgar-suit' out of {1}.", "{0}'s Noisy Cricket got wicked on {1}.", "{0} gets sawn in half by {0}.", "{0} died. I blame {0}.", "{0} was axe murdered by {0}.", "{0}'s melon was split by {0}.", "{0} was put on the chop block on {0}.", "{0} was sliced and diced by {0}.", "{0} is split from crotch to sternum by {0}.", "{0} is split in two with a powerful axe blow from {0}.", "{0}'s death put another notch on {0}'s axe..", "{0} escapes infection from {0} by dying first.", "{0} dies from {0}'s mysterious tropical disease.", "{0} eats {0}'s pineapple.", "{0} was gibbed by {0}'s grenade.", "{0} receives a gift from {0}.", "{0} plays pass-the-parcel with {0}.", "{0} was knife-murdered by {0}.", "{0} gets knifed from behind by {0}.", "{0} was nailed by {0}.", "{0} caught one too many nails from {0}.", "{0} ran into {0}'s nails.", "{0} was turned into {0}'s pin-cushion.", "{0} gets no say in it, no say in it at all! sings {0}.", "{0} surfs on a grenade from {0}.", "{0} got up-close and personal with {0}'s grenade.", "{0} played catch with {0}'s grenade.", "{0} received a pineapple enema from {0}.", "{0} fetches {0}'s pineapple.", "{0} caught too much shrapnel from {0}'s grenade.", "{0} tried to pick up {0}'s hot potato.", "{0} thought {0} was tossing him a spare grenade.", "{0} stops to ponder the technical details of {0}'s grenade.", "{0} gets a hole in their heart from {0}'s railgun.", "{0} gets derailed by {0}.", "{0} rides {0}'s rocket.", "{0} was gibbed by {0}'s rocket.", "{0} rides {0}'s firecracker.", "{0} chewed on {0}'s boomstick.", "{0} got too close to {0}'s muzzleflash.", "{0} practices being {0}'s clay pigeon.", "{0} was on the receiving end of {0}'s shotgun barrel.", "{0} was fed a lead diet by {0}.", "{0} got blasted by {0}'s last resort.", "{0} got more than a powderburn from {0}'s shotgun blast.", "{0} was punctured by {0}.", "{0} is put to sleep by {0}.", "{0} is all partied out by {0}.", "{0} killed {1}", "{0} knifed {1}", "{0} eviscerated {1}", "{0} melee killed {1}", "{0} whacked {1}", "{0} beat down {1}", "{0} murdered {1}", "{0} battered {1}", "{0} ended {1}", "{0} rifled {1}", "{0} shot down {1}", "{0} floored {1}", "{0} riddled {1}", "{0} drilled {1}", "{0} submachine gunned {1}", "{0} ruined {1}", "{0} bombed {1}", "{0} detonated {1}", "{0} exploded {1}", "{0} obliterated {1}", "{0} destroyed {1}", "{0} erased {1}", "{0} ripped apart {1}", "{0} torn apart {1}", "{0} wiped out {1}", "{0} pulverised {1}", "{0} shotgunned {1}", "{0} sniped {1}", "{0} picked off {1}", "{0} scoped {1}", "{0} pistoled {1}", "{0} blasted {1}", "{0} plugged {1}", "{0} machine gunned {1}", "{0} sprayed {1}", "{0} flattened {1}", "{0} ran over {1}", "{0} ran {1} down", "{0} mowed down {1}", "{0} chopped up {1}", "{0} killed {1}", "{0} tried to catch {1}", "{0} was crushed by {1}", "{0} was jumped by {1}", "{0} stomps {1}", "{0} was literally stomped into particles by {1}", "{0} was ax-murdered by {1}", "{0} was lead poisoned by {1}", "{0} was body pierced by {1}", "{0} was nailed by {1}", "{0} was perforated by {1}", "{0} was punctured by {1}", "{0} was ventilated by {1}", "{0} was straw-cuttered by {1}", "{0} gets a natural disaster from {1}", Line truncated
|
||||
private readonly string[] PassiveDeathMessages = new string[] { "{1} is chewed up and spit out by {0}", "{1} got curb stomped by {0}", "{1} gets the Vulcan Nerve Pinch from {0}", "{1} felt the burn from {0}.", "{1} took it hard and hot from {0}", "{1} is now a crispy lawn ornament in {0}'s yard.", "{1} brought a knife to the gun fight with {0}.", "{1} is snuffed by {0}.", "{1} gets a flying wedgie from {0}.", "{1} gets a nice wet vivisection from {0}.", "{1}'s ticket was punched by {0}.", "{1}'s personal space was violated by {0}.", "{1} is curb stomped by {0}.", "{1} makes an unsuccessful pass at {0}.", "{1} gets a little chin music from {0}.", "{1} receives a Chicago Overcoat from {0}.", "{1} is cut down in the prime of life by {0}.", "{1} gets drilled by {0}.", "{1} got eighty-sixed by {0}.", "{1} plays tackling dummy for {0}.", "{1} got slaughtered by {0}.", "{1} is annihilated by a lucky shot from {0}.", "{1} is chewed up and shit out by {0}.", "{1} is womped on by {0}.", "{1} got on {0}'s last nerve.", "{1} took one to many hits from {0}.", "{1} tried to run away from {0}.", "{1} is another buried body in {0}'s yard.", "{1} got cheap shotted by {0}.", "{1} got knocked the FUCK out by {0}.", "{1} has to respawn after fighting {0}.", "{1}'s online life is ended by {0}.", "{1}'s personal space is violated by {0}.", "{1} is humbled by {0}, haha.", "{1} makes an unsuccessful gay pass at {0}.", "{1} is just another point on the scoreboard for {0}.", "{1} is in put in the hospital after facing {0}.", "{1} got a beat down in the prime of life by {0}.", "{1} never had a chance going up against {0}.", "{1}'s scap popped when fighting {0}.", "{1} lagged out and lost to {0}.", "{1} is annihilated by a very lucky shot from {0}.", "{1} underestimated the power of {0}'s Noisy Cricket.", "{1} didn't get a chance to put their Ray-Ban's on before {0}'s flashy-thing went off.", "{1} got a Carbonizer in the back of the head from {0}.", "{1} was cut to pieces by {0}'s Series 4 De-Atomizer.", "{1} got their atoms rearranged by {0}." };
|
||||
private readonly string[] GenericDeathMessages = new string[] { "{0} died.", "{0} had an accident.", "{0} gave up.", "{0} is fail!", "{0} went to get their gun back.", "{0} had their Series 4 De-Atomizer pointed the wrong way.", "{0} flashy-thinged himself to death.", "{0} just stepped on their last cockroach.", "{0} was swallowed alive by a giant interstellar cockroach.", "{0} died impossibly!", "{0} grenades himself.", "{0} got splatted by their own grenade.", "{0} sat on their own grenade.", "{0} got to know their grenade too well.", "{0} caught the end of their own grenade.", "{0} got too close to their own grenade.", "{0} let their own grenade get the best of him.", "{0} tiptoed over their own grenade.", "{0} stared at their grenade too long.", "{0} becomes bored with life.", "{0} checks if their gun is loaded.", "{0} committed suicide", "{0} took the easy way out", "{0} sleeps with the fishes", "{0} sucks it down", "{0} gulped a load of slime", "{0} can't exist on slime alone", "{0} burst into flames", "{0} turned into hot slag", "{0} visits the Volcano God", "{0} cratered", "{0} fell to their death", "{0} blew up", "{0} was spiked", "{0} was zapped", "{0} ate a lavaball", "{0} died", "{0} tried to leave", "{0} was squished", "{0} was telefragged by their teammate", "{0} squished a teammate", "{0} mows down a teammate", "{0} checks their glasses", "{0} gets a frag for the other team", "{0} loses another friend", "{0} was crushed by their teammate", "{0} was jumped by their teammate", "{0} died impossibly!", "{0} dispenses with himself.", "{0} detonates an ammo box too close to him", "{0} makes a crater", "{0} shoots their teammate one too many times", "{0} obstructs their team's sentry gun", "{0} tried to use the ", "{0} can't swim worth a crap!", "{0} can't breathe water", "{0} visits the Hell fires", "{0} was mauled by a Rottweiler", "{0} blew up", "{0} was crushed", "{0} was shot", "{0} was torn up by an enemy Rottweiler", "{0} was stopped by an enemy autoturret", "{0} didn't survive the operation.", "{0} tripped off the worldmap.", "{0} got knocked the fuck out!" };
|
||||
private readonly DeathMessageLines dmLines;
|
||||
|
||||
public DeathMessages()
|
||||
{
|
||||
Console.WriteLine("Death Message Commands Loaded.");
|
||||
var json = "";
|
||||
using (var fs = File.OpenRead("DeathMessages.json"))
|
||||
using (var sr = new StreamReader(fs, new UTF8Encoding(false)))
|
||||
json = sr.ReadToEnd();
|
||||
dmLines = JsonConvert.DeserializeObject<DeathMessageLines>(json);
|
||||
}
|
||||
|
||||
[GroupCommand]
|
||||
@@ -41,8 +44,8 @@ namespace StarsiegeBot
|
||||
string line = "Something went wrong.";
|
||||
if (target == null)
|
||||
{
|
||||
int choice = rnd.Next(0, GenericDeathMessages.Length);
|
||||
line = GenericDeathMessages[choice];
|
||||
int choice = rnd.Next(0, dmLines.generic.Length);
|
||||
line = dmLines.generic[choice];
|
||||
await ctx.RespondAsync(string.Format(line, ctx.Message.Author.Mention));
|
||||
}
|
||||
else
|
||||
@@ -50,13 +53,13 @@ namespace StarsiegeBot
|
||||
int opt = rnd.Next(1, 3);
|
||||
if (opt == 1)
|
||||
{
|
||||
int choice = rnd.Next(0, ActiveDeathMessages.Length);
|
||||
line = ActiveDeathMessages[choice];
|
||||
int choice = rnd.Next(0, dmLines.active.Length);
|
||||
line = dmLines.active[choice];
|
||||
}
|
||||
else if (opt == 2)
|
||||
{
|
||||
int choice = rnd.Next(0, PassiveDeathMessages.Length);
|
||||
line = PassiveDeathMessages[choice];
|
||||
int choice = rnd.Next(0, dmLines.passive.Length);
|
||||
line = dmLines.passive[choice];
|
||||
}
|
||||
await ctx.RespondAsync(string.Format(line, ctx.Message.Author.Mention, target.Mention));
|
||||
}
|
||||
@@ -67,14 +70,15 @@ namespace StarsiegeBot
|
||||
public async Task DeathMessageCount(CommandContext ctx)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
await ctx.RespondAsync($"\r\nActive: {ActiveDeathMessages.Length}\r\nPassive: {PassiveDeathMessages.Length}\r\nGeneric: {GenericDeathMessages.Length}");
|
||||
await ctx.RespondAsync($"\r\nActive: {dmLines.active.Length}\r\nPassive: {dmLines.passive.Length}\r\nGeneric: {dmLines.generic.Length}");
|
||||
}
|
||||
|
||||
[Command("Add")]
|
||||
public async Task DeathMessageNew(CommandContext ctx, [RemainingText] string str)
|
||||
[Description("Adds a message to the Pending Death Message Queue. Generic Death Messages require just a [Killed] while any other death message requires both a [Killed] and a [Killer] tags. These will be replaced with the correct information in game, and in the usage of random DM generation.")]
|
||||
public async Task DeathMessageNew(CommandContext ctx, [RemainingText,Description("The Death Message you want added. See help section.")] string msg)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
await Program.notify.SendMessageAsync($"{ctx.Message.Author.Username} wantes to add the death messages. ```{str}```");
|
||||
await Program.notify.SendMessageAsync($"{ctx.Message.Author.Username} wantes to add the death messages. ```{msg}```");
|
||||
await ctx.RespondAsync("Your request has been added to the pending queue of requests.");
|
||||
}
|
||||
|
||||
@@ -92,24 +96,24 @@ namespace StarsiegeBot
|
||||
|
||||
using StreamWriter file = new StreamWriter("deathmessages.cs");
|
||||
|
||||
await file.WriteLineAsync($"$deathMessage::genericCount = {GenericDeathMessages.Length};");
|
||||
await file.WriteLineAsync($"$deathMessage::activeCount = {ActiveDeathMessages.Length};");
|
||||
await file.WriteLineAsync($"$deathMessage::passiveCount = {PassiveDeathMessages.Length};\r\n");
|
||||
await file.WriteLineAsync($"$deathMessage::genericCount = {dmLines.generic.Length};");
|
||||
await file.WriteLineAsync($"$deathMessage::activeCount = {dmLines.active.Length};");
|
||||
await file.WriteLineAsync($"$deathMessage::passiveCount = {dmLines.passive.Length};\r\n");
|
||||
|
||||
int count = 0;
|
||||
foreach (string death in GenericDeathMessages)
|
||||
foreach (string death in dmLines.generic)
|
||||
{
|
||||
await file.WriteLineAsync(string.Format($"$deathMessage::generic{count} = \"{death}\";", "%s", "%s"));
|
||||
count++;
|
||||
}
|
||||
count = 0;
|
||||
foreach (string death in ActiveDeathMessages)
|
||||
foreach (string death in dmLines.active)
|
||||
{
|
||||
await file.WriteLineAsync(string.Format($"$deathMessage::active{count} = \"{death}\";", "%s", "%s"));
|
||||
count++;
|
||||
}
|
||||
count = 0;
|
||||
foreach (string death in PassiveDeathMessages)
|
||||
foreach (string death in dmLines.passive)
|
||||
{
|
||||
await file.WriteLineAsync(string.Format($"$deathMessage::passive{count} = \"{death}\";", "%s", "%s"));
|
||||
count++;
|
||||
@@ -124,4 +128,18 @@ namespace StarsiegeBot
|
||||
await ctx.RespondAsync(msg);
|
||||
}
|
||||
}
|
||||
class DeathMessageLines
|
||||
{
|
||||
[JsonProperty("active")]
|
||||
public string[] active { get; set; }
|
||||
[JsonProperty("passive")]
|
||||
public string[] passive { get; set; }
|
||||
[JsonProperty("generic")]
|
||||
public string[] generic { get; set; }
|
||||
|
||||
public string[] flagged { get; set; }
|
||||
|
||||
public string[] queue { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user