public override void OnDoubleClick(Mobile m) { if (m.InRange(this.GetWorldLocation(), 2)) { if (0.1 > Utility.RandomDouble()) { m.BAC = Math.Min(60, m.BAC + 10); m.PlaySound(Utility.RandomList(0x30, 0x2D6)); BaseBeverage.CheckHeaveTimer(m); m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1156270, m.NetState); // *You ready the bottle to throw but it's enchanting label persuades you to drink it instead!* Delete(); } else { m.SendLocalizedMessage(1010086); // What do you want to use this on? m.BeginTarget(10, false, Server.Targeting.TargetFlags.None, (from, targeted) => { if (0.25 > Utility.RandomDouble() && m.BAC > 0) { AOS.Damage(m, Utility.RandomMinMax(25, 50), 100, 0, 0, 0, 0); m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1156271, m.NetState); // *You wind up to throw but in your inebriated state you manage to hit yourself!* m.FixedParticles(0x3728, 20, 10, 5044, EffectLayer.Head); Delete(); } else if (targeted is ShadowguardPirate) { ShadowguardPirate pirate = targeted as ShadowguardPirate; m.DoHarmful(pirate); m.MovingParticles(pirate, 0x99B, 10, 0, false, true, 0, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0); Timer.DelayCall(TimeSpan.FromSeconds(.5), () => { if (pirate.Alive) { // this is gay, but can't figure out a better way to do! pirate.BlockReflect = true; AOS.Damage(pirate, m, 300, 0, 0, 0, 0, 0, 0, 100); pirate.BlockReflect = false; pirate.FixedParticles(0x3728, 20, 10, 5044, EffectLayer.Head); pirate.PlaySound(Utility.Random(0x3E, 3)); } }); Delete(); } else { m.SendLocalizedMessage(1156211); // You cannot throw this there! } }); } } }
private void SpawnRandomPirate() { if (Pirates == null) { return; } int row = Utility.Random(8); Point3D ranPnt = SpawnPoints[Utility.Random(SpawnPoints.Length)]; ConvertOffset(ref ranPnt); int a = row % 2 == 0 ? 0 : 3; int startX = ranPnt.X + a; int x = startX + ((row / 2) * 9); ShadowguardPirate pirate = new ShadowguardPirate(); pirate.MoveToWorld(new Point3D(x, ranPnt.Y, ranPnt.Z), Map.TerMur); Pirates.Add(pirate); }