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!

Light on weapons or any equipable object

Light on weapons or any equipable object

ok - finialy figured this out WITH OUT having to use up a layer for it

use an existing item all players have :)

this requires mul mods and then patching to players

and a short addin the scripts for the items you want to light up :)

1st step - need a mul modifier - i suggest Mulpatcher
I also suggest you read this thread:
http://www.runuo.com/forums/faq-forum/88069-interactive-custom-art-tutorial.html

need to make a copy of the backpack art & art gump pics
start up mulpatcher, load up art, artgump and tiledata
find the pics for the backpack in art and artgump - save them to bitmaps
then find and empty spot in both (0xE5B and 0xC4F5 work nicely)
set them to the correct bitmap that you saved
and write own the animation number for the gumpart - if using above should be 1A5
then go into tile data
find the spot you used for new back pack (if as above 0xE5B)
an use the following settings in there
Name: backpack
weight: 3
height: 1
Quality (not quanity): 21
unknown 4: 1
then chack:
A
Container
Wearable
Lightsource

save art, artgump & tiledata :)

then patch those 5 files to your players

Now the easy step:

add this in the weapon, armor, etc script
or merge it in if you have these sections all ready

Code:
		public override bool OnEquip( Mobile from )
		{
			if (base.OnEquip( from ))
			{
				if(from is PlayerMobile && from.Backpack != null)
				{
					from.Backpack.Light = LightType.Circle300;
					from.Backpack.ItemID = 3675;
				}
			}
			return base.OnEquip( from );
		}

		public override void OnRemoved( object parent )
		{
			if ( parent is Mobile )
			{
				Mobile m = (Mobile)parent;
				if (m.Backpack != null) m.Backpack.ItemID = 3701;
			}
			base.OnRemoved( parent );
		}

now even though that says 300 circle - it really is smaller (but evewn the latern works that way - bigger on ground than when carrying)

when they equip the item - presto they have light
when it is removed - they don't

Works great - does not take up a layer slot
and you can have some light there for them :)
 
Top