RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 SVN] Universal Storage Keys

havin a small prob addin this to the RunUO-2.1 + Nerun'sDistro r11 this is the error im havin

RunUO - [www.runuo.com] Version 2.1, Build 3995.28114
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...failed (1 errors, 2 warnings)
Warnings:
+ Customs/costums/BaseCostume.cs:
CS0114: Line 81: 'Server.Items.BaseCostume.Dye(Server.Mobile, Server.Items.D
yeTub)' hides inherited member 'Server.Items.BaseClothing.Dye(Server.Mobile, Ser
ver.Items.DyeTub)'. To make the current member override that implementation, add
the override keyword. Otherwise add the new keyword.
+ Customs/Alpha Gold Ledger.cs:
CS0429: Line 375: Unreachable expression code detected
Errors:
+ Spells/Base/Spell.cs:
CS0118: Line 789: 'Server.Items.Backpack' is a 'type' but is used like a 'va
riable'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Code:
            //pass the task of finding/consuming reagents to a static method in BaseStoreKey.  This allows the system to scan
            //all keys in your backpack for any reagents, and pick what it needs from each one.  Also, it will doublecheck the
            //backpack in case not everythinhg was found in the keys, but the rest is lying loose in the backpack
            if( BaseStoreKey.Consume( Backpack, m_Info.Reagents, m_Info.Amounts ) )
            {
                return true;
            }
            else
            {
                DoFizzle();
            }

            return false;
        }
it did say pack i added Back to it that killed most of the error but now its sayin that any ideas ? if i take the Back part out i get this error CS0103: line 794: the name 'pack' does not exist in the current context


k error fixed for anyone else who uses the neron autospawner version its line 241 before return false; you wanna place it there for the Spells.cs add lines :)
 

Millo

Page
Someone noticed a problem with stash entryes, items dissapearing?
I got an Pet Key for Shrink Items, dont know where i got it from:

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Solaris.ItemStore;                            //for connection to resource store data objects

namespace Server.Items
{
    //item inherited from BaseResourceKey
    public class PetKey : BaseStoreKey
    {
        public override int DisplayColumns{ get{ return 2; } }

        public override bool CanUseFromPack{ get{ return true; } }

        public override bool CanUseFromHouse{ get{ return true; } }

        public override List<StoreEntry> EntryStructure
        {
            get
            {
                List<StoreEntry> entry = base.EntryStructure;

                //NOTE: if you're looking to add new stash entry list types, make sure to include the appropriate "using" directives at the top of this file, or use the full class path

                entry.Add( new ResourceEntry( typeof( RedPetDye ), "RedPetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( BluePetDye ), "BluePetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( GreenPetDye ), "GreenPetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( YellowPetDye ), "YellowPetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( PurplePetDye ), "PurplePetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( OrangePetDye ), "OrangePetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( WhitePetDye ), "WhitePetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( BlackPetDye ), "BlackPetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( BlazePetDye ), "BlazePetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( BloodPetDye ), "BloodPetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( IceBluePetDye ), "IceBluePetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( IceGreenPetDye ), "IceGreenPetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( PinkPetDye ), "PinkPetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( MossGreenPetDye ), "MysticGreenPetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( IceWhitePetDye ), "IceWhitePetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( FrostBluePetDye ), "FrostBluePetDye", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( PetDyeTub ), "PetDyeTub", 0, 25, 0, 0  ) );
                entry.Add( new ResourceEntry( typeof( EmptyDNAVial ), "DNA Vial" ) );
                entry.Add( new ResourceEntry( typeof( EmptyDNAVialSet ), "DNA VialSet" ) );

                entry.Add
                (
                    new StashEntry
                    (
                        typeof( ShrinkItem ), "Pets", 750, new StashSortData
                        (                                            //add the column information
                            new StashSortEntry[]        //the first entry is what is displayed by default
                            {
                                new StashSortEntry( "Type", "MobTypeString" ),
                                new StashSortEntry( "Slots", "PetControlSlots" ),
                                new StashSortEntry( "Str", "StatStr" ),
                                new StashSortEntry( "Int", "StatInt" ),
                                new StashSortEntry( "Dex", "StatDex" ),
                                new StashSortEntry( "Min Dmg", "PetMinDamage" ),
                                new StashSortEntry( "Max Dmg", "PetMaxDamage" ),
                                new StashSortEntry( "Gender", "Gender" ),

                            },
                            new StashSortEntry[]    //the second entry is what is also available to the user when they customize the gump
                            {
                                new StashSortEntry( "Pet Name", "PetName" ),
                                new StashSortEntry( "Level", "Level" ),
                                new StashSortEntry( "Max Level", "MaxLevel" ),
                                new StashSortEntry( "Next Level", "NextLevel" ),
                                new StashSortEntry( "Exp", "Exp" ),
                                new StashSortEntry( "Bonded", "PetBonded" ),

                                new StashSortEntry( "Dmg Cold", "DamageTypeCold" ),
                                new StashSortEntry( "Dmg Energy", "DamageTypeEnergy" ),
                                new StashSortEntry( "Dmg Fire", "DamageTypeFire" ),
                                new StashSortEntry( "Dmg Phys", "DamageTypePhysical" ),
                                new StashSortEntry( "Dmg Poison", "DamageTypePoison" ),

                                new StashSortEntry( "Hits Now", "PetHitsNow" ),
                                new StashSortEntry( "Mana Now", "PetManaNow" ),
                                new StashSortEntry( "Stam Now", "PetStamNow" ),

                                new StashSortEntry( "Hits", "StatHits" ),
                                new StashSortEntry( "Mana", "StatMana" ),
                                new StashSortEntry( "Stam", "StatStam" ),

                                new StashSortEntry( "Pet Hue", "Pet Hue" ),
                                new StashSortEntry( "Kill Pnts", "PetKP" ),

                                new StashSortEntry( "Virt Armor", "PetVirtualArmor" ),
                                new StashSortEntry( "Resist Cold", "ResistCold" ),
                                new StashSortEntry( "Resist Energy", "ResistEnergy" ),
                                new StashSortEntry( "Resist Fire", "ResistFire" ),
                                new StashSortEntry( "Resist Phys", "ResistPhysical" ),
                                new StashSortEntry( "Resist Poison", "ResistPoison" ),

                                new StashSortEntry( "Anatomy", "SkillAnatomy" ),
                                new StashSortEntry( "EvalInt", "SkillEvalInt" ),
                                new StashSortEntry( "Magery", "SkillMagery" ),
                                new StashSortEntry( "Magic Resist", "SkillMagicResist" ),
                                new StashSortEntry( "Meditation", "SkillMeditation" ),
                                new StashSortEntry( "Poisoning", "SkillPoisoning" ),
                                new StashSortEntry( "Tactics", "SkillTactics" ),
                                new StashSortEntry( "Wrestling", "SkillWrestling" ),

                            }
                        )
                    )
                );

                return entry;
            }
        }

        [Constructable]
        public PetKey() : base( 1193 )
        {
            ItemID = (5995);

            Name = "Pet Key";
        }

        //this loads properties specific to the store, like the gump label, and whether it's a dynamic storage device
        protected override ItemStore GenerateItemStore()
        {
            //load the basic store info
            ItemStore store = base.GenerateItemStore();

            //properties of this storage device
            store.Label = "Pet Key";

            store.OfferDeeds = false;
            return store;
        }

        //serial constructor
        public PetKey( Serial serial ) : base( serial )
        {
        }

        //events

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( 0 );
        }

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
        }
    }

}

