Resource icon

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

No permission to download

Tasanar

Moderator
ServUO Developer
Oct 16, 2014
4,490
114
32
trueuo.com
Shard Name
Heritage
Donate
Donate money to this user
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

Well-Known Member
Jul 13, 2017
184
15
55
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
 

Tasanar

Moderator
ServUO Developer
Oct 16, 2014
4,490
114
32
trueuo.com
Shard Name
Heritage
Donate
Donate money to this user
Because they are blessed.

Remove them being blessed and they would drop.
 

manwitch

Well-Known Member
Jul 13, 2017
184
15
55
Thank you very much I will go try this now. :)


E.T.A. This worked perfectly, many thanks. :D
 
Last edited:

LimpBizquick

Well-Known Member
Apr 22, 2016
95
6
48
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.
 

Tasanar

Moderator
ServUO Developer
Oct 16, 2014
4,490
114
32
trueuo.com
Shard Name
Heritage
Donate
Donate money to this user
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);
 

Barclay

Active Member
Jun 3, 2019
30
3
Shard Name
Warwickshire
I'm interested in using this, how do I get it onto my server?
 

ParanoiaPhD

Well-Known Member
May 2, 2019
94
11
31
California
www.iceyou.org
Shard Name
Central USA
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: