Darklady73

Member
I am running a ServUO shard

Is it possible to do this? Lines in question are
" public override int Hides { get { return 10; } }
public override HideType HideType { get { return HideType.Frosted; } } "

I would like to add Scaled Hides with the Frosted Hides and is it possible to set a random amount between the two types? Like set 10 but make it random for the two types? ( 4 Scaled, 6 Frosted )
I would love to do this with my dragon scales too.
Any help on the coding would be greatly appreciated
 
One way I do this is this...

public override HideType HideType{ get{ if ( Utility.RandomBool() ){ return HideType.Frozen; } else { return HideType.Goliath; } } }

...but you only get one or the other per creature killed and skinned, but at least it is randomized whenever I kill this creature and skin it.
 
I think you could do something like this too
public override HideType HideType{ get{ return Utility.RandomBool() ? HideType.Frozen : Utility.RandomBool() ? HideType.Goliath : HideType.RegularLeath } }

Haven't tried the above but i do intend to one of these days.
 
This may be too easy (or me missing something bigger) but could you not remove the public override HideType HideType and instead use something like this:
Code:
			switch ( Utility.Random( 3 ))
			{
				case 0: PackItem( new HideType.Frozen ( ) ) PackItem( new HideType.Spined ( ) );  break;
				case 1: PackItem( new HideType.Goliath ( ) ) PackItem( new HideType.Deamon ( ) );  break;
				case 2: PackItem( new HideType.Spined ( ) ) PackItem( new HideType.Goliath ( ) );   break;
			}
 
Another option is to override onCarve on the creature.


JavaScript:
        public override void OnCarve(Mobile from, Corpse corpse, Item with)
        {
            base.OnCarve(from, corpse, with);

            //bool CanUse = from.CheckSkill(SkillName.Anatomy, 30, 70);//If you want to put in a skill check you can do something like this

            corpse.DropItem(new BarbedHides(Utility.RandomMinMax(1, 3)));
            corpse.DropItem(new HornedHides(Utility.RandomMinMax(5, 20)));

        }
 
This would be better if you want multiple types to appear when you carve. My solution is more designed for a 50/50 chance to get one or the other as I want to reduce the times you get the special hides.

Another option is to override onCarve on the creature.


JavaScript:
        public override void OnCarve(Mobile from, Corpse corpse, Item with)
        {
            base.OnCarve(from, corpse, with);

            //bool CanUse = from.CheckSkill(SkillName.Anatomy, 30, 70);//If you want to put in a skill check you can do something like this

            corpse.DropItem(new BarbedHides(Utility.RandomMinMax(1, 3)));
            corpse.DropItem(new HornedHides(Utility.RandomMinMax(5, 20)));

        }
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back