Evanonian
Member
- ServUO Version
- Publish 58
- Ultima Expansion
- Endless Journey
I'm trying to make a mount change to a random metal hue when mounted, but I can't seem to find a method for when a player mounts.
I have it set in the constructable, but that only applies to when the item is added. I want it to choose a random metal hue every time it's mounted, so it's never the same color.
Thanks,
I have it set in the constructable, but that only applies to when the item is added. I want it to choose a random metal hue every time it's mounted, so it's never the same color.
Code:
using System;
using System.Collections;
using Server.Mobiles;
using Server.Items;
namespace Server.Mobiles
{
public class EarlySupporterMount : EtherealMount
{
[Constructable]
public EarlySupporterMount() : base(0x20DD, 0x3EAA, 0x3EA0)
{
Name = "Early Supporter Mount";
LootType = LootType.Blessed;
Hue = (Utility.RandomMetalHue());
NonTransparentMountedHue = (Utility.RandomMetalHue());
Transparent = false;
}
public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
list.Add( "Promotional Item" );
}
public override void OnCast()
{
FinishSequence();
}
public EarlySupporterMount(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
Thanks,