Random DyeTub Stone
It's a stone who sell a dye tub with random color.
Put this script into a custom directory.
So, if you've any idea or bugs, tell me. Thanks.
Edit: I've lost my host. So here is my script.
It's a stone who sell a dye tub with random color.
Put this script into a custom directory.
So, if you've any idea or bugs, tell me. Thanks.
Edit: I've lost my host. So here is my script.
Code:
using System;
namespace Server.Items
{
public class DyeStone : Item
{
[Constructable]
public DyeStone() : base( 0xED4 )
{
Name = "a random dyetub Stone [10000 gp]";
Movable = false;
}
public override void OnDoubleClick( Mobile from )
{
Container pack = from.Backpack;
DyeTub dt = new DyeTub();
dt.DyedHue = Utility.Random( 1500 );
dt.Name = "Dying Tub [from Random DyeTub Stone]";
dt.Redyable = false;
dt.LootType = LootType.Blessed;
if ( pack != null && pack.ConsumeTotal( typeof( Gold ), 10000 ) ) {
from.AddToBackpack( dt );
}
else {
from.SendMessage( 50, "You don't have enought money" );
}
base.OnDoubleClick( from );
}
public DyeStone( 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();
}
}
}