If you want to hue something the ethereal hue, use hue 0x4000 (16384) and above, up to 0x7FFF (32767) at which point, the client interprets the hues as skin tones.
 
thank you for your replay, what a looking for is a dye tub only for ethereal mounts , i don't know if there any script do that
[doublepost=1484832625][/doublepost]
If you want to hue something the ethereal hue, use hue 0x4000 (16384) and above, up to 0x7FFF (32767) at which point, the client interprets the hues as skin tones.
can you give me more details about your idea plz?
 
This is the script which you wanted from Runuo :) but be warned not sure if this will compile with out errors, it might try it and see :)

Add this to the very top of this script
using Server;
 

Attachments

  • EtherealDyeTub.cs
    4.2 KB · Views: 48
This is the script which you wanted from Runuo :) but be warned not sure if this will compile with out errors, it might try it and see :)

Add this to the very top of this script
using Server;
Thank you so much milva i gonna try it now :)
[doublepost=1484843461][/doublepost]yep i got some errors plz check it and see if you can solve thos error :)
 
You shouldn't rely on others to do the work for you, see if you can fix the errors yourself first.

If you can't, post the errors so everyone can see, not everyone will want to download the script, install it and compile it just to reply to a help request.
 
No need to say sorry, I wasn't telling you off, just trying to help you get more responses from appealing to more people - and showing that you make an effort to try the fix yourself gets you +1 in most people's books ;)
 
Errors:
+ Customs / [ServUO.com] -EtherealDyeTub.cs:
CS1010: Line 71: Line break in the constant
CS1012: Line 71: Too many characters in the character literal
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.


the line 71 is :

from.SendMessage( "You cannot dye that in it's current location." );
 
No need to say sorry, I wasn't telling you off, just trying to help you get more responses from appealing to more people - and showing that you make an effort to try the fix yourself gets you +1 in most people's books ;)


i understand, i did try to fix the error before i post, i am kinda newbie.
[doublepost=1484846095][/doublepost]i have installed visual studio today :)
 
For some reason the file was html-encoded and all the code characters were replaced with things like <

Here's the cleaned version:
Code:
using Server;
using Server.Gumps;
using Server.Network;
using Server.Misc;
using Server.Mobiles;
using Server.Targeting;

namespace Server.Items
{
	public class EtherealDyeTub : DyeTub
	{
		[Constructable]
		public EtherealDyeTub()
		{
			Weight = 10.0;
			Redyable = true;
			Name = "Ethereal Mount Dye Tub";
		}

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

		public override void OnDoubleClick(Mobile from)
		{
			if (from.InRange(this.GetWorldLocation(), 1))
			{
				from.SendMessage("Select the Ethereal to dye.");
				from.Target = new InternalTarget(this);
			}
			else
			{
				from.SendLocalizedMessage(500446); // That is too far away. 
			}
		}

		private class InternalTarget : Target
		{
			private EtherealDyeTub m_LTub;

			public InternalTarget(EtherealDyeTub tub)
				: base(1, false, TargetFlags.None)
			{
				m_LTub = tub;
			}

			protected override void OnTarget(Mobile from, object targeted)
			{
				if (targeted is EtherealMount)
				{
					EtherealMount mount = targeted as EtherealMount;
					if (!from.InRange(m_LTub.GetWorldLocation(), 1) || !from.InRange(((Item)targeted).GetWorldLocation(), 1))
					{
						from.SendLocalizedMessage(500446); // That is too far away. 
					}
					else if ((((Item)targeted).Parent != null) && (((Item)targeted).Parent is Mobile))
					{
						from.SendMessage("You cannot dye that in it's current location.");
					}
					mount.Hue = m_LTub.Hue;
					from.PlaySound(0x23E);
				} //<---This bracket was missing
			} //<---This bracket was missing
		} //<---This bracket was missing
	}

	public class EtherealDyeGump : Gump
	{
		private EtherealHueList[] m_Lists;
		public DyeTub m_Tub;

