添加项目文件。
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.vs/
|
||||
25
EXiled-NebulaMist-CP-NG-hint.sln
Normal file
25
EXiled-NebulaMist-CP-NG-hint.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34330.188
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EXiled-NebulaMist-CP-NG-hint", "EXiled-NebulaMist-CP-NG-hint\EXiled-NebulaMist-CP-NG-hint.csproj", "{B1726FB7-5E83-4DF1-B935-DE242CCF6020}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B1726FB7-5E83-4DF1-B935-DE242CCF6020}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B1726FB7-5E83-4DF1-B935-DE242CCF6020}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B1726FB7-5E83-4DF1-B935-DE242CCF6020}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B1726FB7-5E83-4DF1-B935-DE242CCF6020}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E9A787A4-DFCC-40AD-BA8F-208A732984D9}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
25
EXiled-NebulaMist-CP-NG-hint/AiLiShaLikeConfig.cs
Normal file
25
EXiled-NebulaMist-CP-NG-hint/AiLiShaLikeConfig.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled;
|
||||
using Exiled.API.Interfaces;
|
||||
using Exiled.API.Features;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
public class AiLiShaLikeConfig : IConfig
|
||||
{
|
||||
[Description("是否开启插件")]
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
public bool Debug { get; set; } = true;
|
||||
|
||||
//[Description("SCP站立多少秒后回血时间")]
|
||||
//public float Check { get; set; } = 7;
|
||||
//[Description("SCP站立回血血量")]
|
||||
//public float HealHP { get; set; } = 15f;
|
||||
}
|
||||
|
||||
}
|
||||
53
EXiled-NebulaMist-CP-NG-hint/Command/Client/CX.cs
Normal file
53
EXiled-NebulaMist-CP-NG-hint/Command/Client/CX.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using EXiled_NebulaMist_CP_NG_hint;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.Client
|
||||
{
|
||||
[CommandHandler(typeof(ClientCommandHandler))]
|
||||
public class CxCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "CX" };
|
||||
public string Description => "玩家信息查询";
|
||||
public string Command => "CX";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player p = Player.Get(sender);
|
||||
if (arguments.Count == 0)
|
||||
{
|
||||
Model.Player player = Mysql.GetPlayerInfo(p.RawUserId);
|
||||
Model.Playerinfo info = Mysql.GetInfo(p.RawUserId);
|
||||
XPData.XPPlayerData xpplayerData = XPData.PlayerXPDataManager[p.RawUserId];
|
||||
string playtimes = GetInformation.GetTimes(xpplayerData.Times);
|
||||
response = "\n↓CX指令查询结果↓\n" +
|
||||
$"玩家昵称: {p.Nickname}\n" +
|
||||
$"Steam64ID: {p.UserId}\n" +
|
||||
$"EXP: {player.exp}/{LevelTags.GetNextLevel(player.exp)}\n" +
|
||||
$"等级: Lv.{LevelTags.GetLevel(player.exp)} -- {LevelTags.GetLevelTag(LevelTags.GetLevel(player.exp))}\n" +
|
||||
$"服务器QQ群号: 473917754\n" +
|
||||
$"\n" +
|
||||
$"<color=#FFA500>D级人员击杀数</color>: {info.CdKills} | <color=#00FF00>混沌击杀数</color>: {info.CiKills}\n" +
|
||||
$"<color=#FFFF00>博士击杀数</color>: {info.ScKills} | <color=#0066CC>特遣队击杀数</color>: {info.MtfKills}\n" +
|
||||
$"<color=#FF0000>SCP击杀数</color>: {info.ScpKills}\n" +
|
||||
$"总死亡数: {info.DeadTimes}\n" +
|
||||
$"总击杀数: {info.AllKills} | MVP次数: {info.MvpTimes}\n" +
|
||||
$"\n" +
|
||||
$"你总共在服里游玩了 [{playtimes}] | 感谢你对本服的支持awa\n";
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
response = "!CX指令格式错误! 正确格式: CX";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
using Exiled.API.Features;
|
||||
using CommandSystem;
|
||||
using System;
|
||||
using System.Timers;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using EXiled_NebulaMist_CP_NG_hint;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.Client.Chat
|
||||
{
|
||||
[CommandHandler(typeof(ClientCommandHandler))]
|
||||
public class PublicCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "bc" };
|
||||
|
||||
public string Description => "来和大家聊天吧!";
|
||||
|
||||
string ICommand.Command => "Public Chat";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player = Player.Get(((CommandSender)sender).SenderId);
|
||||
if (player.IsMuted)
|
||||
{
|
||||
response = "很抱歉喔,你好像已经被管理员禁言了 QAQ";
|
||||
return false;
|
||||
}
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "错误格式 正确格式: .bc [内容]";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (HintManager.ChatLIST.Count >= 15)
|
||||
{
|
||||
response = "当前聊天信息过多,请稍后发送";
|
||||
return false;
|
||||
}
|
||||
|
||||
string[] colors = {
|
||||
"#FF1493", "#E453C8", "#B97AED", "#8596FF", "#53AAFF", "#33B8FF",
|
||||
"#0BC4FF", "#00D0FF", "#00DCFF", "#00E8FF", "#00F4FF", "#00FFFF"
|
||||
};
|
||||
|
||||
string playerName = player.Nickname;
|
||||
string message = string.Join(" ", arguments.Array, arguments.Offset, arguments.Count);
|
||||
string Message;
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
if (player.RankName == null)
|
||||
{
|
||||
Message = $"<b><size=22><color=#00FF7F>[全局]</color><color={Misc.ToHex(player.Role.Color)}>[{GetInformation.GET_Role_Type(player.Role.Type)}]</color>{playerName}</color> 说: {message}</size></b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
string rankName = player.RankName;
|
||||
if (playerInfo.badge_color == "cs")
|
||||
{
|
||||
string coloredRankName = "";
|
||||
for (int i = 0; i < rankName.Length; i++)
|
||||
{
|
||||
int colorIndex = i % colors.Length;
|
||||
coloredRankName += $"<color={colors[colorIndex]}>{rankName[i]}</color>";
|
||||
}
|
||||
|
||||
Message = $"<b><size=22><color=#00FF7F>[全局]</color><color={Misc.ToHex(player.Role.Color)}>[{GetInformation.GET_Role_Type(player.Role.Type)}]</color>{playerName}</color> - {coloredRankName} 说: {message}</size></b>";
|
||||
}
|
||||
else if (playerInfo.badge_color == "")
|
||||
{
|
||||
Message = $"<b><size=22><color=#00FF7F>[全局]</color><color={Misc.ToHex(player.Role.Color)}>[{GetInformation.GET_Role_Type(player.Role.Type)}]</color>{playerName}</color> 说: {message}</size></b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
Message = $"<b><size=22><color=#00FF7F>[全局]</color><color={Misc.ToHex(player.Role.Color)}>[{GetInformation.GET_Role_Type(player.Role.Type)}]</color>{playerName}</color> - <color={playerInfo.badge_color}>{player.RankName}</color> 说: {message}</size></b>";
|
||||
}
|
||||
}
|
||||
|
||||
// 根据消息长度设置公告的持续时间
|
||||
//int messageLength = message.Length;
|
||||
//int broadcastDuration = messageLength <= 10 ? 3 : (messageLength <= 20 ? 5 : 10);
|
||||
|
||||
HintManager.ADDCHAT("10", Message, "11");
|
||||
foreach (var aplayer in Player.List)
|
||||
{
|
||||
aplayer.SendConsoleMessage($"[全局] {playerName} 说: {message}", "white");
|
||||
}
|
||||
response = "已成功发送全局消息";
|
||||
|
||||
// 将结果记录到服务器后台日志
|
||||
Log.Info($"[全局]玩家 {playerName} 说: {message}");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
127
EXiled-NebulaMist-CP-NG-hint/Command/Client/Chat/Team Command.cs
Normal file
127
EXiled-NebulaMist-CP-NG-hint/Command/Client/Chat/Team Command.cs
Normal file
@ -0,0 +1,127 @@
|
||||
using CommandSystem;
|
||||
using Discord;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Roles;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using EXiled_NebulaMist_CP_NG_hint;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.Client.Chat
|
||||
{
|
||||
[CommandHandler(typeof(ClientCommandHandler))]
|
||||
public class TeamCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "c" }; //指令的简称
|
||||
|
||||
public string Description => "来和队友聊天吧!"; //指令的描述
|
||||
|
||||
string ICommand.Command => "Team Chat"; //指令的全称
|
||||
public bool SanitizeResponse { get; }
|
||||
|
||||
private string[] colors = {
|
||||
"#FF1493", "#E453C8", "#B97AED", "#8596FF", "#53AAFF", "#33B8FF",
|
||||
"#0BC4FF", "#00D0FF", "#00DCFF", "#00E8FF", "#00F4FF", "#00FFFF"
|
||||
};
|
||||
|
||||
bool ICommand.Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player = Player.Get(((CommandSender)sender).SenderId);
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
if (player.IsMuted)
|
||||
{
|
||||
response = "很抱歉喔,你好像已经被管理员禁言了 QAQ";
|
||||
return false;
|
||||
}
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "错误格式 正确格式: .c [内容]"; //格式错误反馈的内容
|
||||
return false;
|
||||
}
|
||||
|
||||
if (HintManager.ChatLIST.Count >= 15)
|
||||
{
|
||||
response = "当前聊天信息过多,请稍后发送";
|
||||
return false;
|
||||
}
|
||||
|
||||
string playerName = player.Nickname;
|
||||
string message = string.Join(" ", arguments.Array, arguments.Offset, arguments.Count);
|
||||
string Message;
|
||||
string team = GetTeamName(player.Role.Side);
|
||||
if (player.RankName == null)
|
||||
{
|
||||
Message = $"<b><size=22><color=#00FF7F>[{team}]</color><color={Misc.ToHex(player.Role.Color)}>[{GetInformation.GET_Role_Type(player.Role.Type)}]</color>{playerName}</color> 说: {message}</size></b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
string rankName = player.RankName;
|
||||
if (playerInfo.badge_color == "cs")
|
||||
{
|
||||
string coloredRankName = "";
|
||||
for (int i = 0; i < rankName.Length; i++)
|
||||
{
|
||||
int colorIndex = i % colors.Length;
|
||||
coloredRankName += $"<color={colors[colorIndex]}>{rankName[i]}</color>";
|
||||
}
|
||||
|
||||
Message = $"<b><size=22><color=#00FF7F>[{team}]</color><color={Misc.ToHex(player.Role.Color)}>[{GetInformation.GET_Role_Type(player.Role.Type)}]</color>{playerName}</color> - {coloredRankName} 说: {message}</size></b>";
|
||||
}
|
||||
else if (playerInfo.badge_color == "")
|
||||
{
|
||||
Message = $"<b><size=22><color=#00FF7F>[{team}]</color><color={Misc.ToHex(player.Role.Color)}>[{GetInformation.GET_Role_Type(player.Role.Type)}]</color>{playerName}</color> 说: {message}</size></b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
Message = $"<b><size=22><color=#00FF7F>[{team}]</color><color={Misc.ToHex(player.Role.Color)}>[{GetInformation.GET_Role_Type(player.Role.Type)}]</color>{playerName}</color> - <color={playerInfo.badge_color}>{player.RankName}</color> 说: {message}</size></b>";
|
||||
}
|
||||
}
|
||||
int side = (int)player.Role.Side;
|
||||
HintManager.ADDCHAT("10".ToString(), Message, side.ToString());
|
||||
foreach (var aplayer in Player.List)
|
||||
{
|
||||
if (aplayer.Role.Side == player.Role.Side)
|
||||
{
|
||||
aplayer.SendConsoleMessage($"[{team}] {playerName} 说: {message}", "blue");
|
||||
}
|
||||
}
|
||||
|
||||
response = "已成功发送队内消息";
|
||||
// 将结果记录到服务器后台日志
|
||||
Log.Info("[" + team + "]" + playerName + " 说: " + message);
|
||||
|
||||
return true;
|
||||
}
|
||||
private string GetTeamName(Exiled.API.Enums.Side side)
|
||||
{
|
||||
switch (side)
|
||||
{
|
||||
case Exiled.API.Enums.Side.Scp:
|
||||
return "SCP电台";
|
||||
case Exiled.API.Enums.Side.Mtf:
|
||||
return "MTF电台";
|
||||
case Exiled.API.Enums.Side.ChaosInsurgency:
|
||||
return "CI电台";
|
||||
case Exiled.API.Enums.Side.None:
|
||||
return "似人电台";
|
||||
case Exiled.API.Enums.Side.Tutorial:
|
||||
return "管理电台";
|
||||
default:
|
||||
return "未知电台";
|
||||
}
|
||||
}
|
||||
|
||||
private string GetColoredRankName(string rankName)
|
||||
{
|
||||
string coloredRankName = "";
|
||||
for (int i = 0; i < rankName.Length; i++)
|
||||
{
|
||||
int colorIndex = i % colors.Length;
|
||||
coloredRankName += $"<color={colors[colorIndex]}>{rankName[i]}</color>";
|
||||
}
|
||||
return coloredRankName;
|
||||
}
|
||||
}
|
||||
}
|
||||
37
EXiled-NebulaMist-CP-NG-hint/Command/Client/HelpCommand.cs
Normal file
37
EXiled-NebulaMist-CP-NG-hint/Command/Client/HelpCommand.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.Client
|
||||
{
|
||||
[CommandHandler(typeof(ClientCommandHandler))] // 声明为命令处理程序
|
||||
public class HelpCommand : ICommand // 实现 ICommand 接口
|
||||
{
|
||||
public string[] Aliases => new string[] { "H" }; // 指令的简称
|
||||
|
||||
public string Description => "Emmm,I need some help!"; // 指令的描述
|
||||
|
||||
string ICommand.Command => "H"; // 指令的全称
|
||||
|
||||
bool ICommand.Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
if (arguments.Count != 0) // 判断参数数量是否为0
|
||||
{
|
||||
response = "错误格式 正确格式: .H | 你竟然触发了错误反馈,我都没触发过 o(╥﹏╥)o"; // 格式错误反馈的内容
|
||||
return false; // 返回执行失败
|
||||
}
|
||||
else
|
||||
{
|
||||
//正确显示
|
||||
response = "\n.H | 获取所有指令\n.GG | 快速自杀\n.TX | 投降 仅限D级人员\n.C | 发送队内消息\n.BC | 发送全局消息\n.CX | 查询信息\n祝你在本服游玩愉快\n服务器QQ群:473917754!";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
307
EXiled-NebulaMist-CP-NG-hint/Command/Client/Kill Command.cs
Normal file
307
EXiled-NebulaMist-CP-NG-hint/Command/Client/Kill Command.cs
Normal file
@ -0,0 +1,307 @@
|
||||
using CommandSystem; // 导入命令系统的命名空间
|
||||
using Exiled.API.Enums; // 导入 Exiled.API.Enums 的命名空间
|
||||
using Exiled.API.Features; // 导入 Exiled.API.Features 的命名空间
|
||||
using PlayerRoles; // 导入 PlayerRoles 的命名空间
|
||||
using System; // 导入 System 的命名空间
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.Client // 命名空间
|
||||
{
|
||||
[CommandHandler(typeof(ClientCommandHandler))] // 声明为命令处理程序
|
||||
public class KillCommand : ICommand // 实现 ICommand 接口
|
||||
{
|
||||
public string[] Aliases => new string[] { "gg" }; // 指令的简称
|
||||
|
||||
public string Description => "In-game kill command"; // 指令的描述
|
||||
|
||||
string ICommand.Command => "killyourself"; // 指令的全称
|
||||
|
||||
bool ICommand.Execute(ArraySegment<string> arguments, ICommandSender sender, out string response) // 执行指令
|
||||
{
|
||||
if (arguments.Count != 0) // 判断参数数量是否为0
|
||||
{
|
||||
response = "错误格式 正确格式: .gg | 你竟然触发了错误反馈,我都没触发过 o(╥﹏╥)o"; // 格式错误反馈的内容
|
||||
return false; // 返回执行失败
|
||||
}
|
||||
|
||||
Player player = Player.Get((CommandSender)sender); // 获取执行指令的玩家对象
|
||||
if (player.Role == RoleTypeId.Scp049 || player.Role == RoleTypeId.Scp079 || player.Role == RoleTypeId.Scp096 || player.Role == RoleTypeId.Scp106 || player.Role == RoleTypeId.Scp173 || player.Role == RoleTypeId.Scp939 || player.Role == RoleTypeId.Scp3114 || player.Role == RoleTypeId.Scp0492 || player.Role == RoleTypeId.Overwatch || player.Role == RoleTypeId.Spectator || player.Role == RoleTypeId.Filmmaker || player.Role == RoleTypeId.None) // 判断特殊玩家角色
|
||||
{
|
||||
if (player.Role == RoleTypeId.Scp049) // 判断玩家角色是否为SCP-049
|
||||
{
|
||||
Map.Broadcast(5, $"<size=35><color=#FF0000>SCP-049</color> [{player.Nickname}] 自杀了</size>"); // 在地图上广播SCP-049玩家的自杀消息
|
||||
player.Kill(DamageType.CardiacArrest); // 杀死SCP-049玩家
|
||||
|
||||
// 异步方法1
|
||||
Task PlayVoiceSubtitleAsync()
|
||||
{
|
||||
string voiceSubtitle = "SCP 0 4 9 .G1 .G3 SUCCESSFULLY RECONTAINMENT";
|
||||
Cassie.Message(voiceSubtitle, true, true, false);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 异步方法2
|
||||
async Task<Task> ShowSubtitleAsync()
|
||||
{
|
||||
string subtitle = "SCP-049已成功收容";
|
||||
// 延迟2秒执行
|
||||
await Task.Delay(2000);
|
||||
Cassie.Message(subtitle, false, false, true);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 同时执行两个异步方法
|
||||
async Task ExecuteBothAsync()
|
||||
{
|
||||
Task task1 = PlayVoiceSubtitleAsync();
|
||||
Task task2 = ShowSubtitleAsync();
|
||||
await Task.WhenAll(task1, task2);
|
||||
}
|
||||
|
||||
// 调用ExecuteBothAsync方法来同时执行两个函数
|
||||
_ = ExecuteBothAsync();
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Scp079) // 判断玩家角色是否为SCP-079
|
||||
{
|
||||
Map.Broadcast(5, $"<size=35><color=#FF0000>SCP-079</color> [{player.Nickname}] 自杀了</size>"); // 在地图上广播SCP-079玩家的自杀消息
|
||||
player.Kill(DamageType.CardiacArrest); // 杀死SCP-079玩家
|
||||
|
||||
// 异步方法1
|
||||
Task PlayVoiceSubtitleAsync()
|
||||
{
|
||||
string voiceSubtitle = "SCP 0 7 9 .G2 .G4 SUCCESSFULLY RECONTAINMENT";
|
||||
Cassie.Message(voiceSubtitle, true, true, false);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 异步方法2
|
||||
async Task<Task> ShowSubtitleAsync()
|
||||
{
|
||||
string subtitle = "SCP-079已成功收容";
|
||||
// 延迟2秒执行
|
||||
await Task.Delay(2000);
|
||||
Cassie.Message(subtitle, false, false, true);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 同时执行两个异步方法
|
||||
async Task ExecuteBothAsync()
|
||||
{
|
||||
Task task1 = PlayVoiceSubtitleAsync();
|
||||
Task task2 = ShowSubtitleAsync();
|
||||
await Task.WhenAll(task1, task2);
|
||||
}
|
||||
|
||||
// 调用ExecuteBothAsync方法来同时执行两个函数
|
||||
_ = ExecuteBothAsync();
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Scp096) // 判断玩家角色是否为SCP-096
|
||||
{
|
||||
Map.Broadcast(5, $"<size=35><color=#FF0000>SCP-096</color> [ {player.Nickname} ] 自杀了</size>"); // 在地图上广播SCP-096玩家的自杀消息
|
||||
player.Kill(DamageType.CardiacArrest); // 杀死SCP-096玩家
|
||||
|
||||
// 异步方法1
|
||||
Task PlayVoiceSubtitleAsync()
|
||||
{
|
||||
string voiceSubtitle = "SCP 0 9 6 .G1 .G2 SUCCESSFULLY RECONTAINMENT";
|
||||
Cassie.Message(voiceSubtitle, true, true, false);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 异步方法2
|
||||
async Task<Task> ShowSubtitleAsync()
|
||||
{
|
||||
string subtitle = "SCP-096已成功收容";
|
||||
// 延迟2秒执行
|
||||
await Task.Delay(2000);
|
||||
Cassie.Message(subtitle, false, false, true);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 同时执行两个异步方法
|
||||
async Task ExecuteBothAsync()
|
||||
{
|
||||
Task task1 = PlayVoiceSubtitleAsync();
|
||||
Task task2 = ShowSubtitleAsync();
|
||||
await Task.WhenAll(task1, task2);
|
||||
}
|
||||
|
||||
// 调用ExecuteBothAsync方法来同时执行两个函数
|
||||
_ = ExecuteBothAsync();
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Scp106) // 判断玩家角色是否为SCP-106
|
||||
{
|
||||
Map.Broadcast(5, $"<size=35><color=#FF0000>SCP-106</color> [ {player.Nickname} ] 自杀了</size>"); // 在地图上广播SCP-106玩家的自杀消息
|
||||
player.Kill(DamageType.CardiacArrest); // 杀死SCP-106玩家
|
||||
|
||||
// 异步方法1
|
||||
Task PlayVoiceSubtitleAsync()
|
||||
{
|
||||
string voiceSubtitle = "SCP 1 0 6 .G2 .G5 SUCCESSFULLY RECONTAINMENT";
|
||||
Cassie.Message(voiceSubtitle, true, true, false);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 异步方法2
|
||||
async Task<Task> ShowSubtitleAsync()
|
||||
{
|
||||
string subtitle = "SCP-106已成功收容";
|
||||
// 延迟2秒执行
|
||||
await Task.Delay(2000);
|
||||
Cassie.Message(subtitle, false, false, true);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 同时执行两个异步方法
|
||||
async Task ExecuteBothAsync()
|
||||
{
|
||||
Task task1 = PlayVoiceSubtitleAsync();
|
||||
Task task2 = ShowSubtitleAsync();
|
||||
await Task.WhenAll(task1, task2);
|
||||
}
|
||||
|
||||
// 调用ExecuteBothAsync方法来同时执行两个函数
|
||||
_ = ExecuteBothAsync();
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Scp173) // 判断玩家角色是否为SCP-173
|
||||
{
|
||||
Map.Broadcast(5, $"<size=35><color=#FF0000>SCP-173</color> [ {player.Nickname} ] 自杀了</size>"); // 在地图上广播SCP-173玩家的自杀消息
|
||||
player.Kill(DamageType.CardiacArrest); // 杀死SCP-173玩家
|
||||
|
||||
// 异步方法1
|
||||
Task PlayVoiceSubtitleAsync()
|
||||
{
|
||||
string voiceSubtitle = "SCP 1 7 3 .G3 .G1 SUCCESSFULLY RECONTAINMENT";
|
||||
Cassie.Message(voiceSubtitle, true, true, false);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 异步方法2
|
||||
async Task<Task> ShowSubtitleAsync()
|
||||
{
|
||||
string subtitle = "SCP-173已成功收容";
|
||||
// 延迟2秒执行
|
||||
await Task.Delay(2000);
|
||||
Cassie.Message(subtitle, false, false, true);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 同时执行两个异步方法
|
||||
async Task ExecuteBothAsync()
|
||||
{
|
||||
Task task1 = PlayVoiceSubtitleAsync();
|
||||
Task task2 = ShowSubtitleAsync();
|
||||
await Task.WhenAll(task1, task2);
|
||||
}
|
||||
|
||||
// 调用ExecuteBothAsync方法来同时执行两个函数
|
||||
_ = ExecuteBothAsync();
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Scp939) // 判断玩家角色是否为SCP-939
|
||||
{
|
||||
Map.Broadcast(5, $"<size=35><color=#FF0000>SCP-939</color> [ {player.Nickname} ] 自杀了</size>"); // 在地图上广播SCP-939玩家的自杀消息
|
||||
player.Kill(DamageType.CardiacArrest); // 杀死SCP-939玩家
|
||||
|
||||
// 异步方法1
|
||||
Task PlayVoiceSubtitleAsync()
|
||||
{
|
||||
string voiceSubtitle = "SCP 9 3 9 .G1 .G4 SUCCESSFULLY RECONTAINMENT";
|
||||
Cassie.Message(voiceSubtitle, true, true, false);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 异步方法2
|
||||
async Task<Task> ShowSubtitleAsync()
|
||||
{
|
||||
string subtitle = "SCP-939已成功收容";
|
||||
// 延迟2秒执行
|
||||
await Task.Delay(2000);
|
||||
Cassie.Message(subtitle, false, false, true);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 同时执行两个异步方法
|
||||
async Task ExecuteBothAsync()
|
||||
{
|
||||
Task task1 = PlayVoiceSubtitleAsync();
|
||||
Task task2 = ShowSubtitleAsync();
|
||||
await Task.WhenAll(task1, task2);
|
||||
}
|
||||
|
||||
// 调用ExecuteBothAsync方法来同时执行两个函数
|
||||
_ = ExecuteBothAsync();
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Scp3114) // 判断玩家角色是否为SCP-3114
|
||||
{
|
||||
Map.Broadcast(5, $"<size=35><color=#FF0000>SCP-3114</color> [ {player.Nickname} ] 自杀了</size>"); // 在地图上广播SCP-3114玩家的自杀消息
|
||||
player.Kill(DamageType.CardiacArrest); // 杀死SCP-3114玩家
|
||||
|
||||
// 异步方法1
|
||||
Task PlayVoiceSubtitleAsync()
|
||||
{
|
||||
string voiceSubtitle = "SCP 3 1 1 4 .G5 .G3 SUCCESSFULLY RECONTAINMENT";
|
||||
Cassie.Message(voiceSubtitle, true, true, false);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 异步方法2
|
||||
async Task<Task> ShowSubtitleAsync()
|
||||
{
|
||||
string subtitle = "SCP-3114已成功收容";
|
||||
// 延迟2秒执行
|
||||
await Task.Delay(2000);
|
||||
Cassie.Message(subtitle, false, false, true);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// 同时执行两个异步方法
|
||||
async Task ExecuteBothAsync()
|
||||
{
|
||||
Task task1 = PlayVoiceSubtitleAsync();
|
||||
Task task2 = ShowSubtitleAsync();
|
||||
await Task.WhenAll(task1, task2);
|
||||
}
|
||||
|
||||
// 调用ExecuteBothAsync方法来同时执行两个函数
|
||||
_ = ExecuteBothAsync();
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Scp0492) // 判断玩家角色是否为SCP-049-2
|
||||
{
|
||||
Map.Broadcast(5, $"<size=35><color=#FF0000>SCP-049-2</color> [ {player.Nickname} ] 自杀了</size>"); // 在地图上广播SCP-049-2玩家的自杀消息
|
||||
player.Kill(DamageType.CardiacArrest); // 杀死SCP-049-2玩家
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Overwatch) // 判断玩家角色是否为监管者
|
||||
{
|
||||
response = "不支持角色";// 回复玩家错误信息
|
||||
return false;// 返回执行失败
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Spectator) // 判断玩家角色是否为观察者
|
||||
{
|
||||
response = "你已经在天堂辣";// 回复玩家错误信息
|
||||
return false;// 返回执行失败
|
||||
}
|
||||
else if (player.Role == RoleTypeId.Filmmaker) // 判断玩家角色是否为导演
|
||||
{
|
||||
response = "不支持角色";// 回复玩家错误信息
|
||||
return false;// 返回执行失败
|
||||
}
|
||||
else if (player.Role == RoleTypeId.None) // 判断玩家是否处于无身份状态
|
||||
{
|
||||
response = "游戏尚未开始无法使用";// 回复玩家错误信息
|
||||
return false;// 返回执行失败
|
||||
}
|
||||
}
|
||||
else // 如果玩家角色不是SCP
|
||||
{
|
||||
// 杀死玩家
|
||||
player.Kill("自杀");
|
||||
}
|
||||
|
||||
// 将结果记录到服务器后台日志
|
||||
Log.Info($"玩家 {player.Nickname} 使用了自杀指令");
|
||||
|
||||
response = "自杀成功"; // 设置回复的内容
|
||||
return true; // 返回执行成功
|
||||
}
|
||||
}
|
||||
}
|
||||
57
EXiled-NebulaMist-CP-NG-hint/Command/Client/TXCommand.cs
Normal file
57
EXiled-NebulaMist-CP-NG-hint/Command/Client/TXCommand.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Items;
|
||||
using Exiled.CustomItems.API;
|
||||
using InventorySystem;
|
||||
using InventorySystem.Items;
|
||||
using PlayerRoles;
|
||||
using PluginAPI.Core.Items;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.Client
|
||||
{
|
||||
[CommandHandler(typeof(ClientCommandHandler))]
|
||||
public class TXCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "TX" };
|
||||
public string Description => "J'abandonne et ne tire pas!";
|
||||
string ICommand.Command => "TouXiang";
|
||||
|
||||
[Obsolete]
|
||||
bool ICommand.Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player = Player.Get(((CommandSender)sender).SenderId);
|
||||
|
||||
|
||||
|
||||
if (arguments.Count != 0)
|
||||
{
|
||||
response = "错误格式 正确格式: .TX | 你竟然触发了错误反馈,我都没触发过 o(╥﹏╥)o";
|
||||
return false;
|
||||
}
|
||||
if (player.Role != RoleTypeId.ClassD)
|
||||
{
|
||||
response = "此指令仅限D级人员可使用!";
|
||||
return false;
|
||||
}
|
||||
if (player.Role == RoleTypeId.ClassD)
|
||||
{
|
||||
player.Role.Set(RoleTypeId.FacilityGuard, Exiled.API.Enums.SpawnReason.ForceClass);
|
||||
player.ClearInventory();
|
||||
player.AddItem(ItemType.GunCOM18);
|
||||
player.AddItem(ItemType.Painkillers);
|
||||
player.AddItem(ItemType.KeycardGuard);
|
||||
player.AddItem(ItemType.Radio);
|
||||
response = "你投降后被基金会带去补充安保了!";
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
response = "未知错误";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using MEC;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class AiLiShadebugCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "AiLiShadebug" };
|
||||
public string Description => "该指令用于显示一些信息通常只是给星野我看信息来用,我不清楚你输这个指令是为了什么?";
|
||||
public string Command => "alsdebug";
|
||||
public bool SanitizeResponse { get; }
|
||||
public static List<Player> AiLiShadebugList = new List<Player>();
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player = Player.Get(sender);
|
||||
if (arguments.Count > 0)
|
||||
{
|
||||
response = "参数数量不正确 用法: alsdebug";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player != null)
|
||||
{
|
||||
if (AiLiShadebugList.Contains(player))
|
||||
{
|
||||
AiLiShadebugList.Remove(player);
|
||||
response = $"已成功关闭AiLiShadebug!";
|
||||
return true;
|
||||
}
|
||||
AiLiShadebugList.Add(player);
|
||||
}
|
||||
|
||||
response = $"已成功开启AiLiShadebug!";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
using CommandSystem;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin.Custom_R_I
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class SpawnSpeicalItem : ICommand
|
||||
{
|
||||
public string Command { get; } = "ssi";
|
||||
|
||||
public string[] Aliases
|
||||
{
|
||||
get
|
||||
{
|
||||
return new string[]
|
||||
{
|
||||
"ssi"
|
||||
};
|
||||
}
|
||||
}
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return "刷新出一个特殊物品 :)";
|
||||
}
|
||||
}
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
bool result;
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "错误格式 正确格式: .ssi [玩家id] [特殊物品id]";
|
||||
result = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
string text = string.Join(" ", arguments.ToArray<string>());
|
||||
string[] array = text.Split(new char[]
|
||||
{
|
||||
' '
|
||||
});
|
||||
Player player = Player.Get(array[0]);
|
||||
if (player == null)
|
||||
{
|
||||
response = "无法找到指定玩家!";
|
||||
result = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
CustomItem.TryGive(player, uint.Parse(array[1]));
|
||||
response = "完成!";
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin.Custom_R_I
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class SpawnSpeicalRole : ICommand
|
||||
{
|
||||
public string Command { get; } = "ssr";
|
||||
|
||||
public string[] Aliases
|
||||
{
|
||||
get
|
||||
{
|
||||
return new string[]
|
||||
{
|
||||
"ssr"
|
||||
};
|
||||
}
|
||||
}
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return "刷新出一个特殊角色 :)";
|
||||
}
|
||||
}
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
bool result;
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "错误格式 正确格式: .ssr [玩家id] [特殊角色id]";
|
||||
result = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
string text = string.Join(" ", arguments.ToArray<string>());
|
||||
string[] array = text.Split(new char[]
|
||||
{
|
||||
' '
|
||||
});
|
||||
Player player = Player.Get(array[0]);
|
||||
if (player == null)
|
||||
{
|
||||
response = "无法找到指定玩家!";
|
||||
result = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
CustomRole.Get(uint.Parse(array[1])).AddRole(player);
|
||||
response = "完成!";
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class ItemsizeCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "si" };
|
||||
public string Description => "修改物品大小";
|
||||
public string Command => "sizeitem";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
if (arguments.Count < 3)
|
||||
{
|
||||
response = "参数数量不正确。用法: .sizei [x] [y] [z]";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!float.TryParse(arguments.At(0), out float x) || !float.TryParse(arguments.At(1), out float y) || !float.TryParse(arguments.At(2), out float z))
|
||||
{
|
||||
response = "x、y、z 必须是浮点数。用法: .sizei [x] [y] [z]";
|
||||
return false;
|
||||
}
|
||||
|
||||
Player player = Player.Get(sender);
|
||||
|
||||
if (player.CurrentItem == null)
|
||||
{
|
||||
response = "你手上没有任何物品!";
|
||||
return false;
|
||||
}
|
||||
player.CurrentItem.Scale = new UnityEngine.Vector3(x, y, z);
|
||||
|
||||
response = $"已将物品的大小修改为 x:{x}, y:{y}, z:{z}";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
EXiled-NebulaMist-CP-NG-hint/Command/RemoteAdmin/KillHint.cs
Normal file
39
EXiled-NebulaMist-CP-NG-hint/Command/RemoteAdmin/KillHint.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MEC;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using Hint = EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.ServerCoroutineHandle.Hint;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class CancellHintCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "ch" };
|
||||
public string Description => "该指令用于关闭Hint 其实没用,这只是来测试Protector的";
|
||||
public string Command => "cancellhint";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player = Player.Get(sender);
|
||||
if (arguments.Count > 0)
|
||||
{
|
||||
response = "参数数量不正确 用法: ch";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Timing.IsRunning(RoundStarted.hint_coroutine))
|
||||
{
|
||||
Timing.KillCoroutines(RoundStarted.hint_coroutine);
|
||||
}
|
||||
response = $"已成功关闭Hint显示";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class PlayerMusicPrCommand : ICommand
|
||||
{
|
||||
public static AudioPlayerBase playerBase;
|
||||
public string[] Aliases => new string[] { "pmr" };
|
||||
public string Description => "为自己播放一个自定义音频";
|
||||
public string Command => "playermusicpr";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player = Player.Get(sender);
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "参数数量不正确 用法: .pmr [音频名]";
|
||||
return false;
|
||||
}
|
||||
string name = arguments.At(0);
|
||||
|
||||
playerBase = Music.PlayMusicpr(name, 50, player);
|
||||
|
||||
response = $"已成功播放{name}.ogg";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class PlayerMusicPtCommand : ICommand
|
||||
{
|
||||
public static AudioPlayerBase playerBase;
|
||||
public string[] Aliases => new string[] { "pmt" };
|
||||
public string Description => "为团队播放一个自定义音频";
|
||||
public string Command => "playermusicpt";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player = Player.Get(sender);
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "参数数量不正确 用法: .pmt [音频名]";
|
||||
return false;
|
||||
}
|
||||
string name = arguments.At(0);
|
||||
|
||||
playerBase = Music.PlayMusicpt(name, 50, Side.Scp);
|
||||
|
||||
response = $"已成功播放{name}.ogg";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class PlayerMusicPuCommand : ICommand
|
||||
{
|
||||
public static AudioPlayerBase playerBase;
|
||||
public string[] Aliases => new string[] { "pmu" };
|
||||
public string Description => "为全体播放一个自定义音频";
|
||||
public string Command => "playermusicpu";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player = Player.Get(sender);
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "参数数量不正确 用法: .pmu [音频名]";
|
||||
return false;
|
||||
}
|
||||
string name = arguments.At(0);
|
||||
|
||||
playerBase = Music.PlayMusicpu(name, 50);
|
||||
|
||||
response = $"已成功播放{name}.ogg";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class PrivateMessageCommand : ICommand
|
||||
{
|
||||
public string Command { get; } = "tc";
|
||||
public string[] Aliases => new string[] { "tc" };
|
||||
public string Description => "向特定玩家发生信息";
|
||||
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "错误格式 正确格式: .tc [玩家id] [内容]"; //格式错误反馈的内容
|
||||
return false;
|
||||
}
|
||||
|
||||
string fullCommand = string.Join(" ", arguments.ToArray());
|
||||
string[] cmd_args = fullCommand.Split(' ');
|
||||
Player target_player = Player.Get(cmd_args[0]);
|
||||
if (target_player == null)
|
||||
{
|
||||
response = "没有寻找到玩家ID";
|
||||
return false;
|
||||
}
|
||||
XPData.AddDisplayMSG(target_player, "[管理员提醒]" + Player.Get(sender).Nickname + ":" + cmd_args[1], 17);
|
||||
response = "已经向对应玩家发送对应消息内容";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,198 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Permissions.Extensions;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.Restrict
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class EXPCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "xps" };
|
||||
public string Description => "修改玩家经验值";
|
||||
public string Command => "expsystem";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player1 = Player.Get(sender);
|
||||
string playerID = arguments.At(0);
|
||||
if (!int.TryParse(arguments.At(1), out int value))
|
||||
{
|
||||
response = "值必须是一个整数。用法: .xps [玩家ID] [值]";
|
||||
return false;
|
||||
}
|
||||
if (player1.RawUserId == "76561199184237638")
|
||||
{
|
||||
// 查找要修改经验值的玩家
|
||||
Player player2 = Player.List.FirstOrDefault(p => p.RawUserId == playerID);
|
||||
if (player2 == null)
|
||||
{
|
||||
response = $"找不到玩家 {playerID}";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 修改玩家经验值
|
||||
Mysql.SetExp(player2.RawUserId, value);
|
||||
|
||||
response = $"欢迎你!主人!(✿◠‿◠)\n已将玩家 {player2.Nickname} 的经验值修改为 {value}";
|
||||
return true;
|
||||
}
|
||||
if (!player1.CheckPermission(PlayerPermissions.SetGroup)) // 这里使用了 SetGroup 权限,你可以替换为适当的权限
|
||||
{
|
||||
response = "您没有执行此命令的权限!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arguments.Count < 2)
|
||||
{
|
||||
response = "参数数量不正确。用法: .xps [玩家ID] [值]";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 查找要修改经验值的玩家
|
||||
Player player = Player.List.FirstOrDefault(p => p.RawUserId == playerID);
|
||||
if (player == null)
|
||||
{
|
||||
response = $"找不到玩家 {playerID}";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 修改玩家经验值
|
||||
Mysql.SetExp(player.RawUserId,value);
|
||||
|
||||
response = $"已将玩家 {player.Nickname} 的经验值修改为 {value}";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class BadgeCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "bgs" };
|
||||
public string Description => "修改玩家称号";
|
||||
public string Command => "badgesystem";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player1 = Player.Get(sender);
|
||||
if (player1.RawUserId == "76561199184237638")
|
||||
{
|
||||
string playerID1 = arguments.At(0);
|
||||
string content1 = arguments.At(1);
|
||||
string color1 = arguments.At(2);
|
||||
|
||||
// 查找要修改称号的玩家
|
||||
Player player2 = Player.List.FirstOrDefault(p => p.RawUserId == playerID1);
|
||||
if (player2 == null)
|
||||
{
|
||||
response = $"找不到玩家 {playerID1}";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 修改玩家称号
|
||||
Mysql.SetBadge(player2.RawUserId, content1, color1);
|
||||
player1.RankName = content1;
|
||||
player1.RankColor = color1;
|
||||
|
||||
|
||||
response = $"欢迎你!主人!(✿◠‿◠)\n已将玩家 {player2.Nickname} 的称号修改为 {content1},颜色为 {color1}";
|
||||
return true;
|
||||
}
|
||||
if (!player1.CheckPermission(PlayerPermissions.SetGroup)) // 这里使用了 SetGroup 权限,你可以替换为适当的权限
|
||||
{
|
||||
response = "您没有执行此命令的权限!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arguments.Count < 2)
|
||||
{
|
||||
response = "参数数量不正确。用法: .bgs [玩家ID] [内容] [颜色]";
|
||||
return false;
|
||||
}
|
||||
|
||||
string playerID = arguments.At(0);
|
||||
string content = arguments.At(1);
|
||||
string color = arguments.At(2);
|
||||
|
||||
// 查找要修改称号的玩家
|
||||
Player player = Player.List.FirstOrDefault(p => p.RawUserId == playerID);
|
||||
if (player == null)
|
||||
{
|
||||
response = $"找不到玩家 {playerID}";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 修改玩家称号
|
||||
Mysql.SetBadge(player.RawUserId, content, color);
|
||||
player.RankName = content;
|
||||
player.RankColor = color;
|
||||
|
||||
|
||||
response = $"已将玩家 {player.Nickname} 的称号修改为 {content},颜色为 {color}";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class MVPCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "mms" };
|
||||
public string Description => "修改玩家MVP音乐";
|
||||
public string Command => "mvpmusicsystem";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player player1 = Player.Get(sender);
|
||||
if (player1.RawUserId == "76561199184237638")
|
||||
{
|
||||
string playerID1 = arguments.At(0);
|
||||
string content1 = arguments.At(1);
|
||||
|
||||
// 查找要修改音乐的玩家
|
||||
Player player2 = Player.List.FirstOrDefault(p => p.RawUserId == playerID1);
|
||||
if (player2 == null)
|
||||
{
|
||||
response = $"找不到玩家 {playerID1}";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 修改玩家音乐
|
||||
Mysql.SetMusic(player2.RawUserId,content1);
|
||||
|
||||
|
||||
response = $"欢迎你!主人!(✿◠‿◠)\n已将玩家 {player2.Nickname} 的MVP音乐修改为 {content1}";
|
||||
return true;
|
||||
}
|
||||
if (!player1.CheckPermission(PlayerPermissions.SetGroup)) // 这里使用了 SetGroup 权限,你可以替换为适当的权限
|
||||
{
|
||||
response = "您没有执行此命令的权限!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arguments.Count < 2)
|
||||
{
|
||||
response = "参数数量不正确。用法: .mms [玩家ID] [音乐名]";
|
||||
return false;
|
||||
}
|
||||
|
||||
string playerID = arguments.At(0);
|
||||
string content = arguments.At(1);
|
||||
|
||||
// 查找要修改音乐的玩家
|
||||
Player player = Player.List.FirstOrDefault(p => p.RawUserId == playerID);
|
||||
if (player == null)
|
||||
{
|
||||
response = $"找不到玩家 {playerID}";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 修改玩家音乐
|
||||
Mysql.SetMusic(player.RawUserId, content);
|
||||
|
||||
|
||||
response = $"已将玩家 {player.Nickname} 的MVP音乐修改为 {content}";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class ScaleCommand : ICommand
|
||||
{
|
||||
public string Command { get; } = "sizescale";
|
||||
public string[] Aliases => new string[] { "sa" };
|
||||
public string Description => "设置玩家的模型尺寸";
|
||||
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "错误格式 正确格式: .sa [玩家id] [x] [y] [z]"; //格式错误反馈的内容
|
||||
return false;
|
||||
}
|
||||
|
||||
string fullCommand = string.Join(" ", arguments.ToArray());
|
||||
string[] cmd_args = fullCommand.Split(' ');
|
||||
Player target_player = Player.Get(cmd_args[0]);
|
||||
if (target_player == null)
|
||||
{
|
||||
response = "没有寻找到玩家ID";
|
||||
return false;
|
||||
}
|
||||
target_player.Scale = new(float.Parse(cmd_args[1]), float.Parse(cmd_args[2]), float.Parse(cmd_args[3]));
|
||||
response = "已将对应玩家大小修改为对应输入数据";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
using PlayerRoles;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin.Technician
|
||||
{
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
public class SpawnBotCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "sbot" };
|
||||
public string Description => "生成BOT";
|
||||
public string Command => "spawnbot";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
Player p = Player.Get(sender);
|
||||
if (p.RawUserId != "76561199234407686" )
|
||||
{
|
||||
response = "抱歉,此指令仅提供给插件技术员使用!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arguments.Count == 0)
|
||||
{
|
||||
Npc.Spawn("艾莉莎·米哈伊罗夫纳·九条", RoleTypeId.Tutorial, p.Position);
|
||||
|
||||
Npc bot = Npc.Get("AiLiShaBot");
|
||||
|
||||
if (bot == null)
|
||||
{
|
||||
response = "BOT不存在!";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bot.RankName = "艾莉莎·米哈伊罗夫纳·九条|测试BOT";
|
||||
bot.RankColor = "pink";
|
||||
response = "艾莉莎: 欢迎你主人!";
|
||||
return true;
|
||||
}
|
||||
//if (arguments.At(0).ToLower() == "det")
|
||||
//{
|
||||
// Npc bot = Npc.Get(99);
|
||||
// if (bot == null)
|
||||
// {
|
||||
// response = "BOT不存在!";
|
||||
// return false;
|
||||
// }
|
||||
// bot.Destroy();
|
||||
// response = "BOT已被删除!";
|
||||
// return true;
|
||||
//}
|
||||
else
|
||||
{
|
||||
response = "戳辣!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
using CommandSystem;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Command.Server
|
||||
{
|
||||
[CommandHandler(typeof(GameConsoleCommandHandler))]
|
||||
public class ServerCommand : ICommand
|
||||
{
|
||||
public string[] Aliases => new string[] { "sbc" };
|
||||
|
||||
public string Description => "来和玩家们聊天吧!";
|
||||
|
||||
string ICommand.Command => "Server Chat";
|
||||
public bool SanitizeResponse { get; }
|
||||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
|
||||
{
|
||||
if (arguments.Count < 1)
|
||||
{
|
||||
response = "错误格式 正确格式: .bc [内容]";
|
||||
return false;
|
||||
}
|
||||
|
||||
string message = string.Join(" ", arguments.Array, arguments.Offset, arguments.Count);
|
||||
|
||||
// 根据消息长度设置公告的持续时间
|
||||
//int messageLength = message.Length;
|
||||
//int broadcastDuration = messageLength <= 10 ? 3 : (messageLength <= 20 ? 5 : 10);
|
||||
|
||||
Map.Broadcast(10,$"<size=27><b><color=#FF1493>[服</color><color=#E453C8>务器</color><color=#B97AED>后台</color><color=#8596FF>]</color> 说: {message}<b></size>",Broadcast.BroadcastFlags.Normal ,true);
|
||||
foreach (var player in Player.List)
|
||||
{
|
||||
player.SendConsoleMessage($"[服务器后台] 腐竹 说: {message}","red");
|
||||
}
|
||||
response = "已成功发送服务器消息";
|
||||
Log.Warn($"你发送了 [{message}] 给服务器里的玩家");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
using Exiled.API.Features;
|
||||
using MEC;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.PlayerCoroutineHandle
|
||||
{
|
||||
public class Badge
|
||||
{
|
||||
public static string[] Colors = new string[]
|
||||
{
|
||||
"pink",
|
||||
"red",
|
||||
"brown",
|
||||
"silver",
|
||||
"light_green",
|
||||
"crimson",
|
||||
"cyan",
|
||||
"aqua",
|
||||
"deep_pink",
|
||||
"tomato",
|
||||
"yellow",
|
||||
"magenta",
|
||||
"blue_green",
|
||||
"orange",
|
||||
"lime",
|
||||
"green",
|
||||
"emerald",
|
||||
"carmine",
|
||||
"nickel",
|
||||
"mint",
|
||||
"army_green",
|
||||
"pumpkin"
|
||||
};
|
||||
public static IEnumerator<float> ChangeColor(Player player)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
foreach (string s in Colors)
|
||||
{
|
||||
player.RankColor = s;
|
||||
yield return Timing.WaitForSeconds(0.8f);
|
||||
}
|
||||
yield return Timing.WaitForSeconds(0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.ServerCoroutineHandle
|
||||
{
|
||||
internal class ClearAuto
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,535 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.CustomRoles.API.Features.Enums;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using Exiled.API.Enums;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using Exiled.CustomRoles;
|
||||
using Exiled.API.Features.Roles;
|
||||
using CustomPlayerEffects;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.ServerCoroutineHandle
|
||||
{
|
||||
public class Hint
|
||||
{
|
||||
|
||||
|
||||
public static IEnumerator<float> HintCoroutine()
|
||||
{
|
||||
while (Round.IsStarted)
|
||||
{
|
||||
var killmsg = "";
|
||||
// 储存待删除的元素
|
||||
List<Dictionary<string, object>> toRemovekmsg = new List<Dictionary<string, object>> { };
|
||||
|
||||
// 先获取 HintManager.KillLIST 并按时间升序排列
|
||||
var sortedKillList = HintManager.KillLIST.OrderBy(dict => int.Parse(dict["time"].ToString())).ToList();
|
||||
|
||||
// 控制最多显示 8 条击杀信息
|
||||
int maxDisplayCount = 8;
|
||||
int currentDisplayCount = 0;
|
||||
|
||||
foreach (var dict in sortedKillList)
|
||||
{
|
||||
string time = dict["time"].ToString();
|
||||
int time_i = int.Parse(time);
|
||||
time_i--;
|
||||
if (time_i == -1)
|
||||
{
|
||||
toRemovekmsg.Add(dict);
|
||||
}
|
||||
else
|
||||
{
|
||||
dict["time"] = time_i.ToString();
|
||||
if (currentDisplayCount < maxDisplayCount)
|
||||
{
|
||||
killmsg += string.Format("<align=\"left\"><b><size=22>{0}</size></b></align>\n", dict["msg"].ToString());
|
||||
currentDisplayCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有超过 8 条击杀信息,则添加剩余信息的提示
|
||||
if (sortedKillList.Count > maxDisplayCount)
|
||||
{
|
||||
int remainingCount = sortedKillList.Count - maxDisplayCount;
|
||||
killmsg += string.Format("<align=\"left\"><b><size=22>还有 {0} 条击杀信息</size></b></align>\n", remainingCount);
|
||||
}
|
||||
var joinmsg = "";
|
||||
// 储存待删除的元素
|
||||
List<Dictionary<string, object>> toRemovemsg = new List<Dictionary<string, object>> { };
|
||||
foreach (var dict in HintManager.JoinLIST.OrderBy(dict => int.Parse(dict["time"].ToString())))
|
||||
{
|
||||
string time = dict["time"].ToString();
|
||||
int time_i = int.Parse(time);
|
||||
time_i--;
|
||||
if (time_i == -1)
|
||||
{
|
||||
toRemovemsg.Add(dict);
|
||||
}
|
||||
else
|
||||
{
|
||||
dict["time"] = time_i.ToString();
|
||||
joinmsg += string.Format("<b><size=22>{0}", dict["msg"].ToString());
|
||||
joinmsg += "</size></b>\n";
|
||||
}
|
||||
}
|
||||
var msg = "";
|
||||
string[] team_msg = new string[5] { "", "", "", "", "" };
|
||||
// 储存待删除的元素
|
||||
List<Dictionary<string, object>> toRemovechat = new List<Dictionary<string, object>> { };
|
||||
foreach (var dict in HintManager.ChatLIST.OrderBy(dict => int.Parse(dict["time"].ToString())).ThenBy(m => int.Parse(m["side"].ToString())).ToList())
|
||||
{
|
||||
string time = dict["time"].ToString();
|
||||
int time_i = int.Parse(time);
|
||||
time_i--;
|
||||
string side = dict["side"].ToString();
|
||||
int side_i = int.Parse(side);
|
||||
if (time_i == -1)
|
||||
{
|
||||
toRemovechat.Add(dict);
|
||||
}
|
||||
else
|
||||
{
|
||||
dict["time"] = time_i.ToString();
|
||||
if (side == "11") // 公屏聊天
|
||||
{
|
||||
msg += string.Format("<align=\"left\"><size=22>[{0}]{1}", dict["time"].ToString(), dict["msg"].ToString());
|
||||
msg += "</size></align>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] array = team_msg;
|
||||
int num2 = side_i;
|
||||
array[num2] += string.Format("<align=\"left\"><size=22>[{0}]</size>{1}", dict["time"].ToString(), dict["msg"].ToString());
|
||||
string[] array2 = team_msg;
|
||||
int num3 = side_i;
|
||||
array2[num3] += "</align>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
// 删除待删除的元素
|
||||
foreach (var dict in toRemovekmsg)
|
||||
{
|
||||
HintManager.KillLIST.Remove(dict);
|
||||
}
|
||||
foreach (var dict in toRemovemsg)
|
||||
{
|
||||
HintManager.JoinLIST.Remove(dict);
|
||||
}
|
||||
foreach (var dict in toRemovechat)
|
||||
{
|
||||
HintManager.ChatLIST.Remove(dict);
|
||||
}
|
||||
|
||||
foreach (Player splayer in Player.List)
|
||||
{
|
||||
if (splayer.UserId == "AiLiShaBot")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//定义 Roundtime
|
||||
string round_time = Regex.Replace(Round.ElapsedTime.ToString(), "\\.\\d+$", string.Empty);
|
||||
//定义 splayer_team
|
||||
int splayer_team = (int)splayer.Role.Side;
|
||||
//定义 混沌人数 查询
|
||||
int CHAOS_num = Player.List.Where(p => p.Role.Side == Side.ChaosInsurgency).ToList().Count();
|
||||
//定义 九尾人数 查询
|
||||
int MTF_num = Player.List.Where(p => p.Role.Side == Side.Mtf).ToList().Count();
|
||||
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(splayer.RawUserId);
|
||||
Model.Playerinfo Info = Mysql.GetInfo(splayer.RawUserId);
|
||||
XPData.XPPlayerData xpplayerData = XPData.PlayerXPDataManager[splayer.RawUserId];
|
||||
|
||||
xpplayerData.Times++;
|
||||
|
||||
|
||||
long level = LevelTags.GetLevel(playerInfo.exp);
|
||||
long nextlevel = LevelTags.GetNextLevel(playerInfo.exp);
|
||||
string levelTag = LevelTags.GetLevelTag(level);
|
||||
string playtimes = GetInformation.GetTimes(xpplayerData.Times);
|
||||
XPData.XPPlayerData xpdata = XPData.PlayerXPDataManager[splayer.RawUserId];
|
||||
string bottomMSG = string.Format("\n\n<b><size=22><color=#00FF00>{0}</color>|<color=#00FFFF>Lv.{1} {2}</color>|Exp:<color=#00FF00>{3}</color>/<color=#00FF00>{4}</color>|回合时长{5}|游玩时长:{6}</size></b>", new object[]
|
||||
{
|
||||
splayer.Nickname,
|
||||
level,
|
||||
levelTag,
|
||||
xpdata.XP,
|
||||
nextlevel,
|
||||
round_time,
|
||||
playtimes,
|
||||
});
|
||||
string next_respawn_team = "";
|
||||
//if (Respawn.> Respawn.NtfHelicopter)
|
||||
//{
|
||||
//next_respawn_team = "<color=green>混沌分裂者</color>";
|
||||
//}
|
||||
//if (Respawn.ChaosTickets < Respawn.NtfTickets)
|
||||
//{
|
||||
//next_respawn_team = "<color=blue>九尾狐</color>";
|
||||
//}
|
||||
next_respawn_team = "我不到啊?";
|
||||
string[] pinkGradient = {
|
||||
"#FF1493",
|
||||
"#E453C8",
|
||||
"#B97AED",
|
||||
"#8596FF",
|
||||
"#53AAFF",
|
||||
"#33B8FF",
|
||||
"#0BC4FF",
|
||||
"#00D0FF",
|
||||
"#00DCFF",
|
||||
"#00E8FF",
|
||||
"#00F4FF",
|
||||
"#00FFFF",
|
||||
};
|
||||
string format = "<b><align=\"right\"><size=24><color=#00E0FF>千</color><color=#07D9FF>空</color><color=#0ED2FF>之</color><color=#15CBFF>星</color><color=#2CC4FF>服</color><color=#31AFFF>务</color><color=#1AB6FF>器</color>\n观察者:{0}\n刷新时间</color>:{1}:{2}\n刷新阵营:{5}\n回合已进行</color>:{6}\n有事请找管理员但管理员不是服务员\n<color=#FFB90F>欢迎加QQ群:473917754</color></size></align>\n";
|
||||
//\n < color = blue > 九尾狐 </ color > [{ 3}] | < color = green > 混沌分裂者 </ color > [{ 4}]
|
||||
object[] array3 = new object[7];
|
||||
array3[0] = (from p in Player.List where p.Role.Type == RoleTypeId.Spectator select p).ToList<Player>().Count;
|
||||
array3[1] = /*Respawn.TimeUntilSpawnWave.Minutes;*/"666";
|
||||
array3[2] = /*Respawn.TimeUntilSpawnWave.Seconds;*/"666";
|
||||
array3[3] = /*(int)Respawn.NtfTickets*/"666";
|
||||
array3[4] = /*(int)Respawn.ChaosTickets*/"666";
|
||||
array3[5] = next_respawn_team;
|
||||
array3[6] = round_time;
|
||||
string deadmsg = string.Format(format, array3);
|
||||
|
||||
string xp_display_msg = "";
|
||||
if (xpdata.DisplayMSG.Count > 0)
|
||||
{
|
||||
List<Dictionary<string, object>> xp_dsp_msg_toremove = new List<Dictionary<string, object>>();
|
||||
foreach (Dictionary<string, object> dict3 in (from dict in xpdata.DisplayMSG
|
||||
orderby int.Parse(dict["time"].ToString())
|
||||
select dict).ToList<Dictionary<string, object>>())
|
||||
{
|
||||
int time_i2 = int.Parse(dict3["time"].ToString());
|
||||
int num = time_i2;
|
||||
time_i2 = num - 1;
|
||||
bool flag4 = time_i2 == -1;
|
||||
if (flag4)
|
||||
{
|
||||
xp_dsp_msg_toremove.Add(dict3);
|
||||
}
|
||||
else
|
||||
{
|
||||
dict3["time"] = time_i2.ToString();
|
||||
string[] array4 = new string[6];
|
||||
array4[0] = xp_display_msg;
|
||||
array4[1] = "<b><align=\"right\"><size=24>[";
|
||||
array4[2] = time_i2.ToString();
|
||||
array4[3] = "]";
|
||||
int num4 = 4;
|
||||
object obj = dict3["msg"];
|
||||
array4[num4] = ((obj != null) ? obj.ToString() : null);
|
||||
array4[5] = "</size></align></b>\n";
|
||||
xp_display_msg = string.Concat(array4);
|
||||
}
|
||||
}
|
||||
foreach (Dictionary<string, object> dict4 in xp_dsp_msg_toremove)
|
||||
{
|
||||
xpdata.DisplayMSG.Remove(dict4);
|
||||
}
|
||||
}
|
||||
//定义 SCPSTATUS
|
||||
string SCP_STATUS = "";
|
||||
//循环 小僵尸查询
|
||||
foreach (Player scpplayer in Player.List.Where(p => p.IsScp == true && p.Role != RoleTypeId.Scp0492).ToList())
|
||||
{
|
||||
SCP_STATUS += "<align=\"right\">" + GETSOMEONE_STATUS(scpplayer, scpplayer.Role.Name) + "</align>\n";
|
||||
}
|
||||
if (Player.List.Where(p => p.Role.Type == RoleTypeId.Scp0492).Count() > 0)
|
||||
{
|
||||
SCP_STATUS += "<align=\"right\">小僵尸数量:" + Player.List.Where(p => p.Role.Type == RoleTypeId.Scp0492).Count() + "</align>";
|
||||
}
|
||||
|
||||
string team_num = "";
|
||||
if (splayer.Role.Side == Side.ChaosInsurgency)
|
||||
{
|
||||
team_num = $"<align=\"right\"><color={splayer.Role.Color.ToHex()}>CI</color>阵营人数:" + team_num + CHAOS_num.ToString() + "</align>";
|
||||
}
|
||||
else if (splayer.Role.Side == Side.Mtf)
|
||||
{
|
||||
team_num = $"<align=\"right\"><color={splayer.Role.Color.ToHex()}>MTF</color>阵营人数:" + team_num + MTF_num.ToString() + "</align>";
|
||||
}
|
||||
else if (splayer.Role.Side == Side.Scp)
|
||||
{
|
||||
team_num = SCP_STATUS;
|
||||
}
|
||||
|
||||
|
||||
static string GETSOMEONE_STATUS(Player tplayer, string name)
|
||||
{
|
||||
string temp_status;
|
||||
if (tplayer.Role == RoleTypeId.Scp079)
|
||||
{
|
||||
Player snplayer = Player.List.Where(p => p.RawUserId == tplayer.RawUserId).First();
|
||||
var Scp079 = snplayer.Role.As<Scp079Role>();
|
||||
temp_status = $"{name}: 电量:{Scp079.Energy}/{Scp079.MaxEnergy} 等级:{Scp079.Level}";
|
||||
return temp_status;
|
||||
}
|
||||
//if(tplayer.Role == RoleTypeId.Scp0492)
|
||||
//{
|
||||
// return ""; //1111
|
||||
//}
|
||||
// Log.Info(Player.List.Where(p => p.Role.Type == T_role).First().UserId);
|
||||
Player snPlayer = Player.List.Where(p => p.RawUserId == tplayer.RawUserId).First();
|
||||
temp_status = $"{name}: {snPlayer.Health}/{snPlayer.MaxHealth} HS:{snPlayer.HumeShield} 所在区域:{GetInformation.GET_Room_Type(snPlayer.CurrentRoom.Type)}";
|
||||
return temp_status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
string xydebug = "";
|
||||
if (AiLiShadebugCommand.AiLiShadebugList.Contains(splayer))
|
||||
{
|
||||
xydebug = string.Format("<align=left><size=23><b>AiLiShaDebug V1.0.0\n名称:<color=#00FF7F>{0}</color> | 展示名称:<color=#00FF7F>{1}</color>\n称号:<color=#00FF7F>{2}</color> | 颜色:<color=#00FF7F>{3}</color> | 是否隐藏:<color=#00FF7F>{4}</color>\n自定义Name:<color=#00FF7F>{5}</color> | 自定义Info:<color=#00FF7F>{6}</color> | 组名:<color=#00FF7F>{7}</color>\nHP:<color=#00FF7F>{8}</color> | AHP:<color=#00FF7F>{9}</color> | HS:<color=#00FF7F>{10}</color>\n角色:<color=#00FF7F>{11}</color> | 角色名:<color=#00FF7F>{12}</color> | Team:<color=#00FF7F>{13}</color> | Side:<color=#00FF7F>{14}</color> | LeadingTeam:<color=#00FF7F>{15}</color>\n当前房间:<color=#00FF7F>{16}</color> - <color=#00FF7F>{17}</color>\n位置:<color=#00FF7F>{18}</color> | 旋转:<color=#00FF7F>{19}</color> | 速度矢量:<color=#00FF7F>{20}</color>\n通话信道:<color=#00FF7F>{21}</color>\nIP:<color=#00FF7F>{22}</color> | Ping:<color=#00FF7F>{23}</color></b></size></align>", new object[]
|
||||
{
|
||||
splayer.Nickname,
|
||||
splayer.DisplayNickname,
|
||||
splayer.RankName,
|
||||
splayer.RankColor,
|
||||
splayer.BadgeHidden,
|
||||
splayer.CustomName,
|
||||
splayer.CustomInfo,
|
||||
splayer.GroupName,
|
||||
splayer.Health,
|
||||
splayer.ArtificialHealth,
|
||||
splayer.HumeShield,
|
||||
splayer.Role.Type,
|
||||
splayer.Role.Name,
|
||||
splayer.Role.Team,
|
||||
splayer.Role.Side,
|
||||
splayer.LeadingTeam,
|
||||
splayer.CurrentRoom.Type,
|
||||
GetInformation.GET_Room_Type(splayer.CurrentRoom.Type),
|
||||
splayer.Position,
|
||||
splayer.Rotation,
|
||||
splayer.Velocity,
|
||||
splayer.VoiceChannel,
|
||||
splayer.IPAddress,
|
||||
splayer.Ping
|
||||
});
|
||||
}
|
||||
|
||||
/*IEnumerable<CustomRole> CustomRoles = from customRole in CustomRole.Registered
|
||||
where customRole.Check(splayer)
|
||||
select customRole;
|
||||
if (CustomRoles.Count() > 0)
|
||||
{
|
||||
CustomRole CurrentCustomRole = CustomRoles.First();
|
||||
HashSet<ActiveAbility> abilities = (from p in ActiveAbility.AllActiveAbilities
|
||||
where p.Key.RawUserId == splayer.RawUserId
|
||||
select p).First().Value;
|
||||
string TS_MSG = "";
|
||||
string CurrentSelectedAbility = "没有技能";
|
||||
string CooldownDisplay = "你没有技能AWA";
|
||||
if (abilities.Count() > 0)
|
||||
{
|
||||
IEnumerable<ActiveAbility> SelectedAbility = from a in abilities
|
||||
where a.Check(splayer, CheckType.Selected)
|
||||
select a;
|
||||
if (SelectedAbility.Count() > 0)
|
||||
{
|
||||
ActiveAbility CurrentAbility = SelectedAbility.First();
|
||||
if (CurrentAbility.LastUsed.Count > 0)
|
||||
{
|
||||
DateTime usableTime = CurrentAbility.LastUsed[splayer] + TimeSpan.FromSeconds(CurrentAbility.Cooldown);
|
||||
double UTime = Math.Round((usableTime - DateTime.Now).TotalSeconds);
|
||||
if (UTime < 0.0)
|
||||
{
|
||||
CurrentSelectedAbility = CurrentAbility.Name;
|
||||
CooldownDisplay = "准备就绪";
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentSelectedAbility = CurrentAbility.Name;
|
||||
CooldownDisplay = UTime.ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentSelectedAbility = CurrentAbility.Name;
|
||||
CooldownDisplay = "准备就绪";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentSelectedAbility = "未选择";
|
||||
CooldownDisplay = "未选择技能";
|
||||
}
|
||||
}
|
||||
TS_MSG = string.Concat(new string[]
|
||||
{
|
||||
$"<b><align=\"center\"><size=23><color={Misc.ToHex(splayer.Role.Color)}>",
|
||||
CurrentCustomRole.Name,
|
||||
"</color> 当前技能: <color=#00FF7F>",
|
||||
CurrentSelectedAbility,
|
||||
"</color> 冷却时间: <color=#00FF7F>",
|
||||
CooldownDisplay,
|
||||
"</color></size></align></b>"
|
||||
});
|
||||
bottomMSG = TS_MSG + bottomMSG;
|
||||
}*/
|
||||
var CustomRoles = CustomRole.Registered.Where(customrole => customrole.Check(splayer));
|
||||
if (CustomRoles.Count() > 0)
|
||||
{
|
||||
string TS_MSG = "";
|
||||
var currentcustomrole = CustomRoles.First();
|
||||
foreach (var i in SomeInformaiton.CustomRoleListCiTeam)
|
||||
{
|
||||
if (currentcustomrole.Name == i)
|
||||
{
|
||||
TS_MSG = $"<size=22><b><color=#FF8C00>你是{currentcustomrole.Name} [<color=#00FF00>混沌阵营</color>]<br>{currentcustomrole.Description}</color></b></size>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (var i in SomeInformaiton.CustomRoleListMtfTeam)
|
||||
{
|
||||
if (currentcustomrole.Name == i)
|
||||
{
|
||||
TS_MSG = $"<size=22><b><color=#FF8C00>你是{currentcustomrole.Name} [<color=#0000FF>基金会阵营</color>]<br>{currentcustomrole.Description}</color></b></size>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (var i in SomeInformaiton.CustomRoleListScpTeam)
|
||||
{
|
||||
if (currentcustomrole.Name == i)
|
||||
{
|
||||
TS_MSG = $"<size=22><b><color=#FF8C00>你是{currentcustomrole.Name} [<color=#FF0000>SCP阵营</color>]<br>{currentcustomrole.Description}</color></b></size>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
bottomMSG = TS_MSG + bottomMSG;
|
||||
}
|
||||
else
|
||||
{
|
||||
bottomMSG = "<br>" + bottomMSG;
|
||||
}
|
||||
string team_scp_status = SCP_STATUS;
|
||||
string mtMSG = team_msg[splayer_team] + msg + killmsg;
|
||||
string deadMSG = xp_display_msg + deadmsg;
|
||||
if (AiLiShadebugCommand.AiLiShadebugList.Contains(splayer))
|
||||
{
|
||||
splayer.ShowManagedHint(xydebug,1f,true, DisplayLocation.Middle);
|
||||
}
|
||||
if (splayer.IsAlive)
|
||||
{
|
||||
splayer.ShowManagedHint(mtMSG + xp_display_msg, 1f, true, DisplayLocation.MiddleTop);
|
||||
splayer.ShowManagedHint(joinmsg, 1f, true, DisplayLocation.MiddleBottom);
|
||||
splayer.ShowManagedHint(bottomMSG, 1f, true, DisplayLocation.Bottom);
|
||||
|
||||
|
||||
if (splayer.Role.Side == Side.Scp)
|
||||
{
|
||||
//SCP 显示
|
||||
splayer.ShowManagedHint("<size=18>" + team_num + "</size>", 1, true, DisplayLocation.MiddleBottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
//CI&MTF 显示
|
||||
splayer.ShowManagedHint("<size=24>" + team_num + "</size>", 1, true, DisplayLocation.Top);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (splayer.IsDead)
|
||||
{
|
||||
splayer.ShowManagedHint(mtMSG + xp_display_msg, 1f, true, DisplayLocation.MiddleTop);
|
||||
splayer.ShowManagedHint(joinmsg, 1f, true, DisplayLocation.Middle);
|
||||
splayer.ShowManagedHint(deadmsg, 1f, true, DisplayLocation.MiddleBottom);
|
||||
}
|
||||
|
||||
if (splayer.IsAlive && splayer.Position.y <= -1100f && !splayer.IsInPocketDimension)
|
||||
{
|
||||
splayer.IsGodModeEnabled = true;
|
||||
splayer.Position = Land.Av[splayer.UserId];
|
||||
splayer.ShowManagedHint("\n<color=#7FFFD4><size=24><b>反虚空系统已将您传送至地面! 落地保护时间3秒!</b></size></color>", 3f, true, DisplayLocation.Middle);
|
||||
Timing.CallDelayed(3f, () =>
|
||||
{
|
||||
splayer.IsGodModeEnabled = false;
|
||||
splayer.ShowManagedHint("\n<color=#7FFFD4><size=24><b>落地保护时间已失效!</b></size></color>", 5f, true, DisplayLocation.Middle);
|
||||
});
|
||||
Log.Warn($"玩家 {splayer.Nickname} 触发反虚空系统 | 已将玩家转移至进入虚空前的地面 {Land.Av[splayer.UserId]}");
|
||||
}
|
||||
|
||||
if (splayer.IsScp)
|
||||
{
|
||||
if (!RoundStarted.scpChannel.Contains(splayer.Id))
|
||||
{
|
||||
RoundStarted.scpChannel.Add(splayer.Id);
|
||||
}
|
||||
|
||||
if (!RoundStarted.scpList.Contains(splayer))
|
||||
{
|
||||
RoundStarted.scpList.Add(splayer);
|
||||
}
|
||||
}
|
||||
|
||||
if (!splayer.IsScp)
|
||||
{
|
||||
if (RoundStarted.scpChannel.Contains(splayer.Id))
|
||||
{
|
||||
RoundStarted.scpChannel.Remove(splayer.Id);
|
||||
}
|
||||
|
||||
if (RoundStarted.scpList.Contains(splayer))
|
||||
{
|
||||
RoundStarted.scpList.Remove(splayer);
|
||||
}
|
||||
}
|
||||
|
||||
if (splayer.RawUserId == "AiLiShaBot")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
yield return Timing.WaitForSeconds(0.95f);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Features;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using MEC;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.ServerCoroutineHandle
|
||||
{
|
||||
public class Protector
|
||||
{
|
||||
//public static IEnumerator<float> ProtectorCoroutine()
|
||||
//{
|
||||
// while (Round.IsStarted)
|
||||
// {
|
||||
// if (!Timing.IsRunning(RoundStarted.hint_coroutine))
|
||||
// {
|
||||
// RoundStarted.hint_coroutine = Timing.RunCoroutine(Hint.HintCoroutine());
|
||||
// Log.Warn("Hint携程意外终止! Protector重载了Hint显示!");
|
||||
// }
|
||||
// yield return Timing.WaitForSeconds(3f);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
282
EXiled-NebulaMist-CP-NG-hint/EXiled-NebulaMist-CP-NG-hint.csproj
Normal file
282
EXiled-NebulaMist-CP-NG-hint/EXiled-NebulaMist-CP-NG-hint.csproj
Normal file
@ -0,0 +1,282 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B1726FB7-5E83-4DF1-B935-DE242CCF6020}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>EXiled_NebulaMist_CP_NG_hint</RootNamespace>
|
||||
<AssemblyName>EXiled-NebulaMist-CP-NG-hint</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AdvancedHints-Exiled">
|
||||
<HintPath>..\..\引用\AdvancedHints-Exiled.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>bin\Debug\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-Publicized, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\CommandSystem.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exiled.API, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Exiled.API.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exiled.CreditTags, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Exiled.CreditTags.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exiled.CustomItems, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Exiled.CustomItems.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exiled.CustomRoles, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Exiled.CustomRoles.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exiled.Events, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Exiled.Events.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exiled.Loader, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Exiled.Loader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exiled.Permissions, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\Exiled.Permissions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Protobuf, Version=3.30.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Protobuf.3.30.0\lib\net45\Google.Protobuf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4, Version=1.3.8.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Compression.LZ4.1.3.8\lib\net462\K4os.Compression.LZ4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.3.8.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Compression.LZ4.Streams.1.3.8\lib\net462\K4os.Compression.LZ4.Streams.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Hash.xxHash, Version=1.0.8.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Hash.xxHash.1.0.8\lib\net462\K4os.Hash.xxHash.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" />
|
||||
<Reference Include="MySql.Data, Version=9.3.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.9.3.0\lib\net48\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NorthwoodLib, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\NorthwoodLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PluginAPI, Version=13.1.5.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\PluginAPI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Pooling, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\引用\Pooling.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SCPSLAudioApi">
|
||||
<HintPath>..\..\引用\SCPSLAudioApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Configuration.ConfigurationManager, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Configuration.ConfigurationManager.8.0.0\lib\net462\System.Configuration.ConfigurationManager.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Pipelines, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.5.0.2\lib\net461\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\..\引用\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\引用\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\引用\UnityEngine.PhysicsModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\引用\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\YamlDotNet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ZstdSharp, Version=0.8.5.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ZstdSharp.Port.0.8.5\lib\net462\ZstdSharp.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Command\Client\Chat\Public Command.cs" />
|
||||
<Compile Include="Command\Client\Chat\Team Command.cs" />
|
||||
<Compile Include="Command\Client\TXCommand.cs" />
|
||||
<Compile Include="Command\Client\CX.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\Custom R&I\SpawnSpeicalItem.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\Custom R&I\SpawnSpeicalRole.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\Item size Command.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\KillHint.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\PlayerMusicPt.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\PlayerMusicPu.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\PlayerMusicPr.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\PrivateMessage.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\Restrict\SQL Command.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\Scale Command.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\Technician\SpawnBot.cs" />
|
||||
<Compile Include="Command\RemoteAdmin\AiLiShaDebug.cs" />
|
||||
<Compile Include="Command\Server\Server Command.cs" />
|
||||
<Compile Include="CoroutineHandler\PlayerCoroutineHandle\Badge.cs" />
|
||||
<Compile Include="CoroutineHandler\ServerCoroutineHandle\ClearAuto.cs" />
|
||||
<Compile Include="CoroutineHandler\ServerCoroutineHandle\Hint.cs" />
|
||||
<Compile Include="CoroutineHandler\ServerCoroutineHandle\Protector.cs" />
|
||||
<Compile Include="EventHandlers.cs" />
|
||||
<Compile Include="Command\Client\HelpCommand.cs" />
|
||||
<Compile Include="Command\Client\Kill Command.cs" />
|
||||
<Compile Include="Event\PlayerEvent\DroppedAmmo.cs" />
|
||||
<Compile Include="Event\PlayerEvent\ReloadingWeapon.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Dying.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Escaping.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Hurtting.cs" />
|
||||
<Compile Include="Event\PlayerEvent\InteracDoor.cs" />
|
||||
<Compile Include="Event\PlayerEvent\InteracElevator.cs" />
|
||||
<Compile Include="Event\PlayerEvent\InteracLocker.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Land.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Left.cs" />
|
||||
<Compile Include="Event\PlayerEvent\SCP106\Attacking.cs" />
|
||||
<Compile Include="Event\PlayerEvent\SCP914\Activating.cs" />
|
||||
<Compile Include="Event\PlayerEvent\SCP914\ChangingKnobSetting.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Shooting.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Spawn.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Warheads\Starting.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Warheads\Stoping.cs" />
|
||||
<Compile Include="Event\ServerEvent\WaitPlayer.cs" />
|
||||
<Compile Include="Event\PlayerEvent\Verified.cs" />
|
||||
<Compile Include="Event\PlayerEvent\VoiceChat.cs" />
|
||||
<Compile Include="Event\ServerEvent\RespawningTeam.cs" />
|
||||
<Compile Include="Event\ServerEvent\RoundEnded.cs" />
|
||||
<Compile Include="Event\ServerEvent\RoundEnding.cs" />
|
||||
<Compile Include="Event\ServerEvent\RoundStarted.cs" />
|
||||
<Compile Include="GetInformation.cs" />
|
||||
<Compile Include="HintManager.cs" />
|
||||
<Compile Include="Items\Alya 117.cs" />
|
||||
<Compile Include="Items\Dragon%27s Breath.cs" />
|
||||
<Compile Include="Items\Gate C.cs" />
|
||||
<Compile Include="Items\SCP006.cs" />
|
||||
<Compile Include="Items\SCP035_Item.cs" />
|
||||
<Compile Include="Items\Tp Gun.cs" />
|
||||
<Compile Include="LeftPlayerManager.cs" />
|
||||
<Compile Include="LevelTags.cs" />
|
||||
<Compile Include="Music.cs" />
|
||||
<Compile Include="Patch\Role\Cat.cs" />
|
||||
<Compile Include="Patch\Role\Dr.A.cs" />
|
||||
<Compile Include="Patch\Role\Dr.Best.cs" />
|
||||
<Compile Include="Patch\Role\电炮兵.cs" />
|
||||
<Compile Include="Patch\ScpChatJoin.cs" />
|
||||
<Compile Include="Patch\TestPatch.cs" />
|
||||
<Compile Include="Patch\VoiceChatPatch.cs" />
|
||||
<Compile Include="Plugin Standalone\InfiniteAmmoPlugin.cs" />
|
||||
<Compile Include="Plugin Standalone\Rainbow.cs" />
|
||||
<Compile Include="Patch\Role\Ability\Blind.cs" />
|
||||
<Compile Include="Patch\Role\Ability\FullBlood.cs" />
|
||||
<Compile Include="Patch\Role\Ability\OpenTheDoor.cs" />
|
||||
<Compile Include="Patch\Role\GOC\Ability\OpticalCamouflage.cs" />
|
||||
<Compile Include="Patch\Role\GOC\Ability\TacticalShields.cs" />
|
||||
<Compile Include="Patch\Role\GOC\Ability\TacticalTeleportation.cs" />
|
||||
<Compile Include="Patch\Role\GOC\GOC-A.cs" />
|
||||
<Compile Include="Patch\Role\GOC\GOC-C.cs" />
|
||||
<Compile Include="Patch\Role\GOC\GOC-H.cs" />
|
||||
<Compile Include="Patch\Role\GOC\GOC-SC.cs" />
|
||||
<Compile Include="Patch\Role\HD\Ability\EmergencyAid.cs" />
|
||||
<Compile Include="Patch\Role\HD\Ability\WideAreaBombing.cs" />
|
||||
<Compile Include="Patch\Role\HD\HD-C.cs" />
|
||||
<Compile Include="Patch\Role\HD\HD-HP.cs" />
|
||||
<Compile Include="Patch\Role\HD\HD-P.cs" />
|
||||
<Compile Include="Patch\Role\HD\HD-TL.cs" />
|
||||
<Compile Include="Patch\Role\HD\HP-MD.cs" />
|
||||
<Compile Include="Patch\Role\RRH\RRH-C.cs" />
|
||||
<Compile Include="Patch\Role\RRH\RRH-P.cs" />
|
||||
<Compile Include="Patch\Role\RRH\RRH-S.cs" />
|
||||
<Compile Include="Patch\Role\RRH\RRH-SC.cs" />
|
||||
<Compile Include="Patch\Role\SCP035_Role.cs" />
|
||||
<Compile Include="Patch\Role\SCP181.cs" />
|
||||
<Compile Include="Patch\Role\SCP682.cs" />
|
||||
<Compile Include="Patch\Role\SCP999.cs" />
|
||||
<Compile Include="Patch\Role\ShaolinCao.cs" />
|
||||
<Compile Include="Patch\Role\SH\Serpent%27s Hand Spy.cs" />
|
||||
<Compile Include="Patch\Role\SH\Serpent%27s Hand.cs" />
|
||||
<Compile Include="Patch\Role\SomeInformaiton.cs" />
|
||||
<Compile Include="SQL\Model.cs" />
|
||||
<Compile Include="SQL\Mysql.cs" />
|
||||
<Compile Include="AiLiShaLikeConfig.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="XPData.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Other\" />
|
||||
<Folder Include="Patch\Role\UIU\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@ -0,0 +1,32 @@
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using InventorySystem.Items.Pickups;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event
|
||||
{
|
||||
public class DroppedAmmo
|
||||
{
|
||||
public static void OnDroppedAmmo(DroppedAmmoEventArgs e)
|
||||
{
|
||||
// 获取当前场景中的所有物品
|
||||
ItemPickupBase[] items = UnityEngine.Object.FindObjectsOfType<ItemPickupBase>();
|
||||
|
||||
// 遍历物品并销毁子弹掉落物
|
||||
foreach (ItemPickupBase item in items)
|
||||
{
|
||||
// 判断物品是否为子弹掉落物
|
||||
if (item is InventorySystem.Items.Firearms.Ammo.AmmoPickup)
|
||||
{
|
||||
UnityEngine.Object.Destroy(item.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
245
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Dying.cs
Normal file
245
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Dying.cs
Normal file
@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Items;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using InventorySystem.Items.Autosync;
|
||||
using PlayerRoles;
|
||||
using PlayerStatsSystem;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class Dying
|
||||
{
|
||||
public static Dictionary<string, int> Kills = new Dictionary<string, int>();
|
||||
public static Dictionary<string, int> Kills_RE = new Dictionary<string, int>();
|
||||
internal static readonly HashSet<int> ExemptBotIds = new();
|
||||
public static void PlayerDying(DyingEventArgs e)
|
||||
{
|
||||
if (e.Player == null || e.Attacker == null || e.Player.RawUserId == "AiLiShaBot")
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (e.Player.ReferenceHub.IsDummy)
|
||||
{
|
||||
XPData.TryAddXP(e.Attacker, 60, "击杀玩家");
|
||||
e.Attacker.SendConsoleMessage("击杀一名玩家 经验 +60", "red");
|
||||
string value = GetValue(e.Player.Role.Team);
|
||||
if (value != "AWA")
|
||||
{
|
||||
Mysql.AddData(e.Attacker.RawUserId, value);
|
||||
}
|
||||
SCP006.Used006[e.Player.UserId] = false;
|
||||
}
|
||||
if (e.Player.IsNPC)
|
||||
{
|
||||
XPData.TryAddXP(e.Attacker, 60, "击杀玩家");
|
||||
e.Attacker.SendConsoleMessage("击杀一名玩家 经验 +60", "red");
|
||||
string value = GetValue(e.Player.Role.Team);
|
||||
if (value != "AWA")
|
||||
{
|
||||
Mysql.AddData(e.Attacker.RawUserId, value);
|
||||
}
|
||||
SCP006.Used006[e.Player.UserId] = false;
|
||||
}
|
||||
|
||||
|
||||
if (e.Player.IsScp)
|
||||
{
|
||||
XPData.TryAddXP(e.Attacker, 120, "击杀SCP");
|
||||
e.Attacker.SendConsoleMessage("击杀一名SCP 经验 +120", "red");
|
||||
Mysql.AddData(e.Attacker.RawUserId, "Kill_SCP");
|
||||
SCP006.Used006[e.Player.UserId] = false;
|
||||
|
||||
RoundStarted.scpChannel.Remove(e.Player.Id);
|
||||
RoundStarted.scpList.Remove(e.Player);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e.Player.IsHuman)
|
||||
{
|
||||
XPData.TryAddXP(e.Attacker, 60, "击杀玩家");
|
||||
e.Attacker.SendConsoleMessage("击杀一名玩家 经验 +60", "red");
|
||||
string value = GetValue(e.Player.Role.Team);
|
||||
if (value != "AWA")
|
||||
{
|
||||
Mysql.AddData(e.Attacker.RawUserId, value);
|
||||
}
|
||||
SCP006.Used006[e.Player.UserId] = false;
|
||||
}
|
||||
}
|
||||
|
||||
Mysql.AddData(e.Attacker.RawUserId, "Kill_All");
|
||||
Mysql.AddData(e.Player.RawUserId, "DEAD");
|
||||
|
||||
string killerUserId = e.Attacker.UserId;
|
||||
if (Kills.ContainsKey(killerUserId))
|
||||
{
|
||||
Kills[killerUserId]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
Kills.Add(killerUserId, 1);
|
||||
}
|
||||
|
||||
if (e.Attacker != e.Player)
|
||||
{
|
||||
HintManager.ADDKillMSG("10", GetReasonP(e.DamageHandler.Type, e.Attacker, e.Player));
|
||||
}
|
||||
}
|
||||
|
||||
public static void PlayerDying_RE(DyingEventArgs e)
|
||||
{
|
||||
if (e.Player == null || e.Attacker == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string killerUserId = e.Attacker.UserId;
|
||||
if (Kills_RE.ContainsKey(killerUserId))
|
||||
{
|
||||
Kills_RE[killerUserId]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
Kills_RE.Add(killerUserId, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetValue(Team team)
|
||||
{
|
||||
switch (team)
|
||||
{
|
||||
case Team.ChaosInsurgency:
|
||||
return "Kill_CI";
|
||||
case Team.Scientists:
|
||||
return "Kill_SC";
|
||||
case Team.ClassD:
|
||||
return "Kill_CD";
|
||||
case Team.FoundationForces:
|
||||
return "Kill_MTF";
|
||||
case Team.SCPs:
|
||||
return "Kill_SCP";
|
||||
default:
|
||||
return "AWA";
|
||||
}
|
||||
}
|
||||
public static string GetReasonP(DamageType type , Player attacker , Player player)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DamageType.Explosion:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 炸的到处都是";
|
||||
case DamageType.A7:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用A7把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 射死了";
|
||||
case DamageType.AK:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用AK把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 打出了黄金爆头";
|
||||
case DamageType.CardiacArrest:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 不小心摸了一下 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 于是安心的似了";
|
||||
case DamageType.Com15:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用COM15把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 射死了";
|
||||
case DamageType.Com18:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用COM18把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 射死了";
|
||||
case DamageType.Com45:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用COM45把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 射成了马蜂窝";
|
||||
case DamageType.Crossvec:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用维克托把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 刮死了";
|
||||
case DamageType.E11Sr:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用E11把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 射死了";
|
||||
case DamageType.Frmg0:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用轮椅枪让 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 释怀的笑了";
|
||||
case DamageType.Fsp9:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用FSP9把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 射死了";
|
||||
case DamageType.Jailbird:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用囚鸟把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 锤成了肉泥";
|
||||
case DamageType.Logicer:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用大机枪把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 射死了";
|
||||
case DamageType.MicroHid:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用电炮把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 烤成了焦炭";
|
||||
case DamageType.ParticleDisruptor:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用3X让 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 飞起来了";
|
||||
case DamageType.Revolver:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用左轮开死神之眼把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 射死了";
|
||||
case DamageType.Scp018:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用SCP-018把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 弹成了肉泥";
|
||||
case DamageType.Scp049:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 不小心摸了一下 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 于是安心的似了";
|
||||
case DamageType.Scp0492:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 挠死了";
|
||||
case DamageType.Scp096:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 给了 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 一大比斗";
|
||||
case DamageType.Scp106:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 吓死了";
|
||||
case DamageType.Scp173:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 给 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 做了一个颈部按摩";
|
||||
case DamageType.Scp3114:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 吓的安心的似了";
|
||||
case DamageType.Scp939:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 让 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 安心的似了";
|
||||
case DamageType.Shotgun:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 使用霰弹枪把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 焯飞了";
|
||||
case DamageType.Strangled:
|
||||
return
|
||||
$"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 把 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 活生生的掐死了";
|
||||
default:
|
||||
return $"<color={Misc.ToHex(attacker.Role.Color)}>{attacker.Nickname}</color> 击杀了 <color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color>";
|
||||
}
|
||||
}
|
||||
public static string GetReasonE(DamageType type, Player player)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DamageType.Poison:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 中毒身亡";
|
||||
case DamageType.Explosion:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 把自己炸的到处都是";
|
||||
case DamageType.Decontamination:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 不小心在轻收容走丢了";
|
||||
case DamageType.Falldown:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 似乎想打破物理法则";
|
||||
case DamageType.ParticleDisruptor:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 似乎想体验飞的感觉";
|
||||
case DamageType.PocketDimension:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 在口袋空间中迷失了";
|
||||
case DamageType.Scp018:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> SCP-018(忠诚三)";
|
||||
case DamageType.SeveredHands:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 看着断掉的双手陷入了沉思";
|
||||
case DamageType.Tesla:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 似乎想变成雷神";
|
||||
case DamageType.Warhead:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 外部主结构升华(doge";
|
||||
default:
|
||||
return $"<color={Misc.ToHex(player.Role.Color)}>{player.Nickname}</color> 释怀的似了";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
43
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Escaping.cs
Normal file
43
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Escaping.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using Exiled.API.Enums;
|
||||
using PlayerRoles;
|
||||
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class Escaping
|
||||
{
|
||||
public static void OnEscape(EscapingEventArgs ev)
|
||||
{
|
||||
//逃离给于经验
|
||||
if (ev.Player.Role.Type == RoleTypeId.FacilityGuard)
|
||||
{
|
||||
ev.IsAllowed = true;
|
||||
ev.NewRole = RoleTypeId.NtfSergeant;
|
||||
}
|
||||
if (ev.IsAllowed)
|
||||
{
|
||||
XPData.TryAddXP(ev.Player, 60, "逃离设施");
|
||||
ev.Player.SendConsoleMessage("逃离设施 经验 +60", "red");
|
||||
}
|
||||
|
||||
//保安下班
|
||||
if (ev.Player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (ev.Player.Role == RoleTypeId.FacilityGuard)
|
||||
{
|
||||
ev.NewRole = RoleTypeId.NtfSergeant;
|
||||
ev.IsAllowed = true;
|
||||
ev.EscapeScenario = EscapeScenario.Scientist;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
110
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Hurtting.cs
Normal file
110
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Hurtting.cs
Normal file
@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class Hurtting
|
||||
{
|
||||
|
||||
public static void OnHurt(HurtingEventArgs e)
|
||||
{
|
||||
|
||||
// 检查事件参数和相关对象是否为 null
|
||||
if (e == null)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Attacker == null)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Player == null)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Attacker.Role == null)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Player.Role == null)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Side Mtf = Side.Mtf;
|
||||
Side Ci = Side.ChaosInsurgency;
|
||||
Side Scp = Side.Scp;
|
||||
|
||||
if (e.Attacker.Role.Side == Ci)
|
||||
{
|
||||
foreach (var info in SomeInformaiton.CustomRoleListGocTeam)
|
||||
{
|
||||
if (e.Player.CustomInfo == info)
|
||||
{
|
||||
e.IsAllowed = true;
|
||||
}
|
||||
}
|
||||
if (e.Player.Role.Side == Ci)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
if (e.Attacker.Role.Side == Mtf)
|
||||
{
|
||||
if (e.Player.Role.Side == Mtf)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
if (e.Attacker.Role.Side == Scp)
|
||||
{
|
||||
foreach (var info in SomeInformaiton.CustomRoleListScpTeam)
|
||||
{
|
||||
if (e.Player.CustomInfo == info)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
if (e.Player.Role.Side == Scp)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//监测可乐 冲突!
|
||||
//if (e.DamageHandler.Type == DamageType.Scp207 || e.DamageHandler.Type == DamageType.Poison)
|
||||
//{
|
||||
// //可乐0伤害
|
||||
// e.Amount = 0;
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class InteracDoor
|
||||
{
|
||||
|
||||
public static void InteractDoors(InteractingDoorEventArgs e)
|
||||
{
|
||||
|
||||
string DoorLocker914 = string.Format("<b><align=\"right\"><size=22>{0}开启了914打门</size></align></b>", new object[]
|
||||
{
|
||||
e.Player.Nickname,
|
||||
|
||||
});
|
||||
|
||||
foreach (var p in Player.List)
|
||||
{
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.Lcz914)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(DoorLocker914, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class InteracElevator
|
||||
{
|
||||
|
||||
public static void InteractElevators(InteractingElevatorEventArgs e)
|
||||
{
|
||||
|
||||
string InteractElevators = string.Format("<b><align=\"right\"><size=22>{0}开启了电梯</size></align></b>", new object[]
|
||||
{
|
||||
e.Player.Nickname,
|
||||
|
||||
});
|
||||
|
||||
foreach (var p in Player.List)
|
||||
{
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.HczElevatorA)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(InteractElevators, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.HczElevatorB)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(InteractElevators, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.Hcz049)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(InteractElevators, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.HczNuke)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(InteractElevators, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.LczCheckpointA)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(InteractElevators, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.LczCheckpointB)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(InteractElevators, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.EzGateA)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(InteractElevators, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
if (p.CurrentRoom.Type == RoomType.EzGateB)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(InteractElevators, 4f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class InteracLocker
|
||||
{
|
||||
|
||||
public static void InteractLockers(InteractingLockerEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
30
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Land.cs
Normal file
30
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Land.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class Land
|
||||
{
|
||||
public static Dictionary<string, Vector3> Av = new Dictionary<string, Vector3>();
|
||||
public static void OnLand(LandingEventArgs e)
|
||||
{
|
||||
//if (e.Player.Position.y >= 1005)
|
||||
//{
|
||||
// Log.Debug($"玩家 {e.Player.Nickname} 处于1005以上 不记录位置 上次位置 {Av[e.Player.UserId]}");
|
||||
// return;
|
||||
//}
|
||||
//Lift lift = Lift.Get(e.Player.Position);
|
||||
//if (lift == null)
|
||||
//{
|
||||
// Av[e.Player.UserId] = e.Player.Position;
|
||||
// Log.Debug($"玩家 {e.Player.Nickname} 不处于电梯中 记录位置 {e.Player.Position}");
|
||||
//}
|
||||
//if (lift != null)
|
||||
//{
|
||||
// Log.Debug($"玩家 {e.Player.Nickname} 处于电梯中 不记录位置 上次位置 {Av[e.Player.UserId]}");
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
25
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Left.cs
Normal file
25
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Left.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Command.RemoteAdmin;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class Left
|
||||
{
|
||||
public static void PlayerLefted(LeftEventArgs ev)
|
||||
{
|
||||
XPData.XPPlayerData xpplayerData = XPData.PlayerXPDataManager[ev.Player.RawUserId];
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(ev.Player.RawUserId);
|
||||
if (playerInfo.id != 0L)
|
||||
{
|
||||
Mysql.SetTime(ev.Player.RawUserId, xpplayerData.Times);
|
||||
XPData.RemovePlayer(ev.Player);
|
||||
}
|
||||
|
||||
if (AiLiShadebugCommand.AiLiShadebugList.Contains(ev.Player))
|
||||
{
|
||||
AiLiShadebugCommand.AiLiShadebugList.Remove(ev.Player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class ReloadingWeapon
|
||||
{
|
||||
|
||||
private static DateTime lastExecutionTime = DateTime.MinValue;
|
||||
private static bool isTimerRunning = false;
|
||||
|
||||
public static void OnReloadingWeapon(ReloadingWeaponEventArgs ev)
|
||||
{
|
||||
//if (ev.Firearm == null || ev.Firearm.Type == ItemType.ParticleDisruptor)
|
||||
// return;
|
||||
//ev.Player.ClearAmmo();
|
||||
//ev.Player.SetAmmo(ev.Firearm.AmmoType, (ushort)(ev.Firearm.MaxBarrelAmmo + 2));
|
||||
//if (ev.Firearm.Type == ItemType.GunCom45)
|
||||
// ev.Player.SetAmmo(ev.Firearm.AmmoType, (ushort)(ev.Firearm.MaxBarrelAmmo + 2));
|
||||
|
||||
//if (isTimerRunning)
|
||||
//{
|
||||
// return; // 如果计时器正在运行,直接返回,不执行代码
|
||||
//}
|
||||
|
||||
//TimeSpan timeSinceLastExecution = DateTime.Now - lastExecutionTime;
|
||||
//if (timeSinceLastExecution.TotalSeconds >= 1.5)
|
||||
//{
|
||||
// isTimerRunning = true; // 启动计时器
|
||||
// if (ev.Player.CurrentItem.Type == ItemType.GunAK)
|
||||
// {
|
||||
// if (ev.Firearm.BarrelAmmo < ev.Firearm.MaxBarrelAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunCOM15 || ev.Player.CurrentItem.Type == ItemType.GunCOM18 || ev.Player.CurrentItem.Type == ItemType.GunCrossvec || ev.Player.CurrentItem.Type == ItemType.GunFSP9)
|
||||
// {
|
||||
// if (ev.Firearm.BarrelAmmo < ev.Firearm.MaxBarrelAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunRevolver)
|
||||
// {
|
||||
// if (ev.Firearm.BarrelAmmo < ev.Firearm.MaxBarrelAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo44cal);
|
||||
// ev.Player.AddItem(ItemType.Ammo44cal);
|
||||
// ev.Player.AddItem(ItemType.Ammo44cal);
|
||||
// ev.Player.AddItem(ItemType.Ammo44cal);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunShotgun)
|
||||
// {
|
||||
// if (ev.Firearm.BarrelAmmo < ev.Firearm.MaxBarrelAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo12gauge);
|
||||
// ev.Player.AddItem(ItemType.Ammo12gauge);
|
||||
// ev.Player.AddItem(ItemType.Ammo12gauge);
|
||||
// ev.Player.AddItem(ItemType.Ammo12gauge);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunE11SR)
|
||||
// {
|
||||
// if (ev.Firearm.BarrelAmmo < ev.Firearm.MaxBarrelAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunCom45)
|
||||
// {
|
||||
// if (ev.Firearm.BarrelAmmo < ev.Firearm.MaxBarrelAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.ParticleDisruptor)
|
||||
// {
|
||||
// // Nothing
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (ev.Firearm.BarrelAmmo < ev.Firearm.MaxBarrelAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// }
|
||||
// }
|
||||
|
||||
// lastExecutionTime = DateTime.Now;
|
||||
// StartTimer();
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static async void StartTimer()
|
||||
{
|
||||
await Task.Delay(1500); // 等待1.5秒
|
||||
isTimerRunning = false; // 计时器结束,允许下一次执行
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.Events.EventArgs.Scp106;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent.SCP106
|
||||
{
|
||||
public class Attacking
|
||||
{
|
||||
public static void Attack(AttackingEventArgs e)
|
||||
{
|
||||
if (e.IsAllowed && !RoundStarted.scpList.Contains(e.Target))
|
||||
{
|
||||
XPData.TryAddXP(e.Player,50,"抓住一名玩家");
|
||||
e.Target.EnableEffect(EffectType.Corroding);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Scp914;
|
||||
using EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.ServerCoroutineHandle;
|
||||
using MEC;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent.SCP914
|
||||
{
|
||||
public class Activating
|
||||
{
|
||||
public static void Activat(ActivatingEventArgs e)
|
||||
{
|
||||
if (e.IsAllowed)
|
||||
{
|
||||
ChangingKnobSetting._914controlr = e.Player.Nickname;
|
||||
string _914info = string.Format("<b><align=\"left\"><size=24>[<color=#00FF7F>SCP-914</color>]\n当前加工档位:{0}\n操作者:{1}\n</size></align></b>", new object[]
|
||||
{
|
||||
ChangingKnobSetting._914mode,
|
||||
ChangingKnobSetting._914controlr
|
||||
|
||||
});
|
||||
foreach (var p in Player.List)
|
||||
{
|
||||
if (p.CurrentRoom.Type == RoomType.Lcz914)
|
||||
{
|
||||
//p.ShowManagedHint(_914info,12f);
|
||||
p.ShowManagedHint(_914info, 12f, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.Events.EventArgs.Scp914;
|
||||
using EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.ServerCoroutineHandle;
|
||||
using Scp914;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent.SCP914
|
||||
{
|
||||
public class ChangingKnobSetting
|
||||
{
|
||||
public static string _914mode;
|
||||
public static string _914controlr;
|
||||
public static void ChangingSetting(ChangingKnobSettingEventArgs e)
|
||||
{
|
||||
switch (e.KnobSetting)
|
||||
{
|
||||
case Scp914KnobSetting.Rough:
|
||||
_914mode = "<color=#FF0000>超粗加工</color>";
|
||||
break;
|
||||
case Scp914KnobSetting.Coarse:
|
||||
_914mode = "<color=#FFA500>粗加工</color>";
|
||||
break;
|
||||
case Scp914KnobSetting.OneToOne:
|
||||
_914mode = "<color=#7FFF00>1:1</color>";
|
||||
break;
|
||||
case Scp914KnobSetting.Fine:
|
||||
_914mode = "<color=#00FFFF>精加工</color>";
|
||||
break;
|
||||
case Scp914KnobSetting.VeryFine:
|
||||
_914mode = "<color=#00BFFF>超精加工</color>";
|
||||
break;
|
||||
}
|
||||
_914controlr = e.Player.Nickname;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Shooting.cs
Normal file
19
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Shooting.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class Shooting
|
||||
{
|
||||
public static void OnShooting(ShootingEventArgs e)
|
||||
{
|
||||
e.Player.ClearAmmo();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
72
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Spawn.cs
Normal file
72
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Spawn.cs
Normal file
@ -0,0 +1,72 @@
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using Exiled.API.Enums;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.PlayerCoroutineHandle;
|
||||
using MEC;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using PlayerRoles;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class Spawn
|
||||
{
|
||||
|
||||
public static void OnSpawn(SpawnedEventArgs ev)
|
||||
{
|
||||
|
||||
//Timing.CallDelayed(1f, () =>
|
||||
//{
|
||||
// if (ev.Player.Role.Side == Side.Scp)
|
||||
// {
|
||||
// // 防止重复加血
|
||||
// EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent.WaitPlayer.HealCoroutines.Remove(ev.Player.RawUserId);
|
||||
// EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent.WaitPlayer.HealCoroutines.Add(ev.Player.RawUserId, Timing.RunCoroutine(EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.PlayerCoroutineHandle.ScpHeal.StartHeal(ev.Player)));
|
||||
// }
|
||||
//});
|
||||
|
||||
if (ev.Reason == SpawnReason.Respawn)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>重生保护中(无敌)</color>", 5);
|
||||
}
|
||||
//if (ev.Player.Role.Team == Team.FoundationForces)
|
||||
//{
|
||||
// Mysql.AddStat(ev.Player.RawUserId, "become_ntf_count", 1);
|
||||
//}
|
||||
//else if (ev.Player.Role.Team == Team.ClassD)
|
||||
//{
|
||||
// Mysql.(ev.Player.RawUserId, "become_dd_count", 1);
|
||||
//}
|
||||
//else if (ev.Player.Role.Team == Team.Scientists)
|
||||
//{
|
||||
// Mysql.AddStat(ev.Player.RawUserId, "become_doctor_count", 1);
|
||||
//}
|
||||
//else if (ev.Player.Role.Team == Team.SCPs && ev.Player.Role.Type != RoleTypeId.Scp0492)
|
||||
//{
|
||||
// Mysql.AddData(ev.Player.RawUserId, "become_scp_count", 1);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
73
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Verified.cs
Normal file
73
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/Verified.cs
Normal file
@ -0,0 +1,73 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using MEC;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Items;
|
||||
using Badge = EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.PlayerCoroutineHandle.Badge;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class Verified
|
||||
{
|
||||
public static void PlayerJoined(VerifiedEventArgs ev)
|
||||
{
|
||||
if (ev.Player.RawUserId == "AiLiShaBot")
|
||||
{
|
||||
return;
|
||||
}
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(ev.Player.RawUserId);
|
||||
Model.Playerinfo Info = Mysql.GetInfo(ev.Player.RawUserId);
|
||||
if (playerInfo.id == 0L)
|
||||
{
|
||||
Mysql.CreatePlayer(ev.Player.RawUserId);
|
||||
playerInfo.steamid = ev.Player.RawUserId;
|
||||
}
|
||||
if (Info.id == 0L)
|
||||
{
|
||||
Mysql.CreateInfo(ev.Player.RawUserId);
|
||||
Info.steamid = ev.Player.RawUserId;
|
||||
}
|
||||
if (playerInfo.badge_color != "cs")
|
||||
{
|
||||
ev.Player.RankName = playerInfo.badge;
|
||||
ev.Player.RankColor = playerInfo.badge_color;
|
||||
}
|
||||
if (playerInfo.badge_color == "cs")
|
||||
{
|
||||
ev.Player.RankName = playerInfo.badge;
|
||||
Timing.RunCoroutine(Badge.ChangeColor(ev.Player));
|
||||
}
|
||||
long level = LevelTags.GetLevel(playerInfo.exp);
|
||||
string levelTag = LevelTags.GetLevelTag(level);
|
||||
ev.Player.DisplayNickname = string.Concat(new string[]
|
||||
{
|
||||
"[Lv.",
|
||||
level.ToString(),
|
||||
" ",
|
||||
levelTag,
|
||||
"]",
|
||||
ev.Player.Nickname
|
||||
});
|
||||
SCP006.Used006[ev.Player.UserId] = false;
|
||||
XPData.AddPlayer(ev.Player, (int)playerInfo.exp, level.ToString(), LevelTags.GetNextLevel(playerInfo.exp).ToString(), levelTag, (int)playerInfo.playtimes);
|
||||
if (Round.IsStarted)
|
||||
{
|
||||
if (ev.Player.RemoteAdminAccess)
|
||||
{
|
||||
if (ev.Player.GroupName == "owner")
|
||||
{
|
||||
HintManager.ADDJoinMSG("7", $"<color=#FF1493>[</color><color=#E453C8>服</color><color=#B97AED>主</color><color=#8596FF>]</color><color=#54FF9F>{ev.Player.Nickname}</color> 进入服务器");
|
||||
}
|
||||
else
|
||||
{
|
||||
HintManager.ADDJoinMSG("7", $"<color=#FF1493>[</color><color=#E453C8>管</color><color=#B97AED>理</color><color=#8596FF>员</color><color=#53AAFF>]</color><color=#54FF9F>{ev.Player.Nickname}</color> 进入服务器");
|
||||
}
|
||||
}
|
||||
if (!ev.Player.RemoteAdminAccess)
|
||||
{
|
||||
HintManager.ADDJoinMSG("7", $"<color=#54FF9F>{ev.Player.Nickname}</color> 进入服务器");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
41
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/VoiceChat.cs
Normal file
41
EXiled-NebulaMist-CP-NG-hint/Event/PlayerEvent/VoiceChat.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using PlayerRoles.Voice;
|
||||
using VoiceChat;
|
||||
using VoiceChat.Networking;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent
|
||||
{
|
||||
public class VoiceChatting
|
||||
{
|
||||
public static void OnVoiceChat(VoiceChattingEventArgs e)
|
||||
{
|
||||
if (e.Player != null && e.Player.IsVerified && RoundStarted.scpChannel.Contains(e.Player.Id))
|
||||
{
|
||||
SCPCHAT(e.VoiceMessage,e.Player);
|
||||
if (e.Player.IsScp)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void SCPCHAT(VoiceMessage msg,Player p)
|
||||
{
|
||||
foreach (ReferenceHub referenceHub in ReferenceHub.AllHubs)
|
||||
{
|
||||
if (referenceHub.roleManager.CurrentRole is IVoiceRole && RoundStarted.scpChannel.Contains(referenceHub.PlayerId))
|
||||
{
|
||||
if (referenceHub.PlayerId == p.Id)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
msg.Channel = VoiceChatChannel.Intercom;
|
||||
referenceHub.connectionToClient.Send(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Warhead;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent.SCP914;
|
||||
using PluginAPI.Events;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent.Warheads
|
||||
{
|
||||
public class Starting
|
||||
{
|
||||
|
||||
public static void Start(StartingEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
string WarheadInfoStart = string.Format("<b><align=\"right\"><size=22>{0}开启了核弹</size></align></b>", new object[]
|
||||
{
|
||||
e.Player.Nickname,
|
||||
|
||||
});
|
||||
|
||||
foreach (var p in Player.List)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(WarheadInfoStart, 6f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Warhead;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent.Warheads
|
||||
{
|
||||
public class Stoping
|
||||
{
|
||||
|
||||
public static void Stop(StoppingEventArgs e)
|
||||
{
|
||||
|
||||
string WarheadInfoStop = string.Format("<b><align=\"right\"><size=22>{0}关闭了核弹</size></align></b>", new object[]
|
||||
{
|
||||
e.Player.Nickname,
|
||||
|
||||
});
|
||||
|
||||
foreach (var p in Player.List)
|
||||
{
|
||||
|
||||
p.ShowManagedHint(WarheadInfoStop, 6f, true, DisplayLocation.Middle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
185
EXiled-NebulaMist-CP-NG-hint/Event/ServerEvent/RespawningTeam.cs
Normal file
185
EXiled-NebulaMist-CP-NG-hint/Event/ServerEvent/RespawningTeam.cs
Normal file
@ -0,0 +1,185 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Principal;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Server;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using Respawning;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent
|
||||
{
|
||||
public class RespawningTeam
|
||||
{
|
||||
public static AudioPlayerBase playerBase;
|
||||
public static int ntf_count;
|
||||
public static void Respawn(RespawningTeamEventArgs e)
|
||||
{
|
||||
RoundStarted.Respawnint++;
|
||||
List<Player> CI = Player.Get(Team.ChaosInsurgency).ToList();
|
||||
List<Player> CD = Player.Get(Team.ClassD).ToList();
|
||||
List<Player> SC = Player.Get(Team.Scientists).ToList();
|
||||
List<Player> MTF = Player.Get(Team.FoundationForces).ToList();
|
||||
List<Player> SCP = Player.Get(Team.SCPs).ToList();
|
||||
List<Player> Human = new List<Player>();
|
||||
foreach (var human in Player.List)
|
||||
{
|
||||
if (human.IsHuman)
|
||||
{
|
||||
Human.Add(human);
|
||||
}
|
||||
}
|
||||
/*if (e.NextKnownTeam == SpawnableTeamType.NineTailedFox)
|
||||
{
|
||||
if (RoundStarted.Respawnint % 2 == 0 && CI.Count != 0 && SCP.Count > 2 &&
|
||||
RoundStarted.UiuRespawnint <= 2)
|
||||
{
|
||||
RoundStarted.UiuRespawnint++;
|
||||
|
||||
List<Player> players = e.Players;
|
||||
|
||||
Queue<RoleTypeId> queue = e.SpawnQueue;
|
||||
|
||||
foreach (RoleTypeId role in queue)
|
||||
{
|
||||
if (players.Count <= 0)
|
||||
break;
|
||||
Player player = players.RandomItem();
|
||||
players.Remove(player);
|
||||
switch (role)
|
||||
{
|
||||
case RoleTypeId.NtfCaptain:
|
||||
CustomRole.Get(005U).AddRole(player);
|
||||
break;
|
||||
case RoleTypeId.NtfSergeant:
|
||||
CustomRole.Get(006U).AddRole(player);
|
||||
break;
|
||||
case RoleTypeId.NtfPrivate:
|
||||
CustomRole.Get(007U).AddRole(player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
e.IsAllowed = false;
|
||||
e.NextKnownTeam = SpawnableTeamType.None;
|
||||
|
||||
playerBase = Music.PlayMusicpt("uiu", 20 , Side.Mtf);
|
||||
if (SCP.Count > 0)
|
||||
{
|
||||
Cassie.MessageTranslated($"AN jam_043_2 U I .G2 .G3 U jam_043_2 HASENTERED .G1 ALLREMAINING AWAITINGRECONTAINMENT {SCP.Count} SCPSUBJECTS", $"一支UIU小队已进入设施 他们将帮助基金会收容出逃的SCP项目 剩余{SCP.Count}名项目等待收容");
|
||||
}
|
||||
}
|
||||
CustomRole _035 = CustomRole.Get(035U);
|
||||
if (CI.Count != 0 && SCP.Count > 2 && SCP.Count > Human.Count && _035 != null &&
|
||||
RoundStarted.HdRespawnint <= 1)
|
||||
{
|
||||
RoundStarted.HdRespawnint++;
|
||||
|
||||
List<Player> players = e.Players;
|
||||
|
||||
Queue<RoleTypeId> queue = e.SpawnQueue;
|
||||
Player HP = players.RandomItem();
|
||||
players.Remove(HP);
|
||||
CustomRole.Get(015U).AddRole(HP);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Player MD = players.RandomItem();
|
||||
players.Remove(MD);
|
||||
CustomRole.Get(016U).AddRole(MD);
|
||||
}
|
||||
foreach (RoleTypeId role in queue)
|
||||
{
|
||||
if (players.Count <= 0)
|
||||
break;
|
||||
Player player = players.RandomItem();
|
||||
players.Remove(player);
|
||||
switch (role)
|
||||
{
|
||||
case RoleTypeId.NtfCaptain:
|
||||
CustomRole.Get(012U).AddRole(player);
|
||||
break;
|
||||
case RoleTypeId.NtfSergeant:
|
||||
CustomRole.Get(013U).AddRole(player);
|
||||
break;
|
||||
case RoleTypeId.NtfPrivate:
|
||||
CustomRole.Get(014U).AddRole(player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
e.IsAllowed = false;
|
||||
e.NextKnownTeam = SpawnableTeamType.None;
|
||||
|
||||
if (SCP.Count > 0)
|
||||
{
|
||||
Cassie.MessageTranslated($"MTFUNIT .G2 NU jam_043_2 7 jam_043_2 HASENTERED .G1 ALLREMAINING AWAITINGRECONTAINMENT {SCP.Count} SCPSUBJECTS", $"机动特遣队NU-7 落锤特遣队 已进入设施,他们将帮助基金会残余力量收容出逃的SCP项目 剩余{SCP.Count}名项目等待收容");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//if (e.NextKnownTeam == SpawnableTeamType.ChaosInsurgency)
|
||||
//{
|
||||
// if (SCP.Count > 0)
|
||||
// {
|
||||
// if (CI.Count / 2 > SCP.Count || MTF.Count / 2 > SCP.Count)
|
||||
// {
|
||||
// if (RoundStarted.Respawnint % 2 != 0)
|
||||
// {
|
||||
// RoundStarted.ShRespawnint++;
|
||||
|
||||
// List<Player> players = e.Players;
|
||||
|
||||
// for (int i = 0; i < 5; i++)
|
||||
// {
|
||||
// if (players.Count > 0)
|
||||
// {
|
||||
// Player sh = players[UnityEngine.Random.Range(0, players.Count)];
|
||||
// CustomRole.Get(000U).AddRole(sh);
|
||||
// players.Remove(sh);
|
||||
// }
|
||||
// }
|
||||
|
||||
// playerBase = Music.PlayMusicpt("sh", 20, Side.Scp);
|
||||
// Cassie.MessageTranslated("AN jam_043_2 UNKNOWN .G1 jam_043_3 SQUAD HASENTERED ALLREMAINING . NOSCPSLEFT", "一支未知的敌方小队已渗透并进入了设施 所有基金会武装人员请立即消灭该小队 其他非武装人员请等待一支MTF小队的到来");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//if (e.NextKnownTeam == Respawning.SpawnableTeamType.NineTailedFox)
|
||||
//{
|
||||
// ntf_count++;
|
||||
// switch (ntf_count)
|
||||
// {
|
||||
// case 2:
|
||||
// Timing.CallDelayed(1f, () =>
|
||||
// {
|
||||
// if (Player.List.Count() > 5)
|
||||
// {
|
||||
// CustomRole.Get(017).AddRole(Player.List.Where(p => p.Role.Type == RoleTypeId.NtfCaptain).First());
|
||||
// }
|
||||
// });
|
||||
// break;
|
||||
// case 6:
|
||||
// Timing.CallDelayed(1f, () =>
|
||||
// {
|
||||
// if (Player.List.Count() > 5)
|
||||
// {
|
||||
// CustomRole.Get(017).AddRole(Player.List.Where(p => p.Role.Type == RoleTypeId.NtfCaptain).First());
|
||||
// }
|
||||
// });
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
82
EXiled-NebulaMist-CP-NG-hint/Event/ServerEvent/RoundEnded.cs
Normal file
82
EXiled-NebulaMist-CP-NG-hint/Event/ServerEvent/RoundEnded.cs
Normal file
@ -0,0 +1,82 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Roles;
|
||||
using Exiled.Events.EventArgs.Server;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using MEC;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent
|
||||
{
|
||||
public class RoundEnded
|
||||
{
|
||||
public static AudioPlayerBase playerBase;
|
||||
public static void RoundEnd(RoundEndedEventArgs e)
|
||||
{
|
||||
Timing.KillCoroutines(RoundStarted.hint_coroutine);
|
||||
Timing.KillCoroutines(RoundStarted.protector_coroutine);
|
||||
|
||||
var maxKeyValue = Dying.Kills.Aggregate((x, y) => x.Value > y.Value ? x : y);
|
||||
|
||||
string steamid = maxKeyValue.Key;
|
||||
int kills = maxKeyValue.Value;
|
||||
Player mvp = Player.Get(steamid);
|
||||
Mysql.AddData(mvp.RawUserId, "MVP");
|
||||
Model.Playerinfo info = Mysql.GetInfo(mvp.RawUserId);
|
||||
Model.Player playerinfo = Mysql.GetPlayerInfo(mvp.RawUserId);
|
||||
Server.FriendlyFire = true;
|
||||
//foreach (var p in Player.List)
|
||||
//{
|
||||
// Vector3 pox = new Vector3(131.073f, 995.463f, -43.104f);
|
||||
// p.Position = pox;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//}
|
||||
Exiled.Events.Handlers.Player.Dying += Dying.PlayerDying_RE;
|
||||
if (playerinfo != null && info != null)
|
||||
{
|
||||
if (playerinfo.mvpmusic == "none")
|
||||
{
|
||||
foreach (var p in Player.List)
|
||||
{
|
||||
p.ShowManagedHint($"<size=30><b><color=#54FF9F>{mvp.Nickname}</color> 是本回合的MVP!\n击杀数: {kills} | 总MVP数: {info.MvpTimes}\n<color=#FF1493>回合</color><color=#E453C8>结束</color><color=#B97AED>友伤</color><color=#8596FF>已开</color><color=#53AAFF>启|</color><color=#33B8FF>敬请</color><color=#0BC4FF>背刺</color><color=#00D0FF>吧!</color></b></size>", 30f, true, DisplayLocation.Top);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var p in Player.List)
|
||||
{
|
||||
p.ShowManagedHint($"<size=30><b><color=#54FF9F>{mvp.Nickname}</color> 是本回合的MVP!\n击杀数: {kills} | 总MVP数: {info.MvpTimes}\n正在向所有玩家高奏您的MVP凯歌!\n<color=#FF1493>回合</color><color=#E453C8>结束</color><color=#B97AED>友伤</color><color=#8596FF>已开</color><color=#53AAFF>启|</color><color=#33B8FF>敬请</color><color=#0BC4FF>背刺</color><color=#00D0FF>吧!</color></b></size>", 30f, true, DisplayLocation.Top);
|
||||
}
|
||||
playerBase = Music.PlayMusicpu(playerinfo.mvpmusic, 30);
|
||||
}
|
||||
}
|
||||
Timing.CallDelayed(30f, () =>
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Dying -= Dying.PlayerDying_RE;
|
||||
|
||||
var maxKeyValue1 = Dying.Kills_RE.Aggregate((x, y) => x.Value > y.Value ? x : y);
|
||||
|
||||
string steamid1 = maxKeyValue1.Key;
|
||||
int kills1 = maxKeyValue1.Value;
|
||||
Player mvp1 = Player.Get(steamid1);
|
||||
|
||||
foreach (var p in Player.List)
|
||||
{
|
||||
p.ShowManagedHint($"<size=30><b><color=#54FF9F>{mvp1.Nickname}</color> 是本回合的背刺糕手!\n击杀数: {kills1}</b></size>", 12f, true, DisplayLocation.Top);
|
||||
}
|
||||
});
|
||||
|
||||
e.TimeToRestart = 42;
|
||||
|
||||
Exiled.Events.Handlers.Player.VoiceChatting -= VoiceChatting.OnVoiceChat;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
using AdvancedHints.Enums;
|
||||
using AdvancedHints;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Server;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent;
|
||||
using PlayerRoles;
|
||||
using System.Linq;
|
||||
using MEC;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent
|
||||
{
|
||||
public class RoundEnding
|
||||
{
|
||||
public static void RoundEnd(EndingRoundEventArgs e)
|
||||
{
|
||||
|
||||
bool mtfhuman = false;
|
||||
bool gochuman = false;
|
||||
bool scps = false;
|
||||
CustomRole _035 = CustomRole.Get(035U);
|
||||
CustomRole sh = CustomRole.Get(000U);
|
||||
CustomRole gocc = CustomRole.Get(008U);
|
||||
CustomRole gocsc = CustomRole.Get(009U);
|
||||
CustomRole goch = CustomRole.Get(010U);
|
||||
CustomRole goca = CustomRole.Get(011U);
|
||||
|
||||
if (_035 == null || sh == null || gocc == null || gocsc == null || goch == null || goca == null)
|
||||
{
|
||||
Log.Debug($"检测到人类和SCP");
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (Player player in Player.List)
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
Log.Debug($"跳过一个空的玩家对象");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_035.Check(player) || sh.Check(player) || player.Role.Side == Side.Scp)
|
||||
{
|
||||
Log.Debug($"找到一个SCP阵营玩家");
|
||||
scps = true;
|
||||
}
|
||||
if (gocc.Check(player) || gocsc.Check(player) || goch.Check(player) || goca.Check(player))
|
||||
{
|
||||
Log.Debug($"找到一个GOC阵营玩家");
|
||||
gochuman = true;
|
||||
}
|
||||
else if (player.Role.Side == Side.Mtf || player.Role == RoleTypeId.ClassD)
|
||||
{
|
||||
Log.Debug($"找到一个人类玩家");
|
||||
mtfhuman = true;
|
||||
}
|
||||
|
||||
if (scps && mtfhuman)
|
||||
{
|
||||
Log.Debug($"检测到人类和SCP");
|
||||
break;
|
||||
}
|
||||
}
|
||||
Log.Debug($"应该阻止事件:{(mtfhuman && scps)} -- 应该结束回合:{(mtfhuman && scps)}");
|
||||
if (mtfhuman && scps)
|
||||
{
|
||||
e.IsForceEnded = false;
|
||||
}
|
||||
if (mtfhuman && gochuman)
|
||||
{
|
||||
e.IsForceEnded = false;
|
||||
}
|
||||
if (gochuman && scps)
|
||||
{
|
||||
e.IsForceEnded = false;
|
||||
}
|
||||
|
||||
if (scps)
|
||||
{
|
||||
e.LeadingTeam = LeadingTeam.Anomalies;
|
||||
}
|
||||
|
||||
if (gochuman)
|
||||
{
|
||||
e.LeadingTeam = LeadingTeam.Draw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
139
EXiled-NebulaMist-CP-NG-hint/Event/ServerEvent/RoundStarted.cs
Normal file
139
EXiled-NebulaMist-CP-NG-hint/Event/ServerEvent/RoundStarted.cs
Normal file
@ -0,0 +1,139 @@
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent.SCP914;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Exiled.API.Enums;
|
||||
using Hint = EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.ServerCoroutineHandle.Hint;
|
||||
using EXiled_NebulaMist_CP_NG_hint.CoroutineHandler.ServerCoroutineHandle;
|
||||
using EXiled_NebulaMist_CP_NG_hint;
|
||||
using Timer = System.Timers.Timer;
|
||||
using System.Timers;
|
||||
using PluginAPI.Events;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent
|
||||
{
|
||||
public class RoundStarted
|
||||
{
|
||||
public static List<int> scpChannel = new List<int>();
|
||||
public static List<Player> scpList = new List<Player>();
|
||||
public static CoroutineHandle hint_coroutine;
|
||||
public static CoroutineHandle protector_coroutine;
|
||||
public static AudioPlayerBase playerBase;
|
||||
public static int Respawnint;
|
||||
public static int UiuRespawnint;
|
||||
public static int HdRespawnint;
|
||||
public static int ShRespawnint;
|
||||
public static Timer timer;
|
||||
public static int Timeout;
|
||||
public static void RoundStart()
|
||||
{
|
||||
|
||||
|
||||
//开启回合15秒显示文本s
|
||||
Map.Broadcast(15, "<color=#00EEEE>欢迎游玩星云之雾服务器!使用<color=#00FF00>.H</color>指令即可获取指令帮助.</color>");
|
||||
|
||||
hint_coroutine = Timing.RunCoroutine(Hint.HintCoroutine());
|
||||
|
||||
scpChannel.Clear();
|
||||
scpList.Clear();
|
||||
|
||||
foreach (var p in Player.Get(Side.Scp))
|
||||
{
|
||||
scpChannel.Add(p.Id);
|
||||
scpList.Add(p);
|
||||
}
|
||||
|
||||
List<Player> players = Player.Get(RoleTypeId.ClassD).ToList();
|
||||
|
||||
if (players.Count > 0)
|
||||
{
|
||||
Player _181 = players[UnityEngine.Random.Range(0, players.Count)];
|
||||
CustomRole.Get(181U).AddRole(_181);
|
||||
players.Remove(_181);
|
||||
}
|
||||
|
||||
if (scpList.Count >= 2)
|
||||
{
|
||||
Player shspy = players[UnityEngine.Random.Range(0, players.Count)];
|
||||
CustomRole.Get(017U).AddRole(shspy);
|
||||
players.Remove(shspy);
|
||||
}
|
||||
|
||||
if (Server.PlayerCount >= 9)
|
||||
{
|
||||
Player NNNPL = Player.List.Where(p => p.Role == RoleTypeId.ClassD && CustomRole.Registered.Where((CustomRole customRole) => customRole.Check(p)).Count() == 0).GetRandomValue();
|
||||
CustomRole.Get(999).AddRole(NNNPL);
|
||||
|
||||
}
|
||||
|
||||
if (Player.List.Where(p => p.Role.Type == RoleTypeId.Scp939).Count() > 0)
|
||||
{
|
||||
if (Server.PlayerCount > 14)
|
||||
{
|
||||
Player SET = Player.List.Where(p => p.Role == RoleTypeId.Scp939 && CustomRole.Registered.Where((CustomRole customRole) => customRole.Check(p)).Count() == 0).GetRandomValue();
|
||||
CustomRole.Get(682).AddRole(SET);
|
||||
}
|
||||
else if (Server.PlayerCount < 14)
|
||||
{
|
||||
double chance = new System.Random().NextDouble();
|
||||
if (chance <= 0.75)
|
||||
{
|
||||
Player SET = Player.List.Where(p => p.Role == RoleTypeId.Scp939 && CustomRole.Registered.Where((CustomRole customRole) => customRole.Check(p)).Count() == 0).GetRandomValue();
|
||||
CustomRole.Get(682).AddRole(SET);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Server.FriendlyFire)
|
||||
{
|
||||
Server.FriendlyFire = false;
|
||||
}
|
||||
|
||||
Dying.Kills.Clear();
|
||||
Dying.Kills_RE.Clear();
|
||||
|
||||
Respawnint = 1;
|
||||
UiuRespawnint = 0; HdRespawnint = 0; ShRespawnint = 0;
|
||||
|
||||
ChangingKnobSetting._914mode = "<color=#FF0000>超粗加工</color>";
|
||||
ChangingKnobSetting._914controlr = "无";
|
||||
|
||||
Exiled.Events.Handlers.Player.VoiceChatting += VoiceChatting.OnVoiceChat;
|
||||
|
||||
//Timing.CallDelayed(3f, () =>
|
||||
//{
|
||||
// protector_coroutine = Timing.RunCoroutine(Protector.ProtectorCoroutine());
|
||||
// Log.Warn("Protector已启动,随时准备应对Hint终止问题");
|
||||
//});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
29
EXiled-NebulaMist-CP-NG-hint/Event/ServerEvent/WaitPlayer.cs
Normal file
29
EXiled-NebulaMist-CP-NG-hint/Event/ServerEvent/WaitPlayer.cs
Normal file
@ -0,0 +1,29 @@
|
||||
//using MEC;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
|
||||
//namespace EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent
|
||||
//{
|
||||
// public class WaitPlayer
|
||||
// {
|
||||
|
||||
|
||||
|
||||
|
||||
// public static Dictionary<string, CoroutineHandle> HealCoroutines = new Dictionary<string, CoroutineHandle>();
|
||||
// private static object e;
|
||||
|
||||
// public static void WaitingPlayer()
|
||||
// {
|
||||
// foreach (CoroutineHandle coroutine in HealCoroutines.Values)
|
||||
// {
|
||||
// Timing.KillCoroutines(coroutine);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
//}
|
||||
458
EXiled-NebulaMist-CP-NG-hint/EventHandlers.cs
Normal file
458
EXiled-NebulaMist-CP-NG-hint/EventHandlers.cs
Normal file
@ -0,0 +1,458 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Roles;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.CustomRoles.API.Features.Enums;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using Exiled.Events.EventArgs.Server;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MEC;
|
||||
using Scp914;
|
||||
using System.Security.Principal;
|
||||
using PlayerRoles;
|
||||
using Exiled.API.Features.Pickups;
|
||||
using System.Threading;
|
||||
using System.Timers;
|
||||
using Exiled.Events.Features;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
public class EventHandlers
|
||||
{
|
||||
|
||||
|
||||
//private static CoroutineHandle chat_coroutine;
|
||||
|
||||
//public Event<ShotEventArgs> OnPlayerShot { get; internal set; }
|
||||
|
||||
//回合开始 66
|
||||
|
||||
//public static void RoundStart()
|
||||
//{
|
||||
//开启回合15秒显示文本s
|
||||
//Map.Broadcast(15, "<color=#00EEEE>欢迎游玩星云之雾服务器!使用<color=#00FF00>.H</color>指令即可获取指令帮助.</color>");
|
||||
//开启聊天插件的协程
|
||||
//chat_coroutine = Timing.RunCoroutine(ChatCoroutine());
|
||||
//开启清理插件的协程
|
||||
//ClearSystem_Coroutine = Timing.RunCoroutine(ClearSystem());
|
||||
|
||||
//SCP3114刷新
|
||||
//if (Player.List.Count <= 18)
|
||||
//{
|
||||
// Log.Info("玩家人数不足,无法进行随机选择SCP-3114角色");
|
||||
// return;
|
||||
//}
|
||||
|
||||
//List<Player> players = new List<Player>(Player.List); // 获取所有玩家
|
||||
//List<Player> nonSCPPlayers = players.FindAll(player => player.Role.Team != Team.SCPs); // 获取非SCP阵营玩家列表
|
||||
|
||||
//if (nonSCPPlayers.Count == 0)
|
||||
//{
|
||||
// Log.Info("除SCP阵营外没有其他玩家,无法选择SCP-3114角色");
|
||||
// return;
|
||||
//}
|
||||
|
||||
//Random random = new Random();
|
||||
//int randomIndex = random.Next(0, nonSCPPlayers.Count); // 从非SCP阵营玩家中随机选择一个索引
|
||||
//Player randomPlayer = nonSCPPlayers[randomIndex]; // 获取随机选择的玩家
|
||||
|
||||
//foreach (Player player in Player.List)
|
||||
//{
|
||||
// if (player == randomPlayer)
|
||||
// {
|
||||
// player.Role.Set(RoleTypeId.Scp3114); // 将选中的玩家设置为SCP-3114
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//}
|
||||
//回合结束
|
||||
//public static void RoundEnd(RoundEndedEventArgs ev)
|
||||
//{
|
||||
// //杀掉聊天插件的协程
|
||||
// //Timing.KillCoroutines(chat_coroutine);
|
||||
// //杀掉清理插件的协程
|
||||
// //Timing.KillCoroutines(ClearSystem_Coroutine);
|
||||
//}
|
||||
//聊天插件 协程
|
||||
//private static IEnumerator<float> ChatCoroutine()
|
||||
//{
|
||||
// while (true)
|
||||
// {
|
||||
// var msg = "";
|
||||
// string[] team_msg = new string[5] { "", "", "", "", "" };
|
||||
// // 储存待删除的元素
|
||||
// List<Dictionary<string, object>> toRemove = new List<Dictionary<string, object>> { };
|
||||
// foreach (var dict in HintManager.ChatLIST.OrderBy(dict => int.Parse(dict["time"].ToString())).ThenBy(m => int.Parse(m["side"].ToString())).ToList())
|
||||
// {
|
||||
// string time = dict["time"].ToString();
|
||||
// int time_i = int.Parse(time);
|
||||
// time_i--;
|
||||
// string side = dict["side"].ToString();
|
||||
// int side_i = int.Parse(side);
|
||||
// if (time_i == -1)
|
||||
// {
|
||||
// toRemove.Add(dict);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dict["time"] = time_i.ToString();
|
||||
// if (side == "99") // 全体聊天
|
||||
// {
|
||||
// msg += string.Format("<align=\"left\"><size=22>[{0}]</size>{1}", dict["time"].ToString(), dict["msg"].ToString());
|
||||
// msg += "</align>\n";
|
||||
// }
|
||||
// else // 队伍聊天
|
||||
// {
|
||||
// team_msg[side_i] += string.Format("<align=\"left\"><size=22>[{0}]</size>{1}", dict["time"].ToString(), dict["msg"].ToString());
|
||||
// team_msg[side_i] += "</align>\n";
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// //定义 混沌人数 查询
|
||||
// int CHAOS_num = Player.List.Where(p => p.Role.Side == Side.ChaosInsurgency).ToList().Count();
|
||||
// //定义 九尾人数 查询
|
||||
// int MTF_num = Player.List.Where(p => p.Role.Side == Side.Mtf).ToList().Count();
|
||||
// //定义 SCPSTATUS
|
||||
// string SCP_STATUS = "";
|
||||
// //定义 Roundtime
|
||||
// string round_time = Regex.Replace(Round.ElapsedTime.ToString(), @"\.\d+$", string.Empty);
|
||||
// //定义 nextrespawnteam 下次刷新阵容
|
||||
// string next_respawn_team = Respawn.NextKnownTeam == Respawning.SpawnableTeamType.ChaosInsurgency ? "<color=green>混沌分裂者</color>" : "<color=blue>九尾狐</color>"; ;
|
||||
// //定义 deadmsg 注:deadmsg变量代表游戏中观察者模式所显示的字符
|
||||
// string deadmsg = $"<align=\"right\"><size=24><color=#00E0FF>星</color><color=#07D9FF>云</color><color=#0ED2FF>之</color><color=#15CBFF>雾</color><color=#2CC4FF>服</color><color=#31AFFF>务</color><color=#1AB6FF>器</color>\n观察者:{Player.List.Where(p => p.Role.Type == RoleTypeId.Spectator).ToList().Count}\n刷新时间</color>:{Respawn.TimeUntilSpawnWave.Minutes}:{Respawn.TimeUntilSpawnWave.Seconds}\n刷新阵营:{next_respawn_team}\n回合已进行</color>:{round_time}\n有事请找管理员但管理员不是服务员\n<color=#FFB90F>欢迎加QQ群:473917754</color></size></align>";
|
||||
|
||||
// //循环 小僵尸查询
|
||||
// foreach (Player scpplayer in Player.List.Where(p => p.IsScp == true && p.Role != RoleTypeId.Scp0492).ToList())
|
||||
// {
|
||||
// SCP_STATUS += "<align=\"right\">" + GETSOMEONE_STATUS(scpplayer, scpplayer.Role.Name) + "</align>\n";
|
||||
// }
|
||||
// if (Player.List.Where(p => p.Role.Type == RoleTypeId.Scp0492).Count() > 0)
|
||||
// {
|
||||
// SCP_STATUS += "\n小僵尸数量:" + Player.List.Where(p => p.Role.Type == RoleTypeId.Scp0492).Count();
|
||||
// }
|
||||
|
||||
// foreach (Player splayer in Player.List)
|
||||
// {
|
||||
// //XPData.XPPlayerData xpdata = XPData.PlayerXPDataManager[splayer.RawUserId];
|
||||
// //定义 BottoMSG 注:bottoMSG代表游戏中下方显示的字符
|
||||
//string bottomMSG = $"\n\n<size=24><color=#00FF00>{splayer.Nickname}</color>|<color=#00FFFF>Lv.</color>|Exp:<color=#00FF00></color>/<color=#00FF00></color>|本回合已进行{round_time}|TPS:{Server.Tps}</size>";
|
||||
|
||||
// //string xp_display_msg = "";
|
||||
// //if (xpdata.DisplayMSG.Count > 0)
|
||||
// //{
|
||||
// // List<Dictionary<string, object>> xp_dsp_msg_toremove = new();
|
||||
// // foreach (var dict in xpdata.DisplayMSG.OrderBy(dict => int.Parse(dict["time"].ToString())).ToList())
|
||||
// // {
|
||||
// // int time_i = int.Parse(dict["time"].ToString());
|
||||
// // time_i--;
|
||||
// // if (time_i == -1)
|
||||
// // {
|
||||
// // xp_dsp_msg_toremove.Add(dict);
|
||||
// // }
|
||||
// // else //XP显示
|
||||
// // {
|
||||
// // dict["time"] = time_i.ToString();
|
||||
// // xp_display_msg += "<align=\"right\"><size=21>[" + time_i + "]" + dict["msg"] + "</size></align>\n";
|
||||
// // }
|
||||
// // }
|
||||
// // foreach (var dict in xp_dsp_msg_toremove)
|
||||
// // {
|
||||
// // xpdata.DisplayMSG.Remove(dict);
|
||||
// // }
|
||||
// //}
|
||||
|
||||
// //Hint显示
|
||||
|
||||
// if (splayer.IsAlive)
|
||||
// {
|
||||
// int splayer_team = (int)splayer.Role.Side;
|
||||
// if (team_msg[splayer_team] != "")
|
||||
// {
|
||||
// //全体聊天显示
|
||||
// splayer.ShowManagedHint(team_msg[splayer_team] + msg, 1, true, DisplayLocation.MiddleTop);
|
||||
// }
|
||||
// else if (msg != "")
|
||||
// {
|
||||
// //队伍聊天显示
|
||||
// splayer.ShowManagedHint(msg, 1, true, DisplayLocation.MiddleTop);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //XP显示
|
||||
// //splayer.ShowManagedHint(xp_display_msg, 1, true, DisplayLocation.MiddleTop);
|
||||
// }
|
||||
// string team_num = "";
|
||||
// if (splayer.Role.Side == Side.ChaosInsurgency)
|
||||
// {
|
||||
// team_num = $"<align=\"right\"><color={splayer.Role.Color.ToHex()}>CI</color>阵营人数:" + team_num + CHAOS_num.ToString() + "</align>";
|
||||
// }
|
||||
// else if (splayer.Role.Side == Side.Mtf)
|
||||
// {
|
||||
// team_num = $"<align=\"right\"><color={splayer.Role.Color.ToHex()}>MTF</color>阵营人数:" + team_num + MTF_num.ToString() + "</align>";
|
||||
// }
|
||||
// else if (splayer.Role.Side == Side.Scp)
|
||||
// {
|
||||
// team_num = SCP_STATUS;
|
||||
// }
|
||||
// if (splayer.Role.Side == Side.Scp)
|
||||
// {
|
||||
// //SCP 显示
|
||||
// splayer.ShowManagedHint("<size=18>" + team_num + "</size>", 1, true, DisplayLocation.MiddleBottom);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //CI&MTF 显示
|
||||
// splayer.ShowManagedHint("<size=24>" + team_num + "</size>", 1, true, DisplayLocation.Top);
|
||||
|
||||
// }
|
||||
// //BottomMSG 显示
|
||||
// splayer.ShowManagedHint(bottomMSG, 1, true, DisplayLocation.Bottom);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //splayer.ShowManagedHint(msg + xp_display_msg, 1, true, DisplayLocation.MiddleTop);
|
||||
// splayer.ShowManagedHint(deadmsg, 1, true, DisplayLocation.MiddleBottom);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// //返回值
|
||||
// yield return Timing.WaitForSeconds(0.95f);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//}
|
||||
|
||||
//public static string GETSOMEONE_STATUS(Player tplayer, string name)
|
||||
//{
|
||||
// string temp_status;
|
||||
// if (tplayer.Role == RoleTypeId.Scp079)
|
||||
// {
|
||||
// Player snplayer = Player.List.Where(p => p.RawUserId == tplayer.RawUserId).First();
|
||||
// var Scp079 = snplayer.Role.As<Scp079Role>();
|
||||
// temp_status = $"{name}: 电量:{Scp079.Energy}/{Scp079.MaxEnergy} 等级:{Scp079.Level}";
|
||||
// return temp_status;
|
||||
// }
|
||||
// //if(tplayer.Role == RoleTypeId.Scp0492)
|
||||
// //{
|
||||
// // return ""; //1111
|
||||
// //}
|
||||
// // Log.Info(Player.List.Where(p => p.Role.Type == T_role).First().UserId);
|
||||
// Player snPlayer = Player.List.Where(p => p.RawUserId == tplayer.RawUserId).First();
|
||||
// temp_status = $"{name}: {snPlayer.Health}/{snPlayer.MaxHealth} HS:{snPlayer.HumeShield} 所在区域:{GetInformation.GET_Room_Type(snPlayer.CurrentRoom.Type)}";
|
||||
// return temp_status;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//public void PlayerDying(DyingEventArgs ev)
|
||||
//{
|
||||
// XPData.AddDisplayMSG(ev.Attacker, $"<size=20><color={ev.Attacker.Role.Color.ToHex()}>{ev.Attacker.Nickname}</color> 已击杀 <color={ev.Player.Role.Color.ToHex()}>{ev.Player.Nickname}</color></size>", 5);
|
||||
// XPData.AddDisplayMSG(ev.Player, $"<size=20><color={ev.Attacker.Role.Color.ToHex()}>{ev.Attacker.Nickname}</color> 已击杀 <color={ev.Player.Role.Color.ToHex()}>{ev.Player.Nickname}</color></size>", 5);
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//public Scp914KnobSetting Scp914KnobSetting;
|
||||
//public void Scp914Start(Exiled.Events.EventArgs.Scp914.ActivatingEventArgs ev)
|
||||
//{
|
||||
// var current_setting_dsp = "";
|
||||
// switch (Scp914KnobSetting)
|
||||
// {
|
||||
// case Scp914KnobSetting.Rough:
|
||||
// current_setting_dsp = "超粗加工";
|
||||
// break;
|
||||
// case Scp914KnobSetting.Coarse:
|
||||
// current_setting_dsp = "粗加工";
|
||||
// break;
|
||||
// case Scp914KnobSetting.OneToOne:
|
||||
// current_setting_dsp = "1:1加工";
|
||||
// break;
|
||||
// case Scp914KnobSetting.Fine:
|
||||
// current_setting_dsp = "精加工";
|
||||
// break;
|
||||
// case Scp914KnobSetting.VeryFine:
|
||||
// current_setting_dsp = "超精加工";
|
||||
// break;
|
||||
// }
|
||||
// string setting_player_name = ev.Player.Nickname;
|
||||
// foreach (var playerin in ev.Player.CurrentRoom.Players)
|
||||
// {
|
||||
// playerin.Broadcast(10, "<size=22>当前设置:" + current_setting_dsp + " 操作人:" + setting_player_name + "</size>");
|
||||
// }
|
||||
//}
|
||||
//public void Changing914(Exiled.Events.EventArgs.Scp914.ChangingKnobSettingEventArgs ev)
|
||||
//{
|
||||
// if (ev.Player != null)
|
||||
// {
|
||||
// Scp914KnobSetting = ev.KnobSetting;
|
||||
// }
|
||||
//}
|
||||
|
||||
//清理插件 协程
|
||||
//public static CoroutineHandle ClearSystem_Coroutine;
|
||||
|
||||
|
||||
|
||||
|
||||
//public static IEnumerator<float> ClearSystem()
|
||||
//{
|
||||
// yield return Timing.WaitForSeconds(300f);
|
||||
// for (; ; )
|
||||
// {
|
||||
// Map.Broadcast(10, "「<color=#EEEE00>清理大师</color>」5分钟后清理垃圾", Broadcast.BroadcastFlags.Normal, true);
|
||||
// yield return Timing.WaitForSeconds(240f);
|
||||
// Map.Broadcast(10, "「<color=#EEEE00>清理大师</color>」1分钟后清理垃圾", Broadcast.BroadcastFlags.Normal, true);
|
||||
// yield return Timing.WaitForSeconds(50f);
|
||||
// Map.Broadcast(5, "「<color=#EEEE00>清理大师</color>」10秒后清理垃圾", Broadcast.BroadcastFlags.Normal, true);
|
||||
// yield return Timing.WaitForSeconds(5f);
|
||||
// Map.Broadcast(5, "「<color=#EEEE00>清理大师</color>」5秒后清理垃圾", Broadcast.BroadcastFlags.Normal, true);
|
||||
// yield return Timing.WaitForSeconds(1f);
|
||||
// Map.Broadcast(4, "「<color=#EEEE00>清理大师</color>」4秒后清理垃圾", Broadcast.BroadcastFlags.Normal, true);
|
||||
// yield return Timing.WaitForSeconds(1f);
|
||||
// Map.Broadcast(3, "「<color=#EEEE00>清理大师</color>」3秒后清理垃圾", Broadcast.BroadcastFlags.Normal, true);
|
||||
// yield return Timing.WaitForSeconds(1f);
|
||||
// Map.Broadcast(2, "「<color=#EEEE00>清理大师</color>」2秒后清理垃圾", Broadcast.BroadcastFlags.Normal, true);
|
||||
// yield return Timing.WaitForSeconds(1f);
|
||||
// Map.Broadcast(1, "「<color=#EEEE00>清理大师</color>」1秒后清理垃圾", Broadcast.BroadcastFlags.Normal, true);
|
||||
// yield return Timing.WaitForSeconds(1f);
|
||||
// int ragdollnum = 0;
|
||||
// int itemnum = 0;
|
||||
// foreach (Ragdoll ragdoll in Ragdoll.List.ToHashSet())
|
||||
// {
|
||||
// ragdoll.Destroy();
|
||||
// ragdollnum++;
|
||||
// }
|
||||
// foreach (Pickup item in Pickup.List.ToHashSet())
|
||||
// {
|
||||
// if (!(item.Type.IsScp() || item.Type.IsKeycard() || item.Type.IsMedical() || item.Type == ItemType.MicroHID || item.Type.IsWeapon() || item.Type == ItemType.GrenadeHE || item.Type == ItemType.GrenadeFlash))
|
||||
// {
|
||||
// item.Destroy();
|
||||
// itemnum++;
|
||||
// }
|
||||
// }
|
||||
// Log.Info($"成功执行一次清理,共清理{itemnum}个物品 {ragdollnum}个尸体");
|
||||
// Timing.CallDelayed(5f, () =>
|
||||
// {
|
||||
// Map.Broadcast(10, $"「<color=#EEEE00>清理大师</color>」清理成功!本次清理{itemnum}个物品 {ragdollnum}个尸体", Broadcast.BroadcastFlags.Normal, true);
|
||||
// });
|
||||
// yield return Timing.WaitForSeconds(300f);
|
||||
// }
|
||||
//}
|
||||
//public Event<SpawnedEventArgs> OnSpawned { get; internal set; }
|
||||
public static int Timeout { get; internal set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
278
EXiled-NebulaMist-CP-NG-hint/GetInformation.cs
Normal file
278
EXiled-NebulaMist-CP-NG-hint/GetInformation.cs
Normal file
@ -0,0 +1,278 @@
|
||||
using Exiled.API.Enums;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
public class GetInformation
|
||||
{
|
||||
public static string GET_Role_Type(RoleTypeId roleTypeId)
|
||||
{
|
||||
string result;
|
||||
switch (roleTypeId)
|
||||
{
|
||||
case RoleTypeId.ChaosConscript:
|
||||
result = "混沌征召兵";
|
||||
goto IL_70;
|
||||
case RoleTypeId.ChaosMarauder:
|
||||
result = "混沌掠夺者";
|
||||
goto IL_70;
|
||||
case RoleTypeId.ChaosRepressor:
|
||||
result = "混沌压制者";
|
||||
goto IL_70;
|
||||
case RoleTypeId.ChaosRifleman:
|
||||
result = "混沌步枪兵";
|
||||
goto IL_70;
|
||||
case RoleTypeId.ClassD:
|
||||
result = "D级人员";
|
||||
goto IL_70;
|
||||
case RoleTypeId.FacilityGuard:
|
||||
result = "设施警卫";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Filmmaker:
|
||||
result = "导演模式";
|
||||
goto IL_70;
|
||||
case RoleTypeId.NtfCaptain:
|
||||
result = "九尾狐-指挥官";
|
||||
goto IL_70;
|
||||
case RoleTypeId.NtfPrivate:
|
||||
result = "九尾狐-列兵";
|
||||
goto IL_70;
|
||||
case RoleTypeId.NtfSergeant:
|
||||
result = "九尾狐-中士";
|
||||
goto IL_70;
|
||||
case RoleTypeId.NtfSpecialist:
|
||||
result = "九尾狐-收容专家";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Overwatch:
|
||||
result = "监管模式";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scientist:
|
||||
result = "科学家";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scp049:
|
||||
result = "SCP-049";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scp0492:
|
||||
result = "SCP-049-2";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scp079:
|
||||
result = "SCP-079";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scp096:
|
||||
result = "SCP-096";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scp106:
|
||||
result = "SCP-106";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scp173:
|
||||
result = "SCP-173";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scp3114:
|
||||
result = "SCP-3114";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Scp939:
|
||||
result = "SCP-939";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Spectator:
|
||||
result = "观察者";
|
||||
goto IL_70;
|
||||
case RoleTypeId.Tutorial:
|
||||
result = "教程角色";
|
||||
goto IL_70;
|
||||
case RoleTypeId.CustomRole:
|
||||
result = "插件角色";
|
||||
goto IL_70;
|
||||
case RoleTypeId.None:
|
||||
result = "无";
|
||||
goto IL_70;
|
||||
}
|
||||
result = "未知";
|
||||
IL_70:
|
||||
return result;
|
||||
}
|
||||
public static string GET_Room_Type(RoomType roomType)
|
||||
{
|
||||
string result;
|
||||
switch (roomType)
|
||||
{
|
||||
case RoomType.Unknown:
|
||||
result = "未知";
|
||||
goto IL_70;
|
||||
case RoomType.LczArmory:
|
||||
result = "轻收容区武器库";
|
||||
goto IL_70;
|
||||
case RoomType.LczCurve:
|
||||
result = "轻收容区拐弯走廊";
|
||||
goto IL_70;
|
||||
case RoomType.LczStraight:
|
||||
result = "轻收容区直行走廊";
|
||||
goto IL_70;
|
||||
case RoomType.Lcz914:
|
||||
result = "SCP-914收容间";
|
||||
goto IL_70;
|
||||
case RoomType.LczCrossing:
|
||||
result = "轻收容区十字走廊";
|
||||
goto IL_70;
|
||||
case RoomType.LczTCross:
|
||||
result = "轻收容区T型走廊";
|
||||
goto IL_70;
|
||||
case RoomType.LczCafe:
|
||||
result = "轻收容区PC-15";
|
||||
goto IL_70;
|
||||
case RoomType.LczPlants:
|
||||
result = "轻收容区VT-00";
|
||||
goto IL_70;
|
||||
case RoomType.LczToilets:
|
||||
result = "轻收容区厕所";
|
||||
goto IL_70;
|
||||
case RoomType.LczAirlock:
|
||||
result = "轻收容区空气闸门走廊";
|
||||
goto IL_70;
|
||||
case RoomType.Lcz173:
|
||||
result = "轻收容区SCP-173收容间(旧)";
|
||||
goto IL_70;
|
||||
case RoomType.LczClassDSpawn:
|
||||
result = "D级人员关押区";
|
||||
goto IL_70;
|
||||
case RoomType.LczCheckpointB:
|
||||
result = "轻收容区检查点B";
|
||||
goto IL_70;
|
||||
case RoomType.LczGlassBox:
|
||||
result = "轻收容区GR-18";
|
||||
goto IL_70;
|
||||
case RoomType.LczCheckpointA:
|
||||
result = "轻收容区检查点A";
|
||||
goto IL_70;
|
||||
case RoomType.Hcz079:
|
||||
result = "重收容区SCP-079收容间";
|
||||
goto IL_70;
|
||||
case RoomType.HczEzCheckpointA:
|
||||
result = "重收容区检查点A";
|
||||
goto IL_70;
|
||||
case RoomType.HczEzCheckpointB:
|
||||
result = "重收容区检查点B";
|
||||
goto IL_70;
|
||||
case RoomType.HczArmory:
|
||||
result = "重收容区武器库";
|
||||
goto IL_70;
|
||||
case RoomType.Hcz939:
|
||||
result = "重收容区SCP-939收容间";
|
||||
goto IL_70;
|
||||
case RoomType.HczHid:
|
||||
result = "重收容区电磁炮储存间";
|
||||
goto IL_70;
|
||||
case RoomType.Hcz049:
|
||||
result = "重收容区SCP-049收容间";
|
||||
goto IL_70;
|
||||
case RoomType.HczCrossing:
|
||||
result = "重收容区十字走廊";
|
||||
goto IL_70;
|
||||
case RoomType.Hcz106:
|
||||
result = "重收容区SCP-106收容间";
|
||||
goto IL_70;
|
||||
case RoomType.HczNuke:
|
||||
result = "重收容区核弹存放区";
|
||||
goto IL_70;
|
||||
case RoomType.HczTesla:
|
||||
result = "重收容区电网走廊";
|
||||
goto IL_70;
|
||||
case RoomType.HczCurve:
|
||||
result = "重收容区拐弯走廊";
|
||||
goto IL_70;
|
||||
case RoomType.Hcz096:
|
||||
result = "重收容区SCP-096收容间";
|
||||
goto IL_70;
|
||||
case RoomType.EzVent:
|
||||
result = "办公区红色通风区";
|
||||
goto IL_70;
|
||||
case RoomType.EzIntercom:
|
||||
result = "办公区广播室";
|
||||
goto IL_70;
|
||||
case RoomType.EzGateA:
|
||||
result = "办公区A大门出口区";
|
||||
goto IL_70;
|
||||
case RoomType.EzDownstairsPcs:
|
||||
result = "办公区低地办公室";
|
||||
goto IL_70;
|
||||
case RoomType.EzCurve:
|
||||
result = "办公区拐弯走廊";
|
||||
goto IL_70;
|
||||
case RoomType.EzPcs:
|
||||
result = "办公区办公室";
|
||||
goto IL_70;
|
||||
case RoomType.EzCrossing:
|
||||
result = "办公区十字走廊";
|
||||
goto IL_70;
|
||||
case RoomType.EzCollapsedTunnel:
|
||||
result = "办公区隧道间(坍塌)";
|
||||
goto IL_70;
|
||||
case RoomType.EzConference:
|
||||
result = "办公区Dr.L办公室走廊";
|
||||
goto IL_70;
|
||||
case RoomType.EzStraight:
|
||||
result = "办公区直行走廊";
|
||||
goto IL_70;
|
||||
case RoomType.EzCafeteria:
|
||||
result = "办公区自助餐厅";
|
||||
goto IL_70;
|
||||
case RoomType.EzUpstairsPcs:
|
||||
result = "办公区高地办公室";
|
||||
goto IL_70;
|
||||
case RoomType.EzGateB:
|
||||
result = "办公区B大门出口区";
|
||||
goto IL_70;
|
||||
case RoomType.EzShelter:
|
||||
result = "办公区避难室";
|
||||
goto IL_70;
|
||||
case RoomType.Pocket:
|
||||
result = "口袋空间";
|
||||
goto IL_70;
|
||||
case RoomType.Surface:
|
||||
result = "地表";
|
||||
goto IL_70;
|
||||
case RoomType.HczStraight:
|
||||
result = "重收容区直行走廊";
|
||||
goto IL_70;
|
||||
case RoomType.EzTCross:
|
||||
result = "办公区T型走廊";
|
||||
goto IL_70;
|
||||
case RoomType.Lcz330:
|
||||
result = "轻收容区SCP-330收容间";
|
||||
goto IL_70;
|
||||
case RoomType.EzCheckpointHallwayA:
|
||||
result = "办公区检查点长廊";
|
||||
goto IL_70;
|
||||
case RoomType.EzCheckpointHallwayB:
|
||||
result = "办公区检查点长廊";
|
||||
goto IL_70;
|
||||
case RoomType.HczTestRoom:
|
||||
result = "重收容区测试间(SCP-939旧收容间)";
|
||||
goto IL_70;
|
||||
case RoomType.HczElevatorA:
|
||||
result = "重收容区电梯A";
|
||||
goto IL_70;
|
||||
case RoomType.HczElevatorB:
|
||||
result = "重收容区电梯B";
|
||||
goto IL_70;
|
||||
}
|
||||
result = "未知";
|
||||
IL_70:
|
||||
return result;
|
||||
}
|
||||
public static string GetTimes(long times)
|
||||
{
|
||||
long days = times / 86400;
|
||||
long hours = (times % 86400) / 3600;
|
||||
long minutes = (times % 3600) / 60;
|
||||
long seconds = times % 60;
|
||||
|
||||
return $"<color=#0066CC>{days}天</color><color=#99CC00>{hours}小时</color><color=#009900>{minutes}分钟</color><color=#FF9933>{seconds}秒</color>";
|
||||
}
|
||||
|
||||
internal static string GetTimes(object times)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
EXiled-NebulaMist-CP-NG-hint/HintManager.cs
Normal file
47
EXiled-NebulaMist-CP-NG-hint/HintManager.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
public class HintManager
|
||||
{
|
||||
public static List<Dictionary<string, object>> JoinLIST = new List<Dictionary<string, object>> { };
|
||||
// 添加JoinHint信息
|
||||
public static void ADDJoinMSG(string time, string msg)
|
||||
{
|
||||
Dictionary<string, object> tmpData = new Dictionary<string, object>
|
||||
{
|
||||
{"time", time},
|
||||
{"msg", msg},
|
||||
};
|
||||
JoinLIST.Add(tmpData);
|
||||
}
|
||||
|
||||
public static List<Dictionary<string, object>> ChatLIST = new List<Dictionary<string, object>> { };
|
||||
// 添加Hint信息
|
||||
public static void ADDCHAT(string time, string msg, string side)
|
||||
{
|
||||
Dictionary<string, object> tmpData = new Dictionary<string, object>
|
||||
{
|
||||
{"time", time},
|
||||
{"msg", msg},
|
||||
{"side", side},
|
||||
};
|
||||
ChatLIST.Add(tmpData);
|
||||
}
|
||||
public static List<Dictionary<string, object>> KillLIST = new List<Dictionary<string, object>> { };
|
||||
// 添加JoinHint信息
|
||||
public static void ADDKillMSG(string time, string msg)
|
||||
{
|
||||
Dictionary<string, object> tmpData = new Dictionary<string, object>
|
||||
{
|
||||
{"time", time},
|
||||
{"msg", msg},
|
||||
};
|
||||
KillLIST.Add(tmpData);
|
||||
}
|
||||
}
|
||||
}
|
||||
105
EXiled-NebulaMist-CP-NG-hint/Items/Alya 117.cs
Normal file
105
EXiled-NebulaMist-CP-NG-hint/Items/Alya 117.cs
Normal file
@ -0,0 +1,105 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Items;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using Exiled.Events.Features;
|
||||
using InventorySystem.Items.Firearms.Attachments;
|
||||
using MEC;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Items
|
||||
{
|
||||
[CustomItem(ItemType.GunCOM15)]
|
||||
public class Alya_117 : CustomWeapon
|
||||
{
|
||||
public override float Damage { get; set; } = 10;
|
||||
public override uint Id { get; set; } = 117U;
|
||||
public override string Name { get; set; } = "爆炸间隔枪";
|
||||
public override string Description { get; set; } = "炸翻你";
|
||||
public override float Weight { get; set; } = 8;
|
||||
public override byte ClipSize { get; set; } = 15;
|
||||
public override Vector3 Scale { get; set; } = new Vector3(3f, 3f, 3f);
|
||||
public override ItemType Type { get; set; } = ItemType.GunCOM15;
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties()
|
||||
{
|
||||
Limit = 1,
|
||||
DynamicSpawnPoints = new List<DynamicSpawnPoint>
|
||||
{
|
||||
// 电炮房(里)
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 100,
|
||||
Location = SpawnLocationType.InsideHidUpper,
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
public List<Vector3> poslist = new List<Vector3>();
|
||||
//public static Dictionary<string, bool> BoomAmmo = new Dictionary<string, bool>();
|
||||
// 记录正在冷却的玩家的 UserId
|
||||
public static HashSet<string> CooldownPlayers = new HashSet<string>();
|
||||
|
||||
protected override void OnShot(ShotEventArgs e)
|
||||
{
|
||||
if (Check(e.Item))
|
||||
{
|
||||
string userId = e.Player.UserId;
|
||||
|
||||
// 检查玩家是否处于冷却状态
|
||||
if (CooldownPlayers.Contains(userId))
|
||||
{
|
||||
e.Player.ShowManagedHint("「<color=#FF3030>COM15</color>」<color=#7FFF00>子弹冷却中</color>", 4f, true, DisplayLocation.Middle);
|
||||
return;
|
||||
}
|
||||
|
||||
// 添加玩家到冷却集合
|
||||
CooldownPlayers.Add(userId);
|
||||
GrenadeManager grenadeManager = new GrenadeManager();
|
||||
Vector3 position = e.Position;
|
||||
Player player = e.Player;
|
||||
grenadeManager.GenerateAndActivateGrenade(player, ProjectileType.FragGrenade, 0.01f, position);
|
||||
// 启动冷却协程
|
||||
Timing.RunCoroutine(WaitForNextShot(userId), Segment.FixedUpdate);
|
||||
|
||||
|
||||
}
|
||||
base.OnShot(e);
|
||||
}
|
||||
|
||||
private IEnumerator<float> WaitForNextShot(string userId)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(60f);
|
||||
//BoomAmmo[userId] = true;
|
||||
CooldownPlayers.Remove(userId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public class GrenadeManager6
|
||||
{
|
||||
public void GenerateAndActivateGrenade(Player player, ProjectileType type, float fuseTime, Vector3 position)
|
||||
{
|
||||
ExplosiveGrenade grenade = (ExplosiveGrenade)Exiled.API.Features.Items.Item.Create(type.GetItemType());
|
||||
grenade.FuseTime = fuseTime;
|
||||
grenade.MaxRadius = 1;
|
||||
grenade.ScpDamageMultiplier = 2f;
|
||||
grenade.Scale = new Vector3(0.1f, 0.1f, 0.1f);
|
||||
grenade.SpawnActive(position, player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
78
EXiled-NebulaMist-CP-NG-hint/Items/Dragon's Breath.cs
Normal file
78
EXiled-NebulaMist-CP-NG-hint/Items/Dragon's Breath.cs
Normal file
@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Items;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using Exiled.Events.Features;
|
||||
using InventorySystem.Items.Firearms.Attachments;
|
||||
using MEC;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Items
|
||||
{
|
||||
[CustomItem(ItemType.GunShotgun)]
|
||||
public class Dragon_s_Breath : CustomWeapon
|
||||
{
|
||||
public override float Damage { get; set; } = 8;
|
||||
public override uint Id { get; set; } = 1145U;
|
||||
public override string Name { get; set; } = "龙息喷";
|
||||
public override string Description { get; set; } = "子墨:天啊!那是接近的!";
|
||||
public override float Weight { get; set; } = 30f;
|
||||
public override byte ClipSize { get; set; } = 14;
|
||||
public override SpawnProperties SpawnProperties { get; set; }
|
||||
public override Vector3 Scale { get; set; } = new Vector3(3f,3f,3f);
|
||||
public override ItemType Type { get; set; } = ItemType.GunShotgun;
|
||||
|
||||
public override AttachmentName[] Attachments { get; set; } = new AttachmentName[]
|
||||
{
|
||||
AttachmentName.Flashlight,
|
||||
AttachmentName.HoloSight
|
||||
};
|
||||
public List<Vector3> poslist = new List<Vector3>();
|
||||
|
||||
protected override void OnShot(ShotEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Item))
|
||||
{
|
||||
poslist.Add(ev.Position);
|
||||
Timing.CallDelayed(0.05f, () =>
|
||||
{
|
||||
Boom(ev.Player);
|
||||
});
|
||||
}
|
||||
base.OnShot(ev);
|
||||
}
|
||||
|
||||
private void Boom(Player player)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
GrenadeManager grenadeManager = new GrenadeManager();
|
||||
Vector3 pos = poslist.RandomItem();
|
||||
poslist.Remove(pos);
|
||||
grenadeManager.GenerateAndActivateGrenade(player, ProjectileType.FragGrenade,0.01f,pos);
|
||||
}
|
||||
poslist.Clear();
|
||||
}
|
||||
}
|
||||
public class GrenadeManager
|
||||
{
|
||||
public void GenerateAndActivateGrenade(Player player, ProjectileType type, float fuseTime, Vector3 position)
|
||||
{
|
||||
ExplosiveGrenade grenade = (ExplosiveGrenade)Exiled.API.Features.Items.Item.Create(type.GetItemType());
|
||||
grenade.FuseTime = fuseTime;
|
||||
grenade.MaxRadius = 1;
|
||||
grenade.ScpDamageMultiplier = 2f;
|
||||
grenade.Scale = new Vector3(0.1f, 0.1f, 0.1f);
|
||||
grenade.SpawnActive(position, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
129
EXiled-NebulaMist-CP-NG-hint/Items/Gate C.cs
Normal file
129
EXiled-NebulaMist-CP-NG-hint/Items/Gate C.cs
Normal file
@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using UnityEngine;
|
||||
using AdvancedHints.Enums;
|
||||
using AdvancedHints;
|
||||
using Exiled.API.Features;
|
||||
using K4os.Hash.xxHash;
|
||||
using System.Numerics;
|
||||
using Utf8Json.Internal.DoubleConversion;
|
||||
using Exiled.API.Features.Pickups;
|
||||
using Exiled.API.Features.Items;
|
||||
using PluginAPI.Core.Items;
|
||||
using System.Collections;
|
||||
using MEC;
|
||||
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Items
|
||||
{
|
||||
[CustomItem(ItemType.Medkit)]
|
||||
public class Gate_C : CustomItem
|
||||
{
|
||||
public override uint Id { get; set; } = 020U;
|
||||
public override string Name { get; set; } = "Gate C";
|
||||
public override ItemType Type { get; set; } = ItemType.Medkit;
|
||||
public override string Description { get; set; } = "Gate C";
|
||||
public override float Weight { get; set; } = 1f;
|
||||
public override UnityEngine.Vector3 Scale { get; set; } = new UnityEngine.Vector3(5f, 5f, 6f);
|
||||
|
||||
//public static Dictionary<string, bool> Used020 = new Dictionary<string, bool>();
|
||||
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Position = new UnityEngine.Vector3(-39.548f, 991.881f, -36.149f),
|
||||
Chance = 100
|
||||
},
|
||||
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Position = new UnityEngine.Vector3(126.317f, 995.691f, -51.604f),
|
||||
Chance = 100
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
//PlayerEvent.UsedItem += Use20;
|
||||
PlayerEvent.PickingUpItem += Pick20;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
//PlayerEvent.UsedItem -= Use20;
|
||||
PlayerEvent.PickingUpItem -= Pick20;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
//private void Use20(UsedItemEventArgs e)
|
||||
//{
|
||||
|
||||
|
||||
|
||||
|
||||
//}
|
||||
|
||||
private void Pick20(PickingUpItemEventArgs e)
|
||||
{
|
||||
if (!Warhead.IsDetonated)
|
||||
{
|
||||
if (Check(e.Pickup))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
var random = new System.Random();
|
||||
int randValue = random.Next(1, 10);
|
||||
e.Player.Position = GetPos(randValue);
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private UnityEngine.Vector3 GetPos(int value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 1:
|
||||
return Room.Get(RoomType.EzUpstairsPcs).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 2:
|
||||
return Room.Get(RoomType.EzGateB).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 3:
|
||||
return Room.Get(RoomType.EzIntercom).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 4:
|
||||
return Room.Get(RoomType.EzPcs).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 5:
|
||||
return Room.Get(RoomType.Hcz106).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 6:
|
||||
return Room.Get(RoomType.Hcz939).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 7:
|
||||
return Room.Get(RoomType.HczTestRoom).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 8:
|
||||
return Room.Get(RoomType.HczIntersection).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 9:
|
||||
return Room.Get(RoomType.HczEzCheckpointA).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
case 10:
|
||||
return Room.Get(RoomType.HczEzCheckpointB).Position + new UnityEngine.Vector3(0f, 1f, 0f);
|
||||
default:
|
||||
throw new ArgumentException(nameof(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
113
EXiled-NebulaMist-CP-NG-hint/Items/SCP006.cs
Normal file
113
EXiled-NebulaMist-CP-NG-hint/Items/SCP006.cs
Normal file
@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using UnityEngine;
|
||||
using AdvancedHints.Enums;
|
||||
using AdvancedHints;
|
||||
using Exiled.API.Features;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Items
|
||||
{
|
||||
[CustomItem(ItemType.SCP207)]
|
||||
public class SCP006 : CustomItem
|
||||
{
|
||||
public override uint Id { get; set; } = 006U;
|
||||
public override string Name { get; set; } = "SCP-006";
|
||||
public override ItemType Type { get; set; } = ItemType.SCP207;
|
||||
public override string Description { get; set; } = "这是SCP-006,喝下它可以让你充满Power";
|
||||
public override float Weight { get; set; } = 1f;
|
||||
public override Vector3 Scale { get; set; } = new Vector3(5f, 5f, 5f);
|
||||
|
||||
public static Dictionary<string, bool> Used006 = new Dictionary<string, bool>();
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties()
|
||||
{
|
||||
Limit = 1,
|
||||
DynamicSpawnPoints = new List<DynamicSpawnPoint>
|
||||
{
|
||||
// 电炮房(里)
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 50,
|
||||
Location = SpawnLocationType.InsideHidUpper,
|
||||
},
|
||||
// 清收173武器室
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 50,
|
||||
Location = SpawnLocationType.Inside173Armory,
|
||||
},
|
||||
// 重收049武器室
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 50,
|
||||
Location = SpawnLocationType.Inside049Armory,
|
||||
},
|
||||
// 清收Gr18(里)
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 50,
|
||||
Location = SpawnLocationType.InsideGr18,
|
||||
},
|
||||
// 173大门
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 50,
|
||||
Location = SpawnLocationType.Inside173Gate,
|
||||
},
|
||||
// 电脑房
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 50,
|
||||
Location = SpawnLocationType.InsideLczCafe,
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.UsedItem += Use006;
|
||||
PlayerEvent.PickingUpItem += Pick006;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.UsedItem -= Use006;
|
||||
PlayerEvent.PickingUpItem -= Pick006;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
private void Use006(UsedItemEventArgs e)
|
||||
{
|
||||
if (Check(e.Item))
|
||||
{
|
||||
e.Player.MaxHealth = 150;
|
||||
e.Player.Heal(50);
|
||||
}
|
||||
}
|
||||
|
||||
private void Pick006(PickingUpItemEventArgs e)
|
||||
{
|
||||
if (Check(e.Pickup) && Used006[e.Player.UserId])
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>你已经喝过SCP006了!</b></size></align>", 8f, true, DisplayLocation.Middle);
|
||||
}
|
||||
if (Check(e.Pickup) && !Used006[e.Player.UserId])
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
Get(006U).Give(e.Player);
|
||||
Used006[e.Player.UserId] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
171
EXiled-NebulaMist-CP-NG-hint/Items/SCP035_Item.cs
Normal file
171
EXiled-NebulaMist-CP-NG-hint/Items/SCP035_Item.cs
Normal file
@ -0,0 +1,171 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using System.Collections.Generic;
|
||||
using AdvancedHints;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using UnityEngine;
|
||||
using MEC;
|
||||
using Exiled.API.Features;
|
||||
using PlayerRoles;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using AdvancedHints.Enums;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Items
|
||||
{
|
||||
[CustomItem(ItemType.SCP268)]
|
||||
public class SCP035_Item : CustomItem
|
||||
{
|
||||
public override uint Id { get; set; } = 0352U;
|
||||
public override string Name { get; set; } = "SCP-035";
|
||||
public override ItemType Type { get; set; } = ItemType.SCP268;
|
||||
public override string Description { get; set; } = "你仔细一看发现这是<color=red>SCP-035</color>\n<color=red>SCP-035</color>的外观让你<color=#00FF7F>不寒而栗</color>,最好还是<color=#FF7F24>别一直带着它了</color>\n内心OS:<color=#FF8C00>要不还是试试戴一戴试试看?</color>";
|
||||
public override float Weight { get; set; } = 1f;
|
||||
public override Vector3 Scale { get; set; } = new Vector3(1f, 1f, 0.3f);
|
||||
|
||||
public static RoleTypeId scp035role = RoleTypeId.ClassD;
|
||||
public static Vector3 controlpos;
|
||||
public static ushort scp035serial;
|
||||
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties()
|
||||
{
|
||||
Limit = 1,
|
||||
DynamicSpawnPoints = new List<DynamicSpawnPoint>
|
||||
{
|
||||
// 电炮房(里)
|
||||
/*new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 30,
|
||||
Location = SpawnLocationType.InsideHid,
|
||||
},
|
||||
// 清收173武器室
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 30,
|
||||
Location = SpawnLocationType.Inside173Armory,
|
||||
},
|
||||
// 重收049武器室
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 30,
|
||||
Location = SpawnLocationType.Inside049Armory,
|
||||
},*/
|
||||
// 清收厕所
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 30,
|
||||
Location = SpawnLocationType.InsideLczWc,
|
||||
},
|
||||
// 清收330(里)
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 30,
|
||||
Location = SpawnLocationType.Inside330,
|
||||
},
|
||||
// 清收Gr18(里)
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 70,
|
||||
Location = SpawnLocationType.InsideGr18,
|
||||
},
|
||||
// 随机柜子里
|
||||
//new DynamicSpawnPoint()
|
||||
//{
|
||||
// Chance = 70,
|
||||
// Location = SpawnLocationType.,
|
||||
//},
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.UsingItem += Use035;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.UsingItem -= Use035;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
// 佩戴035
|
||||
protected void Use035(UsingItemEventArgs e)
|
||||
{
|
||||
if (Check(e.Item) && e.Player.Role.Type != RoleTypeId.Tutorial && e.Player.Role.Type != RoleTypeId.Scp3114)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
e.Player.RemoveItem(scp035serial);
|
||||
e.Player.DropItems();
|
||||
Timing.KillCoroutines($"035change-{e.Player.UserId}");
|
||||
scp035role = e.Player.Role.Type;
|
||||
controlpos = e.Player.Position;
|
||||
ChangedPlayers.Add(e.Player);
|
||||
CustomRole.Get(035U).AddRole(e.Player);
|
||||
|
||||
Log.Warn($"{e.Player.Nickname} 在 {controlpos} 自觉佩戴SCP-035导致被夺舍. 原角色:{scp035role}");
|
||||
}
|
||||
}
|
||||
|
||||
// 捡起035等待被夺舍
|
||||
protected override void OnPickingUp(PickingUpItemEventArgs ev)
|
||||
{
|
||||
scp035serial = ev.Pickup.Serial;
|
||||
if (ev.Player.MaxHealth == 150 && ev.Player.RankName == "SCP-181" &&
|
||||
ev.Player.Role.Type == RoleTypeId.ClassD)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
ev.Player.ShowManagedHint("<align=left><size=22><b>无法作为<color=red>SCP-181</color>捡起SCP-035!</b></size></align>", 8f, true, DisplayLocation.Middle);
|
||||
return;
|
||||
}
|
||||
if (ev.Player.Role.Type != RoleTypeId.Tutorial && ev.Player.Role.Type != RoleTypeId.Scp3114)
|
||||
{
|
||||
Timing.RunCoroutine(ChangeTo035(ev.Player), $"035change-{ev.Player.UserId}");
|
||||
}
|
||||
base.OnPickingUp(ev);
|
||||
}
|
||||
|
||||
// 变成035的玩家List
|
||||
public static readonly List<Player> ChangedPlayers = new List<Player>();
|
||||
|
||||
// 20秒被035夺舍
|
||||
private IEnumerator<float> ChangeTo035(Player player)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(20f);
|
||||
|
||||
player.RemoveItem(scp035serial);
|
||||
player.DropItems();
|
||||
scp035role = player.Role.Type;
|
||||
controlpos = player.Position;
|
||||
ChangedPlayers.Add(player);
|
||||
CustomRole.Get(035U).AddRole(player);
|
||||
Log.Warn($"{player.Nickname} 在 {controlpos} 不经意间被SCP-035夺舍了. 原角色:{scp035role}");
|
||||
}
|
||||
|
||||
// 丢弃035
|
||||
protected override void OnDropping(DroppingItemEventArgs e)
|
||||
{
|
||||
/*if (Check(e.Item) && e.IsThrown)
|
||||
{
|
||||
e.Player.DropItems();
|
||||
scp035role = e.Player.Role.Type;
|
||||
controlpos = e.Player.Position;
|
||||
scp035serial = e.Item.Serial;
|
||||
e.Item.Destroy();
|
||||
CustomRole.Get(035U).AddRole(e.Player);
|
||||
|
||||
Log.Warn($"{e.Player.Nickname} 在 {controlpos} 自觉佩戴SCP-035导致被夺舍. 原角色:{scp035role}");
|
||||
}*/
|
||||
if (Check(e.Item) && e.Player.Role.Type != RoleTypeId.Tutorial && e.Player.Role.Type != RoleTypeId.Scp3114)
|
||||
{
|
||||
Timing.KillCoroutines($"035change-{e.Player.UserId}");
|
||||
|
||||
Log.Warn($"{e.Player.Nickname} 在 {e.Player.Position} 拒绝被SCP-035夺舍. 角色:{scp035role}");
|
||||
}
|
||||
base.OnDropping(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
107
EXiled-NebulaMist-CP-NG-hint/Items/Tp Gun.cs
Normal file
107
EXiled-NebulaMist-CP-NG-hint/Items/Tp Gun.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Items;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using Exiled.Events.Features;
|
||||
using InventorySystem.Items.Firearms.Attachments;
|
||||
using MEC;
|
||||
using UnityEngine;
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Items
|
||||
{
|
||||
[CustomItem(ItemType.GunRevolver)]
|
||||
public class Tp_Gun : CustomWeapon
|
||||
{
|
||||
public override float Damage { get; set; } = 8;
|
||||
public override uint Id { get; set; } = 4514U;
|
||||
public override string Name { get; set; } = "Tp枪";
|
||||
public override string Description { get; set; } = "Tp用";
|
||||
public override float Weight { get; set; } = 10f;
|
||||
public override byte ClipSize { get; set; } = 6;
|
||||
public override Vector3 Scale { get; set; } = new Vector3(3f, 3f, 3f);
|
||||
public override ItemType Type { get; set; } = ItemType.GunRevolver;
|
||||
public override AttachmentName[] Attachments { get; set; } = new AttachmentName[]
|
||||
{
|
||||
AttachmentName.Flashlight,
|
||||
AttachmentName.HoloSight
|
||||
};
|
||||
public List<Vector3> poslist = new List<Vector3>();
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties()
|
||||
{
|
||||
Limit = 1,
|
||||
DynamicSpawnPoints = new List<DynamicSpawnPoint>
|
||||
{
|
||||
// 电炮房(里)
|
||||
new DynamicSpawnPoint()
|
||||
{
|
||||
Chance = 100,
|
||||
Location = SpawnLocationType.InsideHidLower,
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
//public override uint Id { get; set; } = 4514U;
|
||||
//public override string Name { get; set; } = "Tp枪";
|
||||
//public override ItemType Type { get; set; } = ItemType.GunRevolver;
|
||||
//public override string Description { get; set; } = "Tp枪 用来Tp";
|
||||
//public override float Weight { get; set; } = 1f;
|
||||
//public override Vector3 Scale { get; set; } = new Vector3(1f, 1f, 1f);
|
||||
//public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties()
|
||||
//{
|
||||
// Limit = 1,
|
||||
// DynamicSpawnPoints = new List<DynamicSpawnPoint>
|
||||
// {
|
||||
// // 电炮房(里)
|
||||
// new DynamicSpawnPoint()
|
||||
// {
|
||||
// Chance = 100,
|
||||
// Location = SpawnLocationType.InsideHidUpper,
|
||||
// },
|
||||
|
||||
// },
|
||||
//};
|
||||
|
||||
|
||||
public void OnPlayerShot(ShootingEventArgs e)
|
||||
{
|
||||
|
||||
//执行射线检测,获取玩家瞄准的位置
|
||||
if (Physics.Raycast(e.Player.CameraTransform.position, e.Player.CameraTransform.forward, out RaycastHit hitInfo, 100f))
|
||||
{
|
||||
// 将玩家传送到射线命中的位置
|
||||
e.Player.Position = hitInfo.point;
|
||||
}
|
||||
TeleportPlayer(e.Player, e.Player.Position);
|
||||
Vector3 position = e.Player.Position;
|
||||
Player player = e.Player;
|
||||
Manager Manager = new Manager();
|
||||
Manager.Tp(player, position);
|
||||
|
||||
}
|
||||
|
||||
private void TeleportPlayer(Player player, Vector3 position)
|
||||
{
|
||||
// 直接传送玩家到射击位置
|
||||
player.Position = position;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class Manager
|
||||
{
|
||||
public void Tp(Player player, Vector3 position)
|
||||
{
|
||||
player.Position = position;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
76
EXiled-NebulaMist-CP-NG-hint/LeftPlayerManager.cs
Normal file
76
EXiled-NebulaMist-CP-NG-hint/LeftPlayerManager.cs
Normal file
@ -0,0 +1,76 @@
|
||||
using Exiled.API.Features;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
public class LeftPlayerManager
|
||||
{
|
||||
public class PlayerData
|
||||
{
|
||||
public PlayerData(Player player)
|
||||
{
|
||||
Player = player;
|
||||
}
|
||||
|
||||
public Vector3 Position { get; set; }
|
||||
|
||||
public RoleTypeId Role { get; set; }
|
||||
|
||||
public float Health { get; set; }
|
||||
|
||||
public HashSet<Exiled.API.Features.Items.Item> Inventory { get; set; }
|
||||
|
||||
public Player Player { get; set; }
|
||||
|
||||
public long Time { get; set; }
|
||||
}
|
||||
public static Dictionary<string, PlayerData> DisconnectedPlayers = new Dictionary<string, PlayerData> { };
|
||||
public static PlayerData GetPlayerData(Player player) => DisconnectedPlayers.ContainsKey(player.UserId) ? DisconnectedPlayers[player.UserId] : null;
|
||||
public static void AddPlayer(Player player)
|
||||
{
|
||||
if (player == null && !player.IsAlive) return;
|
||||
|
||||
PlayerData PlayerHandler = new(player)
|
||||
{
|
||||
Role = player.Role.Type,
|
||||
Health = player.Health,
|
||||
Inventory = new HashSet<Exiled.API.Features.Items.Item>(),
|
||||
Position = player.Position,
|
||||
Player = player,
|
||||
Time = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds(),
|
||||
};
|
||||
|
||||
DisconnectedPlayers.Add(player.UserId, PlayerHandler);
|
||||
|
||||
foreach (Exiled.API.Features.Items.Item item in player.Items.ToHashSet())
|
||||
{
|
||||
PlayerHandler.Inventory.Add(item.Clone());
|
||||
}
|
||||
}
|
||||
public static bool GetLeftPlayer(Player player)
|
||||
{
|
||||
return DisconnectedPlayers.ContainsKey(player.UserId);
|
||||
}
|
||||
public static bool SetPlayer(Player player, PlayerData playerData)
|
||||
{
|
||||
if (player == null && playerData == null) return false;
|
||||
// 但如果是DD,role set会自带另一张卡,背包里也已经有了,由于破坏力不大,所以不想管这个问题
|
||||
player.Role.Set(playerData.Role, RoleSpawnFlags.None);
|
||||
player.Position = playerData.Position;
|
||||
player.Health = playerData.Health;
|
||||
|
||||
foreach (Exiled.API.Features.Items.Item item in playerData.Inventory)
|
||||
{
|
||||
item.Give(player);
|
||||
}
|
||||
playerData.Inventory.Clear();
|
||||
|
||||
DisconnectedPlayers?.Remove(player.UserId);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
81
EXiled-NebulaMist-CP-NG-hint/LevelTags.cs
Normal file
81
EXiled-NebulaMist-CP-NG-hint/LevelTags.cs
Normal file
@ -0,0 +1,81 @@
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
|
||||
public class LevelTags
|
||||
{
|
||||
public static string GetLevelTag(long level)
|
||||
{
|
||||
string result;
|
||||
if (level >= 0L && level < 20L)
|
||||
{
|
||||
result = "初次尝试";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level >= 20L && level < 40L)
|
||||
{
|
||||
result = "普通玩家";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level >= 40L && level < 60L)
|
||||
{
|
||||
result = "渐入佳境";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level >= 60L && level < 100L)
|
||||
{
|
||||
result = "PRO玩家";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level >= 80L && level < 100L)
|
||||
{
|
||||
result = "忠实粉丝";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (level >= 100L && level < 140L)
|
||||
{
|
||||
result = "卓拉之星";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level >= 140L && level < 1200L)
|
||||
{
|
||||
result = "一代宗师";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = "神秘";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static long GetLevel(long exp)
|
||||
{
|
||||
return exp / 100L;
|
||||
}
|
||||
public static long GetNextLevel(long exp)
|
||||
{
|
||||
long result;
|
||||
if (exp % 100L == 0L)
|
||||
{
|
||||
result = exp + 100L;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = 100L * ((exp + 99L) / 100L);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
110
EXiled-NebulaMist-CP-NG-hint/Music.cs
Normal file
110
EXiled-NebulaMist-CP-NG-hint/Music.cs
Normal file
@ -0,0 +1,110 @@
|
||||
using Exiled.API.Features;
|
||||
using Mirror;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Exiled.API.Enums;
|
||||
using UnityEngine;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint
|
||||
{
|
||||
public class FakeConnection : NetworkConnectionToClient
|
||||
{
|
||||
public FakeConnection(int networkConnectionId) : base(networkConnectionId)
|
||||
{
|
||||
}
|
||||
|
||||
public override string address => "localhost";
|
||||
|
||||
public override void Send(ArraySegment<byte> segment, int channelId = 0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Disconnect()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
public class WarppedAudio
|
||||
{
|
||||
public AudioPlayerBase Player { get; set; }
|
||||
public string Music { get; set; }
|
||||
public string Verfiy { get; set; }
|
||||
}
|
||||
public class Music
|
||||
{
|
||||
public static List<WarppedAudio> audios = new List<WarppedAudio>();
|
||||
public static AudioPlayerBase PlayMusicpu(string musicname,int vol)
|
||||
{
|
||||
GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(NetworkManager.singleton.playerPrefab);
|
||||
System.Random rand = new System.Random();
|
||||
int num = rand.Next(250, 301);
|
||||
FakeConnection connection = new FakeConnection(num);
|
||||
NetworkServer.AddPlayerForConnection(connection, gameObject);
|
||||
ReferenceHub referenceHub = gameObject.GetComponent<ReferenceHub>();
|
||||
AudioPlayerBase playerbase = AudioPlayerBase.Get(referenceHub);
|
||||
string text = Paths.Exiled + $"\\Pumusic\\{musicname}.ogg"; /*$"C:\\Users\\Administrator\\AppData\\Roaming\\EXILED\\Pumusic\\{musicname}.ogg";*/
|
||||
playerbase.Enqueue(text, -1);
|
||||
playerbase.LogDebug = false;
|
||||
playerbase.Volume = vol;
|
||||
foreach (Player player in Player.List)
|
||||
{
|
||||
playerbase.BroadcastTo.Add(player.Id);
|
||||
}
|
||||
playerbase.Loop = false;
|
||||
playerbase.Play(-1);
|
||||
referenceHub.roleManager.InitializeNewRole(PlayerRoles.RoleTypeId.Overwatch, PlayerRoles.RoleChangeReason.RemoteAdmin);
|
||||
audios.Add(new WarppedAudio { Player = playerbase, Music = musicname, Verfiy = $"{musicname}-{num}@server" });
|
||||
return playerbase;
|
||||
}
|
||||
public static AudioPlayerBase PlayMusicpr(string musicname, int vol , Player p)
|
||||
{
|
||||
GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(NetworkManager.singleton.playerPrefab);
|
||||
System.Random rand = new System.Random();
|
||||
int num = rand.Next(250, 301);
|
||||
FakeConnection connection = new FakeConnection(num);
|
||||
NetworkServer.AddPlayerForConnection(connection, gameObject);
|
||||
ReferenceHub referenceHub = gameObject.GetComponent<ReferenceHub>();
|
||||
AudioPlayerBase playerbase = AudioPlayerBase.Get(referenceHub);
|
||||
string text = Paths.Exiled + $"\\Prmusic\\{musicname}.ogg";/* $"C:\\Users\\Administrator\\AppData\\Roaming\\EXILED\\Prmusic\\{musicname}.ogg";*/
|
||||
|
||||
playerbase.Enqueue(text, -1);
|
||||
playerbase.LogDebug = false;
|
||||
playerbase.Volume = vol;
|
||||
playerbase.BroadcastTo.Add(p.Id);
|
||||
playerbase.Loop = false;
|
||||
playerbase.Play(-1);
|
||||
referenceHub.roleManager.InitializeNewRole(PlayerRoles.RoleTypeId.Overwatch, PlayerRoles.RoleChangeReason.RemoteAdmin);
|
||||
audios.Add(new WarppedAudio { Player = playerbase, Music = musicname, Verfiy = $"{musicname}-{num}@server" });
|
||||
return playerbase;
|
||||
}
|
||||
public static AudioPlayerBase PlayMusicpt(string musicname, int vol , Side side)
|
||||
{
|
||||
GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(NetworkManager.singleton.playerPrefab);
|
||||
System.Random rand = new System.Random();
|
||||
int num = rand.Next(250, 301);
|
||||
FakeConnection connection = new FakeConnection(num);
|
||||
NetworkServer.AddPlayerForConnection(connection, gameObject);
|
||||
ReferenceHub referenceHub = gameObject.GetComponent<ReferenceHub>();
|
||||
AudioPlayerBase playerbase = AudioPlayerBase.Get(referenceHub);
|
||||
string text = Paths.Exiled + $"\\Ptmusic\\{musicname}.ogg"; /*$"C:\\Users\\Administrator\\AppData\\Roaming\\EXILED\\Ptmusic\\{musicname}.ogg";*/
|
||||
playerbase.Enqueue(text, -1);
|
||||
playerbase.LogDebug = false;
|
||||
playerbase.Volume = vol;
|
||||
foreach (Player player in Player.List)
|
||||
{
|
||||
if (player.Role.Side == side)
|
||||
{
|
||||
playerbase.BroadcastTo.Add(player.Id);
|
||||
}
|
||||
}
|
||||
playerbase.Loop = false;
|
||||
playerbase.Play(-1);
|
||||
referenceHub.roleManager.InitializeNewRole(PlayerRoles.RoleTypeId.Overwatch, PlayerRoles.RoleChangeReason.RemoteAdmin);
|
||||
audios.Add(new WarppedAudio { Player = playerbase, Music = musicname, Verfiy = $"{musicname}-{num}@server" });
|
||||
return playerbase;
|
||||
}
|
||||
}
|
||||
}
|
||||
30
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Ability/Blind.cs
Normal file
30
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Ability/Blind.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.Ability
|
||||
{
|
||||
[CustomAbility]
|
||||
public class BindEveryone : ActiveAbility
|
||||
{
|
||||
public override string Name { get; set; } = "致盲周围的人";
|
||||
|
||||
public override string Description { get; set; } = "just Blind Everyone";
|
||||
|
||||
public override float Duration { get; set; } = 0f;
|
||||
|
||||
public override float Cooldown { get; set; } = 250f;
|
||||
|
||||
protected override void AbilityUsed(Player player)
|
||||
{
|
||||
foreach (Player nplayer in Player.List.Where(np => np.RawUserId != player.RawUserId && Vector3.Distance(np.Position, player.Position) < 10f))
|
||||
{
|
||||
nplayer.EnableEffect(EffectType.Flashed, 2, 7f);
|
||||
}
|
||||
EndAbility(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
32
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Ability/FullBlood.cs
Normal file
32
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Ability/FullBlood.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.Ability
|
||||
{
|
||||
[CustomAbility]
|
||||
public class FullBlood : ActiveAbility
|
||||
{
|
||||
public override string Name { get; set; } = "周围人的血回满";
|
||||
|
||||
public override string Description { get; set; } = "HP+999";
|
||||
|
||||
public override float Duration { get; set; } = 0f;
|
||||
|
||||
public override float Cooldown { get; set; } = 750f;
|
||||
|
||||
protected override void AbilityUsed(Player player)
|
||||
{
|
||||
foreach (Player nplayer in Player.List.Where(np => np.RawUserId != player.RawUserId && Vector3.Distance(np.Position, player.Position) < 8f))
|
||||
{
|
||||
if (nplayer.IsHuman)
|
||||
{
|
||||
nplayer.Health = nplayer.MaxHealth;
|
||||
}
|
||||
}
|
||||
EndAbility(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Doors;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.Ability
|
||||
{
|
||||
[CustomAbility]
|
||||
public class OpenTheDoor : ActiveAbility
|
||||
{
|
||||
public override string Name { get; set; } = "开启周围的门";
|
||||
|
||||
public override string Description { get; set; } = "just open the fucking door";
|
||||
|
||||
public override float Duration { get; set; } = 0f;
|
||||
|
||||
public override float Cooldown { get; set; } = 450f;
|
||||
|
||||
protected override void AbilityUsed(Player player)
|
||||
{
|
||||
foreach (Door door in Door.List.Where(d => d.IsOpen == false && Vector3.Distance(d.Position, player.Position) < 30f))
|
||||
{
|
||||
door.IsOpen = true;
|
||||
}
|
||||
EndAbility(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
152
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Cat.cs
Normal file
152
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Cat.cs
Normal file
@ -0,0 +1,152 @@
|
||||
using System.Collections.Generic;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using PlayerRoles;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using MEC;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role
|
||||
{
|
||||
|
||||
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class Cat : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 2;
|
||||
public override int MaxHealth { get; set; } = 288;
|
||||
public override string Name { get; set; } = "猫猫-Cat";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.Tutorial;
|
||||
public override string Description { get; set; } = "你是猫猫,用来逗的猫 ";
|
||||
public override string CustomInfo { get; set; } = "猫猫";
|
||||
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting += OnHurting; // 监听伤害事件
|
||||
Exiled.Events.Handlers.Player.UsingItem += OnUsingItem; // 监听使用物品事件
|
||||
Exiled.Events.Handlers.Server.ReloadedConfigs += OnServerReloaded;
|
||||
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting -= OnHurting;
|
||||
Exiled.Events.Handlers.Player.UsingItem -= OnUsingItem;
|
||||
Exiled.Events.Handlers.Server.ReloadedConfigs -= OnServerReloaded;
|
||||
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.KeycardFacilityManager}",
|
||||
$"{ItemType.SCP500}",
|
||||
$"{ItemType.GunFSP9}",
|
||||
$"{ItemType.SCP207}",
|
||||
$"{ItemType.SCP207}",
|
||||
$"{ItemType.SCP207}",
|
||||
$"{ItemType.SCP207}",
|
||||
};
|
||||
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
base.RoleAdded(player);
|
||||
player.RankName = this.Name;
|
||||
player.ShowHint("<size=30><b><color=red>你是猫猫,用来逗的猫 你只会受到1hp的伤害 你无法攻击别人</color></b></size>", 60f);
|
||||
|
||||
|
||||
|
||||
player.Scale = new Vector3(0.35f, 0.35f, 0.35f);
|
||||
Room hidRoom = Room.List.FirstOrDefault(r => r.Type == RoomType.Hcz049);
|
||||
if (hidRoom != null)
|
||||
{
|
||||
player.Position = hidRoom.Transform.position + new Vector3(0, 1, 0);
|
||||
}
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Cassie.MessageTranslated("The cat has been terminated.", "猫猫已被终止");
|
||||
player.RankName = null;
|
||||
base.RoleRemoved(player);
|
||||
player.Scale = Vector3.one;
|
||||
}
|
||||
|
||||
// 处理伤害事件
|
||||
private void OnHurting(HurtingEventArgs ev)
|
||||
{
|
||||
// 特殊情况:核弹、清收容、挫骨顿伤直接按默认逻辑处理
|
||||
if (ev.DamageHandler.Type == DamageType.Warhead ||
|
||||
ev.DamageHandler.Type == DamageType.Decontamination ||
|
||||
ev.DamageHandler.Type == DamageType.Crushed ||
|
||||
ev.DamageHandler.Type == DamageType.Decontamination)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查受伤者是否为猫猫
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
Debug.Log($"猫猫角色 {ev.Player.Nickname} 受到伤害: {ev.Amount}, 类型: {ev.DamageHandler.Type}");
|
||||
|
||||
// 可乐(SCP-207)伤害免疫
|
||||
if (ev.DamageHandler.Type == DamageType.Scp207 )
|
||||
{
|
||||
ev.Amount = 0f;
|
||||
return;
|
||||
}
|
||||
|
||||
// 电网伤害固定为 1
|
||||
if (ev.DamageHandler.Type == DamageType.Tesla)
|
||||
{
|
||||
ev.Amount = 1f;
|
||||
return;
|
||||
}
|
||||
|
||||
// 其他伤害类型,强制改为 1
|
||||
ev.Amount = 1f;
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查攻击者是否为猫猫
|
||||
if (Check(ev.Attacker))
|
||||
{
|
||||
Debug.Log($"猫猫角色 {ev.Attacker.Nickname} 试图攻击其他玩家,被阻止。");
|
||||
ev.Amount = 0f; // 猫猫攻击无效
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 处理物品使用事件
|
||||
private void OnUsingItem(UsingItemEventArgs ev)
|
||||
{
|
||||
if (ev.Item.Type == ItemType.MicroHID)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
ev.Player.ClearInventory();
|
||||
ev.Player.ShowHint("<size=30><b><color=red>小咪咪是不能用HID的哟 你的物品被基金会人员清除</color></b></size>", 5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnServerReloaded()
|
||||
{
|
||||
foreach (var player in Player.List)
|
||||
{
|
||||
// 防止角色被重复分配或移除
|
||||
if (!Check(player))
|
||||
{
|
||||
RemoveRole(player);
|
||||
AddRole(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
75
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Dr.A.cs
Normal file
75
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Dr.A.cs
Normal file
@ -0,0 +1,75 @@
|
||||
using System.Collections.Generic;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using PlayerRoles;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class DrA : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 1;
|
||||
public override int MaxHealth { get; set; } = 200;
|
||||
public override string Name { get; set; } = "Dr.A-A博士";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.Scientist;
|
||||
public override string Description { get; set; } = "你是A博士";
|
||||
public override string CustomInfo { get; set; } = "A博士";
|
||||
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
//Exiled.Events.Handlers.Player.Hurting += Hurt;
|
||||
Exiled.Events.Handlers.Server.ReloadedConfigs += OnServerReloaded;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
//Exiled.Events.Handlers.Player.Hurting -= Hurt;
|
||||
Exiled.Events.Handlers.Server.ReloadedConfigs -= OnServerReloaded;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.KeycardFacilityManager}",
|
||||
$"{ItemType.MicroHID}",
|
||||
$"{ItemType.SCP268}",
|
||||
$"{ItemType.SCP500}",
|
||||
$"{ItemType.SCP1344}"
|
||||
};
|
||||
|
||||
|
||||
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
base.RoleAdded(player);
|
||||
player.RankName = this.Name;
|
||||
}
|
||||
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Cassie.MessageTranslated(
|
||||
"Dr A has been terminated",
|
||||
"博士A 已被终止"
|
||||
);
|
||||
player.RankName = null;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
|
||||
private void OnServerReloaded()
|
||||
{
|
||||
foreach (var player in Player.List)
|
||||
{
|
||||
// 防止角色被重复分配或移除
|
||||
if (!Check(player))
|
||||
{
|
||||
RemoveRole(player);
|
||||
AddRole(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
188
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Dr.Best.cs
Normal file
188
EXiled-NebulaMist-CP-NG-hint/Patch/Role/Dr.Best.cs
Normal file
@ -0,0 +1,188 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class DrBest : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 3;
|
||||
public override string Name { get; set; } = "Dr. Best";
|
||||
public override string Description { get; set; } = "一名向人类分发疫苗的医生,保护他们免受 SCP-049 的感染。";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfCaptain;
|
||||
public override int MaxHealth { get; set; } = 300;
|
||||
public override string CustomInfo { get; set; } = "Dr. Best - 医疗专家";
|
||||
|
||||
private readonly HashSet<Player> vaccinatedPlayers = new HashSet<Player>();
|
||||
private CoroutineHandle periodicTask;
|
||||
|
||||
// 初始化 Dr. Best 的物品
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunCOM15}",
|
||||
$"{ItemType.GunCOM18}",
|
||||
$"{ItemType.Medkit}"
|
||||
};
|
||||
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting += OnHurt;
|
||||
Exiled.Events.Handlers.Player.Shooting += OnShooting;
|
||||
Exiled.Events.Handlers.Player.Died += OnDied;
|
||||
Exiled.Events.Handlers.Player.ChangingRole += OnChangingRole; // 注册角色切换事件
|
||||
|
||||
Exiled.Events.Handlers.Player.DroppingItem += OnDroppingItem;
|
||||
Exiled.Events.Handlers.Player.PickingUpItem += OnPickingUpItem;
|
||||
|
||||
periodicTask = Timing.RunCoroutine(PeriodicTask());
|
||||
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting -= OnHurt;
|
||||
Exiled.Events.Handlers.Player.Shooting -= OnShooting;
|
||||
Exiled.Events.Handlers.Player.Died -= OnDied; // 注销死亡事件
|
||||
Exiled.Events.Handlers.Player.ChangingRole -= OnChangingRole; // 注销角色切换事件
|
||||
|
||||
Exiled.Events.Handlers.Player.DroppingItem -= OnDroppingItem;
|
||||
Exiled.Events.Handlers.Player.PickingUpItem -= OnPickingUpItem;
|
||||
|
||||
Timing.KillCoroutines(periodicTask);
|
||||
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
|
||||
public override void AddRole(Player player)
|
||||
{
|
||||
base.AddRole(player);
|
||||
player.Broadcast(10, "<color=green>你现在是 Dr. Best!使用 COM15 给玩家接种疫苗,用 COM18 治疗僵尸。</color>");
|
||||
}
|
||||
|
||||
private void OnDroppingItem(DroppingItemEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
ev.Player.ShowHint("<color=red>你无法丢弃任何物品!</color>", 3);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPickingUpItem(PickingUpItemEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
ev.Player.ShowHint("<color=red>你无法捡起任何物品!</color>", 3);
|
||||
}
|
||||
}
|
||||
public void OnShooting(ShootingEventArgs ev)
|
||||
{
|
||||
var shooter = ev.Player;
|
||||
var target = ev.ClaimedTarget;
|
||||
|
||||
if (shooter.Role != Role || shooter.CurrentItem == null || target == null) return;
|
||||
|
||||
// 处理 COM15
|
||||
if (shooter.CurrentItem.Type == ItemType.GunCOM15)
|
||||
{
|
||||
if (target.IsHuman)
|
||||
{
|
||||
vaccinatedPlayers.Add(target);
|
||||
target.Broadcast(5, "<color=blue>你被 Dr. Best 接种了疫苗!现在免疫 SCP-049 的攻击。</color>");
|
||||
shooter.ShowHint("<color=green>成功为目标接种疫苗!你的疫苗已被使用</color>", 3);
|
||||
shooter.RemoveItem(shooter.CurrentItem); // 移除 COM15
|
||||
}
|
||||
}
|
||||
|
||||
// 处理 COM18
|
||||
if (shooter.CurrentItem.Type == ItemType.GunCOM18)
|
||||
{
|
||||
if (target.Role == RoleTypeId.Scp0492) // 确保目标是 SCP-049-2
|
||||
{
|
||||
target.Role.Set(RoleTypeId.ClassD, RoleSpawnFlags.All); // 将目标变为 ClassD
|
||||
target.Position = target.Position; // 强制留在原地
|
||||
target.Broadcast(5, "<color=blue>你被 Dr. Best 接种了急救针!你变成了DD</color>");
|
||||
shooter.Broadcast(5, "<color=green>你成功治愈了一只僵尸!你的急救针已被使用</color>");
|
||||
shooter.RemoveItem(shooter.CurrentItem); // 移除 COM18
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void OnHurt(HurtingEventArgs ev)
|
||||
{
|
||||
var attacker = ev.Attacker;
|
||||
var target = ev.Player;
|
||||
|
||||
if (attacker == null || target == null) return;
|
||||
|
||||
// 如果目标玩家在“免疫组”,取消 SCP-049 的伤害
|
||||
if (attacker.Role == RoleTypeId.Scp049 && vaccinatedPlayers.Contains(target))
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
target.Broadcast(5, "<color=yellow>你免疫了 SCP-049 的攻击!</color>");
|
||||
attacker.ShowHint("<color=red>目标已接种疫苗,无法感染!</color>", 3);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDied(DiedEventArgs ev)
|
||||
{
|
||||
var player = ev.Player;
|
||||
|
||||
if (vaccinatedPlayers.Contains(player))
|
||||
vaccinatedPlayers.Remove(player);
|
||||
if (vaccinatedPlayers.Contains(player))
|
||||
{
|
||||
vaccinatedPlayers.Remove(player);
|
||||
Log.Debug($"玩家 {player.Nickname} 死亡,从免疫组中移除。");
|
||||
}
|
||||
}
|
||||
|
||||
public void OnChangingRole(ChangingRoleEventArgs ev)
|
||||
{
|
||||
var player = ev.Player;
|
||||
|
||||
// 确保是被接种疫苗的玩家切换角色时,才移除
|
||||
if (vaccinatedPlayers.Contains(player))
|
||||
{
|
||||
vaccinatedPlayers.Remove(player);
|
||||
Log.Debug($"玩家 {player.Nickname} 角色切换,从免疫组中移除。");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 每 180 秒执行的任务
|
||||
private IEnumerator<float> PeriodicTask()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(180f);
|
||||
|
||||
foreach (var player in Player.List)
|
||||
{
|
||||
if (Check(player))
|
||||
{
|
||||
player.AddItem(ItemType.GunCOM15); // 补充 COM15
|
||||
player.AddItem(ItemType.GunCOM18); // 补充 COM18
|
||||
player.AddItem(ItemType.SCP500); // 补充医疗包
|
||||
player.Broadcast(5, "<color=green>你的库存已被补充!继续保护玩家。</color>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AdvancedHints;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.GOC.Ability
|
||||
{
|
||||
[CustomAbility]
|
||||
public class OpticalCamouflage : ActiveAbility
|
||||
{
|
||||
public override float Duration { get; set; } = 0f;
|
||||
public override float Cooldown { get; set; } = 120f;
|
||||
public override string Name { get; set; } = "光学迷彩";
|
||||
public override string Description { get; set; } = "使用光学迷彩让你和你身边的队友进入隐身状态";
|
||||
protected override void AbilityUsed(Player player)
|
||||
{
|
||||
foreach (var goc in Player.List)
|
||||
{
|
||||
CustomRole gocc = CustomRole.Get(008U);
|
||||
CustomRole gocsc = CustomRole.Get(009U);
|
||||
CustomRole goch = CustomRole.Get(010U);
|
||||
CustomRole goca = CustomRole.Get(011U);
|
||||
if (gocc == null || gocsc == null || goch == null || goca == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (gocc.Check(goc) || gocsc.Check(goc) || goch.Check(goc) || goca.Check(goc))
|
||||
{
|
||||
if (Vector3.Distance(player.Position, goc.Position) < 3)
|
||||
{
|
||||
goc.EnableEffect(EffectType.Invisible, 20f);
|
||||
goc.ShowManagedHint("<align=left><size=23><b>受到来自指挥官的<color=#00FA9A>光学迷彩</color>效果影响\n隐身持续<color=#3CB371>20秒</color></b></size></align>",20,true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.EnableEffect(EffectType.Invisible, 20f);
|
||||
player.ShowManagedHint("<align=left><size=23><b><color=#00FA9A>光学迷彩</color>效果影响\n隐身持续<color=#3CB371>20秒</color></b></size></align>", 20, true, DisplayLocation.Middle);
|
||||
base.EndAbility(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
using AdvancedHints.Enums;
|
||||
using AdvancedHints;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Doors;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.GOC.Ability
|
||||
{
|
||||
[CustomAbility]
|
||||
public class TacticalShields : ActiveAbility
|
||||
{
|
||||
public override float Duration { get; set; } = 0f;
|
||||
public override float Cooldown { get; set; } = 120f;
|
||||
public override string Name { get; set; } = "战术护盾";
|
||||
public override string Description { get; set; } = "使用战术护盾装置让你和你身边的队友获得惊人的防御力";
|
||||
|
||||
protected override void AbilityUsed(Player player)
|
||||
{
|
||||
foreach (var goc in Player.List)
|
||||
{
|
||||
CustomRole gocc = CustomRole.Get(008U);
|
||||
CustomRole gocsc = CustomRole.Get(009U);
|
||||
CustomRole goch = CustomRole.Get(010U);
|
||||
CustomRole goca = CustomRole.Get(011U);
|
||||
if (gocc == null || gocsc == null || goch == null || goca == null || goc == player)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (gocc.Check(goc) || gocsc.Check(goc) || goch.Check(goc) || goca.Check(goc))
|
||||
{
|
||||
if (Vector3.Distance(player.Position, goc.Position) < 8)
|
||||
{
|
||||
|
||||
goc.ArtificialHealth = 125;
|
||||
goc.EnableEffect(EffectType.DamageReduction, 2, 15);
|
||||
goc.ShowManagedHint("<align=left><size=23><b>受到来自重装干员的<color=#00FA9A>战术护盾</color>效果影响\n获得<color=#3CB371>125</color>AHP\n15秒的伤害减免</b></size></align>", 15, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.ArtificialHealth = 125;
|
||||
player.EnableEffect(EffectType.DamageReduction, 2, 15);
|
||||
player.ShowManagedHint("<align=left><size=23><b><color=#00FA9A>战术护盾</color>效果影响\n获得<color=#3CB371>125</color>AHP\n15秒的伤害减免</b></size></align>", 15, true, DisplayLocation.Middle);
|
||||
base.EndAbility(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features.Doors;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.GOC.Ability
|
||||
{
|
||||
[CustomAbility]
|
||||
public class TacticalTeleportation : ActiveAbility
|
||||
{
|
||||
public override float Duration { get; set; } = 0f;
|
||||
public override float Cooldown { get; set; } = 120f;
|
||||
public override string Name { get; set; } = "战术传送";
|
||||
public override string Description { get; set; } = "使用战术传送装置让你和你身边的队友随机传送到某地";
|
||||
|
||||
public List<Vector3> doorpos = new List<Vector3>();
|
||||
protected override void AbilityUsed(Player player)
|
||||
{
|
||||
foreach (var door in Door.List)
|
||||
{
|
||||
if (Map.IsLczDecontaminated && door.Zone == ZoneType.LightContainment)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
doorpos.Add(door.Position);
|
||||
}
|
||||
}
|
||||
foreach (var goc in Player.List)
|
||||
{
|
||||
CustomRole gocc = CustomRole.Get(008U);
|
||||
CustomRole gocsc = CustomRole.Get(009U);
|
||||
CustomRole goch = CustomRole.Get(010U);
|
||||
CustomRole goca = CustomRole.Get(011U);
|
||||
if (gocc == null || gocsc == null || goch == null || goca == null || goc == player)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (gocc.Check(goc) || gocsc.Check(goc) || goch.Check(goc) || goca.Check(goc))
|
||||
{
|
||||
if (Vector3.Distance(player.Position, goc.Position) < 3)
|
||||
{
|
||||
int randomIndex = UnityEngine.Random.Range(0, doorpos.Count);
|
||||
player.Position = doorpos[randomIndex];
|
||||
goc.Position = doorpos[randomIndex];
|
||||
goc.ShowManagedHint("<align=left><size=23><b>受到来自作战专家的<color=#00FA9A>战术传送</color>效果影响!</b></size></align>", 8, true, DisplayLocation.Middle);
|
||||
player.ShowManagedHint("<align=left><size=23><b>受到<color=#00FA9A>战术传送</color>效果影响!</b></size></align>", 8, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
doorpos.Clear();
|
||||
base.EndAbility(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
86
EXiled-NebulaMist-CP-NG-hint/Patch/Role/GOC/GOC-A.cs
Normal file
86
EXiled-NebulaMist-CP-NG-hint/Patch/Role/GOC/GOC-A.cs
Normal file
@ -0,0 +1,86 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.GOC
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class GOC_A : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 011U;
|
||||
public override int MaxHealth { get; set; } = 115;
|
||||
public override string Name { get; set; } = "GOC-特工";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.ChaosRifleman;
|
||||
public override string Description { get; set; } = "你是GOC-特工\n你们拥有强大的装备\n为了人类的未来,消灭所有异常拯救人类\n消灭所有的其他势力!不留活口!\n服从指挥官的命令!";
|
||||
public override string CustomInfo { get; set; } = "GOC-特工";
|
||||
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunE11SR}",
|
||||
$"{ItemType.KeycardMTFOperative}",
|
||||
$"{ItemType.Coin}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.Adrenaline}",
|
||||
$"{ItemType.ArmorCombat}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "CI Side Gate",
|
||||
Position = new UnityEngine.Vector3(-40.238F,991.881F -36.145F),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public void Hurt(HurtingEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
if (e.Attacker.IsHuman)
|
||||
{
|
||||
e.Amount *= 0.8f;
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
93
EXiled-NebulaMist-CP-NG-hint/Patch/Role/GOC/GOC-C.cs
Normal file
93
EXiled-NebulaMist-CP-NG-hint/Patch/Role/GOC/GOC-C.cs
Normal file
@ -0,0 +1,93 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MEC;
|
||||
using Exiled.API.Enums;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role.GOC.Ability;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.GOC
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class GOC_C : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 008U;
|
||||
public override int MaxHealth { get; set; } = 130;
|
||||
public override string Name { get; set; } = "GOC-指挥官";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.ChaosConscript;
|
||||
public override string Description { get; set; } = "你是GOC-指挥官\n你们拥有强大的装备\n为了人类的未来,消灭所有异常拯救人类\n消灭所有的其他势力!不留活口!";
|
||||
public override string CustomInfo { get; set; } = "GOC-指挥官";
|
||||
|
||||
public override List<CustomAbility> CustomAbilities { get; set; } = new List<CustomAbility>
|
||||
{
|
||||
new OpticalCamouflage()
|
||||
};
|
||||
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunFRMG0}",
|
||||
$"{ItemType.ParticleDisruptor}",
|
||||
$"{ItemType.KeycardO5}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Adrenaline}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "CI Side Gate",
|
||||
Position = new UnityEngine.Vector3(-40.238F,991.881F -36.145F),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public void Hurt(HurtingEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
if (e.Attacker.IsHuman)
|
||||
{
|
||||
e.Amount *= 0.8f;
|
||||
e.Player.EnableEffect(EffectType.Invisible, 2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
91
EXiled-NebulaMist-CP-NG-hint/Patch/Role/GOC/GOC-H.cs
Normal file
91
EXiled-NebulaMist-CP-NG-hint/Patch/Role/GOC/GOC-H.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role.GOC.Ability;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using MEC;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.GOC
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class GOC_H : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 010U;
|
||||
public override int MaxHealth { get; set; } = 150;
|
||||
public override string Name { get; set; } = "GOC-重装特工";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.ChaosRepressor;
|
||||
public override string Description { get; set; } = "你是GOC-重装特工\n你们拥有强大的装备\n为了人类的未来,消灭所有异常拯救人类\n消灭所有的其他势力!不留活口!\n服从指挥官的命令!";
|
||||
public override string CustomInfo { get; set; } = "GOC-重装特工";
|
||||
|
||||
public override List<CustomAbility> CustomAbilities { get; set; } = new List<CustomAbility>
|
||||
{
|
||||
new TacticalShields()
|
||||
};
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.Lantern}",
|
||||
$"{ItemType.Adrenaline}",
|
||||
$"{ItemType.KeycardMTFCaptain}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "CI Side Gate",
|
||||
Position = new UnityEngine.Vector3(-40.238F,991.881F -36.145F),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public void Hurt(HurtingEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
if (e.Attacker.IsHuman)
|
||||
{
|
||||
e.Amount *= 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
96
EXiled-NebulaMist-CP-NG-hint/Patch/Role/GOC/GOC-SC.cs
Normal file
96
EXiled-NebulaMist-CP-NG-hint/Patch/Role/GOC/GOC-SC.cs
Normal file
@ -0,0 +1,96 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Core;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role.GOC.Ability;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.GOC
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class GOC_SC : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 009U;
|
||||
public override int MaxHealth { get; set; } = 120;
|
||||
public override string Name { get; set; } = "GOC-作战专家";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.ChaosMarauder;
|
||||
public override string Description { get; set; } = "你是GOC-作战专家\n你们拥有强大的装备\n为了人类的未来,消灭所有异常拯救人类\n消灭所有的其他势力!不留活口!\n服从指挥官的命令!";
|
||||
public override string CustomInfo { get; set; } = "GOC-作战专家";
|
||||
public override List<CustomAbility> CustomAbilities { get; set; } = new List<CustomAbility>
|
||||
{
|
||||
new TacticalTeleportation()
|
||||
};
|
||||
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunE11SR}",
|
||||
$"{ItemType.Adrenaline}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.KeycardMTFCaptain}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.ArmorCombat}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "CI Side Gate",
|
||||
Position = new UnityEngine.Vector3(-40.238F,991.881F -36.145F),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public void Hurt(HurtingEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
if (e.Attacker.IsHuman)
|
||||
{
|
||||
e.Amount *= 0.8f;
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
foreach (var ci in Player.Get(Side.ChaosInsurgency))
|
||||
{
|
||||
player.SetFriendlyFire(ci.Role.Type, 1f);
|
||||
}
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
using AdvancedHints.Enums;
|
||||
using AdvancedHints;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Doors;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.HD.Ability
|
||||
{
|
||||
[CustomAbility]
|
||||
public class EmergencyAid : ActiveAbility
|
||||
{
|
||||
public override float Duration { get; set; } = 0f;
|
||||
public override float Cooldown { get; set; } = 60f;
|
||||
public override string Name { get; set; } = "紧急救助";
|
||||
public override string Description { get; set; } = "使用你的紧急治疗手段为附近受伤的队员提供医疗救助";
|
||||
|
||||
protected override void AbilityUsed(Player player)
|
||||
{
|
||||
foreach (var teammates in Player.List)
|
||||
{
|
||||
if (teammates.Role.Side == Side.Mtf)
|
||||
{
|
||||
if (Vector3.Distance(player.Position, teammates.Position) < 10)
|
||||
{
|
||||
if (teammates.Health != teammates.MaxHealth)
|
||||
{
|
||||
teammates.Heal(999);
|
||||
teammates.ArtificialHealth = 100f;
|
||||
teammates.ShowManagedHint("<align=left><size=23><b><color=#00BFFF>受到了来自医疗专家的紧急医疗救助!</color></b></size></align>", 10, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
base.EndAbility(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
using System.Collections.Generic;
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Doors;
|
||||
using Exiled.API.Features.Items;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.HD.Ability
|
||||
{
|
||||
[CustomAbility]
|
||||
public class WideAreaBombing : ActiveAbility
|
||||
{
|
||||
public override float Duration { get; set; } = 0f;
|
||||
public override float Cooldown { get; set; } = 120f;
|
||||
public override string Name { get; set; } = "广域轰炸";
|
||||
public override string Description { get; set; } = "使用战术轰炸机对地表区域的每位敌人实行定点轰炸,并在重收容区实行随机轰炸";
|
||||
protected override void AbilityUsed(Player player)
|
||||
{
|
||||
GrenadeManager grenadeManager = new GrenadeManager();
|
||||
List<Door> doors = new List<Door>();
|
||||
List<Player> Enemy = new List<Player>();
|
||||
foreach (var enemy in Player.List)
|
||||
{
|
||||
if (enemy.Role.Side != Side.Mtf && enemy.Zone == ZoneType.Surface)
|
||||
{
|
||||
Enemy.Add(enemy);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Player enemy = Enemy.RandomItem();
|
||||
Enemy.Remove(enemy);
|
||||
Vector3 enemyPosition = enemy.Position + new Vector3(0, 15, 0);
|
||||
grenadeManager.GenerateAndActivateGrenade(player, ProjectileType.FragGrenade, 6, enemyPosition);
|
||||
enemy.ShowManagedHint("<align=left><size=23><b><color=#00BFFF>遭到来自落锤特遣队的定点轰炸!当心!</color></b></size></align>", 6, true, DisplayLocation.Middle);
|
||||
}
|
||||
foreach (var door in Door.List)
|
||||
{
|
||||
if (door.Zone == ZoneType.HeavyContainment && !door.IsCheckpoint && !door.IsGate)
|
||||
{
|
||||
if (Vector3.Distance(player.Position, door.Position) > 10)
|
||||
{
|
||||
doors.Add(door);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Door door = doors.RandomItem();
|
||||
grenadeManager.GenerateAndActivateGrenade(player, ProjectileType.FragGrenade, 10, door.Position);
|
||||
}
|
||||
base.EndAbility(player);
|
||||
}
|
||||
}
|
||||
public class GrenadeManager
|
||||
{
|
||||
public void GenerateAndActivateGrenade(Player player, ProjectileType type, float fuseTime, Vector3 position)
|
||||
{
|
||||
ExplosiveGrenade grenade = (ExplosiveGrenade)Exiled.API.Features.Items.Item.Create(type.GetItemType());
|
||||
grenade.FuseTime = fuseTime;
|
||||
grenade.SpawnActive(position, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
75
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HD-C.cs
Normal file
75
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HD-C.cs
Normal file
@ -0,0 +1,75 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role.GOC.Ability;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role.HD.Ability;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.HD
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class HD_C : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 012U;
|
||||
public override int MaxHealth { get; set; } = 150;
|
||||
public override string Name { get; set; } = "落锤特遣队-指挥官";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfCaptain;
|
||||
public override string Description { get; set; } = "你是落锤特遣队-指挥官\n你们拥有强大的火力,指挥你的队员们\n帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "落锤特遣队-指挥官";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunFRMG0}",
|
||||
$"{ItemType.KeycardMTFCaptain}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.GrenadeFlash}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override List<CustomAbility> CustomAbilities { get; set; } = new List<CustomAbility>
|
||||
{
|
||||
new WideAreaBombing()
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
107
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HD-HP.cs
Normal file
107
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HD-HP.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.Commands.PluginManager;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features.Items;
|
||||
using UnityEngine;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features.DamageHandlers;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.Events.Features;
|
||||
using PlayerStatsSystem;
|
||||
using Exiled.API.Features.Pickups;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.HD
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class HD_HP : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 015U;
|
||||
public override int MaxHealth { get; set; } = 120;
|
||||
public override string Name { get; set; } = "落锤特遣队-爆破专家";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfSpecialist;
|
||||
public override string Description { get; set; } = "你是落锤特遣队-爆破专家\n你们拥有强大的火力,服从上级们的命令\n利用你的爆破知识为队员们提供火力支援\n帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "落锤特遣队-爆破专家";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
"龙息喷",
|
||||
$"{ItemType.KeycardMTFOperative}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
PlayerEvent.Dying += Dying;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
PlayerEvent.Dying -= Dying;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
private void Dying(DyingEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
foreach (var item in e.ItemsToDrop)
|
||||
{
|
||||
if (item.Type == ItemType.GunShotgun)
|
||||
{
|
||||
item.Destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void Hurt(HurtingEventArgs e)
|
||||
{
|
||||
if (Check(e.Attacker) && e.Attacker.CurrentItem.Type == ItemType.GunShotgun)
|
||||
{
|
||||
if (e.DamageHandler.Type == DamageType.Explosion)
|
||||
{
|
||||
e.Amount *= 0.06f;
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
65
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HD-P.cs
Normal file
65
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HD-P.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.HD
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class HD_P : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 014U;
|
||||
public override int MaxHealth { get; set; } = 110;
|
||||
public override string Name { get; set; } = "落锤特遣队-武装干员";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfPrivate;
|
||||
public override string Description { get; set; } = "你是落锤特遣队-武装干员\n你们拥有强大的火力,服从上级们的命令\n帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "落锤特遣队-武装干员";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunE11SR}",
|
||||
$"{ItemType.KeycardMTFOperative}",
|
||||
$"{ItemType.GrenadeFlash}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
65
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HD-TL.cs
Normal file
65
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HD-TL.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.HD
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class HD_TL : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 013U;
|
||||
public override int MaxHealth { get; set; } = 130;
|
||||
public override string Name { get; set; } = "落锤特遣队-行动队长";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfSergeant;
|
||||
public override string Description { get; set; } = "你是落锤特遣队-行动队长\n你们拥有强大的火力,指挥你的队员们并服从指挥官的命令\n帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "落锤特遣队-行动队长";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunFRMG0}",
|
||||
$"{ItemType.KeycardMTFCaptain}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
72
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HP-MD.cs
Normal file
72
EXiled-NebulaMist-CP-NG-hint/Patch/Role/HD/HP-MD.cs
Normal file
@ -0,0 +1,72 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role.HD.Ability;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.HD
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class HD_MD : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 016U;
|
||||
public override int MaxHealth { get; set; } = 120;
|
||||
public override string Name { get; set; } = "落锤特遣队-医疗专家";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfCaptain;
|
||||
public override string Description { get; set; } = "你是落锤特遣队-医疗专家\n你们拥有强大的火力,服从上级们的命令\n向受伤的队友提供医疗救助\n帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "落锤特遣队-医疗专家";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunE11SR}",
|
||||
$"{ItemType.KeycardMTFOperative}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.Adrenaline}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override List<CustomAbility> CustomAbilities { get; set; } = new List<CustomAbility>
|
||||
{
|
||||
new EmergencyAid()
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
107
EXiled-NebulaMist-CP-NG-hint/Patch/Role/RRH/RRH-C.cs
Normal file
107
EXiled-NebulaMist-CP-NG-hint/Patch/Role/RRH/RRH-C.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MEC;
|
||||
using Exiled.API.Enums;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.RRH
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class RRH_C : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 001U;
|
||||
public override int MaxHealth { get; set; } = 135;
|
||||
public override string Name { get; set; } = "红右手-指挥官";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfCaptain;
|
||||
public override string Description { get; set; } = "你是红右手-指挥官,你们拥有强大的武器,指挥你的小伙计们,帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "红右手-指挥官";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunFRMG0}",
|
||||
$"{ItemType.KeycardO5}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Adrenaline}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.DroppedItem += DropCoin;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.DroppedItem -= DropCoin;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public static Dictionary<string, bool> CoolDown = new Dictionary<string, bool>();
|
||||
|
||||
private void DropCoin(DroppedItemEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
if (ev.Pickup.Type == ItemType.Coin && CoolDown[ev.Player.UserId])
|
||||
{
|
||||
foreach (var rrh in Player.List)
|
||||
{
|
||||
if (rrh.Role.Name == Get(001U).Name)
|
||||
{
|
||||
rrh.EnableEffect(EffectType.Scp207,1);
|
||||
}
|
||||
if (rrh.Role.Name == Get(002U).Name)
|
||||
{
|
||||
rrh.EnableEffect(EffectType.Scp207, 1);
|
||||
}
|
||||
if (rrh.Role.Name == Get(003U).Name)
|
||||
{
|
||||
rrh.EnableEffect(EffectType.Scp207, 1);
|
||||
}
|
||||
}
|
||||
CoolDown[ev.Player.UserId] = false;
|
||||
Timing.RunCoroutine(Cooldown(ev.Player.UserId), "Cooldown");
|
||||
}
|
||||
}
|
||||
}
|
||||
private IEnumerator<float> Cooldown(string userId)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(170f);
|
||||
CoolDown[userId] = true;
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
CoolDown[player.UserId] = true;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
129
EXiled-NebulaMist-CP-NG-hint/Patch/Role/RRH/RRH-P.cs
Normal file
129
EXiled-NebulaMist-CP-NG-hint/Patch/Role/RRH/RRH-P.cs
Normal file
@ -0,0 +1,129 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.RRH
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class RRH_P : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 003U;
|
||||
public override int MaxHealth { get; set; } = 115;
|
||||
public override string Name { get; set; } = "红右手-列兵";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfPrivate;
|
||||
public override string Description { get; set; } = "你是红右手-列兵,即使你只是个小角色,但你们拥有强大的武器,服从长官的命令,帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "红右手-列兵";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunCrossvec}",
|
||||
$"{ItemType.KeycardMTFOperative}",
|
||||
$"{ItemType.Coin}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.ArmorCombat}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.DroppedItem += DropCoin;
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.DroppedItem -= DropCoin;
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public static Dictionary<string, bool> CoolDown = new Dictionary<string, bool>();
|
||||
public static Dictionary<string, bool> AbilityTime = new Dictionary<string, bool>();
|
||||
|
||||
private void DropCoin(DroppedItemEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
if (ev.Pickup.Type == ItemType.Coin && CoolDown[ev.Player.UserId])
|
||||
{
|
||||
foreach (var rrh in Player.List)
|
||||
{
|
||||
if (rrh.Role.Name == Get(001U).Name)
|
||||
{
|
||||
rrh.ArtificialHealth += 20;
|
||||
}
|
||||
if (rrh.Role.Name == Get(002U).Name)
|
||||
{
|
||||
rrh.ArtificialHealth += 20;
|
||||
}
|
||||
if (rrh.Role.Name == Get(003U).Name)
|
||||
{
|
||||
rrh.ArtificialHealth += 20;
|
||||
}
|
||||
}
|
||||
CoolDown[ev.Player.UserId] = false;
|
||||
AbilityTime[ev.Player.UserId] = true;
|
||||
Timing.RunCoroutine(Cooldown(ev.Player.UserId), "Cooldown");
|
||||
Timing.RunCoroutine(Ability(ev.Player.UserId), "Ability");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Hurt(HurtingEventArgs e)
|
||||
{
|
||||
if (Check(e.Attacker))
|
||||
{
|
||||
if (AbilityTime[e.Attacker.UserId])
|
||||
{
|
||||
e.Amount *= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
private IEnumerator<float> Cooldown(string userId)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(120f);
|
||||
CoolDown[userId] = true;
|
||||
}
|
||||
private IEnumerator<float> Ability(string userId)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(15f);
|
||||
AbilityTime[userId] = false;
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
104
EXiled-NebulaMist-CP-NG-hint/Patch/Role/RRH/RRH-S.cs
Normal file
104
EXiled-NebulaMist-CP-NG-hint/Patch/Role/RRH/RRH-S.cs
Normal file
@ -0,0 +1,104 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Exiled.API.Enums;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using MEC;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.RRH
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class RRH_S : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 002U;
|
||||
public override int MaxHealth { get; set; } = 120;
|
||||
public override string Name { get; set; } = "红右手-中士";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfSergeant;
|
||||
public override string Description { get; set; } = "你是红右手-中士,你们拥有强大的武器,指挥你的小队成员并服从指挥官的命令,帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "红右手-中士";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunE11SR}",
|
||||
$"{ItemType.Coin}",
|
||||
$"{ItemType.KeycardMTFCaptain}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.ArmorCombat}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.DroppedItem += DropCoin;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.DroppedItem -= DropCoin;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public static Dictionary<string, bool> CoolDown = new Dictionary<string, bool>();
|
||||
|
||||
private void DropCoin(DroppedItemEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
if (ev.Pickup.Type == ItemType.Coin && CoolDown[ev.Player.UserId])
|
||||
{
|
||||
foreach (var scp in Player.Get(Side.Scp))
|
||||
{
|
||||
if (scp.Health < 500)
|
||||
{
|
||||
return;
|
||||
}
|
||||
scp.Health -= 100;
|
||||
}
|
||||
ev.Player.AddItem(ItemType.Jailbird);
|
||||
CoolDown[ev.Player.UserId] = false;
|
||||
Timing.RunCoroutine(Cooldown(ev.Player.UserId), "Cooldown");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private IEnumerator<float> Cooldown(string userId)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(150f);
|
||||
CoolDown[userId] = true;
|
||||
}
|
||||
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
CoolDown[player.UserId] = true;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
127
EXiled-NebulaMist-CP-NG-hint/Patch/Role/RRH/RRH-SC.cs
Normal file
127
EXiled-NebulaMist-CP-NG-hint/Patch/Role/RRH/RRH-SC.cs
Normal file
@ -0,0 +1,127 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Core;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.RRH
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class RRH_SC : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 004U;
|
||||
public override int MaxHealth { get; set; } = 120;
|
||||
public override string Name { get; set; } = "红右手-收容专家";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfSpecialist;
|
||||
public override string Description { get; set; } = "你是红右手-收容专家,你们拥有强大的武器,指挥你的小队成员并服从指挥官的命令,帮助设施内残留的基金会成员收容所有出逃的SCP项目";
|
||||
public override string CustomInfo { get; set; } = "红右手-收容专家";
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.GunE11SR}",
|
||||
$"{ItemType.Coin}",
|
||||
$"{ItemType.KeycardMTFCaptain}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.ArmorHeavy}"
|
||||
};
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "NTF Side Gate",
|
||||
Position = new UnityEngine.Vector3(138.3f, 995.5f, -65f),
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.DroppedItem += DropCoin;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.DroppedItem -= DropCoin;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
public static Dictionary<string, bool> CoolDown_C = new Dictionary<string, bool>();
|
||||
public static Dictionary<string, bool> CoolDown_R = new Dictionary<string, bool>();
|
||||
public static Dictionary<string, bool> AbilityTime = new Dictionary<string, bool>();
|
||||
|
||||
private void DropCoin(DroppedItemEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
if (ev.Pickup.Type == ItemType.Coin && CoolDown_C[ev.Player.UserId])
|
||||
{
|
||||
foreach (var scp in Player.Get(Side.Scp))
|
||||
{
|
||||
if (Vector3.Distance(ev.Player.Position, scp.Position) <= 8f)
|
||||
{
|
||||
scp.HumeShield = 0;
|
||||
}
|
||||
}
|
||||
CoolDown_C[ev.Player.UserId] = false;
|
||||
Timing.RunCoroutine(Cooldown_C(ev.Player.UserId), "Cooldown Coin");
|
||||
}
|
||||
|
||||
if (ev.Pickup.Type == ItemType.Radio && CoolDown_R[ev.Player.UserId])
|
||||
{
|
||||
ev.Player.IsGodModeEnabled = true;
|
||||
ev.Player.EnableEffect(EffectType.Scp207, 4);
|
||||
CoolDown_R[ev.Player.UserId] = false;
|
||||
Timing.RunCoroutine(Cooldown_R(ev.Player.UserId), "Cooldown Radio");
|
||||
Timing.RunCoroutine(Ability(ev.Player), "Ability");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private IEnumerator<float> Cooldown_C(string userId)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(110f);
|
||||
CoolDown_C[userId] = true;
|
||||
}
|
||||
private IEnumerator<float> Cooldown_R(string userId)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(120f);
|
||||
CoolDown_R[userId] = true;
|
||||
}
|
||||
private IEnumerator<float> Ability(Player player)
|
||||
{
|
||||
yield return Timing.WaitForSeconds(5f);
|
||||
player.IsGodModeEnabled = false;
|
||||
player.EnableEffect(EffectType.Scp207, 0);
|
||||
AbilityTime[player.UserId] = false;
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
CoolDown_C[player.UserId] = true;
|
||||
CoolDown_R[player.UserId] = true;
|
||||
AbilityTime[player.UserId] = false;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
303
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SCP035_Role.cs
Normal file
303
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SCP035_Role.cs
Normal file
@ -0,0 +1,303 @@
|
||||
using System;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerRoles;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Items;
|
||||
using System.Collections.Generic;
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Enums;
|
||||
using VoiceChat;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features.Pickups;
|
||||
using Exiled.API.Features.Roles;
|
||||
using Exiled.CustomItems.API.Features;
|
||||
using Exiled.CustomRoles.API;
|
||||
using Exiled.Events.EventArgs.Scp079;
|
||||
using Exiled.Events.EventArgs.Scp106;
|
||||
using Exiled.Events.Features;
|
||||
using Exiled.Events.Handlers;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using MEC;
|
||||
using PlayerRoles.PlayableScps.Scp079;
|
||||
using UnityEngine;
|
||||
using VoiceChat.Networking;
|
||||
using PlayerRoles.Spectating;
|
||||
using PlayerRoles.Voice;
|
||||
using Cassie = Exiled.API.Features.Cassie;
|
||||
using Player = Exiled.API.Features.Player;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role
|
||||
{
|
||||
[CustomRole(RoleTypeId.Tutorial)]
|
||||
public class SCP035_Role : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 035U;
|
||||
public override int MaxHealth { get; set; } = 200;
|
||||
public override string Name { get; set; } = "SCP-035";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.Tutorial;
|
||||
public override string Description { get; set; } = "你被035占据了身体,你每隔10秒就会被身上分泌的一种腐蚀性物质腐蚀,帮助其他SCP让设施完全陷入收容失效";
|
||||
public override string CustomInfo { get; set; } = "SCP035";
|
||||
public float DamagePerTick { get; set; } = 15f;
|
||||
public override bool KeepInventoryOnSpawn { get; set; } = true;
|
||||
|
||||
public Vector3 TantrumPos;
|
||||
private ReferenceHub scp035ReferenceHub;
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
Limit = 1,
|
||||
StaticSpawnPoints = new List<StaticSpawnPoint>
|
||||
{
|
||||
new StaticSpawnPoint()
|
||||
{
|
||||
Name = "Control Pos",
|
||||
Position = SCP035_Item.controlpos,
|
||||
Chance = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
PlayerEvent.Handcuffing += HandCuff;
|
||||
PlayerEvent.PickingUpItem += PickingUpItem;
|
||||
PlayerEvent.DroppingItem += DropItem;
|
||||
PlayerEvent.UsingItem += UsingItem;
|
||||
PlayerEvent.ActivatingGenerator += ActiveG;
|
||||
|
||||
Exiled.Events.Handlers.Scp106.Attacking += LD;
|
||||
Exiled.Events.Handlers.Scp079.GainingExperience += GE;
|
||||
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
PlayerEvent.Handcuffing -= HandCuff;
|
||||
PlayerEvent.PickingUpItem -= PickingUpItem;
|
||||
PlayerEvent.DroppingItem -= DropItem;
|
||||
PlayerEvent.UsingItem -= UsingItem;
|
||||
PlayerEvent.ActivatingGenerator -= ActiveG;
|
||||
|
||||
Exiled.Events.Handlers.Scp106.Attacking -= LD;
|
||||
Exiled.Events.Handlers.Scp079.GainingExperience -= GE;
|
||||
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
|
||||
private void LD(AttackingEventArgs e)
|
||||
{
|
||||
if (Check(e.Target))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
private void GE(GainingExperienceEventArgs e)
|
||||
{
|
||||
if (e.RoleType == RoleTypeId.Tutorial)
|
||||
{
|
||||
if (e.GainType == Scp079HudTranslation.ExpGainTerminationDirect ||
|
||||
e.GainType == Scp079HudTranslation.ExpGainTerminationAssist ||
|
||||
e.GainType == Scp079HudTranslation.ExpGainTerminationWitness)
|
||||
{
|
||||
e.IsAllowed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 035伤害事件
|
||||
private void Hurt(HurtingEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
foreach (var info in SomeInformaiton.CustomRoleListScpTeam)
|
||||
{
|
||||
if (ev.Attacker.IsScp)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
if (ev.Attacker.CustomInfo == info)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
if (ev.Attacker.IsHuman)
|
||||
{
|
||||
ev.Amount *= 0.8f;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Check(ev.Attacker))
|
||||
{
|
||||
foreach (var info in SomeInformaiton.CustomRoleListScpTeam)
|
||||
{
|
||||
if (ev.Player.IsScp)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
if (ev.Player.CustomInfo == info)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 035拷人和被拷事件
|
||||
private void HandCuff(HandcuffingEventArgs e)
|
||||
{
|
||||
if (Check(e.Target))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>无法捆绑<color=red>SCP-035</color>!</b></size></align>", 8f,true, DisplayLocation.Middle);
|
||||
}
|
||||
|
||||
if (Check(e.Player))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>无法作为<color=red>SCP-035</color>捆绑其他人类!</b></size></align>", 8f, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
// 035物品黑名单
|
||||
private List<ItemType> BlackItemList = new List<ItemType>
|
||||
{
|
||||
ItemType.SCP207,
|
||||
ItemType.Jailbird,
|
||||
ItemType.MicroHID,
|
||||
ItemType.ParticleDisruptor,
|
||||
ItemType.SCP1853,
|
||||
};
|
||||
// 035捡起物品
|
||||
private void PickingUpItem(PickingUpItemEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
foreach (var item in BlackItemList)
|
||||
{
|
||||
if (e.Pickup.Type == item)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>无法作为<color=red>SCP-035</color>捡起该物品!</b></size></align>", 8f, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 035丢弃035(物)
|
||||
private void DropItem(DroppingItemEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
if (e.Item.Serial == SCP035_Item.scp035serial && e.Item.Type == ItemType.SCP268)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>无法作为<color=red>SCP-035</color>丢弃SCP-035(物)!</b></size></align>", 8f, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 035使用物品
|
||||
private void UsingItem(UsingItemEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
foreach (var item in BlackItemList)
|
||||
{
|
||||
if (e.Item.Type == item)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>无法作为<color=red>SCP-035</color>使用该物品!</b></size></align>", 8f, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
if (e.Item.Serial == SCP035_Item.scp035serial && e.Item.Type == ItemType.SCP268)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>无法作为<color=red>SCP-035</color>使用SCP-035(物)!</b></size></align>", 8f, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void ActiveG(ActivatingGeneratorEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
Timing.RunCoroutine(Appearance(player), $"{player.UserId}-appearance");
|
||||
Timing.RunCoroutine(Corrosion(player), $"{player.UserId}-corrosion");
|
||||
Timing.KillCoroutines("damage-players");
|
||||
player.Position = SCP035_Item.controlpos;
|
||||
scp035ReferenceHub = player.ReferenceHub;
|
||||
|
||||
RoundStarted.scpChannel.Add(player.Id);
|
||||
RoundStarted.scpList.Add(player);
|
||||
|
||||
Timing.CallDelayed(1f, () =>
|
||||
{
|
||||
player.ChangeAppearance(SCP035_Item.scp035role, false);
|
||||
});
|
||||
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
// 035外观模型
|
||||
private IEnumerator<float> Appearance(Player player)
|
||||
{
|
||||
for (; ; )
|
||||
{
|
||||
yield return Timing.WaitForSeconds(20f);
|
||||
player.ChangeAppearance(SCP035_Item.scp035role, false);
|
||||
player.CustomInfo = $"<color=#C50000>{player.Nickname}\n{GetInformation.GET_Role_Type(SCP035_Item.scp035role)}\n[!!!这是SCP-035的伪装!!!]</color>";
|
||||
player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.Nickname;
|
||||
player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.Role;
|
||||
player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.PowerStatus;
|
||||
player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.UnitName;
|
||||
}
|
||||
}
|
||||
// 035腐蚀效果
|
||||
private IEnumerator<float> Corrosion(Player player)
|
||||
{
|
||||
for (; ; )
|
||||
{
|
||||
yield return Timing.WaitForSeconds(10f);
|
||||
player.Hurt(DamagePerTick,"长时间的高度腐蚀");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Timing.KillCoroutines($"{player.UserId}-appearance");
|
||||
Timing.KillCoroutines($"{player.UserId}-corrosion");
|
||||
SCP035_Item.ChangedPlayers.Remove(player);
|
||||
Cassie.MessageTranslated("SCP 0 3 5 .G3 .G2 SUCCESSFULLY TERMINATED .G1 TERMINATION CAUSE UNSPECIFIED", $"SCP-035(宿主:{player.Nickname})已被成功消灭,具体原因不明");
|
||||
|
||||
RoundStarted.scpChannel.Remove(player.Id);
|
||||
RoundStarted.scpList.Remove(player);
|
||||
|
||||
TantrumPos = player.Position;
|
||||
//Timing.RunCoroutine(DamagePlayersInArea(), "damage-players");
|
||||
|
||||
CustomItem.TrySpawn(0352U, player.Position,out Pickup pickup);
|
||||
pickup.Serial = SCP035_Item.scp035serial;
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
|
||||
// 死后腐蚀性液体
|
||||
private IEnumerator<float> DamagePlayersInArea()
|
||||
{
|
||||
int times = 0;
|
||||
while (times <= 30)
|
||||
{
|
||||
foreach (var human in Player.List)
|
||||
{
|
||||
if (human.IsHuman && Vector3.Distance(TantrumPos, human.Position) <= 3 && !Check(human))
|
||||
{
|
||||
human.Hurt(8f, "被SCP-035的高度腐蚀性液体腐蚀");
|
||||
}
|
||||
}
|
||||
times++;
|
||||
yield return Timing.WaitForSeconds(1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
135
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SCP181.cs
Normal file
135
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SCP181.cs
Normal file
@ -0,0 +1,135 @@
|
||||
using System.Collections.Generic;
|
||||
using AdvancedHints.Enums;
|
||||
using AdvancedHints;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Pickups;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using UnityEngine;
|
||||
using Utf8Json.Formatters;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class SCP181 : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 181U;
|
||||
public override int MaxHealth { get; set; } = 150;
|
||||
public override string Name { get; set; } = "SCP-181";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.ClassD;
|
||||
public override string Description { get; set; } = "你有75%的概率徒手开权限门和SCP展柜,40%的概率免疫一次伤害,丢物品时35%的概率复制";
|
||||
public override string CustomInfo { get; set; } = "SCP181";
|
||||
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
Limit = 1U
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting += Hurt;
|
||||
Exiled.Events.Handlers.Player.InteractingDoor += OpenDoor;
|
||||
Exiled.Events.Handlers.Player.Escaping += Escaped;
|
||||
Exiled.Events.Handlers.Player.InteractingLocker += OpenLocker;
|
||||
Exiled.Events.Handlers.Player.DroppedItem += DropItem;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting -= Hurt;
|
||||
Exiled.Events.Handlers.Player.InteractingDoor -= OpenDoor;
|
||||
Exiled.Events.Handlers.Player.Escaping -= Escaped;
|
||||
Exiled.Events.Handlers.Player.InteractingLocker -= OpenLocker;
|
||||
Exiled.Events.Handlers.Player.DroppedItem -= DropItem;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
private void Hurt(HurtingEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
System.Random random = new System.Random();
|
||||
double num = random.NextDouble();
|
||||
if (num <= 0.40)
|
||||
{
|
||||
if (e.DamageHandler.Type != DamageType.Warhead)
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
if (e.Attacker != null)
|
||||
{
|
||||
e.Attacker.ShowManagedHint("\n<color=#7FFFD4><size=22><b>你的攻击被SCP-181躲开了!</b></size></color>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void OpenDoor(InteractingDoorEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
System.Random random = new System.Random();
|
||||
double num = random.NextDouble();
|
||||
if (num <= 0.75 && e.Door.Type != DoorType.Scp079First)
|
||||
{
|
||||
e.IsAllowed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Escaped(EscapingEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
Timing.CallDelayed(5f, delegate ()
|
||||
{
|
||||
|
||||
Exiled.API.Features.Items.Item item = Exiled.API.Features.Items.Item.Create(ItemType.MicroHID, e.Player);
|
||||
item.CreatePickup(e.Player.Position, default(Quaternion), true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenLocker(InteractingLockerEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
System.Random random = new System.Random();
|
||||
double num = random.NextDouble();
|
||||
if (num <= 0.75)
|
||||
{
|
||||
e.IsAllowed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DropItem(DroppedItemEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
System.Random random = new System.Random();
|
||||
double num = random.NextDouble();
|
||||
if (num <= 0.35)
|
||||
{
|
||||
Pickup pickup = Pickup.CreateAndSpawn(e.Pickup.Type, e.Player.Position, e.Player.Rotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
Cassie.MessageTranslated("SCP 1 8 1 .G1 .G3 SUCCESSFULLY TERMINATED .G2 TERMINATION CAUSE UNSPECIFIED", "SCP-181已被成功收容,具体原因不明");
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
128
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SCP682.cs
Normal file
128
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SCP682.cs
Normal file
@ -0,0 +1,128 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role
|
||||
{
|
||||
[CustomRole(RoleTypeId.Scp939)]
|
||||
public class SCP682 : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 682U;
|
||||
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.Scp939;
|
||||
|
||||
public override int MaxHealth { get; set; } = 1300;
|
||||
|
||||
public override bool KeepRoleOnChangingRole { get; set; } = true;
|
||||
public override bool KeepRoleOnDeath { get; set; } = true;
|
||||
|
||||
public override string Name { get; set; } = "SCP-682";
|
||||
|
||||
public override string Description { get; set; } =
|
||||
"<size=24>死后能复活三次,每次死后增加血量和大小</size>";
|
||||
|
||||
public override string CustomInfo { get; set; } = "SCP682";
|
||||
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new()
|
||||
{
|
||||
Limit = 1,
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Dying += OnDead;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Dying += OnDead;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
private int RespawnCount = 0;
|
||||
private void OnDead(DyingEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
RespawnCount++;
|
||||
RemoveRole(ev.Player);
|
||||
if (ev.DamageHandler.Type == DamageType.Warhead)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (RespawnCount == 1)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>45s后复活</color>", 45);
|
||||
Timing.CallDelayed(45f, () =>
|
||||
{
|
||||
AddRole(ev.Player);
|
||||
});
|
||||
}
|
||||
else if (RespawnCount == 2)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>55s后复活</color>", 55);
|
||||
Timing.CallDelayed(55f, () =>
|
||||
{
|
||||
AddRole(ev.Player);
|
||||
});
|
||||
}
|
||||
else if (RespawnCount == 3)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>80s后复活最后一次复活</color>", 80);
|
||||
Timing.CallDelayed(80f, () =>
|
||||
{
|
||||
AddRole(ev.Player);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = Name;
|
||||
if (RespawnCount == 0)
|
||||
{
|
||||
player.Scale = new UnityEngine.Vector3(0.6f, 0.6f, 0.6f);
|
||||
}
|
||||
if (RespawnCount == 1)
|
||||
{
|
||||
player.Scale = new UnityEngine.Vector3(0.8f,0.8f,0.8f);
|
||||
MaxHealth += 250;
|
||||
XPData.AddDisplayMSG(player, "<color=#4169E1>血量增加250体型变大</color>", 5);
|
||||
}
|
||||
else if (RespawnCount == 2)
|
||||
{
|
||||
player.Scale = new UnityEngine.Vector3(1.0f, 1.0f, 1.0f);
|
||||
MaxHealth += 150;
|
||||
XPData.AddDisplayMSG(player, "<color=#4169E1>血量增加150体型正常</color>", 5);
|
||||
}
|
||||
else if (RespawnCount == 3)
|
||||
{
|
||||
MaxHealth += 200;
|
||||
player.Scale = new UnityEngine.Vector3(1.1f, 1.1f, 1.1f);
|
||||
XPData.AddDisplayMSG(player, "<color=#4169E1>血量增加200体型最大化</color>", 5);
|
||||
}
|
||||
player.MaxHealth = MaxHealth;
|
||||
player.Health = MaxHealth;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
player.RankName = "";
|
||||
Cassie.MessageTranslated("SCP 6 8 2 .G1 .G3 SUCCESSFULLY TERMINATED .G2 TERMINATION CAUSE UNSPECIFIED", "SCP-682已被成功收容,具体原因不明");
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
200
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SCP999.cs
Normal file
200
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SCP999.cs
Normal file
@ -0,0 +1,200 @@
|
||||
using EXiled_NebulaMist_CP_NG_hint.Role.Ability;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Pickups;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Map;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using PlayerRoles;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using EXiled_NebulaMist_CP_NG_hint;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Roles
|
||||
{
|
||||
[CustomRole(RoleTypeId.Tutorial)]
|
||||
public class SCP999 : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 999U;
|
||||
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.Tutorial;
|
||||
|
||||
public override int MaxHealth { get; set; } = 200;
|
||||
|
||||
public override string Name { get; set; } = "SCP-999";
|
||||
|
||||
public override string Description { get; set; } =
|
||||
"<size=24>部分枪械开枪加血或减血(看右方提示),丢对讲机传至SCP</size>";
|
||||
|
||||
public override string CustomInfo { get; set; } = "SCP999";
|
||||
|
||||
public override List<string> Inventory { get; set; } = new()
|
||||
{
|
||||
$"{ItemType.KeycardGuard}",
|
||||
$"{ItemType.GunCrossvec}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.GunE11SR}",
|
||||
$"{ItemType.ArmorLight}",
|
||||
$"{ItemType.Medkit}",
|
||||
};
|
||||
public override Dictionary<AmmoType, ushort> Ammo { get; set; } = new()
|
||||
{
|
||||
{ AmmoType.Nato9,60 }
|
||||
};
|
||||
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new()
|
||||
{
|
||||
Limit = 1,
|
||||
};
|
||||
// todo...
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting += OnHurt;
|
||||
Exiled.Events.Handlers.Player.DroppingItem += OnDropItem;
|
||||
Exiled.Events.Handlers.Player.ChangedItem += OnChangeItem;
|
||||
Exiled.Events.Handlers.Player.VoiceChatting += OnVoiceChatting;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting -= OnHurt;
|
||||
Exiled.Events.Handlers.Player.DroppingItem -= OnDropItem;
|
||||
Exiled.Events.Handlers.Player.ChangedItem -= OnChangeItem;
|
||||
Exiled.Events.Handlers.Player.VoiceChatting -= OnVoiceChatting;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
private void OnVoiceChatting(VoiceChattingEventArgs ev)
|
||||
{
|
||||
// ev.VoiceModule.CurrentChannel = VoiceChat.VoiceChatChannel.ScpChat;
|
||||
}
|
||||
private void OnChangeItem(ChangedItemEventArgs ev)
|
||||
{
|
||||
// 检查 ev 和 ev.Player 是否有效
|
||||
if (ev?.Player == null)
|
||||
return;
|
||||
var oldItem = ev.Item;
|
||||
if (oldItem == null )
|
||||
return;
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
if(ev.Item.Type == ItemType.GunCrossvec)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>开枪减血-冲锋枪</color>", 5);
|
||||
}
|
||||
else if (ev.Item.Type == ItemType.GunCOM18)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>开枪减血-COM18</color>", 5);
|
||||
}
|
||||
else if (ev.Item.Type == ItemType.GunAK)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>开枪减血-AK</color>", 5);
|
||||
}
|
||||
else if (ev.Item.Type == ItemType.GunFSP9)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>开枪减血-保安枪</color>", 5);
|
||||
}
|
||||
else if (ev.Item.Type == ItemType.GrenadeHE)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>开枪减血-AK</color>", 5);
|
||||
}
|
||||
else if(ev.Item.Type == ItemType.Radio)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>丢对讲机传至SCP</color>", 5);
|
||||
}
|
||||
else if(ev.Item.IsWeapon)
|
||||
{
|
||||
XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>开枪加血</color>", 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void OnHurt(HurtingEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
// 特殊情况:核弹、清收容、挫骨顿伤直接按默认逻辑处理
|
||||
if (ev.DamageHandler.Type == DamageType.Warhead ||ev.DamageHandler.Type == DamageType.Decontamination ||ev.DamageHandler.Type == DamageType.Crushed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (ev.Attacker.IsHuman)
|
||||
{
|
||||
ev.Amount *= 0.65f;
|
||||
}
|
||||
else
|
||||
{
|
||||
ev.Amount = 0f;
|
||||
}
|
||||
}
|
||||
if (Check(ev.Attacker))
|
||||
{
|
||||
if(ev.Player.Role.Side == Side.Scp)
|
||||
{
|
||||
ev.Amount = 0f;
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
if (ev.DamageHandler.Base is PlayerStatsSystem.FirearmDamageHandler firearmDamageHandler)
|
||||
{
|
||||
if(firearmDamageHandler.WeaponType == ItemType.GunCrossvec)
|
||||
{
|
||||
ev.IsAllowed = true;
|
||||
return;
|
||||
}
|
||||
else if (firearmDamageHandler.WeaponType == ItemType.GunCOM18)
|
||||
{
|
||||
ev.IsAllowed = true;
|
||||
return;
|
||||
}
|
||||
else if (firearmDamageHandler.WeaponType == ItemType.GunAK)
|
||||
{
|
||||
ev.IsAllowed = true;
|
||||
return;
|
||||
}
|
||||
else if (firearmDamageHandler.WeaponType == ItemType.GunFSP9)
|
||||
{
|
||||
ev.IsAllowed = true;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ev.Player.Heal(5f);
|
||||
ev.Amount = 0f;
|
||||
ev.IsAllowed = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDropItem(DroppingItemEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
if (ev.Item.Type == ItemType.Radio)
|
||||
{
|
||||
Player TPTarget = Player.List.Where(p => p.IsScp).GetRandomValue();
|
||||
ev.Player.Position = TPTarget.Position;
|
||||
ev.IsAllowed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = Name;
|
||||
Vector3 HIDPosition = Room.List.Where(r => r.RoomName == MapGeneration.RoomName.HczMicroHID).First().Position;
|
||||
player.Position = new(HIDPosition.x, HIDPosition.y + 1f, HIDPosition.z);
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
player.RankName = "";
|
||||
Cassie.MessageTranslated("SCP 9 9 9 .G1 .G3 SUCCESSFULLY TERMINATED .G2 TERMINATION CAUSE UNSPECIFIED", "SCP-999已被成功收容,具体原因不明");
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
197
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SH/Serpent's Hand Spy.cs
Normal file
197
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SH/Serpent's Hand Spy.cs
Normal file
@ -0,0 +1,197 @@
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Interfaces;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AdvancedHints;
|
||||
using AdvancedHints.Enums;
|
||||
using Exiled.API.Extensions;
|
||||
using MEC;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.PlayerEvent;
|
||||
using SCPSLAudioApi.AudioCore;
|
||||
using Exiled.Events.EventArgs.Scp106;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.SH
|
||||
{
|
||||
[CustomRole(RoleTypeId.Tutorial)]
|
||||
public class Serpent_s_Hand_Spy : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 017U;
|
||||
public override int MaxHealth { get; set; } = 100;
|
||||
public override string Name { get; set; } = "蛇之手-间谍";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.Tutorial;
|
||||
public override string Description { get; set; } = "尽可能的隐藏身份等待组增援或给组织创造一个机会,击杀三名其他势力的人类即可丢弃对讲机请求一支增援";
|
||||
public override string CustomInfo { get; set; } = "科学家";
|
||||
public override string ConsoleMessage { get; set; } = "";
|
||||
public int kills = 0;
|
||||
public int Times = 0;
|
||||
public static AudioPlayerBase playerBase;
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.ArmorLight}",
|
||||
$"{ItemType.KeycardScientist}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Medkit}"
|
||||
};
|
||||
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
Limit = 1U,
|
||||
DynamicSpawnPoints = new List<DynamicSpawnPoint>
|
||||
{
|
||||
new DynamicSpawnPoint
|
||||
{
|
||||
Chance = 100,
|
||||
Location = SpawnLocationType.InsideGr18
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
PlayerEvent.Dying += Dying;
|
||||
PlayerEvent.DroppedItem += Drop;
|
||||
PlayerEvent.ActivatingGenerator += ActiveG;
|
||||
|
||||
Exiled.Events.Handlers.Scp106.Attacking += LD;
|
||||
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
PlayerEvent.Dying -= Dying;
|
||||
PlayerEvent.DroppedItem -= Drop;
|
||||
PlayerEvent.ActivatingGenerator -= ActiveG;
|
||||
|
||||
Exiled.Events.Handlers.Scp106.Attacking -= LD;
|
||||
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
private void LD(AttackingEventArgs e)
|
||||
{
|
||||
if (Check(e.Target))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
private void Hurt(HurtingEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
foreach (var info in SomeInformaiton.CustomRoleListScpTeam)
|
||||
{
|
||||
if (ev.Attacker.IsScp)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
if (ev.Attacker.CustomInfo == info)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Check(ev.Attacker))
|
||||
{
|
||||
foreach (var info in SomeInformaiton.CustomRoleListScpTeam)
|
||||
{
|
||||
if (ev.Player.IsScp)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
if (ev.Player.CustomInfo == info)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void Dying(DyingEventArgs e)
|
||||
{
|
||||
if (Check(e.Attacker))
|
||||
{
|
||||
if (e.Player.IsHuman)
|
||||
{
|
||||
kills++;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void Drop(DroppedItemEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
if (e.Pickup.Type == ItemType.Radio)
|
||||
{
|
||||
if (Times == 0)
|
||||
{
|
||||
if (kills >= 3)
|
||||
{
|
||||
List<Player> players = Player.Get(RoleTypeId.Spectator).ToList();
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (players.Count > 0)
|
||||
{
|
||||
Player sh = players[UnityEngine.Random.Range(0, players.Count)];
|
||||
CustomRole.Get(000U).AddRole(sh);
|
||||
players.Remove(sh);
|
||||
}
|
||||
}
|
||||
|
||||
playerBase = Music.PlayMusicpt("sh", 20, Side.Scp);
|
||||
Cassie.MessageTranslated("AN jam_043_2 UNKNOWN .G1 jam_043_3 SQUAD HASENTERED ALLREMAINING . NOSCPSLEFT", "一支未知的敌方小队已渗透并进入了设施 所有基金会武装人员请立即消灭该小队 其他非武装人员请等待一支MTF小队的到来");
|
||||
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>你已成功召唤了一支蛇之手小队!</b></size></align>",5f,true,DisplayLocation.Middle);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>你的击杀数不够无法召唤增援!</b></size></align>", 5f, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Player.ShowManagedHint("<align=left><size=22><b>你已经召唤过一支蛇之手小队了!</b></size></align>", 5f, true, DisplayLocation.Middle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void ActiveG(ActivatingGeneratorEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
|
||||
RoundStarted.scpChannel.Add(player.Id);
|
||||
RoundStarted.scpList.Add(player);
|
||||
Timing.CallDelayed(1f, () =>
|
||||
{
|
||||
player.ChangeAppearance(RoleTypeId.Scientist);
|
||||
});
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
RoundStarted.scpChannel.Remove(player.Id);
|
||||
RoundStarted.scpList.Remove(player);
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
128
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SH/Serpent's Hand.cs
Normal file
128
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SH/Serpent's Hand.cs
Normal file
@ -0,0 +1,128 @@
|
||||
using System.Collections.Generic;
|
||||
using Exiled.API.Enums;
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using PlayerEvent = Exiled.Events.Handlers.Player;
|
||||
using PlayerRoles;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using Exiled.Events.EventArgs.Scp106;
|
||||
using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
using EXiled_NebulaMist_CP_NG_hint.SQL;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role.SH
|
||||
{
|
||||
[CustomRole(RoleTypeId.Tutorial)]
|
||||
public class Serpent_s_Hand : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 000U;
|
||||
public override int MaxHealth { get; set; } = 100;
|
||||
public override string Name { get; set; } = "蛇之手-士兵";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.Tutorial;
|
||||
public override string Description { get; set; } = "你们与SCP为盟友,帮助SCP抵抗基金会与其他势力";
|
||||
public override string CustomInfo { get; set; } = "蛇之手-士兵";
|
||||
|
||||
public override List<string> Inventory { get; set; } = new List<string>
|
||||
{
|
||||
$"{ItemType.ArmorHeavy}",
|
||||
$"{ItemType.GunLogicer}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Adrenaline}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.KeycardChaosInsurgency}"
|
||||
};
|
||||
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new SpawnProperties
|
||||
{
|
||||
Limit = 5U,
|
||||
DynamicSpawnPoints = new List<DynamicSpawnPoint>
|
||||
{
|
||||
new DynamicSpawnPoint
|
||||
{
|
||||
Chance = 100,
|
||||
Location = SpawnLocationType.Inside096
|
||||
}
|
||||
}
|
||||
};
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting += Hurt;
|
||||
PlayerEvent.ActivatingGenerator += ActiveG;
|
||||
|
||||
Exiled.Events.Handlers.Scp106.Attacking += LD;
|
||||
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
PlayerEvent.Hurting -= Hurt;
|
||||
PlayerEvent.ActivatingGenerator -= ActiveG;
|
||||
|
||||
Exiled.Events.Handlers.Scp106.Attacking -= LD;
|
||||
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
private void LD(AttackingEventArgs e)
|
||||
{
|
||||
if (Check(e.Target))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
private void Hurt(HurtingEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
foreach (var info in SomeInformaiton.CustomRoleListScpTeam)
|
||||
{
|
||||
if (ev.Attacker.IsScp)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
if (ev.Attacker.CustomInfo == info)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Check(ev.Attacker))
|
||||
{
|
||||
foreach (var info in SomeInformaiton.CustomRoleListScpTeam)
|
||||
{
|
||||
if (ev.Player.IsScp)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
if (ev.Player.CustomInfo == info)
|
||||
{
|
||||
ev.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void ActiveG(ActivatingGeneratorEventArgs e)
|
||||
{
|
||||
if (Check(e.Player))
|
||||
{
|
||||
e.IsAllowed = false;
|
||||
}
|
||||
}
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = this.Name;
|
||||
RoundStarted.scpChannel.Add(player.Id);
|
||||
RoundStarted.scpList.Add(player);
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
Model.Player playerInfo = Mysql.GetPlayerInfo(player.RawUserId);
|
||||
player.RankName = playerInfo.badge;
|
||||
RoundStarted.scpChannel.Remove(player.Id);
|
||||
RoundStarted.scpList.Remove(player);
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
140
EXiled-NebulaMist-CP-NG-hint/Patch/Role/ShaolinCao.cs
Normal file
140
EXiled-NebulaMist-CP-NG-hint/Patch/Role/ShaolinCao.cs
Normal file
@ -0,0 +1,140 @@
|
||||
using Exiled.API.Features;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.API.Features.Items;
|
||||
using Exiled.API.Features.Spawn;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using Exiled.Events.EventArgs.Player;
|
||||
using MEC;
|
||||
using PlayerRoles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role
|
||||
{
|
||||
[CustomRole(RoleTypeId.NtfCaptain)]
|
||||
public class ShaolinCao : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 017U;
|
||||
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfCaptain;
|
||||
|
||||
public override int MaxHealth { get; set; } = 80;
|
||||
|
||||
public override string Name { get; set; } = "曹少璘";
|
||||
|
||||
public override string Description { get; set; } =
|
||||
"<size=24>左轮超高伤害,高速打急救包低回血,无CD</size>";
|
||||
|
||||
public override string CustomInfo { get; set; } = "曹少璘";
|
||||
|
||||
public override List<string> Inventory { get; set; } = new()
|
||||
{
|
||||
$"{ItemType.KeycardMTFCaptain}",
|
||||
$"{ItemType.GunFRMG0}",
|
||||
$"{ItemType.Medkit}",
|
||||
$"{ItemType.GrenadeHE}",
|
||||
$"{ItemType.Radio}",
|
||||
$"{ItemType.Adrenaline}",
|
||||
$"{ItemType.ArmorHeavy}",
|
||||
$"{ItemType.GunRevolver}",
|
||||
};
|
||||
|
||||
// public override float SpawnChance { get; set; } = 100f;
|
||||
|
||||
public override SpawnProperties SpawnProperties { get; set; } = new()
|
||||
{
|
||||
Limit = 1,
|
||||
};
|
||||
// todo...
|
||||
protected override void SubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting += OnHurting;
|
||||
Exiled.Events.Handlers.Player.UsingItem += OnUsingItem;
|
||||
Exiled.Events.Handlers.Player.DroppingItem += OnDropping;
|
||||
base.SubscribeEvents();
|
||||
}
|
||||
protected override void UnsubscribeEvents()
|
||||
{
|
||||
Exiled.Events.Handlers.Player.Hurting -= OnHurting;
|
||||
Exiled.Events.Handlers.Player.UsingItem -= OnUsingItem;
|
||||
Exiled.Events.Handlers.Player.DroppingItem += OnDropping;
|
||||
base.UnsubscribeEvents();
|
||||
}
|
||||
private void OnDropping(DroppingItemEventArgs ev)
|
||||
{
|
||||
//if (Check(ev.Player))
|
||||
//{
|
||||
// if(ev.Item.Type == ItemType.Medkit && ShootLimit < 5)
|
||||
// {
|
||||
// ev.IsThrown = false;
|
||||
// }
|
||||
// else if (ev.Item.Type == ItemType.GunRevolver && ShootLimit < 3)
|
||||
// {
|
||||
// ev.IsThrown = false;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
private int ShootLimit = 0;
|
||||
private void OnHurting(HurtingEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Attacker))
|
||||
{
|
||||
if (ev.DamageHandler.Base is PlayerStatsSystem.FirearmDamageHandler firearmDamageHandler)
|
||||
{
|
||||
if(firearmDamageHandler.WeaponType == ItemType.GunRevolver)
|
||||
{
|
||||
//if (ShootLimit < 5)
|
||||
//{
|
||||
ev.Amount = 99f;
|
||||
//ShootLimit++;
|
||||
//if (ShootLimit > 5)
|
||||
//{
|
||||
// XPData.AddDisplayMSG(ev.Attacker, "<color=#4169E1>特殊子弹没了,使用普通子弹</color>", 3);
|
||||
//}
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private int MedkitLimit = 0;
|
||||
private long MedkitTime = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
|
||||
private void OnUsingItem(UsingItemEventArgs ev)
|
||||
{
|
||||
if (Check(ev.Player))
|
||||
{
|
||||
if (ev.Usable.Type == ItemType.Medkit)
|
||||
{
|
||||
//if (MedkitLimit < 5)
|
||||
//{
|
||||
ev.IsAllowed = false;
|
||||
ev.Player.Heal(2f);
|
||||
|
||||
// MedkitTime = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
|
||||
// MedkitLimit++;
|
||||
// if (MedkitLimit > 5)
|
||||
// {
|
||||
// ev.Player.CurrentItem.Destroy();
|
||||
// XPData.AddDisplayMSG(ev.Player, "<color=#4169E1>急救包没了报废</color>", 3);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RoleAdded(Player player)
|
||||
{
|
||||
player.RankName = Name;
|
||||
ShootLimit = 0;
|
||||
base.RoleAdded(player);
|
||||
}
|
||||
protected override void RoleRemoved(Player player)
|
||||
{
|
||||
player.RankName = "";
|
||||
Cassie.MessageTranslated("曹少璘 .G1 .G3 SUCCESSFULLY TERMINATED .G2 TERMINATION CAUSE UNSPECIFIED", "曹少璘已死亡,具体原因不明");
|
||||
base.RoleRemoved(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
56
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SomeInformaiton.cs
Normal file
56
EXiled-NebulaMist-CP-NG-hint/Patch/Role/SomeInformaiton.cs
Normal file
@ -0,0 +1,56 @@
|
||||
using System.Collections.Generic;
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Role
|
||||
{
|
||||
public class SomeInformaiton
|
||||
{
|
||||
public static List<string> CustomRoleListScpTeam = new List<string>()
|
||||
{
|
||||
"SCP-035", // 模型:教程 编号:035 状态:实装
|
||||
"SCP-682", // 模型:939 编号:682 状态:实装
|
||||
"SCP-999", // 模型:教程 编号:999 状态:实装
|
||||
// Serpent's Hand 蛇之手 模型:教程 状态:实装
|
||||
"蛇之手-士兵", // 编号:000
|
||||
"蛇之手-间谍" // 编号:017
|
||||
|
||||
};
|
||||
public static List<string> CustomRoleListCiTeam = new List<string>()
|
||||
{
|
||||
"SCP-181" // 模型:DD 编号:181 状态:实装
|
||||
};
|
||||
public static List<string> CustomRoleListMtfTeam = new List<string>()
|
||||
{
|
||||
// Alpha-01 红右手 模型:九尾狐 状态:未实装
|
||||
"红右手-指挥官", // 编号:001
|
||||
"红右手-中士", // 编号:002
|
||||
"红右手-列兵", // 编号:003
|
||||
"红右手-收容专家", // 编号:004
|
||||
// Nu-7 落锤 模型:九尾狐 状态:未实装
|
||||
"落锤特遣队-指挥官", // 编号:012
|
||||
"落锤特遣队-行动队长", // 编号:013
|
||||
"落锤特遣队-武装干员", // 编号:014
|
||||
"落锤特遣队-爆破专家", // 编号:015
|
||||
"落锤特遣队-医疗专家", // 编号:016
|
||||
// UIU 联邦调查局所属特异事故处 模型:保安 状态:未实装
|
||||
"UIU-指挥官", // 编号:005
|
||||
"UIU-专家", // 编号:006
|
||||
"UIU-特工", // 编号:007
|
||||
//
|
||||
"曹少璘" // 编号:017
|
||||
};
|
||||
public static List<string> CustomRoleListGocTeam = new List<string>()
|
||||
{
|
||||
// GOC 全球超自然联盟 模型:混沌 状态:未实装
|
||||
"GOC-指挥官", // 编号:008
|
||||
"GOC-作战专家", // 编号:009
|
||||
"GOC-重装特工", // 编号:010
|
||||
"GOC-特工", // 编号:011
|
||||
};
|
||||
public static List<string> CustomRoleListUiuTeam = new List<string>()
|
||||
{
|
||||
// UIU 联邦调查局所属特异事故处 模型:保安 状态:未实装(非第三方阵营,现MTF阵营)
|
||||
"UIU-指挥官", // 编号:005
|
||||
"UIU-专家", // 编号:006
|
||||
"UIU-特工", // 编号:007
|
||||
};
|
||||
}
|
||||
}
|
||||
32
EXiled-NebulaMist-CP-NG-hint/Patch/Role/电炮兵.cs
Normal file
32
EXiled-NebulaMist-CP-NG-hint/Patch/Role/电炮兵.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Exiled.API.Features.Attributes;
|
||||
using Exiled.CustomRoles.API.Features;
|
||||
using PlayerRoles;
|
||||
using Exiled.API.Features;
|
||||
using System;
|
||||
|
||||
namespace EXiled_NebulaMist_CP_NG_hint.Patch.Role
|
||||
{
|
||||
[CustomRole(RoleTypeId.CustomRole)]
|
||||
public class DrA : CustomRole
|
||||
{
|
||||
public override uint Id { get; set; } = 8848;
|
||||
public override int MaxHealth { get; set; } = 150;
|
||||
public override string Name { get; set; } = "电炮兵";
|
||||
public override RoleTypeId Role { get; set; } = RoleTypeId.NtfSpecialist;
|
||||
public override string Description { get; set; } = "你是电炮兵 你的电磁炮是无限的 ";
|
||||
public override string CustomInfo { get; set; } = "电炮兵";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
37
EXiled-NebulaMist-CP-NG-hint/Patch/ScpChatJoin.cs
Normal file
37
EXiled-NebulaMist-CP-NG-hint/Patch/ScpChatJoin.cs
Normal file
@ -0,0 +1,37 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using Exiled.API.Features;
|
||||
//using EXiled_NebulaMist_CP_NG_hint.Event.ServerEvent;
|
||||
//using HarmonyLib;
|
||||
//using Mirror;
|
||||
//using PlayerRoles.Voice;
|
||||
//using VoiceChat;
|
||||
//using VoiceChat.Networking;
|
||||
|
||||
//namespace EXiled_NebulaMist_CP_NG_hint.Patch
|
||||
//{
|
||||
// [HarmonyPatch(typeof(VoiceTransceiver), "ServerReceiveMessage")]
|
||||
// public class ScpChatJoin
|
||||
// {
|
||||
// public static void Postfix(NetworkConnection conn, VoiceMessage msg)
|
||||
// {
|
||||
// Player player = Player.Get(conn.identity);
|
||||
// if (player != null && player.IsVerified)
|
||||
// {
|
||||
// foreach (ReferenceHub referenceHub in ReferenceHub.AllHubs)
|
||||
// {
|
||||
// if (referenceHub.roleManager.CurrentRole is IVoiceRole &&
|
||||
// RoundStarted.scpChannel.Contains(referenceHub.PlayerId))
|
||||
// {
|
||||
// if (player.Id == referenceHub.PlayerId)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// msg.Channel = VoiceChat.VoiceChatChannel.Intercom;
|
||||
// referenceHub.connectionToClient.Send<VoiceMessage>(msg, 0);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
18
EXiled-NebulaMist-CP-NG-hint/Patch/TestPatch.cs
Normal file
18
EXiled-NebulaMist-CP-NG-hint/Patch/TestPatch.cs
Normal file
@ -0,0 +1,18 @@
|
||||
//using Exiled.API.Features;
|
||||
//using HarmonyLib;
|
||||
//using PlayerRoles;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
//using VoiceChat.Networking;
|
||||
|
||||
//namespace EXiled_NebulaMist_CP_NG_hint.Patch
|
||||
//{
|
||||
// [HarmonyPatch]
|
||||
// public class TestPatch
|
||||
// {
|
||||
|
||||
// }
|
||||
//}
|
||||
48
EXiled-NebulaMist-CP-NG-hint/Patch/VoiceChatPatch.cs
Normal file
48
EXiled-NebulaMist-CP-NG-hint/Patch/VoiceChatPatch.cs
Normal file
@ -0,0 +1,48 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Reflection;
|
||||
//using System.Reflection.Emit;
|
||||
//using HarmonyLib;
|
||||
//using Mirror;
|
||||
//using NorthwoodLib.Pools;
|
||||
//using VoiceChat.Networking;
|
||||
|
||||
//namespace EXiled_NebulaMist_CP_NG_hint.Patch
|
||||
//{
|
||||
// [HarmonyPatch(typeof(VoiceTransceiver), "ServerReceiveMessage")]
|
||||
// public class VoiceChatPatch
|
||||
// {
|
||||
// private static MethodInfo GetSendMethod()
|
||||
// {
|
||||
// foreach (MethodInfo methodInfo in typeof(NetworkConnection).GetMethods())
|
||||
// {
|
||||
// if (methodInfo.Name == "Send" && methodInfo.GetGenericArguments().Length != 0)
|
||||
// {
|
||||
// return methodInfo.MakeGenericMethod(new Type[]
|
||||
// {
|
||||
// typeof(VoiceMessage)
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
// private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
// {
|
||||
// List<CodeInstruction> newInstructions = ListPool<CodeInstruction>.Shared.Rent(instructions);
|
||||
// Label label = generator.DefineLabel();
|
||||
// newInstructions[newInstructions.Count - 1].labels.Add(label);
|
||||
// int index = newInstructions.FindLastIndex((CodeInstruction x) => x.opcode == OpCodes.Ldloc_0);
|
||||
// newInstructions.InsertRange(index, new CodeInstruction[]
|
||||
// {
|
||||
// CodeInstructionExtensions.MoveLabelsFrom(new CodeInstruction(OpCodes.Ldarg_0), newInstructions[index]),
|
||||
// new CodeInstruction(OpCodes.Ldarg_1),
|
||||
// new CodeInstruction(OpCodes.Brfalse_S, label)
|
||||
// });
|
||||
// foreach (CodeInstruction codeInstruction in newInstructions)
|
||||
// {
|
||||
// yield return codeInstruction;
|
||||
// }
|
||||
// ListPool<CodeInstruction>.Shared.Return(newInstructions);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@ -0,0 +1,163 @@
|
||||
//using Exiled.API.Enums;
|
||||
//using Exiled.API.Features;
|
||||
//using Exiled.API.Features.Items;
|
||||
//using Exiled.Events.EventArgs;
|
||||
//using Exiled.Events.EventArgs.Player;
|
||||
//using InventorySystem.Items.Firearms;
|
||||
//using InventorySystem.Items.Pickups;
|
||||
//using System;
|
||||
//using System.Diagnostics.Eventing.Reader;
|
||||
//using System.Linq;
|
||||
//using System.Threading.Tasks;
|
||||
//using Text01;
|
||||
//using YamlDotNet.Serialization;
|
||||
//using Firearm = Exiled.API.Features.Items.Firearm;
|
||||
|
||||
//namespace ReloadPlugin
|
||||
//{
|
||||
// public class Plugin : Plugin<XYlikeconfig>
|
||||
// {
|
||||
// public override void OnEnabled()
|
||||
// {
|
||||
// base.OnEnabled();
|
||||
|
||||
// // 注册事件
|
||||
// Exiled.Events.Handlers.Player.ReloadingWeapon += OnReloadingWeapon;
|
||||
// Exiled.Events.Handlers.Player.Shooting += OnShooting;
|
||||
// Exiled.Events.Handlers.Player.DroppedAmmo += OnDroppedAmmo;
|
||||
// }
|
||||
|
||||
// public override void OnDisabled()
|
||||
// {
|
||||
// base.OnDisabled();
|
||||
|
||||
// // 取消注册事件
|
||||
// Exiled.Events.Handlers.Player.ReloadingWeapon -= OnReloadingWeapon;
|
||||
// Exiled.Events.Handlers.Player.Shooting -= OnShooting;
|
||||
// Exiled.Events.Handlers.Player.DroppedAmmo -= OnDroppedAmmo;
|
||||
// }
|
||||
|
||||
// private DateTime lastExecutionTime = DateTime.MinValue;
|
||||
// private bool isTimerRunning = false;
|
||||
|
||||
// private void OnReloadingWeapon(ReloadingWeaponEventArgs ev)
|
||||
// {
|
||||
// if (isTimerRunning)
|
||||
// {
|
||||
// return; // 如果计时器正在运行,直接返回,不执行代码
|
||||
// }
|
||||
|
||||
// TimeSpan timeSinceLastExecution = DateTime.Now - lastExecutionTime;
|
||||
// if (timeSinceLastExecution.TotalSeconds >= 1.5)
|
||||
// {
|
||||
// isTimerRunning = true; // 启动计时器
|
||||
// if (ev.Player.CurrentItem.Type == ItemType.GunAK)
|
||||
// {
|
||||
// if (ev.Firearm.Ammo < ev.Firearm.MaxAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunCOM15 || ev.Player.CurrentItem.Type == ItemType.GunCOM18 || ev.Player.CurrentItem.Type == ItemType.GunCrossvec || ev.Player.CurrentItem.Type == ItemType.GunFSP9)
|
||||
// {
|
||||
// if (ev.Firearm.Ammo < ev.Firearm.MaxAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunRevolver)
|
||||
// {
|
||||
// if (ev.Firearm.Ammo < ev.Firearm.MaxAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo44cal);
|
||||
// ev.Player.AddItem(ItemType.Ammo44cal);
|
||||
// ev.Player.AddItem(ItemType.Ammo44cal);
|
||||
// ev.Player.AddItem(ItemType.Ammo44cal);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunShotgun)
|
||||
// {
|
||||
// if (ev.Firearm.Ammo < ev.Firearm.MaxAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo12gauge);
|
||||
// ev.Player.AddItem(ItemType.Ammo12gauge);
|
||||
// ev.Player.AddItem(ItemType.Ammo12gauge);
|
||||
// ev.Player.AddItem(ItemType.Ammo12gauge);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunE11SR)
|
||||
// {
|
||||
// if (ev.Firearm.Ammo < ev.Firearm.MaxAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.GunCom45)
|
||||
// {
|
||||
// if (ev.Firearm.Ammo < ev.Firearm.MaxAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// ev.Player.AddItem(ItemType.Ammo9x19);
|
||||
// }
|
||||
// }
|
||||
// else if (ev.Player.CurrentItem.Type == ItemType.ParticleDisruptor)
|
||||
// {
|
||||
// // Nothing
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (ev.Firearm.Ammo < ev.Firearm.MaxAmmo)
|
||||
// {
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo556x45);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// ev.Player.AddItem(ItemType.Ammo762x39);
|
||||
// }
|
||||
// }
|
||||
|
||||
// lastExecutionTime = DateTime.Now;
|
||||
// StartTimer();
|
||||
// }
|
||||
// }
|
||||
|
||||
// private async void StartTimer()
|
||||
// {
|
||||
// await Task.Delay(1500); // 等待1.5秒
|
||||
// isTimerRunning = false; // 计时器结束,允许下一次执行
|
||||
// }
|
||||
// private void OnShooting(ShootingEventArgs ev)
|
||||
// {
|
||||
// ev.Player.ClearAmmo();
|
||||
// }
|
||||
// private void OnDroppedAmmo(DroppedAmmoEventArgs ev)
|
||||
// {
|
||||
// // 获取当前场景中的所有物品
|
||||
// ItemPickupBase[] items = UnityEngine.Object.FindObjectsOfType<ItemPickupBase>();
|
||||
|
||||
// // 遍历物品并销毁子弹掉落物
|
||||
// foreach (ItemPickupBase item in items)
|
||||
// {
|
||||
// // 判断物品是否为子弹掉落物
|
||||
// if (item is InventorySystem.Items.Firearms.Ammo.AmmoPickup)
|
||||
// {
|
||||
// UnityEngine.Object.Destroy(item.gameObject);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user