mouradoski
Initiate
Hello,
i am looking for script of Ethereal dye tub.
thankx guys
i am looking for script of Ethereal dye tub.
thankx guys
can you give me more details about your idea plz?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 so much milva i gonna try it nowThis is the script which you wanted from Runuobut 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;
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![]()
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;
}
}
}
private EtherealHueList[] m_Lists;
We use essential cookies to make this site work, and optional cookies to enhance your experience.