Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 06-12-2003, 11:33 PM   #1 (permalink)
 
Join Date: Jan 2003
Posts: 351
Send a message via AIM to Nacho_Supreme
Default Hue all items in a bag

This is probably a really newbish question, but I have an armor bag that i want to give hued armor. How would i do this in the code?
Nacho_Supreme is offline   Reply With Quote
Old 06-12-2003, 11:38 PM   #2 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default Re: Hue all items in a bag

Quote:
Originally Posted by Nacho_Supreme
This is probably a really newbish question, but I have an armor bag that i want to give hued armor. How would i do this in the code?
Depends on how you add the items to the bag.

Please post the code so we can help otherwise it might not be the way you want to do it.
Phantom is offline   Reply With Quote
Old 06-12-2003, 11:41 PM   #3 (permalink)
 
Join Date: Jan 2003
Posts: 351
Send a message via AIM to Nacho_Supreme
Default

its really basic:

[code:1]
using System;
using Server;
using Server.Items;
using Server.Mobiles;

namespace Server.Items
{
public class ArmorBag : Bag
{
[Constructable]
public ArmorBag() : this( 1 )
{
Movable = true;
Hue = 0x0481;
}
[Constructable]
public ArmorBag( int amount )
{
DropItem( new LeatherChest() );
DropItem( new LeatherGorget() );
DropItem( new LeatherArms() );
DropItem( new LeatherGloves() );
DropItem( new LeatherLegs() );
DropItem( new LeatherCap() );

}

public ArmorBag( 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();
}
}
}
[/code:1][/code]
Nacho_Supreme is offline   Reply With Quote
Old 06-12-2003, 11:47 PM   #4 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Default

Pass the item to a variable then set it's hue. For example[code:1]LeatherChest lc = new LeatherChest();
lc.Hue = Hue; // If you want the armour to be the same color as the bag
DropItem( lc );[/code:1]
UOT is offline   Reply With Quote
Old 06-12-2003, 11:51 PM   #5 (permalink)
 
Join Date: Jan 2003
Posts: 351
Send a message via AIM to Nacho_Supreme
Default

Thanks alot. But i have a question. I dont have a script or anything but could it be possible to make a gump that when you choose leather armor from it another gump could come up with a range or colors then when you select it, it gives you a full set of hued armor?
Nacho_Supreme is offline   Reply With Quote
Old 06-13-2003, 04:24 AM   #6 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Ya it possable. When they chose leatherarmor. It would open another gump. Or it could be like a radio button, i think is the term, and u check leather armor then check the hue. When you press ok, it saves the hue # to a int, and that int is then passed over to when you make the item.

Also, I could be mistaken, but I think you can change the hue in the DropItem command. I thought i saw a script do that, but I'm not sure. If not, UOT's way will diff work.
Clarke76 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