Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 02-14-2005, 06:27 PM   #1 (permalink)
Forum Novice
 
Join Date: Aug 2004
Location: Quebec
Age: 20
Posts: 235
Default 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.
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();
		}
		
	}
}
airwalk is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5