Resource icon

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

No permission to download

Tasanar

Admin
ServUO Developer
Oct 16, 2014
4,663
177
63
33
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...
 
  • Like
Reactions: realpanthersfan

manwitch

Squire
Jul 13, 2017
258
35
28
56
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

Admin
ServUO Developer
Oct 16, 2014
4,663
177
63
33
trueuo.com
Shard Name
Heritage
Donate
Donate money to this user
Because they are blessed.

Remove them being blessed and they would drop.
 

manwitch

Squire
Jul 13, 2017
258
35
28
56
Thank you very much I will go try this now. :)


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

LimpBizquick

Squire
Apr 22, 2016
102
13
18
49
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

Admin
ServUO Developer
Oct 16, 2014
4,663
177
63
33
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

Squire
Jun 3, 2019
123
6
0
Shard Name
Warwickshire
I'm interested in using this, how do I get it onto my server?
 

ParanoiaPhD

Squire
May 2, 2019
161
17
18
32
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:

danielsheep

Gold Donator
Mar 19, 2018
122
3
18
Donate
Donate money to this user
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 Donator
Mar 19, 2018
122
3
18
Donate
Donate money to this user
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 Donator
Mar 19, 2018
122
3
18
Donate
Donate money to this user
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?