51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
using System;
|
|
using Server;
|
|
using Server.Commands;
|
|
using Server.Mobiles;
|
|
|
|
namespace Server.Scripts.Commands
|
|
{
|
|
public class VitalsCommand
|
|
{
|
|
public static void Initialize()
|
|
{
|
|
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)
|
|
{
|
|
int greenHue = 63;
|
|
int orangeHue = 43;
|
|
int redHue = 33;
|
|
|
|
if (m.Hunger >= 75)
|
|
m.SendMessage(greenHue, "You are completely full and feeling invigorated.");
|
|
else if (m.Hunger >= 50)
|
|
m.SendMessage(greenHue, "You are satiated and not hungry.");
|
|
else if (m.Hunger >= 25)
|
|
m.SendMessage(orangeHue, "Your stomach gives a slight rumble. You should eat soon.");
|
|
else if (m.Hunger >= 1)
|
|
m.SendMessage(redHue, "You are getting extremely hungry and feel weak!");
|
|
else
|
|
m.SendMessage(redHue, "You are starving to death!");
|
|
|
|
if (m.Thirst >= 75)
|
|
m.SendMessage(greenHue, "You are perfectly hydrated and refreshed.");
|
|
else if (m.Thirst >= 50)
|
|
m.SendMessage(greenHue, "You are not thirsty.");
|
|
else if (m.Thirst >= 25)
|
|
m.SendMessage(orangeHue, "Your mouth feels dry. You should drink soon.");
|
|
else if (m.Thirst >= 1)
|
|
m.SendMessage(redHue, "You are terribly thirsty and feel sluggish!");
|
|
else
|
|
m.SendMessage(redHue, "You are exhausted from thirst!");
|
|
}
|
|
}
|
|
}
|
|
}
|