feat: New Jail System (#2215)

New Jail System for MUO
----------------------------

Commands:
[jail [player] [reason] - Jail with time escalation per offense (5 to 120 minutes, GM only)
[unjail [player] - Manual release from jail regardless of time (GM only)
[jailinfo [player] - Check jail status and history (GM only)
[jailrecord - Checks their own jail record stats (player access)

Jail/Unjail can be found in the client view of a player in Admin Gump
![Screenshot 2025-06-12 030226](https://github.com/user-attachments/assets/a9f1a736-0316-464c-8958-c589ea0a1dcb)

Jail record gump, invoked with [jailrecord (30 second cooldown)
![Screenshot 2025-06-12 030320](https://github.com/user-attachments/assets/c19b3e76-3042-48ae-a00d-c70ef564bc84)
This commit is contained in:
Bohica 2025-07-16 20:41:21 -07:00 committed by GitHub
parent c2c486c06e
commit 5f0561b7fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 669 additions and 4 deletions

View file

@ -92,12 +92,12 @@ namespace Server.Gumps
AddPage(0);
AddBackground(0, 0, 420, 440, 5054);
AddBackground(0, 0, 420, 480, 5054);
AddBlackAlpha(10, 10, 170, 100);
AddBlackAlpha(190, 10, 220, 100);
AddBlackAlpha(10, 120, 400, 260);
AddBlackAlpha(10, 390, 400, 40);
AddBlackAlpha(10, 120, 400, 300);
AddBlackAlpha(10, 430, 400, 40);
AddPageButton(
10,
@ -141,7 +141,7 @@ namespace Server.Gumps
if (notice != null)
{
AddHtml(12, 392, 396, 36, notice.Color(LabelColor32));
AddHtml(20, 440, 396, 36, notice.Color(LabelColor32));
}
switch (pageType)
@ -619,6 +619,14 @@ namespace Server.Gumps
AddButtonLabeled(20, y, GetButtonID(7, 12), "Kill");
AddButtonLabeled(200, y, GetButtonID(7, 13), "Resurrect");
y += 20;
AddButtonLabeled(20, y, GetButtonID(7, 15), "Jail");
AddButtonLabeled(200, y, GetButtonID(7, 16), "Unjail");
y += 25;
AddLabel(20, y, LabelHue, "Jail Reason:");
AddTextField(100, y, 300, 20, 1);
break;
}
@ -3801,6 +3809,33 @@ namespace Server.Gumps
sendGump = false;
break;
}
case 15:
{
var reason = info.GetTextEntry(1)?.Trim();
if (string.IsNullOrWhiteSpace(reason))
{
reason = "";
}
CommandLogging.WriteLine(
from,
$"{from.AccessLevel} {CommandLogging.Format(from)} jailing {CommandLogging.Format(m)} - Reason: {reason}"
);
InvokeCommand($"Jail {m.Name} \"{reason}\"");
notice = $"Player has been sent to jail. Reason: {reason}";
break;
}
case 16:
{
CommandLogging.WriteLine(
from,
$"{from.AccessLevel} {CommandLogging.Format(from)} unjailing {CommandLogging.Format(m)}"
);
InvokeCommand($"Unjail {m.Name}");
notice = "Player has been unjailed.";
break;
}
}
if (sendGump)