public static void HandleThrow(BaseBeverage beverage, WaterElemental elemental, Mobile thrower) { if (!beverage.IsFull) { thrower.SendLocalizedMessage(1113038); // It is not full. } else if (!thrower.InRange(elemental.Location, 5)) { thrower.SendLocalizedMessage(500295); // You are too far away to do that. } else if (!elemental.HasDecanter) { thrower.SendLocalizedMessage(1115895); // It seems that this water elemental no longer has a magical decanter... } else if (0.1 > Utility.RandomDouble()) { thrower.RevealingAction(); elemental.Damage(1, thrower); elemental.HasDecanter = false; beverage.Delete(); thrower.AddToBackpack(new EndlessDecanter()); thrower.SendLocalizedMessage(1115897); // The water elemental has thrown a magical decanter back to you! } else { thrower.RevealingAction(); elemental.Damage(1, thrower); beverage.Delete(); thrower.PlaySound(0x040); thrower.SendLocalizedMessage(1115896); // The water pitcher has shattered. } }
public static void HandleThrow(BaseBeverage beverage, WaterElemental elemental, Mobile thrower) { if (!beverage.IsFull) { thrower.SendLocalizedMessage(1113038); } else if (!thrower.InRange(elemental.Location, 5)) // It is not full. { thrower.SendLocalizedMessage(500295); // You are too far away to do that. } else if (!elemental.HasDecanter) { thrower.SendLocalizedMessage(1115895); // It seems that this water elemental no longer has a magical decanter... } else if (0.1 > Utility.RandomDouble()) { thrower.RevealingAction(); elemental.Damage(1, thrower); elemental.HasDecanter = false; beverage.Delete(); thrower.AddToBackpack(new EndlessDecanter()); thrower.SendLocalizedMessage(1115897); // The water elemental has thrown a magical decanter back to you! } else { thrower.RevealingAction(); elemental.Damage(1, thrower); beverage.Delete(); thrower.PlaySound(0x040); thrower.SendLocalizedMessage(1115896); // The water pitcher has shattered. } }
public void OnTarget(Mobile from, object obj) { // TODO: Need details on how oil cloths should get consumed here if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (obj is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)obj; if (weapon.RootParent != from) { from.SendLocalizedMessage(1005425); // You may only wipe down items you are holding or carrying. } else if (weapon.Poison == null || weapon.PoisonCharges <= 0) { from.LocalOverheadMessage(Network.MessageType.Regular, 0x3B2, 1005422); // Hmmmm... this does not need to be cleaned. } else { if (weapon.PoisonCharges < 2) { weapon.PoisonCharges = 0; } else { weapon.PoisonCharges -= 2; } if (weapon.PoisonCharges > 0) { from.SendLocalizedMessage(1005423); // You have removed some of the caustic substance, but not all. } else { from.SendLocalizedMessage(1010497); // You have cleaned the item. } } } else if (obj == from && obj is PlayerMobile) { PlayerMobile pm = (PlayerMobile)obj; if (pm.BodyMod == 183 || pm.BodyMod == 184) { pm.SavagePaintExpiration = TimeSpan.Zero; pm.BodyMod = 0; pm.HueMod = -1; from.SendLocalizedMessage(1040006); // You wipe away all of your body paint. Consume(); } else if (pm.HueMod == 298) { from.SendMessage("With some elbow grease, you manage to rub off the dye."); Consume(); pm.HueMod = -1; } else { from.LocalOverheadMessage(Network.MessageType.Regular, 0x3B2, 1005422); // Hmmmm... this does not need to be cleaned. } } //Added for Firebomb else if (obj is BaseBeverage) { BaseBeverage beverage = (BaseBeverage)obj; if (beverage.Content == BeverageType.Liquor) { Firebomb bomb = new Firebomb(beverage.ItemID); bomb.Name = beverage.Name; Point3D loc = beverage.Location; beverage.Delete(); from.AddToBackpack(bomb); bomb.Location = loc; from.SendLocalizedMessage(1060580); // You prepare a firebomb. Consume(); } } else if (obj is Firebomb) { from.SendLocalizedMessage(1060579); // That is already a firebomb! } //Firebomb end else { from.SendLocalizedMessage(1005426); // The cloth will not work on that. } }