RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

how can I make it so the WoodenTreasureChest

Maxi - II

Wanderer
how can I make it so the WoodenTreasureChest

has more then just gold in it?...... So when it spawns there is swords and armor and rings and regs and all kinds of stuff in it.. maybe even so you can set it by levels any idea's??? please


using Server;
using Server.Items;
using Server.Multis;
using Server.Network;
using System;

namespace Server.Items
{
[FlipableAttribute( 0xe43, 0xe42 )]
public class WoodenTreasureChest : BaseTreasureChest
{
public override int DefaultGumpID{ get{ return 0x49; } }
public override int DefaultDropSound{ get{ return 0x42; } }

public override Rectangle2D Bounds
{
get{ return new Rectangle2D( 20, 105, 150, 180 ); }
}

[Constructable]
public WoodenTreasureChest() : base( 0xE43 )
{
}

public WoodenTreasureChest( 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();
}
}

[FlipableAttribute( 0xe41, 0xe40 )]
public class MetalGoldenTreasureChest : BaseTreasureChest
{
public override int DefaultGumpID{ get{ return 0x42; } }
public override int DefaultDropSound{ get{ return 0x42; } }

public override Rectangle2D Bounds
{
get{ return new Rectangle2D( 20, 105, 150, 180 ); }
}

[Constructable]
public MetalGoldenTreasureChest() : base( 0xE41 )
{
}

public MetalGoldenTreasureChest( 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();
}
}

[FlipableAttribute( 0x9ab, 0xe7c )]
public class MetalTreasureChest : BaseTreasureChest
{
public override int DefaultGumpID{ get{ return 0x4A; } }
public override int DefaultDropSound{ get{ return 0x42; } }

public override Rectangle2D Bounds
{
get{ return new Rectangle2D( 20, 105, 150, 180 ); }
}

[Constructable]
public MetalTreasureChest() : base( 0x9AB )
{
}

public MetalTreasureChest( 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();
}
}
}



http://forums.gamingeeks.net
 

Gene2324

Wanderer
Or if you don't want to create each chest and fill them one at a time you could always [add xmlspawner then under its spawn menu type TreasureChestLevel# where # is the level I think they go up to level 4 or 5 you could always script more if the need be.

Cheers,
-Gene
 

Maxi - II

Wanderer
Thanks you 2 for the reply, I did try the first one and yes it is what I want but I can't seem to have them spawn like the other ones do, it's like the one chest spawns on top of the ground and the other one spawns underground it's kinda weird.


but thanks I'll try them both again
 

Maxi - II

Wanderer
I tried the one command [add xmlspawner and it doesn't do anything.
I just dont get it, the other chest do what I want them to but just have gold in them and I want them to have what a 1 or5 treasure chest has in them. Can't I do that?
 

Gene2324

Wanderer
Well for the [add xmlspawner command to work you need to have bobsmarts premade world installed otherwise type [add spawner and for making chests that respawn you NEED a spawner placed that spawns a chest with goodies in it unless you want to go around refilling the chests by hand.

Cheers,
-Gene
 

steveq

Wanderer
[add spawner
target ground
dbl click spawner

TreasureChestlevel1 //( can be 1-5 )

[props

set the time on how you would like it to spawn,


a spawning treasure chest,
 

Maxi - II

Wanderer
tried that, and it only spawns either a brown one woth gold in it or a tresure map one, but the treasure map one is under ground or something casue I cant see it spawn like the other ones....


but thanks.
 
Top