Compare commits
1 Commits
6159856c36
...
e07c22b7e3
Author | SHA1 | Date | |
---|---|---|---|
|
e07c22b7e3 |
@ -14,10 +14,10 @@ namespace CuffedFrenemies;
|
|||||||
|
|
||||||
public class CuffedFrenemies : Plugin
|
public class CuffedFrenemies : Plugin
|
||||||
{
|
{
|
||||||
public override string Name => "CuffedFrenemies";
|
public override string Name => "GamblingCoin";
|
||||||
public override string Author => "Code002Lover";
|
public override string Author => "Code002Lover";
|
||||||
public override Version Version { get; } = new(1, 0, 0);
|
public override Version Version { get; } = new(1, 0, 0);
|
||||||
public override string Description => "Cuff your enemies";
|
public override string Description => "Gamble your life away";
|
||||||
public override Version RequiredApiVersion { get; } = new (LabApiProperties.CompiledVersion);
|
public override Version RequiredApiVersion { get; } = new (LabApiProperties.CompiledVersion);
|
||||||
|
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
@ -44,6 +44,23 @@ public class CuffedFrenemies : Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ev.Target.RoleBase is Scp3114Role scp3114)
|
||||||
|
{
|
||||||
|
var stolenRole = scp3114.CurIdentity.StolenRole;
|
||||||
|
var ragdoll = scp3114.CurIdentity.Ragdoll.Info;
|
||||||
|
switch (stolenRole)
|
||||||
|
{
|
||||||
|
case RoleTypeId.ChaosConscript or RoleTypeId.ChaosMarauder or RoleTypeId.ChaosRepressor
|
||||||
|
or RoleTypeId.ChaosRifleman:
|
||||||
|
scp3114.CurIdentity.Ragdoll.Info = new RagdollData(ragdoll.OwnerHub, ragdoll.Handler, RoleTypeId.NtfPrivate, ragdoll.StartPosition, ragdoll.StartRotation, ragdoll.Nickname, ragdoll.CreationTime);
|
||||||
|
return;
|
||||||
|
case RoleTypeId.NtfPrivate or RoleTypeId.NtfCaptain or RoleTypeId.NtfSergeant
|
||||||
|
or RoleTypeId.NtfSpecialist:
|
||||||
|
scp3114.CurIdentity.Ragdoll.Info = new RagdollData(ragdoll.OwnerHub, ragdoll.Handler, RoleTypeId.ChaosConscript, ragdoll.StartPosition, ragdoll.StartRotation, ragdoll.Nickname, ragdoll.CreationTime);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ev.Target.Team is Team.SCPs or Team.Dead)
|
if (ev.Target.Team is Team.SCPs or Team.Dead)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -5,7 +5,7 @@ namespace GamblingCoin
|
|||||||
|
|
||||||
public class GamblingCoinChancesConfig
|
public class GamblingCoinChancesConfig
|
||||||
{
|
{
|
||||||
public int NukeChance { get; set; } = 10;
|
public int NukeChance { get; set; } = 20;
|
||||||
public int SpawnWaveChance { get; set; } = 150;
|
public int SpawnWaveChance { get; set; } = 150;
|
||||||
public int CommonItemChance { get; set; } = 600;
|
public int CommonItemChance { get; set; } = 600;
|
||||||
public int UncommonItemChance { get; set; } = 400;
|
public int UncommonItemChance { get; set; } = 400;
|
||||||
@ -14,16 +14,15 @@ namespace GamblingCoin
|
|||||||
public int LegendaryItemChance { get; set; } = 30;
|
public int LegendaryItemChance { get; set; } = 30;
|
||||||
public int RandomTeleportChance { get; set; } = 200;
|
public int RandomTeleportChance { get; set; } = 200;
|
||||||
public int StealItemChance { get; set; } = 100;
|
public int StealItemChance { get; set; } = 100;
|
||||||
public int ExplosionChance { get; set; } = 40;
|
public int ExplosionChance { get; set; } = 15;
|
||||||
public int AntiMicroChance { get; set; } = 10;
|
public int AntiMicroChance { get; set; } = 10;
|
||||||
public int GrenadeChance { get; set; } = 50;
|
public int GrenadeChance { get; set; } = 50;
|
||||||
public int PocketDimensionChance { get; set; } = 30;
|
public int PocketDimensionChance { get; set; } = 75;
|
||||||
public int SwitchInventoryChance { get; set; } = 150;
|
public int SwitchInventoryChance { get; set; } = 150;
|
||||||
public int PositiveEffectChance { get; set; } = 300;
|
public int PositiveEffectChance { get; set; } = 300;
|
||||||
public int NegativeEffectChance { get; set; } = 350;
|
public int NegativeEffectChance { get; set; } = 250;
|
||||||
public int AdvancedPositiveEffectChance { get; set; } = 150;
|
public int AdvancedPositiveEffectChance { get; set; } = 150;
|
||||||
public int AdvancedNegativeEffectChance { get; set; } = 250;
|
public int AdvancedNegativeEffectChance { get; set; } = 250;
|
||||||
public int RemoveCoinChance { get; set; } = 300;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GamblingCoinMessages
|
public class GamblingCoinMessages
|
||||||
@ -100,6 +99,7 @@ namespace GamblingCoin
|
|||||||
ItemType.KeycardO5,
|
ItemType.KeycardO5,
|
||||||
ItemType.MicroHID,
|
ItemType.MicroHID,
|
||||||
ItemType.Jailbird,
|
ItemType.Jailbird,
|
||||||
|
ItemType.ParticleDisruptor,
|
||||||
ItemType.GunCom45,
|
ItemType.GunCom45,
|
||||||
ItemType.Coin
|
ItemType.Coin
|
||||||
};
|
};
|
||||||
@ -148,19 +148,17 @@ namespace GamblingCoin
|
|||||||
|
|
||||||
public AdvancedEffectSettings AdvancedNegative { get; set; } = new()
|
public AdvancedEffectSettings AdvancedNegative { get; set; } = new()
|
||||||
{
|
{
|
||||||
Effects = new[] { nameof(InsufficientLighting), nameof(AmnesiaVision) },
|
Effects = new[] { nameof(InsufficientLighting) },
|
||||||
Settings = new Dictionary<string, EffectSettings>
|
Settings = new Dictionary<string, EffectSettings>
|
||||||
{
|
{
|
||||||
{ nameof(InsufficientLighting), new EffectSettings(1, 20f, true) },
|
{ nameof(InsufficientLighting), new EffectSettings(1, 20f, true) }
|
||||||
{ nameof(AmnesiaVision), new EffectSettings(3, 30f, true) },
|
|
||||||
{ nameof(Bleeding), new EffectSettings(3, 40f, true) },
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AdvancedEffectSettings
|
public class AdvancedEffectSettings
|
||||||
{
|
{
|
||||||
public string[] Effects { get; set; }
|
public String[] Effects { get; set; }
|
||||||
public Dictionary<string, EffectSettings> Settings { get; set; }
|
public Dictionary<string, EffectSettings> Settings { get; set; }
|
||||||
|
|
||||||
public AdvancedEffectSettings(){}
|
public AdvancedEffectSettings(){}
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
using System.Diagnostics;
|
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using CustomPlayerEffects;
|
|
||||||
using InventorySystem.Items;
|
|
||||||
using LabApi.Events.Arguments.PlayerEvents;
|
using LabApi.Events.Arguments.PlayerEvents;
|
||||||
using LabApi.Features.Wrappers;
|
using LabApi.Features.Wrappers;
|
||||||
using MapGeneration;
|
using MapGeneration;
|
||||||
@ -10,7 +7,6 @@ using PlayerRoles;
|
|||||||
using Respawning.Waves;
|
using Respawning.Waves;
|
||||||
using Utils;
|
using Utils;
|
||||||
using Logger = LabApi.Features.Console.Logger;
|
using Logger = LabApi.Features.Console.Logger;
|
||||||
using MicroHIDItem = InventorySystem.Items.MicroHID.MicroHIDItem;
|
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
namespace GamblingCoin
|
namespace GamblingCoin
|
||||||
@ -64,55 +60,15 @@ namespace GamblingCoin
|
|||||||
.AddAction(x =>
|
.AddAction(x =>
|
||||||
{
|
{
|
||||||
x.Player.SendBroadcast(configMessages.LegendaryItemSpawnMessage, configGameplay.BroadcastDuration);
|
x.Player.SendBroadcast(configMessages.LegendaryItemSpawnMessage, configGameplay.BroadcastDuration);
|
||||||
|
SpawnRandomItemAtPlayer(x.Player, configGameplay.Items.LegendaryItems);
|
||||||
var player = x.Player;
|
|
||||||
var items = configGameplay.Items.LegendaryItems;
|
|
||||||
|
|
||||||
var itemIndex = Random.Range(0, items.Length);
|
|
||||||
var item = items[itemIndex];
|
|
||||||
|
|
||||||
var pickup = Pickup.Create(item, player.Position + new UnityEngine.Vector3(0,1,0));
|
|
||||||
if (pickup == null) return;
|
|
||||||
|
|
||||||
if (item is ItemType.MicroHID)
|
|
||||||
{
|
|
||||||
var host = Player.List.First(player1 => player1.IsHost);
|
|
||||||
var micro = host.AddItem(pickup)!.Base;
|
|
||||||
|
|
||||||
var microItem = (MicroHIDItem)micro;
|
|
||||||
microItem.EnergyManager.ServerSetEnergy(microItem.ItemId.SerialNumber, 100);
|
|
||||||
|
|
||||||
var newPickup = host.DropItem(micro);
|
|
||||||
newPickup.Position = player.Position + new UnityEngine.Vector3(0, 1, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pickup.Spawn();
|
|
||||||
}, configChances.LegendaryItemChance)
|
}, configChances.LegendaryItemChance)
|
||||||
.AddAction(x =>
|
.AddAction(x =>
|
||||||
{
|
{
|
||||||
x.Player.SendBroadcast(configMessages.RandomTeleportMessage, configGameplay.BroadcastDuration);
|
x.Player.SendBroadcast(configMessages.RandomTeleportMessage, configGameplay.BroadcastDuration);
|
||||||
|
|
||||||
var randomRoom = Map.GetRandomRoom();
|
var randomRoom = Map.GetRandomRoom();
|
||||||
if (randomRoom == null) return;
|
if (randomRoom == null) return;
|
||||||
|
|
||||||
var isInOtherZone = randomRoom is { Zone: FacilityZone.Other };
|
|
||||||
var isDetonated = Warhead.IsDetonated;
|
|
||||||
var isDecontaminating = Decontamination.IsDecontaminating;
|
|
||||||
|
|
||||||
var isInDetonatedZone = isDetonated && randomRoom.Zone is FacilityZone.HeavyContainment
|
|
||||||
or FacilityZone.LightContainment or FacilityZone.Entrance;
|
|
||||||
var isInDecontaminatedZone = isDecontaminating && randomRoom.Zone is FacilityZone.LightContainment;
|
|
||||||
while (isInOtherZone || isInDetonatedZone || isInDecontaminatedZone)
|
|
||||||
{
|
|
||||||
randomRoom = Map.GetRandomRoom();
|
|
||||||
if(randomRoom == null) return;
|
|
||||||
|
|
||||||
isInOtherZone = randomRoom is { Zone: FacilityZone.Other };
|
|
||||||
isInDetonatedZone = isDetonated && randomRoom.Zone is FacilityZone.HeavyContainment
|
|
||||||
or FacilityZone.LightContainment or FacilityZone.Entrance;
|
|
||||||
isInDecontaminatedZone = isDecontaminating && randomRoom.Zone is FacilityZone.LightContainment;
|
|
||||||
}
|
|
||||||
|
|
||||||
var newPos = randomRoom.Position;
|
var newPos = randomRoom.Position;
|
||||||
|
|
||||||
x.Player.Position = newPos + new UnityEngine.Vector3(0, configGameplay.TeleportHeightOffset, 0);;
|
x.Player.Position = newPos + new UnityEngine.Vector3(0, configGameplay.TeleportHeightOffset, 0);;
|
||||||
@ -129,7 +85,7 @@ namespace GamblingCoin
|
|||||||
|
|
||||||
x.Player.ClearInventory();
|
x.Player.ClearInventory();
|
||||||
|
|
||||||
TimedGrenadeProjectile.SpawnActive(x.Player.Position, ItemType.GrenadeHE, x.Player);
|
ExplosionUtils.ServerExplode(x.Player.ReferenceHub, ExplosionType.Custom);
|
||||||
}, configChances.ExplosionChance)
|
}, configChances.ExplosionChance)
|
||||||
.AddAction(x =>
|
.AddAction(x =>
|
||||||
{
|
{
|
||||||
@ -141,7 +97,9 @@ namespace GamblingCoin
|
|||||||
{
|
{
|
||||||
x.Player.SendBroadcast(configMessages.GrenadeMessage, configGameplay.BroadcastDuration);
|
x.Player.SendBroadcast(configMessages.GrenadeMessage, configGameplay.BroadcastDuration);
|
||||||
|
|
||||||
TimedGrenadeProjectile.SpawnActive(x.Player.Position, ItemType.GrenadeHE, x.Player, 2);
|
var grenade = (TimedGrenadeProjectile)Pickup.Create(ItemType.GrenadeHE, x.Player.Position);
|
||||||
|
grenade?.Spawn();
|
||||||
|
grenade?.FuseEnd();
|
||||||
}, configChances.GrenadeChance)
|
}, configChances.GrenadeChance)
|
||||||
.AddAction(x =>
|
.AddAction(x =>
|
||||||
{
|
{
|
||||||
@ -149,8 +107,6 @@ namespace GamblingCoin
|
|||||||
|
|
||||||
var newPos = Map.Rooms.First(roomIdentifier => roomIdentifier.Zone==FacilityZone.Other).Position;
|
var newPos = Map.Rooms.First(roomIdentifier => roomIdentifier.Zone==FacilityZone.Other).Position;
|
||||||
|
|
||||||
x.Player.ReferenceHub.playerEffectsController.ChangeState(nameof(Corroding),1, 999, true);
|
|
||||||
|
|
||||||
x.Player.Position = newPos + new UnityEngine.Vector3(0, configGameplay.TeleportHeightOffset, 0);
|
x.Player.Position = newPos + new UnityEngine.Vector3(0, configGameplay.TeleportHeightOffset, 0);
|
||||||
},
|
},
|
||||||
configChances.PocketDimensionChance)
|
configChances.PocketDimensionChance)
|
||||||
@ -200,11 +156,7 @@ namespace GamblingCoin
|
|||||||
{
|
{
|
||||||
x.Player.AddItem(randomPlayerItem.Type);
|
x.Player.AddItem(randomPlayerItem.Type);
|
||||||
}
|
}
|
||||||
}, configChances.SwitchInventoryChance)
|
}, configChances.SwitchInventoryChance);
|
||||||
.AddAction(x =>
|
|
||||||
{
|
|
||||||
x.Player.CurrentItem?.DropItem().Destroy();
|
|
||||||
}, configChances.RemoveCoinChance);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
using HintServiceMeow.Core.Enum;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Timers;
|
||||||
|
using HintServiceMeow.Core.Enum;
|
||||||
using HintServiceMeow.Core.Models.Hints;
|
using HintServiceMeow.Core.Models.Hints;
|
||||||
using HintServiceMeow.Core.Utilities;
|
using HintServiceMeow.Core.Utilities;
|
||||||
using LabApi.Events.Arguments.PlayerEvents;
|
using LabApi.Events.Arguments.PlayerEvents;
|
||||||
@ -8,9 +12,9 @@ using LabApi.Features.Console;
|
|||||||
using LabApi.Features.Wrappers;
|
using LabApi.Features.Wrappers;
|
||||||
using PlayerRoles;
|
using PlayerRoles;
|
||||||
using PlayerRoles.PlayableScps.Scp079;
|
using PlayerRoles.PlayableScps.Scp079;
|
||||||
|
using PlayerRoles.PlayableScps.Scp079.GUI;
|
||||||
using PlayerRoles.PlayableScps.Scp096;
|
using PlayerRoles.PlayableScps.Scp096;
|
||||||
using PlayerRoles.PlayableScps.Scp3114;
|
using PlayerRoles.PlayableScps.Scp3114;
|
||||||
using Timer = System.Timers.Timer;
|
|
||||||
|
|
||||||
namespace SCPTeamHint
|
namespace SCPTeamHint
|
||||||
{
|
{
|
||||||
@ -47,7 +51,6 @@ namespace SCPTeamHint
|
|||||||
|
|
||||||
foreach (var player in Player.List)
|
foreach (var player in Player.List)
|
||||||
{
|
{
|
||||||
if (player.IsDummy || player.IsHost) continue;
|
|
||||||
if (!player.IsSCP) continue;
|
if (!player.IsSCP) continue;
|
||||||
|
|
||||||
var text = $" <size=25><color=red>{player.RoleBase.RoleName}</color> | <color=#6761cd>{player.HumeShield}</color> | <color=#da0101>{player.Health}</color> | <color=grey>{player.Zone}</color></size> ";
|
var text = $" <size=25><color=red>{player.RoleBase.RoleName}</color> | <color=#6761cd>{player.HumeShield}</color> | <color=#da0101>{player.Health}</color> | <color=grey>{player.Zone}</color></size> ";
|
||||||
|
@ -19,14 +19,6 @@
|
|||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Northwood.LabAPI" Version="1.0.2" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="0Harmony">
|
<Reference Include="0Harmony">
|
||||||
<HintPath>..\dependencies\0Harmony.dll</HintPath>
|
<HintPath>..\dependencies\0Harmony.dll</HintPath>
|
||||||
@ -47,4 +39,8 @@
|
|||||||
<HintPath>..\dependencies\UnityEngine.CoreModule.dll</HintPath>
|
<HintPath>..\dependencies\UnityEngine.CoreModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Northwood.LabAPI" Version="1.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user