Now the problem: If i fill this key with ShrinkItems, and get them back out, no problem.
But if i fill this key, put it in Masters Key and try to get an item out the entry is deleted and im left with no item.

Someone can help me out?
 

Snooki

Wanderer
Can someone point me in the direction of how to add the hue color for the taming bods, i managed to add them to the bod key but they are black and i cant seem to figure out where i need to look to change the hue color to show.
 

Millo

Page
Code:
entry.Add(new ListEntry(typeof(LargeTamingBOD), typeof(LargeBODMobileListEntry), "Large Taming", 0x2258, 0x1CA));

0x1CA is the Color, 0x2258 is the ItemID
 

Dodger-b

Sorceror
does this work with the calandor's ML/SA svn that he put out i havent even tried to add it because it says i need the cliloc handler but the link for it doesnt work
 

milva

Sorceror
I actually have a new release cookin' away in the background, and am hoping to release it in the next day or so. This update will offer a new system that will make things like pet kennels a big possibility
This would be really great!! I can't get the pet kennel to work "exactly" as it is suppose to.
With having FSTaming and using Xantos Shrink- guessing a basecreature edit would be due.
 
Did anyone manage to get the stat scroll entries to work?
I noticed earlier today that I couldn't withdraw my rather large collection of stat scrolls, heh
 

Iraq-

Sorceror
First off, thank you for the excellent system release.

Secondly, through my many months of experience using this system I have come to often notice a lag-spike when some of the keys are open...
In particular, the Ultimate BOD Book. I believe it to be because of the up-to 100,000 entries stored into the book which are being loaded everytime the book is opened.

