Ejemplo n.º 1
0
        public static string OnModuleExamine(string existingDescription, NWObject examinedObject)
        {
            if (examinedObject.ObjectType != ObjectType.Item)
            {
                return(existingDescription);
            }

            NWItem examinedItem = (examinedObject.Object);

            if (examinedItem.GetLocalFloat("DURABILITY_MAX") <= 0f)
            {
                return(existingDescription);
            }

            string description = ColorTokenService.Orange("Durability: ");
            float  durability  = GetDurability(examinedItem);

            if (durability <= 0.0f)
            {
                description += ColorTokenService.Red(Convert.ToString(durability));
            }
            else
            {
                description += ColorTokenService.White(FormatDurability(durability));
            }

            description += ColorTokenService.White(" / " + FormatDurability(GetMaxDurability(examinedItem)));

            return(existingDescription + "\n\n" + description);
        }
Ejemplo n.º 2
0
 public static string PrismaticString()
 {
     return(ColorTokenService.Red("p") + ColorTokenService.Orange("r") + ColorTokenService.Yellow("i") + ColorTokenService.Green("s") + ColorTokenService.Blue("m") +
            ColorTokenService.LightPurple("a") + ColorTokenService.Purple("t") + ColorTokenService.White("i") + ColorTokenService.Black("c"));
 }
Ejemplo n.º 3
0
        private static void ShowMOTD()
        {
            NWPlayer            player = GetEnteringObject();
            ServerConfiguration config = DataService.ServerConfiguration.Get();
            string message             = ColorTokenService.Green("Welcome to " + config.ServerName + "!\n\nMOTD: ") + ColorTokenService.White(config.MessageOfTheDay);

            DelayCommand(6.5f, () =>
            {
                player.SendMessage(message);
            });
        }