Universal Storage Keys

Universal Storage Keys 2.0.6

No permission to download

IanE

Well-Known Member
Dec 27, 2013
215
16
31
Florida
github.com
Donate
Donate money to this user
IanE submitted a new resource:

Universal Storage Keys - Based roughly on Daat99's storage keys, these are designed to give the developer as much flexibility

I did not make this. Edited the "Server Modification" files to be relevant with ServUO, making it easier to tell where to add your edits.
1. Original Universal Storage Keys
2. Formosa Update
Some of the main storage types include:
  • Resource Storage: Items like resources, where the...
Read more about this resource...
 

IanE

Well-Known Member
Dec 27, 2013
215
16
31
Florida
github.com
Donate
Donate money to this user

tass23

Moderator
Aug 28, 2013
1,021
142
42
St. Petersburg, FL
www.uoexpanse.com
Shard Name
The Expanse
Donate
Donate money to this user
@IanE
When I originally used this, the Ultimate Powerscroll Key had issues with SoTs in that they couldn't be removed. The creation of an SoT is very different from the creation of a Powerscroll and that was the reason why that key wouldn't work with SoTs. Has that been addressed?
 

IanE

Well-Known Member
Dec 27, 2013
215
16
31
Florida
github.com
Donate
Donate money to this user
@IanE
When I originally used this, the Ultimate Powerscroll Key had issues with SoTs in that they couldn't be removed. The creation of an SoT is very different from the creation of a Powerscroll and that was the reason why that key wouldn't work with SoTs. Has that been addressed?
I hate to sound ignorant on this one but what is an SoT?

EDIT

Looks like the Stat scrolls do not withdraw still. I will take a look into that. Thank You
 
Last edited:
  • Like
Reactions: tass23

IanE

Well-Known Member
Dec 27, 2013
215
16
31
Florida
github.com
Donate
Donate money to this user
Well this uses the StashEntry instead of the ListEntry. I will continue to look into the issue though to try to get ListEntry to work with this key.
Comment out:
Code:
        public override List<StoreEntry> EntryStructure
        {
            get
            {
                List<StoreEntry> entry = base.EntryStructure;

                string[] skillnames = Enum.GetNames(typeof(SkillName));


                entry.Add(new ListEntry(typeof(PowerScroll),typeof(PowerScrollListEntry),"Power Scrolls"));
                entry.Add(new ListEntry(typeof(StatCapScroll),typeof(StatCapScrollListEntry),"Stat Scrolls"));

                return entry;
            }
        }
Replace with:
Code:
        public override List<StoreEntry> EntryStructure
        {
            get
            {
                List<StoreEntry> entry = base.EntryStructure;

                entry.Add
                (
                    new StashEntry
                    (
                        typeof(PowerScroll),"Power Scroll",500,new StashSortData
                        (
                            new StashSortEntry[]
                            {
                                new StashSortEntry( "Value", "Value" ),
                                new StashSortEntry( "Skill", "Skill" )
                            }
                        )
                    )
                );

                entry.Add
                (
                    new StashEntry
                    (
                        typeof(StatCapScroll),"Stat Cap Scroll",500,new StashSortData
                        (
                            new StashSortEntry[]
                            {
                                new StashSortEntry( "Value", "Value" )
                            }
                        )
                    )
                );
                return entry;
            }
        }
EDIT

This will also delete all the scrolls in the system.
 
Last edited:

shakar

Member
Mar 8, 2016
8
1
Hey, love the script but there seems to be an issue with it when used on the current newest build of ServUO. Seems that with the doom guantlet change they did, they also did a change to treasure maps in some form. I'm not a scriptor myself, but I don't know how to fix it so I'm reporting it here for you to see.

The error is as follows:
ai.imgur.com_56mfqpD.png