My question to you is this: Is there a way to have reduce the size of the list being loaded into memory each time these types of items are used (clothing hampers, armor storage, etc (but these are on a smaller scale because they only hold up to 999 items)... or a more efficient way to handle these large list items being opened?

While I understand I could reduce the capacity of the books to be lesser, making the books storage list smaller, I am hoping that is only a last resort.
 
After having used this system for months and making alot of major changes to the system and getting it to work right. I will tell you that your lag spikes are not coming from a peticular key.. Rather its coming from the crafting part of the key if you have the code installed.. If players are using the keys to craft from or shoot arrows directly out of the keys you are more than likely to get a lag spike and the more players you have doing this the worse it will be....My advice is to remove the crafting from the keys and so forth and try the system making it only for storage and if that helps.. If it does then you will know what to look for..


Weeble2424
 

Iraq-

Sorceror
We'll I'm quite positive that it is the specific key and the specific reason that I've listed. But that doesn't mean that your source of lag isn't another concern - it's just not the one I'm speaking of or looking to solve as we are not using the "craft from the key" code. Thanks though for the tip.

Loading an array of 100,000 objects ( a full Ultimate Bod Book ) is most certainly the cause. I aim to find a more elegant solution to reduce the lag, whether it be to seperate the list into smaller groups of lists which are loaded separately, or only to load the enough for the current page that is being displayed, or any other solutions that there are to reducing the overhead caused by loading such large lists.
 

datguy

Sorceror
Found a bug
Crashes if Master is empty & you 'Fill from backpack'

MasterKey.cs Line 196 Add a null check
Code:
        //this triggers all fill from backpack methods in all entries contained within the master keys
        public void FillEntriesFromBackpack( Mobile from )
        {
            if (_Stores == null)
                return;
 
            foreach( ItemStore store in _Stores )
            {
                //don't resend this gump if it's not up
                store.FillFromBackpack( from, false );
            }
         
         
        }
 

prplbeast

Sorceror
Found a bug
Crashes if Master is empty & you 'Fill from backpack'

MasterKey.cs Line 196 Add a null check
Code:
        //this triggers all fill from backpack methods in all entries contained within the master keys
        public void FillEntriesFromBackpack( Mobile from )
        {
            if (_Stores == null)
                return;
 
            foreach( ItemStore store in _Stores )
            {
                //don't resend this gump if it's not up
                store.FillFromBackpack( from, false );
            }
       
       
        }
i have tried many ways yet i still get a crash if the master keys are empty, any ideas?
 

Attachments

  • Crash Report.txt
    2.7 KB · Views: 12

sexylady

Sorceror
hi i am having problems with the tool key it wont put Lumberjacking tools help plz

{
List<StoreEntry> entry = base.EntryStructure;

entry.Add( new ToolEntry( typeof( TinkerTools ), "Tinkering", 0, 30, 0, 0 ) );
entry.Add( new ToolEntry( typeof( SmithHammer ), new Type[]{ typeof( Tongs ), typeof( SledgeHammer ) }, "Blacksmithy", 0, 30, -5, 0 ) );
entry.Add( new ToolEntry( typeof( SewingKit ), "Tailoring", 0, 30, -5, 3 ) );
entry.Add( new ToolEntry( typeof( Nails ), new Type[]{ typeof( Saw ), typeof( Hammer ), typeof( Scorp ), typeof( DrawKnife ), typeof( DovetailSaw ), typeof( Froe ), typeof( Inshave ), typeof( JointingPlane ) }, "Carpentry", 0, 30, -10, 5 ) );
entry.Add( new ToolEntry( typeof( FletcherTools ), "Fletching", 0, 35, 0, 0 ) );
entry.Add( new ToolEntry( typeof( MortarPestle ), "Alchemy", 0, 30, 0, 0 ) );
entry.Add( new ToolEntry( typeof( ScribesPen ), "Inscription", 0, 30, 0, 0 ) );
entry.Add( new ToolEntry( typeof( Skillet ), new Type[]{ typeof( FlourSifter ), typeof( RollingPin ) }, "Cooking", 0, 30, 0, 0 ) );
entry.Add( new ColumnSeparationEntry() );
entry.Add( new ToolEntry( typeof( MalletAndChisel ), "Stone Crafting", 0, 30, 0, 0 ) );
entry.Add( new ToolEntry( typeof( Shovel ), new Type[]{ typeof( SturdyShovel ), typeof( Pickaxe ), typeof( SturdyPickaxe ) }, "Mining", 0, 35, -10, -10 ) );
entry.Add( new ToolEntry( typeof( Hatchet ), "Lumberjacking", 0, 30, -5, 0 ) );
entry.Add( new ToolEntry( typeof( GargoylesPickaxe ), "Gargoyle's Pickaxe", 0, 30, -5, -5 ) );
entry.Add( new ToolEntry( typeof( ProspectorsTool ), "Prospector's Tool", 0, 30, 0, 0 ) );
entry.Add( new ToolEntry( typeof( MapmakersPen ), "Cartography", 0, 30, 0, 0 ) );
entry.Add( new ToolEntry( typeof( Blowpipe ), "Glassblowing", 0, 40, 0, 0 ) );
entry.Add( new ResourceEntry( typeof( TaxidermyKit ), "Taxidermy", 0, 30, 0, 0 ) );

return entry;
}
}
 

Iraq-

Sorceror
If by lumberjacking tools you mean axes it's probably because an axe is a weapon, and as such it could have many many different mods, and these keys only remember the UsesRemaining portion... so taking them back out would combine the usesremaining, but would lose all of the other attributes on the weapons. Furthermore, there are many different Lumberjacking tools (axes) - to have 1 arbitrary "tool" doesn't exist. You should make a new axe/lj-tool with only UsesRemaining, and then store that in the key - at least that's what i'd do. You can also simply remove LJ from taking UsesRemaining on Axes, so all axes are infinite.
 

Iraq-

Sorceror
i have tried many ways yet i still get a crash if the master keys are empty, any ideas?
if you can"t find it.. you can always just go crazy with null checks..

make sure the store that you're calling the FillFromBackpack( from, false ) isn't null, make sure from isn't null, make sure the from has a backpack.. etc.
 
Top