PigPen

Member
ServUO Version
Publish Unknown
Ultima Expansion
Mondain's Legacy
(I have a Server using RunUO V. 2.2)

I know we can set an Item's weight to zero so it does not contribute to the weight being held in a container . . but . . is it possible to create an item that will not add to the 'item count' of a container when dropped into the container?

I have been searching for an answer (if one exists) so hoping someone in the community can tell me if I am following a blind trail.

Thanks
 
The item is stored in a list which is on the container, ie: BackPack.Items : the count comes from how many items are in the list! I don't see what this benefits, as if it is item count your trying to reduce, than regardless if you hold a item in a container or store its data somewhere else, it has to exist in some form somewhere! if it is the item count restrictions that are the issue, then you can set the maxitems = xxx on and container!
 
Hi. Thanks for looking at this.

I have a couple of quests where players gather items (and a couple of them are only visible to the NPC quest giver). My problem occurs when a player with a full pack tries the quest and the Invisible item just drops to the ground.

I have the items set to Weight = 0.0; but have not found a solution to the item count part.
 
Just run a check on there bag, if at max items, inc the max items + the num of quest items you'll add, then once they are removed, if player bag not at normal max items, set back until it is normal, depends if you are still exceeding limits with quest items so they should be easy to keep track of either using a base class or interface!
 
On the item that you don't want to count towards weight or total:
C#:
public override bool IsVirtualItem { get { return true; } }
Well . . just . . WOW!

Thank you so much for that. I learn something from the good people here every time I fall on my face.

Greatly appreciated.

*bows*
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back