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!

Please help me.Regarding huedeed

longtianchi

Sorceror
Please help me.Regarding huedeed

I am a novice and I tried to write scripts, but the end always wrong. I do not understand where he was in the end out of the error. Please help me fix this script. Thanks

using System;
using Server;
using Server.Network;
using Server.Prompts;
using Server.Targeting;
using Server.Items;

namespace Server.Items
{
public class Huedeed : Item
{
[Constructable]
public Huedeed() : base( 0x14F0 )
{
Weight = 1.0;
Name = "Huedeed";
}

public override void OnDoubleClick( Mobile from )
{
from.SendMessage( "Choose the goal you want to stain。" );
from.Target = new huedeedaaa( this );
}
public Huedeed( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class huedeedaaa : Target
{
private Item m_Item;

public huedeedaaa( Item item ) : base( 12, false, TargetFlags.None )
{
m_Item = item;
}
protected override void OnTarget( Mobile from, object target )
{
if (target is Item)
{
Item targ = (Item)target;
if (!targ.IsChildOf(from.Backpack))
{
from.SendMessage("The item is not in your backpack!!");
}
else
{
from.Prompt = new huedeedbbb(m_Item);
from.SendMessage("Enter the color you want to dye。");
}
}
}
}

}
namespace Server.Prompts
{
public class huedeedbbb : Prompt
{
private Target m_Target;

public huedeedbbb(Target target)
{
m_Target = target;
}

public override void OnResponse(Mobile from, string text)
{
targ.Hue = text;
from.SendMessage("Success.");
}
}
}
 
Top