Resource icon

In-game way to add Sovereigns to the new UO Store 1.0

No permission to download

Dan(Tasanar)

Administrator
ServUO Developer
Tasanar submitted a new resource:

In-game way to add Sovereigns to the new UO Store - In-game way to add Sovereigns to the new UO Store

This item is just a simple item that when double clicked will allow you to add Sovereigns to your players "digital wallet". This allows them to purchase items from the built in UO Store.

The newest versions of ServUO are required. The UO Store is built into these versions if TOL expansion is enabled.

You can access the UO Store, in game, by seeing the picture below:
View attachment 11721

Read more about this resource...
 

manwitch

Citizen
So I have the sovereigns in, and I'm trying to distribute them. My thought was to make it so they have a chance to drop on everything but have it be rare.
So I went to basecreature and added a random double .05 after the paragon chocolate method and right before the ondeath return(around line 6042) But players report no drops after ALOT of kills.

I used this same snippet in runuo and it worked fine, but it seems not to on servuo. Most likely because of my shortcomings ;)

any help is appreciated
 

manwitch

Citizen
Thank you very much I will go try this now. :)


E.T.A. This worked perfectly, many thanks. :D
 
Last edited:
There a way to add items to the store or are we stuck with whats at uo.com/ultima-store/. I looked at the store scripys but didnt see anything that stands out.
 

Dan(Tasanar)

Administrator
ServUO Developer
You can edit the store to sell whatever you like. Just change the cliloc and names of items.

Here is an example:

Code:
Register<HeritageSpellbook>("Heritage Spellbook", 0, 0xEFA, 0, 0x480, 1000, cat);
 

ParanoiaPhD

Citizen
I think it's better to just switch from soveriens to gold coin... and then increase the multiplier so instead of 2500 gold coin its 250000 gold coins... I think this is much cooler but that's just my opinion.

There a way to add items to the store or are we stuck with whats at uo.com/ultima-store/. I looked at the store scripys but didnt see anything that stands out.

Here is some code that I did for a bag of full spell books you might like... You add the first line under the StoreCategory you want it in like "featured".

3010065 makes it say "Spellbooks" when you hover your mouse over it in the store. You can find these numbers in uofiddler.

You put these two blocks of code in UltimaStore.cs

C#:
Register<Bag>(new TextDefinition[] { 0, 0 }, 3010065, 0xE76, 0, 0, 250, cat, ConstructBagOfSpellBooks);

C#:
        //CUSTOM
                public static Item ConstructBagOfSpellBooks(Mobile m, StoreEntry entry)
        {
            var bag = new Bag();

            bag.DropItem(new RingOfNoobs());
            bag.DropItem(new RecallRune());
            bag.DropItem(new RecallRune());
            bag.DropItem(new RecallRune());
            bag.DropItem(new RecallRune());
            bag.DropItem(new RecallRune());
            bag.DropItem(new RecallRune());
            bag.DropItem(new RecallRune());
            bag.DropItem(new RecallRune());
            bag.DropItem(new NecromancerSpellbook((UInt64)0xFFFF));
            bag.DropItem(new BookOfChivalry((UInt64)0x3FF));
            bag.DropItem(new BookOfBushido());
            bag.DropItem(new BookOfNinjitsu());
            bag.DropItem(new Runebook(10));
            bag.DropItem(new Spellbook(UInt64.MaxValue));
      
            return bag;
        }
        //CUSTOM

The stuff at the top of the list of things getting dropped into the bag get dropped in first so the way it is in the code the spell books will be on top of the runes when you open it.

Lastly you have to create a new script for the actual item called BagOfSpellBooks.cs (just create it as a text file in the /scripts/ folder and then add this code and save.

C#:
using System;

namespace Server.Items
{
    public class BagOfSpellBooks : Bag
    {
        [Constructable]
        public BagOfSpellBooks()
            : this(50)
        {
        }

        [Constructable]
        public BagOfSpellBooks(int amount)
        {
          
            this.DropItem(new RecallRune());
            this.DropItem(new RecallRune());
            this.DropItem(new RecallRune());
            this.DropItem(new RecallRune());
            this.DropItem(new RecallRune());
            this.DropItem(new RecallRune());
            this.DropItem(new RecallRune());
            this.DropItem(new RecallRune());
            this.DropItem(new NecromancerSpellbook((UInt64)0xFFFF));
            this.DropItem(new BookOfChivalry((UInt64)0x3FF));
            this.DropItem(new BookOfBushido());
            this.DropItem(new BookOfNinjitsu());
            this.DropItem(new Runebook(10));
            this.DropItem(new Spellbook(UInt64.MaxValue));
            this.DropItem(new RingOfNoobs());
        }

        public BagOfSpellBooks(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();
        }
    }
}
 
Last edited:

danielsheep

Gold Supporter
I tried add a custom stone which implement [store command.
But the stone doesn't work.
Is there someone recommend me?

C#:
using System;
using Server.Network;
using Server.Commands;


namespace Server.Items
{
    public class UltimaStoreStone : Item
    {
        
        [Constructable]
        public UltimaStoreStone()
            : base(0x2A93)
        {
            Weight = 10.0;
        }

        public UltimaStoreStone(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 override void OnDoubleClick( Mobile from )
        {
            PacketHandlers.Register(0xFA, 1, true, UOStoreRequest);

            CommandSystem.Register("Store", AccessLevel.Player, e => OpenStore(e.Mobile as PlayerMobile));

            EventSink.WorldSave += OnSave;
            EventSink.WorldLoad += OnLoad;
        }
    }
}
 

danielsheep

Gold Supporter
How do you use this? I dropped it into scripts/custom, now what? Way to add the item to my backpack or make it a loot drop?
I created and droped this script into my customs folder. Nothing happend when I said [add name command. I would like to use this like a casino stone. Installing at the specific location, Appearing gump when people d-click it. This is all I want.
 

danielsheep

Gold Supporter
I would like to add custom items in ultimastore.cs.
As we know, cliloc must be changed after adding custom items. Because the names and descriptions of custom items are not exsit before.

I have done this everytime after updating uo.
This is very annoying.
The name of custom item can be created easily by using “text definition”. But explanation of items cannot be created by text definition.

How could I put custom items in the ultimastore.cs without changing cliloc?
 

PyroTech03

Citizen
I would like to add custom items in ultimastore.cs.
As we know, cliloc must be changed after adding custom items. Because the names and descriptions of custom items are not exsit before.

I have done this everytime after updating uo.
This is very annoying.
The name of custom item can be created easily by using “text definition”. But explanation of items cannot be created by text definition.

How could I put custom items in the ultimastore.cs without changing cliloc?

If this is on anyone's radar I'd like to know as well. I'm getting prepared to utilize the store and want to add custom content to it but don't want to really keep redistributing the cliloc files each time.
 

LordFenris

Citizen
I also had the idea of adding additional equipment to the Store on our shard. And for the same reason (clilocs changes) I stopped my aspirations.
@Tasanar @Dexter_Lexia
Is it possible to recognize a potential variant of bypassing the clilocs change and coding the descriptions of additional items within ServUO itself?