I found by commenting out the section below allowed the scripts to work, however I fear that it may have disabled the keys that store the treasure maps. I'd rather have my players lose one key rather than all of them.
Code:
//master constructor
public TreasureMapListEntry(Item item) : base(item)
{
    TreasureMap map = (TreasureMap)item;

    //fill in the name based on the level
    //TODO: find a better way to do this
    switch (map.Level)
    {
        case 0:
            {
                _Name = "Youthful";
                break;
            }
        case 1:
            {
                _Name = "Plainly";
                break;
            }
        case 2:
            {
                _Name = "Expertly";
                break;
            }
        case 3:
            {
                _Name = "Adeptly";
                break;
            }
        case 4:
            {
                _Name = "Cleverly";
                break;
            }
        case 5:
            {
                _Name = "Deviously";
                break;
            }
        case 6:
            {
                _Name = "Ingeniously";
                break;
            }
    }

    _ChestLocation = map.ChestLocation;
    _ChestMap = map.ChestMap;
    _Decoder = map.Decoder;
    _Level = map.Level;
    _Bounds = map.Bounds;
}
The error is pointing at the ChestMap bit of the script there in the ItemListEntries.cs at line 291.

Again, this is with a fresh compilation of the ServUO server files as they were since April 16th of 2016.
 
  • Like
Reactions: IanE

Tukaram

Well-Known Member
Jan 4, 2015
305
40
55
Hey, love the script but there seems to be an issue with it when used on the current newest build of ServUO. Seems that with the doom guantlet change they did, they also did a change to treasure maps in some form. I'm not a scriptor myself, but I don't know how to fix it so I'm reporting it here for you to see.

The error is pointing at the ChestMap bit of the script there in the ItemListEntries.cs at line 291.

Again, this is with a fresh compilation of the ServUO server files as they were since April 16th of 2016.
Yeah, they changed the T-Maps to the random spawn locations (like the official servers) and it messed with the storage keys. My fix went a different route.... I don't like the random locations so I just switched back to the old treasuremap.cs. Have not seen any problems yet - but not sure what the long term effects will be :)
 

PyrO

Well-Known Member
Jan 27, 2015
1,167
95
If you change
Code:
_ChestMap = map.ChestMap;
into this it should work for both the newer maps and the older ones
Code:
if (map.ChestMap != null)
{
	_ChestMap = map.ChestMap;
}
in case the error persists you can try to change it simply into
Code:
//_ChestMap = map.ChestMap;
 

Dramoor

Well-Known Member
Apr 4, 2014
78
9
38
So all you have to do to fix this is change this

Code:
_ChestMap = map.ChestMap;
to this

Code:
_ChestMap = map.Facet;

Haven't had any problems after that.


This will keep them stating the correct facet inside the ItemEntry gump when you add them to the keys
 
Last edited:
  • Like
Reactions: Sareus

Diesel

Gold Donator
Sep 7, 2014
142
23
54
Shard Name
Medival World 73.146.176.79
Yeah, they changed the T-Maps to the random spawn locations (like the official servers) and it messed with the storage keys. My fix went a different route.... I don't like the random locations so I just switched back to the old treasuremap.cs. Have not seen any problems yet - but not sure what the long term effects will be :)
So by a previous version do you mean an older verison of treasuremap.cs from...? pub 54 or? Any chance Tukram you could post that treasuremap.cs? I tried these workarounds without being able to eliminate the chestmap problem.
 

Tukaram

Well-Known Member
Jan 4, 2015
305
40
55
So by a previous version do you mean an older verison of treasuremap.cs from...? pub 54 or? Any chance Tukram you could post that treasuremap.cs? I tried these workarounds without being able to eliminate the chestmap problem.
As a "programming" fix... I don't know if this is recommended, probably not. Not sure what it might interfere with later - but I will deal with that later. I can't stand the random spawning chests anyway, so I was glad to get the storage keys working, Davies Locker working, and go back to the regular spawning chests so the rune libraries work. For me it was a win/win/win. We shall see if it backfires later.

I had an older copy of the ServUO file. Good luck :)
 

Attachments

Diesel

Gold Donator
Sep 7, 2014
142
23
54
Shard Name
Medival World 73.146.176.79
Turns out I had package 2.0.5. That wouldn't fix with what had been posted. When I updated to 2.0.6 Universal keys I got it working with post from above by Dramoor! Thanks Dramoor! and thank you for trying to help me Turkaram

_ChestMap = map.Facet;
 

zerodowned

