- Requirements
-
OneTime is required
Using [.Net 4.7.2] (Min Version Compatibility)
ServUO Pub 57 & Earlier : No Support for any pub after 57!
This Interface will be developed around animating hues on a variety of things in UO!
**You'll need to install One Time in order to use this system**
***** Rate this Resource if you find it useful *****
Examples Included
[add specialrobe <cycle True/False>
[add specialrobe <1-209> <cycle True/False>
[add specialfloor <hue> <range>
[add specialbat <hue> <range>
This system uses an Interface, see Basic Example below on how to implement it into any existing Item or Mobile!
Interface
Basic Example - Add the following code to your items or mobiles to add hue animation
**You'll need to install One Time in order to use this system**
***** Rate this Resource if you find it useful *****
Examples Included
[add specialrobe <cycle True/False>
[add specialrobe <1-209> <cycle True/False>
[add specialfloor <hue> <range>
[add specialbat <hue> <range>
This system uses an Interface, see Basic Example below on how to implement it into any existing Item or Mobile!
Interface
Code:
namespace Server.AnimateHue
{
public interface IAnimateHue
{
int HueMin { get; set; } //Min Hue in a Range
int HueMax { get; set; } //Max Hue in a Range
int HueSpeed { get; set; } //Frequency of hues changing
int HueCount { get; set; } //Counter for Speed
bool HueCycle { get; set; } //true is smooth back and forth, false is once at end it repeats from start
bool HueForward { get; set; } //Sets direction of Hue if cycle true
}
}
Basic Example - Add the following code to your items or mobiles to add hue animation
Code:
public class YourClass: Base, IAnimateHue //Hue Animate Interface
{
public int HueMin { get; set; } //Min Hue in a Range
public int HueMax { get; set; } //Max Hue in a Range
public int HueSpeed { get; set; } //Frequency of hues changing
public int HueCount { get; set; } //Counter for Speed
public bool HueCycle { get; set; } //false is smooth back and forth, true is end and repeat from start
public bool HueForward { get; set; } //Sets direction of Hue
[Constructable]
public YourClass() : base()
{
//Hue Setters
HueMin = 1 <-Starts at Hue 1
HueMax = 5; <- This will mark the max range for the Hue, this will cycle over 5 hues
HueSpeed = 3; <- the larger the number, the slower the intervals between hue changes
HueCycle = false; <- cycle smooth or not
}
public YourClass(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
//Save Hue Values
writer.Write(HueMin);
writer.Write(HueMax);
writer.Write(HueSpeed);
writer.Write(HueCount);
writer.Write(HueCycle);
writer.Write(HueForward);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
//Load Hue Values
HueMin = reader.ReadInt();
HueMax = reader.ReadInt();
HueSpeed = reader.ReadInt();
HueCount = reader.ReadInt();
HueCycle = reader.ReadBool();
HueForward = reader.ReadBool();
}