BelfortUO

Member
Hi I'm just beginning my journey with ServUO. So far it has been very fun to mess around with and learn the "code".

Can someone help me with this question?

I am curious if there is something that you can add to an item to have it show the text below.

I've tried a couple things however it breaks the code.

1581814146519.png

Here is the code I'm messing around with.
using Server.Engines.Craft;
using System;

namespace Server.Items
{
public class TestRock : Item, ICommodity, ICraftable
{
[Constructable]
public TestRock()
: this(1)
{
}

[Constructable]
public TestRock(int amount)
: base(0x1779)

{
this.Name = "Here is main line of text";
this.Hue = 0x9ED; //changes color of item
this.Stackable = false;
//this.EngravedText = "This doesn't work"
//this.Weight = 1.0;
this.Amount = amount;
}

public TestRock(Serial serial)
: base(serial)
{
}

TextDefinition ICommodity.Description
{
get
{
return this.LabelNumber;
}
}
bool ICommodity.IsDeedable
{
get
{
return (Core.ML);
}
}
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 int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, ITool tool, CraftItem craftItem, int resHue)
{
Amount = 5;
return 1;
}
}
}

Thanks in advance!!!!
 
Several methods in Server\item.cs handle the item property list that pops up. They start at around line 1230 and are all overridable.

C#:
        public override void GetProperties( ObjectPropertyList list )
        {
            base.GetProperties( list );

            list.Add( "Your custom property here" );
        }
 
Last edited:
yeah you can:

C#:
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            list.Add("<BASEFONT COLOR=#ff0000>This is red now.<BASEFONT COLOR=#FFFFFF>");
        }
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back