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!

Little nudge needed on an issue I am experiencing..

gibreaper

Sorceror
I have google searched this forum to death and can't find an answer. I have tried modifying values in the LootPack.cs script itself and I am about to go bonkers. When a monster dies that drops multiple lootpacks - (i.e. an ancient wyrm drops 3 "FilthyRich" packs) the gold does not stack up in one pile, I get separate 3 piles of gold, also the jewels do not stack. I was just going to leave it as is, but I recently added a single silver coin to drop (for a reward system I want to eventually invoke) and now have 3 single silver coins and I need some help because my OCD in me just wont let this go. Basically stacking is broke for me on RunUO 2.5. My next step is just to overhaul the loot of each monster and that would seriously be an inefficient use of time. I am going to look around BaseCreature and see if I can find anything there on the OnDeath method, but if anyone can help, I would appreciate it!!
 
Look inside the individual monster scripts and you will see many are set to drop more then one set of lootpacks.

For example - here is what I find inside my AncientWyrm.cs script which will drop FilthyRitch three times:

public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich, 3 );
AddLoot( LootPack.Gems, 5 );
}
Hope this helps
 

gibreaper

Sorceror
Thanks for the prompt reply - I understand that. What I would like to happen is have the items in those individual lootpacks that are stackable, stack!
For example, let's say a lootpack has 500 gold, 3 jewels of a single type, a silver coin, and random weapons/armor items.
Lets call it "filthyrich" like the ancient wyrms drop. When I kill the wyrm, I would like to open the corpse and see 1500 gold (in one stack) , 9 jewels (in one stack), 3 silver coins (in one stack) and then the random items (which aren't stackable)
Currently the stacking isn't happening, I am getting 3 separate lootpacks that are generating and nothing that is stackable is stacking. I have verified instanced loot is off on the corpse btw. I hope this further clarifies what is going on.
 

gibreaper

Sorceror
OK instead of just saying "I fixed it" and not passing on any knowledge, I found the issue. It ends up where I was working on containers for enabling house breakins that I accidentally commented out this line in containers.cs:

On or about line 72 under TryDropItem method... DO NOT comment out line below or you will separate your stackables (at least related to lootpack drops) into separate piles.

if ( !house.LockDown( from, dropped, false ) )
returnfalse;

Hope someone gets to use this and saves them about 4 hours like I spent today trying to track this booger down.
 
Top