#W# Added command to check hunger and thirst.
This commit is contained in:
parent
85c094813b
commit
a70122a3d5
1 changed files with 54 additions and 0 deletions
54
Scripts/Commands/Player/Vitals.cs
Normal file
54
Scripts/Commands/Player/Vitals.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Commands;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Scripts.Commands
|
||||
{
|
||||
public class VitalsCommand
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
// Register the command so players can use [Vitals
|
||||
CommandSystem.Register("Vitals", AccessLevel.Player, new CommandEventHandler(Vitals_OnCommand));
|
||||
}
|
||||
|
||||
[Usage("Vitals")]
|
||||
[Description("Displays your current hunger and thirst status.")]
|
||||
public static void Vitals_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
Mobile m = e.Mobile;
|
||||
|
||||
if (m is PlayerMobile)
|
||||
{
|
||||
// Standard UO Hues
|
||||
int greenHue = 63;
|
||||
int redHue = 33;
|
||||
|
||||
// --- Hunger Status ---
|
||||
if (m.Hunger >= 16)
|
||||
m.SendMessage(greenHue, "You are completely full and not hungry at all.");
|
||||
else if (m.Hunger >= 11)
|
||||
m.SendMessage(greenHue, "Your stomach gives a slight rumble.");
|
||||
else if (m.Hunger >= 6)
|
||||
m.SendMessage(redHue, "You are starting to feel hungry.");
|
||||
else if (m.Hunger >= 1)
|
||||
m.SendMessage(redHue, "You are getting extremely hungry. You should eat soon!");
|
||||
else
|
||||
m.SendMessage(redHue, "You are starving to death!");
|
||||
|
||||
// --- Thirst Status ---
|
||||
if (m.Thirst >= 16)
|
||||
m.SendMessage(greenHue, "You are perfectly hydrated and not thirsty.");
|
||||
else if (m.Thirst >= 11)
|
||||
m.SendMessage(greenHue, "Your mouth feels a little dry.");
|
||||
else if (m.Thirst >= 6)
|
||||
m.SendMessage(redHue, "You are starting to feel thirsty.");
|
||||
else if (m.Thirst >= 1)
|
||||
m.SendMessage(redHue, "You are getting extremely thirsty. You should drink soon!");
|
||||
else
|
||||
m.SendMessage(redHue, "You are exhausted from thirst!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue