Skip to content

Commit

Permalink
Fix for allah mode
Browse files Browse the repository at this point in the history
  • Loading branch information
IntelSDM committed Aug 26, 2023
1 parent ad5fed8 commit 77095bf
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions 7DTD/Misc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ void Update()

try
{
System.Random rand = new System.Random();



foreach (EntityPlayer player in KillList)
{
System.Random rand = new System.Random();
int randsource = 0;
int randtype = 0;
randsource = rand.Next(0, 1);
Expand Down Expand Up @@ -121,19 +123,40 @@ void Update()
{ 24, EnumDamageTypes.Suicide },
{ 25, EnumDamageTypes.Toxic },
{ 26, EnumDamageTypes.VehicleInside }};
public static void KillEveryone()
{
// kill the entire server, helps you blend in
foreach (EntityPlayer player in GameManager.Instance.World.Players.list)
{
if (player == null && !player.IsAlive())
continue; // check if player is killable
KillPlayer(player);
}
}
public static void KillEveryoneElse()
{
// kills everyone but you
foreach (EntityPlayer player in Esp.Player.PlayerList)
{
if (player == null && !player.IsAlive())
continue; // check if player is killable
KillPlayer(player);
}
}
public static void KillPlayer(EntityPlayer player)
{
System.Random rand = new System.Random();
int randsource = 0;
int randtype = 0;
randsource = rand.Next(0, 1);
randtype = rand.Next(0, 26);
int randdam = rand.Next(0, 100);
EnumDamageSource damsource = DamageSourceDict[randsource];
EnumDamageTypes damtype = DamageTypeDict[randtype];

// server plugins and admin only check for the concuss damage source, you should randomize the damage source to be different for all different damage sources and types.
DamageSource source = new DamageSource(damsource, damtype);
player.DamageEntity(source, player.Health, false, 1); // do it for their entire health, nothing more nothing less. you could do 1 health at a time to troll.
player.DamageEntity(source, player.Health + randdam, false, 1); // do it for their entire health, nothing more nothing less. you could do 1 health at a time to troll.
}
public static void StartConstantlyKillPlayer(EntityPlayer player)
{
Expand Down Expand Up @@ -420,10 +443,9 @@ void Worlds()
{
if (Globals.Config.LocalPlayer.AllahMode)
{
System.Random rand = new System.Random();
GameManager.Instance.persistentLocalPlayer.EntityId = rand.Next(0, 1000000);
GameManager.Instance.persistentLocalPlayer.PlayerName = rand.Next(0, 1000000).ToString();
Globals.LocalPlayer.entityId = rand.Next(100000, 100000000); // spam change our entity id so the server has no idea who we are, prevents the server banning you somehow.

foreach (EntityPlayer player in Esp.Player.PlayerList)
Globals.LocalPlayer.entityId = player.entityId; // spam change our entity id so the server has no idea who we are, prevents the server banning you somehow.
}
}
catch { }
Expand Down Expand Up @@ -467,28 +489,7 @@ void Worlds()
catch { }
}

public static void KillEveryone()
{
// kill the entire server, helps you blend in
foreach (EntityPlayer player in GameManager.Instance.World.Players.list)
{
if (player == null && !player.IsAlive())
continue; // check if player is killable
DamageSource source = new DamageSource(EnumDamageSource.External, EnumDamageTypes.VehicleInside);
player.DamageEntity(source,1000000,false,1); // kill them
}
}
public static void KillEveryoneElse()
{
// kills everyone but you
foreach (EntityPlayer player in Esp.Player.PlayerList)
{
if (player == null && !player.IsAlive())
continue; // check if player is killable
DamageSource source = new DamageSource(EnumDamageSource.External, EnumDamageTypes.Sprain);
player.DamageEntity(source, 1000000, false, 1); // kill
}
}

public static void InstantCraft()
{
// allows you to craft instantly and at no cost and without blueprints
Expand Down

0 comments on commit 77095bf

Please sign in to comment.