		public EtherealDyeGump(DyeTub tub)
			: base(50, 50)
		{
			m_Tub = tub;
			EtherealHueList[] checkLists;

			checkLists = EtherealHueList.EtherealHueLists;

			m_Lists = new EtherealHueList[checkLists.Length];

			for (int i = 0; i < m_Lists.Length; ++i)
				m_Lists = checkLists;

			AddPage(0);
			AddBackground(0, 0, 450, 450, 5054); // Outer gump border 
			AddBackground(10, 10, 430, 430, 3000); // Gump background 

			AddLabel(20, 30, 0, "Ethereal Hue Selection Menu");
			AddButton(20, 400, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0);
			AddLabel(55, 400, 0x00, "OKAY");

			for (int i = 0; i < checkLists.Length; ++i)
			{
				AddButton(30, 85 + (i * 25), 0x1468, 0x1468, 0, GumpButtonType.Page, Array.IndexOf(m_Lists, checkLists) + 1);
				AddLabel(55, 85 + (i * 25), 0, checkLists.HueGroup);
			}

			for (int i = 0; i < m_Lists.Length; ++i)
				RenderPage(i, Array.IndexOf(checkLists, m_Lists));
		}

		private void RenderPage(int index, int offset)
		{
			EtherealHueList list = m_Lists[index];

			AddPage(index + 1);

			AddButton(30, 85 + (offset * 25), 0x1468, 0x1468, 0, GumpButtonType.Page, index + 1);
			AddLabel(55, 85 + (offset * 25), 0, list.HueGroup);

			EtherealHueEntry[] entries = list.Entries;

			for (int i = 0; i < entries.Length; ++i)
			{
				AddRadio(255, 90 + (i * 25), 210, 211, false, (index * 100) + i);
				AddLabel(275, 90 + (i * 25), entries.Hue, "*****");
				//AddItem( 315, 88 + (i * 25), 7609, entries.Hue); 
			}
		}

		public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons 
		{
			Mobile from = state.Mobile;

			if (info.ButtonID == 0) // Cancel 
				return;

			int[] switches = info.Switches;

			if (switches.Length == 0)
				return;

			int switchID = switches[0];
			int listIndex = switchID / 100;
			int listEntry = switchID % 100;

			if (listIndex < 0 || listIndex >= m_Lists.Length)
				return;

			EtherealHueList list = m_Lists[listIndex];

			if (listEntry < 0 || listEntry >= list.Entries.Length)
				return;

			EtherealHueEntry entry = list.Entries[listEntry];

			m_Tub.Hue = entry.Hue + 1; // Add one to 0-base for proper hue 
			m_Tub.DyedHue = entry.Hue + 1;
			Effects.PlaySound(from.Location, from.Map, 0x23E); // Sound 574: The dyetub 
			return;
		}
	}
}
 
Just fyi, thereally is only one ethereal hue. Vors is correct about the hue numbers, but all of those hues are the same. So, really, all you need here, is an item, that when double-clicked by a player, will bring up a targeting reticle, and then allow certain items to have their hue changed. You could add limitations to what items were allowed with a few IFs put in for good measure, but my point was that unlike other dye tubs, that allow you to select from the color picker, an ethereal dye tub would not have that restriction.
 
If you're persistent enough to keep doing [self inc hue 1 (beyond 0x4000), you'll eventually get to the tinted ethereal hues.
They seem to be duped versions of normal hues in the 0-2999 range, but they are applied with the ethereal (translucent) effect and not all of them work, the ethereal effect makes them appear much darker too. If I was going to guess, the client uses a multiply filter to apply them.

The ethereal hue is rendered differently depending on the situation too, it hues things pure black in the paperdoll, but the body animations look fine for equipment and characters.
Applying an ethereal hue to a static item results in pure black too, unless the ItemID is flagged translucent.

A developer on the Pandora shard rigged up an XmlSpawner that cycled through hues as long as a lever was flipped - as soon as something interesting happened, it was a case of flipping the lever to stop the cycle and noting the hue.
He did the same thing with BodyValue up in the thousands and discovered some weird animations that seem to be colored lights.
 
well i tryed to compile now i got another error:

Errors:
+ Customs / [ServUO.com] -EtherealDyeTub.cs:
CS0246: Line 84: The type or namespace name 'EtherealHueList' could not be found (is a directive using or an assembly reference missing?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.


in this line:
Code:
 private EtherealHueList[] m_Lists;
 
I guess it's in another file that's missing :S

Will have to try to reconstruct it, or find it on RunUO.com
 
hmm that what i was thinking too. i hope someone have it.
i did search in google but couldn't fin the zip file :(
thanks guys
 
Back