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!

New here, need help.

hermi

Sorceror
ok im sure you have all herd this before, Im new to this...want to start my own shard. i want to jsut start off easy and clone a UO server. but want to move in to adding new content of my own.

so any help would be great. i miss uo but don't want to pay for it. have some cool ideas, or so i think. but want to know the basics and advanced for later...main things im looking at is adding new ores and woods and crafting items...

Hope you can all point me in the right direction!

thank you very much

Hermi
 

Ryan

RunUO Founder
Staff member
Adding new items is pretty easy... can you give me some specifics on what you want to do? If you an give me some specifics on the types of ore or wood you'd like to add I will help out!
 

Ryan

RunUO Founder
Staff member
To properly make a custom item you'll need to actually write a script. I'm sure that you could create an in-game mechanism which would allow you to create customized items (or even use XMLSpawner) but the problem is its either not repeatable or it's going to end up as a mess at some point.

So as an example lets take making an Ankh Necklace for your shard. The Ankh Necklace could be created in the world with a simple command like this:

[self addtopack static 0x3BB5 set name "a Golden Ankh Necklace" hue 1161 loottype blessed

So now in game you've got a beautiful Ankh Necklace. The problem is it's not really manageable in game. If you took the time to code the item properly in scripts as you can wee here:


Code:
using System;
using Server;
 
namespace Server.Items
{
        public class AnkhNecklace : BaseNecklace
        {
                [Constructable]
                public AnkhNecklace() : base(0x3BB5)
                {
                        Name = "a Golden Ankh Necklace";
                        LootType = LootType.Blessed;
                        Hue = 1161;
                        Weight = 1;
                }
 
                public AnkhNecklace( Serial serial ) : base(serial)
                {
                }
 
                public override void Serialize(GenericWriter writer)
                {
                        base.Serialize(writer);
 
                        writer.Write((int)1); // version
                }
 
                public override void Deserialize(GenericReader reader)
                {
                        base.Deserialize(reader);
 
                        int version = reader.ReadInt();
 
                        if ( version == 0 )
                                LootType = LootType.Blessed;
                }
        }
}

Now in the game you can do things like:

[global count where ankhnecklace
[global set hue 0x481 where ankhnecklace
[global remove where ankhnecklace

Instead of having to do things like this:

[global count where static itemid = 0x3BB5
[global set hue 0x481 where static itemid = 0x3BB5
[global remove where static itemid = 0x3BB5

It makes your entire world much easier to manage to just take the extra five minutes to code the item.

The same is true for mobiles (monsters, animals and npcs).
 
Top