Hi i would like to :
Make players Cut gargoyles corpse (carve) only from a custom knife ,
if a player try to cut corpse with a normal bladed weapon they get nothing, is it possible?


Thankssss
 
Yes.. but how to make carve method check for an expecific item from onehanded layer.?

This seems to work, not sure if its the most elegant way to do it



Code:
        public override void OnCarve( Mobile from, Corpse corpse, Item item )
        {
            if (from is PlayerMobile)
            {
   
        Item butcher = from.FindItemOnLayer(Layer.OneHanded);
    if (from.Player && butcher != null && butcher is ButcherKnife )
        //{
            if ( corpse.Carved )
            base.OnCarve( from, corpse, item );
            else if ( !corpse.Carved )
            {
                    corpse.DropItem( new WyrmsHeart() );
                    from.SendMessage( "You carve into the corpse and find a WyrmHeart." );
                    corpse.Carved = true;
            }

        }
            }
 
Last edited:
well its not that bad but a bit redundant in my opinion. Also I added in an message when its not the right blade :p
This would be my take on it
Code:
public override void OnCarve( Mobile from, Corpse corpse, Item item )
{
	if (from is PlayerMobile)
	{
		Item butcher = from.FindItemOnLayer(Layer.OneHanded);
		if (butcher != null && butcher is ButcherKnife)
		{
			if (corpse.Carved)
			{
				base.OnCarve( from, corpse, item );
				return;
			}
			corpse.DropItem( new WyrmsHeart() );
			from.SendMessage( "You carve into the corpse and find a Wyrm heart." );
			corpse.Carved = true;
		}
		else
		{
			from.SendMessage("You try to carve into the corpse but your blade doesn't get through.");
		}
	}
}
 
I added a 40% chance to get the item (white scales)

if the player doesnt get any item, the message " You try to carve into the corpse but your blade doesn't get through" appears. I would like to have that message sent only when players try to carve using a different weapon. not when they actually carve and dont get any item.

Also if player doesnt get any item, they can keep trying, until they get the item, is that normal?


Code:
        public override void OnCarve( Mobile from, Corpse corpse, Item item )
{
    if (from is PlayerMobile)
    {
        Item butcher = from.FindItemOnLayer(Layer.OneHanded);
        if (butcher != null && butcher is trinchadordragones)
        {
            if (corpse.Carved)
            {
                base.OnCarve( from, corpse, item );
                return;
            }
                if (from.Mounted)
                    from.Animate(28, 5, 1, true, false, 1);
                else
                    from.Animate(32, 5, 1, true, false, 1);
                if (Utility.RandomDouble() <= 0.4)
                {
                corpse.Carved = true;
                from.SendMessage("You find nothing.");
                if (Utility.RandomDouble() <= 0.5)
                {
            corpse.DropItem( new WhiteScales{Amount = 10} );
            from.SendMessage( "You cut the Whitewyrm corpse." );
               from.PublicOverheadMessage(MessageType.Regular, 906, true, "*Chic chic");
            corpse.Carved = true;
        }
        else
        {
            from.SendMessage("You need to equip a Special knife in order to cut that corpse!.");
        }
    }
}
}
}

^maybe like this they cant keep trying to carve?
 
Last edited:
Back