public override void OnDoubleClick(Mobile from) { if (!Movable) { from.SendAsciiMessage("You cannot eat this head"); return; } // Fill the Mobile with FillFactor if (Food.FillHunger(from, 4)) { // Play a random "eat" sound from.PlaySound(Utility.Random(0x3A, 3)); if (from.Body.IsHuman && !from.Mounted) { from.Animate(34, 5, 1, true, false, 0); } if (PlayerName != null) { from.PublicOverheadMessage(Network.MessageType.Emote, 0x22, true, string.Format("*You see {0} eat the head of {1}*", from.Name, m_PlayerName)); } Consume(); } }
public override void OnDoubleClick(Mobile from) { if (this.ItemID == 0x978) //in jerky form, eat it { if (!Movable) { return; } if (from.InRange(this.GetWorldLocation(), 1)) { int fillfactor = Utility.RandomMinMax(-5, 10); // Fill the Mobile with FillFactor if (Food.FillHunger(from, fillfactor)) { if (fillfactor < 0) { from.SendMessage("That jerky didn't taste too good!"); from.Stam -= Utility.Random(15, 10); } // Play a random "eat" sound from.PlaySound(Utility.Random(0x3A, 3)); if (from.Body.IsHuman && !from.Mounted) { from.Animate(34, 5, 1, true, false, 0); } if (this.Poison != null) { from.ApplyPoison(this.Poisoner, this.Poison); } Consume(); } } } else { if (Movable) //if it's not movable, then we're already cooking it { from.SendMessage("Target the fire to make jerky."); from.Target = new CookTarget(this); } } }
public override void OnDoubleClick(Mobile from) { // Fill the Mobile with FillFactor if (Food.FillHunger(from, 4)) { // Play a random "eat" sound from.PlaySound(Utility.Random(0x3A, 3)); if (from.Body.IsHuman && !from.Mounted) { from.Animate(34, 5, 1, true, false, 0); } if (Owner != null) { from.PublicOverheadMessage(MessageType.Emote, 0x22, true, string.Format("*You see {0} eat some {1}*", from.Name, Name)); } Consume(); } }