Full Version : Elven Dressers on RunUo 2.0 Svn
xmlspawner >>Scripting Support >>Elven Dressers on RunUo 2.0 Svn
<< Prev | Next >>
Erica- 07-17-2006
Hi ArteGordon got a question ok i noticed it that all the elven dressers are just decoration items they dont open what script would i have to edited on this so it can be opened like dressers im sure its easy for it to be fixed just need to know what script would it be in .
ArteGordon- 07-17-2006

QUOTE (Erica @ July 17, 2006 12:33 pm)
Hi ArteGordon got a question ok i noticed it that all the elven dressers are just decoration items they dont open what script would i have to edited on this so it can be opened like dressers im sure its easy for it to be fixed just need to know what script would it be in .

do you know the itemids? The actual furniture containers such as dressers would be defined in FurnitureContainer.cs. You would just need to add one with the appropriate itemids.
Erica- 07-17-2006
Heres the item ids from a custom i had on 1.0 script

CODE
using System; using System.Collections; using Server; using Server.Multis; using Server.Network;
namespace Server.Items
{
[Furniture]
[Flipable( 0x2D09, 0x2D0A )]
public class ElvenDresser : BaseContainer
{
public override int DefaultGumpID{ get{ return 0x51; } }
public override int DefaultDropSound{ get{ return 0x42; } }
public override Rectangle2D Bounds
{
get{ return new Rectangle2D( 20, 10, 150, 90 ); }
}
[Constructable]
public ElvenDresser() : base( 0x2D09 )
{
Weight = 0.0;
}
public ElvenDresser( 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();
}
}
}

And heres the 2.0 one

CODE
using System; using Server; namespace Server.Items { public class ElvenDresserSouthAddon : BaseAddon
{
public override BaseAddonDeed Deed{ get{ return new ElvenDresserSouthDeed(); } }
[Constructable]
public ElvenDresserSouthAddon()
{
AddComponent( new AddonComponent( 0x30E5 ), 0, 0, 0 );
AddComponent( new AddonComponent( 0x30E6 ), 1, 0, 0 );
}
public ElvenDresserSouthAddon( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
public class ElvenDresserSouthDeed : BaseAddonDeed
{
public override BaseAddon Addon{ get{ return new ElvenDresserSouthAddon(); } }
public override int LabelNumber{ get{ return 1072864; } } // elven dresser (south)
[Constructable]
public ElvenDresserSouthDeed()
{
}
public ElvenDresserSouthDeed( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

Haazen- 07-17-2006
Thanks for pointing this out. I have the same 1.0 dresser script as you. It works just fine in 2.0. I am not going to use the new 2.0 addon dresser scripts. The old ones are actual working containers.