public static void BlueprintUse(IBlueprintItem item, BlueprintDataBlock bdb) { //Fougerite.Player player = Fougerite.Player.FindByPlayerClient(item.controllable.playerClient); Fougerite.Player player = Fougerite.Server.Cache[item.controllable.playerClient.userID]; if (player != null) { BPUseEvent ae = new BPUseEvent(bdb, item); if (OnBlueprintUse != null) { OnBlueprintUse(player, ae); } if (!ae.Cancel) { PlayerInventory internalInventory = player.Inventory.InternalInventory as PlayerInventory; if (internalInventory.BindBlueprint(bdb)) { int count = 1; if (item.Consume(ref count)) { internalInventory.RemoveItem(item.slot); } player.Notice("", "You can now craft: " + bdb.resultItem.name, 4f); } else { player.Notice("", "You already have this blueprint", 4f); } } } }
public static void BlueprintUse(IBlueprintItem item, BlueprintDataBlock bdb) { Contract.Requires(item != null); Contract.Requires(bdb != null); if (item.controllable == null) { throw new InvalidOperationException("IBlueprintItem's controllable is null."); } if (item.controllable.playerClient == null) { throw new InvalidOperationException("IBlueprintItem's playerClient is null."); } Fougerite.Player player = Fougerite.Player.FindByPlayerClient(item.controllable.playerClient); if (player == null) { return; } BPUseEvent ae = new BPUseEvent(bdb); if (OnBlueprintUse != null) { OnBlueprintUse(player, ae); } if (ae.Cancel) { return; } PlayerInventory internalInventory = player.Inventory.InternalInventory as PlayerInventory; if (internalInventory.BindBlueprint(bdb)) { int count = 1; if (item.Consume(ref count)) { internalInventory.RemoveItem(item.slot); } player.Notice("", "You can now craft: " + bdb.resultItem.name, 4f); } else { player.Notice("", "You already have this blueprint", 4f); } }
public override void Execute(ref ConsoleSystem.Arg Arguments, ref string[] ChatArguments) { Fougerite.Player pl = Fougerite.Server.Cache[Arguments.argUser.userID]; string lang = LanguageComponent.LanguageComponent.GetPlayerLangOrDefault(pl); if (!RustPP.Data.Globals.UserIsLogged(pl)) { char ch = '☢'; pl.Notice(ch.ToString(), LanguageComponent.LanguageComponent.getMessage("notice_not_logged", lang), 4f); return; } RustPP.Data.Entities.User user = RustPP.Data.Globals.GetInternalUser(pl); if (user.ClanID == -1) { if (user.InvitedClan != -1) { user.ClanID = user.InvitedClan; Data.Entities.Clan clan = Data.Globals.Clans.Find(x => x.ID == user.ClanID); user.Clan = clan; user.ClanRank = 1; user.Save(); Data.Globals.SendMessageForClan(user.ClanID, $"[color purple]<!>[/color] El usuario {user.Name} aceptó unirse al clan."); } else { pl.SendClientMessage($"[color red]<!>[/color] ¡No tienes una invitación de clan!"); return; } } else { pl.SendClientMessage($"[color red]<!>[/color] ¡Ya estas en un clan! Usa /clan salir primero"); return; } }
public override void Execute(ref ConsoleSystem.Arg Arguments, ref string[] ChatArguments) { Fougerite.Player pl = Fougerite.Server.Cache[Arguments.argUser.userID]; string lang = LanguageComponent.LanguageComponent.GetPlayerLangOrDefault(pl); if (!RustPP.Data.Globals.UserIsLogged(pl)) { char ch = '☢'; pl.Notice(ch.ToString(), LanguageComponent.LanguageComponent.getMessage("notice_not_logged", lang), 4f); return; } using (MySqlConnection connection = new MySqlConnection(Data.Database.Connection.GetConnectionString())) { pl.SendClientMessage($"--------- [color blue]Clanes - TOP 10[/color] ---------"); connection.Open(); MySqlCommand command = connection.CreateCommand(); command.CommandText = "SELECT * FROM clans ORDER BY level DESC LIMIT 10"; MySqlDataReader reader = command.ExecuteReader(); DataTable schemaTable = reader.GetSchemaTable(); int puesto = 1; while (reader.HasRows) { while (reader.Read()) { int nivel = reader.GetInt32("level"); string owner = reader.GetString("owner"); string name = reader.GetString("name"); pl.SendClientMessage($"#{puesto} [color blue]{name}[/color] | Nivel [color blue]{nivel.ToString()}[/color] - Lider: [color blue]{owner}[/color]"); puesto++; } reader.NextResult(); } } }
public override void Execute(ref ConsoleSystem.Arg Arguments, ref string[] ChatArguments) { Fougerite.Player pl = Fougerite.Server.Cache[Arguments.argUser.userID]; string lang = LanguageComponent.LanguageComponent.GetPlayerLangOrDefault(pl); if (!RustPP.Data.Globals.UserIsLogged(pl)) { char ch = '☢'; pl.Notice(ch.ToString(), LanguageComponent.LanguageComponent.getMessage("notice_not_logged", lang), 4f); return; } RustPP.Data.Entities.User user = RustPP.Data.Globals.GetInternalUser(pl); if (user.TimeToChat >= 1) { pl.SendClientMessage("[color red]<Error>[/color] Tienes que esperar {user.TimeToChat} para enviar otro mensaje"); return; } if (user.ClanID == -1) { pl.SendClientMessage("[color red]<Error>[/color] No tienes Clan"); return; } string rango = "Miembro"; if (user.ClanRank == 2) { rango = "Reclutador"; } if (user.ClanRank == 3) { rango = "Encargado"; } if (user.Name == user.Clan.Owner) { rango = "Lider"; } string strText = string.Join(" ", ChatArguments).Trim(new char[] { ' ', '"' }); string rem = Regex.Replace(strText, @"\[/?color\b.*?\]", string.Empty); string template = "[color #2780d8][F]((-rank- -userName-: -userMessage-))"; string setrank = Regex.Replace(template, "-rank-", rango); string setname = Regex.Replace(setrank, "-userName-", Arguments.argUser.displayName); string final = Regex.Replace(setname, "-userMessage-", rem); if (strText == string.Empty) { pl.SendClientMessage("[color red]<Sintaxis> [color white]/f <Texto>"); } else { user.Clan.SendMessage(final); user.TimeToChat += 5; } }
public override void Execute(ref ConsoleSystem.Arg Arguments, ref string[] ChatArguments) { Fougerite.Player pl = Fougerite.Server.Cache[Arguments.argUser.userID]; string lang = LanguageComponent.LanguageComponent.GetPlayerLangOrDefault(pl); if (!RustPP.Data.Globals.UserIsLogged(pl)) { char ch = '☢'; pl.Notice(ch.ToString(), LanguageComponent.LanguageComponent.getMessage("notice_not_logged", lang), 4f); return; } RustPP.Data.Entities.User user = RustPP.Data.Globals.GetInternalUser(pl); FPS(pl, user.FPS); }
public override void Execute(ref ConsoleSystem.Arg Arguments, ref string[] ChatArguments) { Fougerite.Player pl = Fougerite.Server.Cache[Arguments.argUser.userID]; string lang = LanguageComponent.LanguageComponent.GetPlayerLangOrDefault(pl); if (!RustPP.Data.Globals.UserIsLogged(pl)) { char ch = '☢'; pl.Notice(ch.ToString(), LanguageComponent.LanguageComponent.getMessage("notice_not_logged", lang), 4f); return; } RustPP.Data.Entities.User user = RustPP.Data.Globals.GetInternalUser(pl); if (user.ClanID == -1) { pl.SendClientMessage($"[color red]<!>[/color] ¡No tienes clan!"); return; } if (ChatArguments.Length < 1) { pl.SendClientMessage("-[color blue] /clan stats [/color] Ver las estadisticas del clan"); pl.SendClientMessage("-[color blue] /clan miembros [/color] Ver todos los miembros del clan conectados"); if (user.ClanRank >= 2) { pl.SendClientMessage("-[color blue] /clan invitar [/color] Invita a una persona al clan"); pl.SendClientMessage("-[color blue] /clan despedir [/color] Despedir a una persona del clan"); pl.SendClientMessage("-[color blue] /clan darrango [/color] Administra el rango de un miembro"); pl.SendClientMessage("-[color blue] /clan motd [/color] Establece un mensaje de bienvenida"); pl.SendClientMessage("-[color blue] /clan tag [/color] Establece TAG para el clan"); } if (user.Clan.Owner == user.Name) { pl.SendClientMessage("-[color blue] /clan darlider [/color] Entrega el liderazgo del clan a otra persona."); } pl.SendClientMessage("-[color blue] /clan salir [/color] Abandonar el clan"); return; } string search = ChatArguments[0].ToLower(); if (search == "stats") { pl.SendClientMessage($"---------------[color blue] {user.Clan.Name} [/color]---------------"); pl.SendClientMessage($"-[color blue] MOTD: [/color]{user.Clan.MOTD}"); pl.SendClientMessage($"-[color blue] Dueño: [/color]{user.Clan.Owner}"); pl.SendClientMessage($"-[color blue] Nivel: [/color]{user.Clan.Level}"); pl.SendClientMessage($"-[color blue] Exp: [/color]{user.Clan.Exp}"); pl.SendClientMessage($"-[color blue] Materiales: [/color]{user.Clan.Mats}"); pl.SendClientMessage($"-[color blue] Asesinatos: [/color]{user.Clan.Kills}"); pl.SendClientMessage($"-[color blue] Muertes: [/color]{user.Clan.Deaths}"); pl.SendClientMessage($"-[color blue] Banco: [/color]${user.Clan.Cash}"); return; } if (search == "miembros") { pl.SendClientMessage($"[color blue] Miembros de {user.Clan.Name} conectados [/color]"); string miembros = ""; foreach (RustPP.Data.Entities.User player in Data.Globals.usersOnline) { if (player.ClanID == user.ClanID) { miembros = miembros + " - " + player.Name; } } pl.SendClientMessage($"{miembros}"); return; } if (search == "salir") { if (user.Clan.Owner == user.Name) { pl.SendClientMessage($"[color red]<!>[/color] No puedes abandonar el clan {user.Clan.Name} ya que eres el dueño, usa [color blue]/clan darlider[/color]. "); pl.SendClientMessage($"[color red]<!>[/color] Utiliza [color blue]/clan darlider[/color] para otorgar el liderazgo del clan {user.Clan.Name} a otra persona. "); return; } pl.SendClientMessage($"[color red]<!>[/color] ¿Estás seguro de querer abandonar el clan {user.Clan.Name}? Usa: [color blue]/clan salir confirmar [/color]."); string confirmar = ChatArguments[1].ToLower(); if (confirmar == "confirmar") { Data.Globals.SendMessageForClan(user.ClanID, $"El usuario [color red]{user.Name}[/color] abandonó el clan."); user.ClanID = -1; user.ClanRank = 0; user.Save(); } return; } if (search == "invitar") { if (ChatArguments.Length < 2) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan invitar <NombreJugador>"); return; } if (user.ClanRank == 1) { pl.SendClientMessage($"[color red]<Error>[/color] Solo el lider o el encargado del clan pueden invitar a otros miembros."); return; } string invite = ChatArguments[1]; Fougerite.Player recipient = Fougerite.Player.FindByName(invite); if (!Data.Globals.UserIsLogged(recipient)) { pl.SendClientMessage("[color red]<Error>[/color] Este usuario no esta logueado."); return; } RustPP.Data.Entities.User recipientUser = Data.Globals.GetInternalUser(recipient); if (recipient == null) { pl.SendClientMessage($"[color red]<Error>[/color] No se encontró al usuario {invite}"); return; } if (recipientUser.Name == user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] No puedes usar este comando contigo."); return; } if (recipientUser.InvitedClan == user.ClanID) { pl.SendClientMessage($"[color red]<Error>[/color] Este usuario ya tiene una invitación para unirse a {recipientUser.Clan.Name}"); return; } if (recipientUser.ClanID != -1) { pl.SendClientMessage($"[color red]<Error>[/color] Este usuario ya pertenece a un clan ({recipientUser.Clan.Name})"); return; } recipientUser.InvitedClan = user.ClanID; pl.SendClientMessage($"[color purple]<!>[/color] Invitaste a [color purple]{recipientUser.Name}[/color] a unirse a tu clan."); recipient.SendClientMessage($"[color purple]<!>[/color] El usuario [color purple]{user.Name}[/color] te invito a unirte a [color purple]{user.Clan.Name}[/color]"); recipient.SendClientMessage($"[color purple]<!>[/color] Utiliza [color purple]/aceptar[/color] para aceptar la invitación."); } if (search == "despedir") { if (ChatArguments.Length < 2) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan despedir <NombreJugador>"); return; } if (user.ClanRank == 1) { pl.SendClientMessage($"[color red]<Error>[/color] Solo el lider o el encargado del clan pueden despedir a un miembro."); return; } string invite = ChatArguments[1]; Fougerite.Player recipient = Fougerite.Player.FindByName(invite); if (!Data.Globals.UserIsLogged(recipient)) { pl.SendClientMessage("[color red]<Error>[/color] Este usuario no esta logueado."); return; } RustPP.Data.Entities.User recipientUser = Data.Globals.GetInternalUser(recipient); if (recipient == null) { pl.SendClientMessage($"[color red]<Error>[/color] No se encontró al usuario {invite}"); return; } if (recipientUser.ClanID == user.ClanID && recipientUser.ClanRank >= user.ClanRank && user.Clan.Owner != user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] No tienes permisos para despedir a {recipientUser.Name}"); return; } if (recipientUser.ClanID != user.ClanID) { pl.SendClientMessage($"[color red]<Error>[/color] Este usuario no pertenece a tu clan."); return; } if (recipientUser.Name == user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] No puedes usar este comando contigo."); return; } Data.Globals.SendMessageForClan(user.ClanID, $"El usuario [color red]{user.Name}[/color] despidió a {recipientUser.Name} del clan."); recipientUser.ClanID = -1; recipientUser.ClanRank = 0; recipientUser.Save(); } if (search == "motd") { if (ChatArguments.Length < 2) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan motd <Texto>"); return; } if (user.ClanRank != 3 && user.Clan.Owner != user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] Solo el lider o el encargado del clan puede cambiar el motd."); return; } List <string> wth = ChatArguments.ToList(); wth.Remove(wth[0]); string message; try { message = string.Join(" ", wth.ToArray()).Replace(search, "").Trim(new char[] { ' ', '"' }).Replace('"', 'ˮ'); } catch { pl.SendClientMessage("[color red]<Error>[/color] Algo salio mal, intentalo nuevamente más tarde"); return; } if (message == string.Empty) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan motd <Texto>"); } else { user.Clan.MOTD = message; pl.SendClientMessage("[color green]<!>[/color] Cambiaste el MOTD del clan."); user.Clan.save(); } return; } if (search == "tag") { if (ChatArguments.Length < 2) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan tag <TAG 1 a 4 digitos>"); return; } if (user.ClanRank != 3 && user.Clan.Owner != user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] Solo el lider o el encargado del clan pueden dar rango."); return; } List <string> wth = ChatArguments.ToList(); wth.Remove(wth[0]); string message; try { message = string.Join(" ", wth.ToArray()).Replace(search, "").Trim(new char[] { ' ', '"' }).Replace('"', 'ˮ'); } catch { pl.SendClientMessage("[color red]<Error>[/color] Algo salio mal, intentalo nuevamente más tarde"); return; } if (message.Length < 2 || message.Length > 4) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan tag <TAG> | Use un tag de 2 a 4 DIGITOS"); } else { user.Clan.changeTag(message); pl.SendClientMessage("[color green]<!>[/color] Cambiaste el MOTD del clan."); user.Clan.save(); } return; } if (search == "darrango") { if (ChatArguments.Length < 3) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan darrango <NombreJugador> <RANGO>"); pl.SendClientMessage("[color red]<Sintaxis>[/color] Rangos: 1 (miembro) - 2 (reclutador) - 3 (encargado)"); return; } if (user.ClanRank != 3 && user.Clan.Owner != user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] Solo el lider o el encargado del clan pueden dar rango."); return; } string invite = ChatArguments[1]; int rank = Int32.Parse(ChatArguments[2]); Fougerite.Player recipient = Fougerite.Player.FindByName(invite); if (!Data.Globals.UserIsLogged(recipient)) { pl.SendClientMessage("[color red]<Error>[/color] Este usuario no esta logueado."); return; } RustPP.Data.Entities.User recipientUser = Data.Globals.GetInternalUser(recipient); if (recipient == null) { pl.SendClientMessage($"[color red]<Error>[/color] No se encontró al usuario {invite}"); return; } if (recipientUser.Name == user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] No puedes usar este comando contigo."); return; } if (recipientUser.ClanID == user.ClanID && recipientUser.ClanRank >= user.ClanRank && user.Clan.Owner != user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] No tienes permisos para cambiar el rango de {recipientUser.Name}"); return; } if (rank > user.ClanRank) { pl.SendClientMessage($"[color red]<Error>[/color] No tienes permisos para asignar este rango"); return; } if (rank > 3) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan darrango <NombreJugador> <RANGO>"); pl.SendClientMessage("[color red]<Sintaxis>[/color] Rangos: 1 (miembro) - 2 (reclutador) - 3 (encargado)"); return; } if (recipientUser.ClanID != user.ClanID) { pl.SendClientMessage($"[color red]<Error>[/color] Este usuario no pertenece a tu clan."); return; } Data.Globals.SendMessageForClan(user.ClanID, $"El usuario [color purple]{user.Name}[/color] asignó a [color purple]{recipientUser.Name}[/color] el rango numero {rank}."); recipientUser.ClanRank = rank; recipientUser.Save(); } if (search == "darlider") { if (ChatArguments.Length < 2) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /clan darlider <NombreJugador>"); return; } if (user.Name != user.Clan.Owner) { pl.SendClientMessage($"[color red]<Error>[/color] Solo el lider puede usar este comando."); return; } string invite = ChatArguments[1]; Fougerite.Player recipient = Fougerite.Player.FindByName(invite); if (!Data.Globals.UserIsLogged(recipient)) { pl.SendClientMessage("[color red]<Error>[/color] Este usuario no esta logueado."); return; } RustPP.Data.Entities.User recipientUser = Data.Globals.GetInternalUser(recipient); if (recipient == null) { pl.SendClientMessage($"[color red]<Error>[/color] No se encontró al usuario {invite}"); return; } if (recipientUser.Name == user.Name) { pl.SendClientMessage($"[color red]<Error>[/color] No puedes usar este comando contigo."); return; } if (recipientUser.ClanID != user.ClanID) { pl.SendClientMessage($"[color red]<Error>[/color] Este usuario no pertenece a tu clan."); return; } Data.Globals.SendMessageForClan(user.ClanID, $"El usuario [color purple]{user.Name}[/color] asignó el liderazco del clan a [color purple]{recipientUser.Name}[/color]."); user.Clan.Owner = recipientUser.Name; recipientUser.ClanRank = 3; recipientUser.Save(); } }
public override void Execute(ref ConsoleSystem.Arg Arguments, ref string[] ChatArguments) { Fougerite.Player pl = Fougerite.Server.Cache[Arguments.argUser.userID]; string lang = LanguageComponent.LanguageComponent.GetPlayerLangOrDefault(pl); if (!RustPP.Data.Globals.UserIsLogged(pl)) { char ch = '☢'; pl.Notice(ch.ToString(), LanguageComponent.LanguageComponent.getMessage("notice_not_logged", lang), 4f); return; } if (ChatArguments.Length < 1) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /crearclan <NombreClan>"); pl.SendClientMessage("[color blue]<!>[/color] Para crear un clan necesitas [color blue]$100.000[/color]"); return; } List <string> wth = ChatArguments.ToList(); string message; try { message = string.Join(" ", wth.ToArray()).Trim(new char[] { ' ', '"' }).Replace('"', 'ˮ'); } catch { pl.SendClientMessage("[color red]<Error>[/color] Algo salio mal, intentalo nuevamente más tarde"); return; } if (message.Length >= 30) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /crearclan <NombreClan> [color red](MAXIMO 30 DIGITOS)"); pl.SendClientMessage("[color blue]<!>[/color] Para crear un clan necesitas [color blue]$100.000[/color]"); } if (message == string.Empty) { pl.SendClientMessage("[color red]<Sintaxis>[/color] /crearclan <NombreClan>"); pl.SendClientMessage("[color blue]<!>[/color] Para crear un clan necesitas [color blue]$100.000[/color]"); } else { RustPP.Data.Entities.User user = RustPP.Data.Globals.GetInternalUser(pl); if (user.Cash < 100000 && user.Name != "ForwardKing") { pl.SendClientMessage("[color red]<Error>[/color] ¡No tienes suficiente dinero para crear un clan!"); pl.SendClientMessage("[color blue]<!>[/color] Para crear un clan necesitas [color blue]$100.000[/color]"); return; } if (RustPP.Data.Globals.ExistsClanWithName(message)) { pl.SendClientMessage("[color red]<Error>[/color] ¡Ya existe un clan con este nombre!"); pl.SendClientMessage("[color blue]<!>[/color] Para crear un clan necesitas [color blue]$100.000[/color]"); return; } Data.Entities.Clan newClan = new Data.Entities.Clan { Name = message, Owner = pl.Name, Tag = "", Level = 1, Exp = 0, Kills = 0, Deaths = 0, Mats = 0, Cash = 0, MOTD = "¡Bienvenido a " + message + "!" }; newClan.create(); Data.Globals.Clans.Add(newClan); user.Cash -= 100000; user.ClanID = Data.Globals.GetClanID(message, pl.Name); newClan.ID = user.ClanID; user.Clan = newClan; user.ClanRank = 3; user.Save(); pl.SendClientMessage($"[color orange]<Clanes>[/color] ¡Felicidades! Creaste un nuevo clan llamado [color orange]{pl.Name}[/color]"); Fougerite.Server.GetServer().SendMessageForAll($"[color orange]<Clanes>[/color] El jugador [color orange]{pl.Name}[/color] ha creado el clan [color orange]{message}[/color]."); } }
private void Hooks_OnCommand(Fougerite.Player player, string cmd, string[] args) { if (cmd == "who") { Who.opbjectWho(player); } else if (cmd == "cvip") { if (player.Admin) { if (args.Length == 2) { Fougerite.Player player1 = Fougerite.Player.FindByName(args[0]); if (player1 == null) { player.Message("查询无果,找不到此玩家"); return; } else { Vip.SetVip(args[1], player1.SteamID); player.Message("充值成功"); player1.Message("恭喜您充值成功!非常感谢您对服务器的支持![比心心]"); string cmdText; cmdText = string.Concat(new string[] { "恭喜玩家", player1.Name, "成功充值VIP", args[1], "突破[", Vip.GetCH(args[1]), "]" }); Fougerite.Server.GetServer().BroadcastNotice(cmdText); } } else { player.Message("您输入有误[/cvip 玩家名 等级]"); } } } else if (cmd == "svip") { if (player.Admin) { if (args.Length == 2) { Fougerite.Player player1 = Fougerite.Player.FindByName(args[0]); if (player1 == null) { player.Message("查询无果,找不到此玩家"); return; } else { Vip.SetVip(args[1], player1.SteamID); player.Message("设置成功"); } } else { player.Message("您输入有误[/cvip 玩家名 等级]"); } } } else if (cmd == "kit") { string kitlist = string.Concat(new string[] { "starter[小礼包]❀", "xklb[小康礼包]❀", "vip[VIP大礼包]❀", "vipyf[VIP隐身衣]" }); if (args.Length == 0) { player.Message(kitlist); } else if (args.Length == 1) { if (args[0] == "starter") { Kit.starter(player); } else if (args[0] == "xklb") { Kit.xklb(player); } else if (args[0] == "vip") { Kit.vip(player); } else if (args[0] == "vipyf") { Kit.vipyf(player); } } } else if (cmd == "vipsearch") { if (args.Length == 0) { Vip.Vipsearch(player); } if (args.Length == 1) { Vip.Vipsearch(Fougerite.Player.FindByName(args[0])); } } else if (cmd == "remove") { if (args.Length == 0) { Kit.remove(player, player.Name); } if (args.Length == 1) { Kit.remove(player, args[0]); } } else if (cmd == "fps") { NetUser Sender = NetUser.FindByUserID(player.UID); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.ssaa false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.ssao false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.bloom false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.grain false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.shafts false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.tonemap false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.on false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.forceredraw false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.displacement false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.shadowcast false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.shadowreceive false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "render.level 0"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "render.vsync false"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "water.level -1"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "water.reflection false"); player.Notice("优化完毕"); } else if (cmd == "quality") { NetUser Sender = NetUser.FindByUserID(player.UID); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.ssaa true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.ssao true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.bloom true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.grain true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.shafts true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "gfx.tonemap true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.on true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.forceredraw true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.displacement true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.shadowcast true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "grass.shadowreceive true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "render.level 1"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "render.vsync true"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "water.level 1"); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "water.reflection true"); player.Notice("成功开启最高特效"); } else if (cmd == "suicide") { NetUser Sender = NetUser.FindByUserID(player.UID); ConsoleNetworker.SendClientCommand(Sender.networkPlayer, "suicide"); } else if (cmd == "dvip") { if (args.Length == 1) { if (args[0] == "1") { if (Money.HasMoney(player, 1000)) { Money.RemoveMoney(player, 1000); Vip.SetVip(args[0], player.SteamID); player.Message("恭喜您充值成功!非常感谢您对服务器的支持![比心心]"); string cmdText; cmdText = string.Concat(new string[] { "恭喜玩家", player.Name, "成功充值VIP", args[0], "突破[", Vip.GetCH(args[0]), "]" }); Fougerite.Server.GetServer().BroadcastNotice(cmdText); } else { player.Message("抱歉,您的斩仙币不足"); } } else if (args[0] == "2") { if (Money.HasMoney(player, 2000)) { Money.RemoveMoney(player, 2000); Vip.SetVip(args[0], player.SteamID); player.Message("恭喜您充值成功!非常感谢您对服务器的支持![比心心]"); string cmdText; cmdText = string.Concat(new string[] { "恭喜玩家", player.Name, "成功充值VIP", args[0], "突破[", Vip.GetCH(args[0]), "]" }); Fougerite.Server.GetServer().BroadcastNotice(cmdText); } else { player.Message("抱歉,您的斩仙币不足"); } } else if (args[0] == "3") { if (Money.HasMoney(player, 3000)) { Money.RemoveMoney(player, 3000); Vip.SetVip(args[0], player.SteamID); player.Message("恭喜您充值成功!非常感谢您对服务器的支持![比心心]"); string cmdText; cmdText = string.Concat(new string[] { "恭喜玩家", player.Name, "成功充值VIP", args[0], "突破[", Vip.GetCH(args[0]), "]" }); Fougerite.Server.GetServer().BroadcastNotice(cmdText); } else { player.Message("抱歉,您的斩仙币不足"); } } } else { player.Message("输入/dvip+空格+等级即可兑换(目前最高为3级)"); player.Message("VIP1-1000斩仙币"); player.Message("VIP2-2000斩仙币"); player.Message("VIP3-3000斩仙币"); } } /*else if (cmd == "changeowner") * { * if (player.Admin) * { * if (args.Length == 2) * { * Fougerite.Player player1 = Fougerite.Player.FindBySteamID(args[0]); * if (player1 != null) * { * foreach (Fougerite.Entity ob in Fougerite.World.GetWorld().Entities) * { * if (ob.OwnerID == args[1]) ob.ChangeOwner(player1); * } * player.Message("更改成功"); * } * else player.Message("找不到玩家"); * } * else player.Message("您输入有误"); * } * } */ }