Moderator
ServUO Developer
Jun 28, 2014
1,770
221
Code:
Universal Storage Keys/Main Data Management/BODListEntries.cs:
  CS0234: Line 8: The type or namespace name 'CliLocHandler' does not exist in
 the namespace 'Solaris' (are you missing an assembly reference?)
 + Universal Storage Keys/Main Data Management/ItemListEntries.cs:
  CS0234: Line 7: The type or namespace name 'CliLocHandler' does not exist in
 the namespace 'Solaris' (are you missing an assembly reference?)
 + Universal Storage Keys/Main Data Management/StashListEntry.cs:
  CS0234: Line 5: The type or namespace name 'CliLocHandler' does not exist in
 the namespace 'Solaris' (are you missing an assembly reference?)
 + Universal Storage Keys/Main Data Management/StoreEntries.cs:
  CS0234: Line 13: The type or namespace name 'CliLocHandler' does not exist i
n the namespace 'Solaris' (are you missing an assembly reference?)
Where can I get the Solaris clilochandler now that runuo is down?
 

zerodowned

Moderator
ServUO Developer
Jun 28, 2014
1,770
221
I believe this is the droid you're looking for...err, wait...
There are three files inside the archive that all pertain to USK.
lol, sorry, was looking at an older version of the keys that didn't include it.
thank you for the info
 

Arakinas

Member
Sep 27, 2017
8
0
I've recently added this system to a shard I'm working for.
I'm having two issues that I'm having trouble finding a work around for. Similar to the post above, the stat scrolls won't come out of storage. We have a few people that have them stored, so the solution presented with the stash items that removes the currently stored items is not ideal.
The second issue is that I haven't been able to work out yet is that I can't seem to store any runic tools.
I've tried to work through this, but I think the issue is in StoreEntries.cs, around ln 200 with the match methods. I've added some debug messages and it looks like the Item's type is the issue.
For sake of ease on my part, I tried debugging through the StoreEntries method :
(Sorry for the janky messages in say. I can't get it to run in debug mode within visual studio to just step through it)

public static int IndexOfItem(List<StoreEntry> sourcelist, Item item, bool checkalltypes)
{
int index = 0;

foreach (StoreEntry entry in sourcelist)
{
//added for debug
Mobile m = item.FindOwner();

Type[] checktypes = new Type[] { entry.GetType() };

foreach (Type checktype in checktypes)
{
m.Say("ItemGetType: {0}, checkType: {1}, checktypeName: {2}", item.GetType(), checktype, checktype.Name);
m.Say("Entryname: {0}", entry.Name);

if (checktype == item.GetType())
{
return index;
}
}
//End added for debug

if (entry.Match(item, checkalltypes))
{
return index;
}
index++;
}

//not found
return -1;
}

When i attempt to add an item with this, the messages I'm getting he following values:
GetType() :Server.Items.DullCopperRunicHammer
checktype: Solaris.ItemStore.RunicToolEntry
checktype.Name: RunicToolEntry

I can't seem to figure out how to pull out the specific type of tool entry to get the checks to ever pass.
When I attempted to dig down further into this through the Match Methods, it eventually would get down to the Type Type Property, which was always Type for these.

Any suggestions on these? Thanks.
 

TwilightRaven

Well-Known Member
Oct 29, 2016
455
7
37
Pennsylvania
Shard Name
Guardia
Can't wait to get the script working. I have some issues on compile.


Errors:
+ Customs/[ServUO.com]-Universal Storage Keys Version 2.0.6/Universal Storage Keys Version 2.0.6/Main Data Management/ItemListEntries.cs:
CS0246: Line 631: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 660: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
+ Customs/[ServUO.com]-Universal Storage Keys Version 2.0.6/Universal Storage Keys Version 2.0.6/Main Data Management/StoreEntries.cs:
CS0246: Line 2278: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 2280: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 2283: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 2288: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 2293: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 2298: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 2303: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 2308: The type or namespace name 'InstrumentQuality' could not be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

Arakinas

Member
Sep 27, 2017
8
0
TwilightRaven - Check your StoreEntries.cs file It should have the reference there. it should be in folder: Universal Storage Keys Version 2.0.6/Main Data Management