IanSmellios

Member
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
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
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:
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:
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.
 
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 :)
 
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;
 
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:
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.
 
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

  • TreasureMap.cs
    24 KB · Views: 33
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;
 
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?
 
I believe this is the droid you're looking for...err, wait...
There are three files inside the archive that all pertain to USK.
 

Attachments

  • CliLocHandler_For_USK.zip
    4.5 KB · Views: 30
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
 
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.
 
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.
 
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
 
Ok. Hopefully this is the last of the errors:

--------------------------------------------------------------------------------
ServUO - [https://www.servuo.com] Version 0.5, Build 6472.26597
Core: Optimizing for 8 64-bit processors
RandomImpl: CSPRandom (Software)

Errors:
+ Customs/[ServUO.com]-Universal Storage Keys Version 2.0.6/Universal Storage Keys Version 2.0.6/Main Data Management/BODListEntries.cs:
CS1502: Line 635: The best overloaded method match for 'Server.Engines.BulkOrders.LargeBulkEntry.LargeBulkEntry(Server.Engines.BulkOrders.LargeBOD, Server.Engines.BulkOrders.SmallBulkEntry)' has some invalid arguments
CS1503: Line 635: Argument 2: cannot convert from 'Server.GenericReader' to 'Server.Engines.BulkOrders.SmallBulkEntry'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
I finally got VS to work with my project and have found some solutions to the issues I was experiencing. If anyone else is experiencing these issues, this may help.

For the runics not storing, in StoreEntries.CS, update the match method on 216 to include this checktype.BaseType. For me, this was the solution to getting a valid type comparison without causing errors for other items.

public bool Match(Type[] checktypes, bool checksubtypes)
{
foreach (Type checktype in checktypes)
{
if (checktype == Type)
{
return true;
}
if (checktype.BaseType == Type)
{
return true;
}
}

This does have a slight issue with pulling the items back out.They show their names of Runic Hammer, and are colored with a resource of the appropriate type instead of say the name Dull Copper Runic Hammer.

The stat scroll issue was a hidden exception error. It could not find a valid constructor. In ItemListEntries.cs, the GenerateItem method wasn't functioning as expected.
I changed the line that was giving me invalid constructor:
scroll = (StatCapScroll)Activator.CreateInstance(_Type, new object[] { _Value });
to:
scroll = (new StatCapScroll((int)_Value));

No loss for current users that have them in there, and I haven't run into any issues with the change.

An issue I'm still trying to figure out is why when my users cast spells with sufficient regs in their reg key, it's not pulling them. Any ideas?
 
I thought that I might have found the place to put it earlier, in Spell.CS, the ConsumeReagents method. I've been looking over the BaseStoreKey's Consume methods. I haven't started playing with it yet, but I'm guessing that it's probably where I'll need to go.
 
I feel a little silly with this. The info for how to make that work is in the Server Modifications folder.
 
Ok. Hopefully this is the last of the errors:

--------------------------------------------------------------------------------
ServUO - [https://www.servuo.com] Version 0.5, Build 6472.26597
Core: Optimizing for 8 64-bit processors
RandomImpl: CSPRandom (Software)

Errors:
+ Customs/[ServUO.com]-Universal Storage Keys Version 2.0.6/Universal Storage Keys Version 2.0.6/Main Data Management/BODListEntries.cs:
CS1502: Line 635: The best overloaded method match for 'Server.Engines.BulkOrders.LargeBulkEntry.LargeBulkEntry(Server.Engines.BulkOrders.LargeBOD, Server.Engines.BulkOrders.SmallBulkEntry)' has some invalid arguments
CS1503: Line 635: Argument 2: cannot convert from 'Server.GenericReader' to 'Server.Engines.BulkOrders.SmallBulkEntry'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
I ended up removing Bod keys and the list entry because a Bod book that's part of the repo is way better IMO
 
I screwed something up. Help?
CS0103: Line 400: The name 'DuelContext' does not exist in the current context

I also get an error about ChestMaps
CS1061: Line 291: 'Server.Items.TreasureMap' does not contain a definition for 'ChestMap' and no extension method 'ChestMap' accepting a first argument of type 'Server.Items.TreasureMap' could be found
 
Last edited:
hi I am getting a error
Errors:
+ custom/Universal Storage Keys Version 2.0.6/Main Data Management/BODListEntries.cs:
CS1502: Line 635: The best overloaded method match for 'Server.Engines.BulkOrders.LargeBulkEntry.LargeBulkEntry(Server.Engines.BulkOrders.LargeBOD, Server.Engines.BulkOrders.SmallBulkEntry)' has some invalid arguments
CS1503: Line 635: Argument 2: cannot convert from 'Server.GenericReader' to 'Server.Engines.BulkOrders.SmallBulkEntry'
Scripts: One or more scripts failed to compile or no script files were found.
line is
_Entries =newLargeBulkEntry(null,reader);
please help
 

Attachments

  • BODListEntries.cs
    18.8 KB · Views: 3
I downloaded the latest version of LoA (but also with other versions of servuo) as soon as I try to take a map from the key treasure's hunter storage crash the server with this report
Server Crash Report
===================

Servo Version 0.5, Build 6971.16673
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 4.0.30319.42000
Time: 01/02/2019 12:51:23
Mobiles: 8828
Items: 132393
Exception:
System.NullReferenceException: A reference to an object that is not set on an object instance.
in Solaris.ItemStore.TreasureMapListEntry.get_Columns ()
in Server.Gumps.ListEntryGump.ApplyFilters ()
in Server.Gumps.ListEntryGump..ctor (Mobile owner, ListEntry listentry, Int32 page)
in Solaris.ItemStore.ItemStore.WithdrawItem (Mobile from, Int32 amount, Int32 entryindex, Boolean makedeed, Boolean resend)
in Server.Gumps.ItemStoreGump.OnResponse (NetState sender, RelayInfo info)
in Server.Network.PacketHandlers.DisplayGumpResponse (NetState state, PacketReader pvSrc) in m: \ My Shard \ ServUO LoA \ Server \ Network \ PacketHandlers.cs: line 1461
in Server.Network.MessagePump.HandleReceive (NetState ns) in m: \ My Shard \ ServUO LoA \ Server \ Network \ MessagePump.cs: line 187
in Server.Network.MessagePump.Slice () in m: \ My Shard \ ServUO LoA \ Server \ Network \ MessagePump.cs: line 121
in Server.Core.Main (String [] args) in m: \ My Shard \ ServUO LoA \ Server \ Main.cs: line 587

clients:
- Count: 1
+ 127.0.0.1: (account = Ganja) (mobile = 0x37F 'Ganja')
someone can help me?

this error occurs when I extract a treasure map from the key Treasure Hunter's Storage
 
Last edited:
I updated and having a issue with storage keys . Has anyone run into this problem?

ServUO - [https://www.servuo.com] Version 0.5, Build 6985.38769 - Build on 2/15/2019 9:32:18 PM UTC - Release
Core: Optimizing for 4 64-bit processors
Core: Compiled for .NET 4.0
RandomImpl: CSPRandom (Software)
Core: Loading config...
Scripts: Compiling C# scripts...Failed with: 1 errors, 2 warnings
Warnings:
+ Custom Folder tim/Deco and Addons/Addons/GraniteFurnessAddon.cs:
CS0105: Line 2: The using directive for 'System' appeared previously in this namespace
+ Custom Folder tim/Gm Use/Displaysavegump.cs:
CS0105: Line 6: The using directive for 'Server.Mobiles' appeared previously in this namespace
CS0105: Line 7: The using directive for 'Server.Gumps' appeared previously in this namespace
Errors:
+ Custom Folder tim/NewSystems/Universal Storage Keys Version 2.0.6/Main Data Management/ItemListEntries.cs:
CS0426: Line 886: The type name 'RepairSkillType' does not exist in the type 'Server.Items.RepairDeed'
CS0426: Line 912: The type name 'RepairSkillType' does not exist in the type 'Server.Items.RepairDeed'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
Has anyone ever attempted to script a storage unit for pets?
I have something I modified. The pet key when you put in the master key and used it would sometimes crash a shard. This one you have to lock down in your house. I'll send the script
 

Attachments

  • PetKey.cs
    3.5 KB · Views: 30

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back