ServUO Version
Publish Unknown
Ultima Expansion
None
I got it so I could kill an NPC or Vendor in this case but their clothes are not dropping for loot.
As an admin I can remove or add their clothes so there should be a way to have whatever they are wearing to drop as loot.
Not finding anything by searching the forum, and I'm still very new to scripting.
Anyone know how I can do this?
Thanks
 
I'm not positive if this will work as I typically don't use ServUO and am unable to test at this time, but it appears that you can go inside BaseVendor.cs and change all of the SetWearable in InitOutfit() from something like

SetWearable(new FancyShirt(GetRandomHue()));

to

SetWearable(new FancyShirt(GetRandomHue()), 1.0);

The 1.0 being the 100% chance for the item to be movable, which will allow it to drop to the corpse on death.

I'm not sure on the exact code for it right now though and that may be incorrect. If it doesn't work, search for SetWearable inside BaseCreature.cs for an idea of what you may need to do.

*Edit* Either way it goes, that is the area you need to look at to get the clothing to drop on death I'm pretty sure.
 
I'm not positive if this will work as I typically don't use ServUO and am unable to test at this time, but it appears that you can go inside BaseVendor.cs and change all of the SetWearable in InitOutfit() from something like

SetWearable(new FancyShirt(GetRandomHue()));

to

SetWearable(new FancyShirt(GetRandomHue()), 1.0);

The 1.0 being the 100% chance for the item to be movable, which will allow it to drop to the corpse on death.

I'm not sure on the exact code for it right now though and that may be incorrect. If it doesn't work, search for SetWearable inside BaseCreature.cs for an idea of what you may need to do.

*Edit* Either way it goes, that is the area you need to look at to get the clothing to drop on death I'm pretty sure.
Thanks
Got it to work
Took me a few tries
It had two properties to change ,[hue],[drop chance]
Here is what worked.
SetWearable(new FancyShirt(GetRandomHue()), -1, 1.0);
 
  • Like
Reactions: ExX
Back