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!

[hue and [gethue command for players (takes tokens)

zite

Wanderer
[hue and [gethue command for players (takes tokens)

Summary:
on my shard I have a hue room with like 8934984 hues and as a prize you could hue clothing or weapons, ect. So as my shard grew our staff would be getting a page every 5 minutes asking for something to be hued. Thus I made this command so players could hue things themselves.
[hue <hue number>
will take tokens from the player's pack or bank and hue the item.

Description:
NOTE: I did NOT make the tokens.cs file.

Installation:
drop in custom folder
 

Attachments

  • hueandgethue.zip
    2.2 KB · Views: 977

Brazen

Wanderer
looks cool!

Will probably play with this tomorrow, definately one of those things that was on our "todo" list. Thanks! (Now we can have our dye-room, and freetime to staff too! LOL)

Brazen

*tooo pooor to have a sigline! LOL*
 
infdude said:
colum 9 13 etc basecommand could not be found are u missing assembly reffrence somthing

If you have an error please look in the F.A.Q forums it tells you how to copy errors.

Then I or Zite would help you fix it....
 

zite

Wanderer
are you running an older version of runuo? if so you may need to add in like 'using Server.Commands;' at the top or something similar. Not sure, like the guy above me said, check the faq section on how to paste errors
 

Meth

Wanderer
zite said:
are you running an older version of runuo? if so you may need to add in like 'using Server.Commands;' at the top or something similar. Not sure, like the guy above me said, check the faq section on how to paste errors
crash's the server :-/

Exception:
System.InvalidCastException: Specified cast is not valid.
at Server.Scripts.Commands.HueTarget.OnTarget(Mobile from, Object target)
at Server.Targeting.Target.Invoke(Mobile from, Object targeted)
at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
 

Pheragas

Wanderer
Great Job! This script will save staff a lot of time. The only thing is i had to edit some of the prices but besides that its awesome.
 

Grimbo

Wanderer
Great script! I do have a question about it. It doesn't hue dyetubs correctly. Have you noticed this, and if you have do you have a fix?
 
It doesn't hue dyetubs correctly. Have you noticed this, and if you have do you have a fix?
Dye tubs have two hue properties, the normal hue (that comes with every item), and a property called dyedhue. Hue shows what color the dye tub is, and DyedHue is what color clothing is when the tub is used. This means you could color the dye tub to appear pure white, yet have it dye items pure black. Kinda funny :D

From what I can tell, it seems there's different token prices for different things (mounts, items, etc.). Dye tubs are items, so maybe insert a check somewhere that if the item is a dye tub, it does both Hue and DyedHue?
 

flowerbudd

Sorceror
Is there any way to prevent players from using whatever colors they want? We only want them to be able to use certain colours.
 

dukereece07

Wanderer
Huing pets

Well, I like the script, and I have changed it to take gold instead of tokens, but that's beside the point. My problem is this. I'm trying to make it so that players can use this command to hue their pets as well. I've got it all put in, but I have only one problem. It gives me the following error:

'Server.Mobile' does not contain a definition for 'ControlMaster'

and this is the segment I added for this script to hue pets.

Code:
			else if ( target is BaseCreature )
			{
				Mobile p = (Mobile)target;

				if ( p.ControlMaster = true )
				{
					if ( m_Amount >= 5000 )
					{
						p.Hue = m_Hue;
						from.Backpack.ConsumeTotal( typeof( Gold ), 5000 );
						from.SendMessage( "Removed 5k from backpack and hued the pet." );
					}
					else if ( b_Amount >= 5000 )
					{
						p.Hue = m_Hue;
						from.BankBox.ConsumeTotal( typeof( Gold ), 5000 );
						from.SendMessage( "Removed 5k from bank and hued the pet." );
					}
					else
					{
						from.SendMessage( "To hue a pet you need 5k gold in you pack or bank." );
					}
				}
				else
				{
					from.SendMessage( "That is not your pet." );
				}
			}

Any insight?
 
Top