- ServUO Version
- Publish Unknown
- Ultima Expansion
- Endless Journey
Hey,
hoping someone can assist trying to figure this out, our server uses a fair few custom items. I am trying to make a boss that will drop a item directly into a players backpack on a 20% drop chance.
Currently i have
public override void OnDeath(Container c)
{
base.OnDeath(c);
if( 0.20 > Utility.RandomDouble() ) // 20% Drop Rate
{
switch ( Utility.Random( 2 ))
{
case 0: c.DropItem( new PetBondingPotion() ); break;
case 1: c.DropItem( new PetSlotStatue() ); break;
case 2: c.DropItem( new InstaTameDeed() ); break;
case 3: c.DropItem( new StableSlotIncreaseDeed() ); break;
case 4: c.DropItem( new MarineShroud() ); break;
case 5: c.DropItem( new DiamondChargerDeed() ); break;
}
}
}
But this is obviously for the mostners corpse. How would i be able to ammend this to drop directly into the players backpack? using PUB 54
Thank you in advance.
hoping someone can assist trying to figure this out, our server uses a fair few custom items. I am trying to make a boss that will drop a item directly into a players backpack on a 20% drop chance.
Currently i have
public override void OnDeath(Container c)
{
base.OnDeath(c);
if( 0.20 > Utility.RandomDouble() ) // 20% Drop Rate
{
switch ( Utility.Random( 2 ))
{
case 0: c.DropItem( new PetBondingPotion() ); break;
case 1: c.DropItem( new PetSlotStatue() ); break;
case 2: c.DropItem( new InstaTameDeed() ); break;
case 3: c.DropItem( new StableSlotIncreaseDeed() ); break;
case 4: c.DropItem( new MarineShroud() ); break;
case 5: c.DropItem( new DiamondChargerDeed() ); break;
}
}
}
But this is obviously for the mostners corpse. How would i be able to ammend this to drop directly into the players backpack? using PUB 54
Thank you in advance.