More Helpful Help Command (#5)

* Deleted TestCommand.cs

No longer needed.

* Update AbyssCommand.cs

Added a command to adjust the player's bracket at will.

* Update User.cs

Added Abyss Group Value

* Update Command.cs

Added Examples[] to the constructor and handler.

* Update HelpCommand.cs

Made the Help command more helpful!

* Update AbyssCommand.cs

Added Help Examples

* Update GiveCommand.cs

Added help examples,
handles negative inputs again,
added more aliases,
can add or remove materials by ID,
can now for add all skipped characters with `give avatars-scuffed`

* Update AbyssCommand.cs

missed a quote

* Update UltraEndlessGetMainDataReqHandler.cs

Bracket can now be set with commands.

Need to unscuff the fight cycle.

* Update GiveCommand.cs

Cheeky give gold command

* Further refined the Help Command

---------

Co-authored-by: TerminalAide0017 <Sucks@code>
This commit is contained in:
TerminalAide0017
2023-06-09 00:23:54 -07:00
committed by GitHub
parent d784bee5fa
commit f2e83c93dd
10 changed files with 108 additions and 51 deletions

View File

@@ -1,13 +1,53 @@
namespace PemukulPaku.GameServer.Commands
using Common.Resources.Proto;
using Common;
namespace PemukulPaku.GameServer.Commands
{
[CommandHandler("help", "Shows the help page", CommandType.All)]
[CommandHandler("help", " - shows help page >:3", CommandType.All)]
internal class HelpCommand : Command
{
public override void Run(Session session, string[] args)
{
// TODO: Implement online help
base.Run(session, args);
RecvChatMsgNotify notify = new() { };
//hardcoding values is fun AND easy!
string msg = "<color=#B00B><size=26>Commands</size></color><size=16><color=#555>\n";
msg += "command <required> [optional]\n";
//msg += "┌\n";
foreach (Command Cmd in CommandFactory.Commands)
{
if(Cmd.CmdType == CommandType.All || Cmd.CmdType == CommandType.Player)
{
msg += "┝<size=22>" + Cmd.Name + " " + Cmd.Description + "</size>\n";
if (Cmd.Examples is not null)
{
foreach (string Example in Cmd.Examples)
{
msg += "│┕" + Example + "\n";
}
}
}
}
msg += "</color></size>";
//I really want to figure out how to grab from Chatroom.cs instead, but oh well.
ChatMsg AiMsg = new()
{
Uid = 0,
Nickname = "Ai-chan",
Time = (uint)Global.GetUnixInSeconds(),
Msg = msg,
Content = new() { },
Channel = ChatMsg.MsgChannel.World,
AvatarId = 3201,
DressId = 593201,
FrameId = 200001,
CustomHeadId = 161080,
CheckResult = new() { NumberCheck = 0, ShieldType = 0, RewriteText = msg }
};
AiMsg.Content.Items.Add(new() { MsgStr = msg });
notify.ChatMsgLists.Add(AiMsg);
session.Send(Packet.FromProto(notify, CmdId.RecvChatMsgNotify));
}
public override void Run(string[] args)