public void OnPlacement(Mobile from, Point3D p) { if (Deleted) { return; } else if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else { Map map = from.Map; if (map == null) { return; } BaseGalleon galleon = Galleon; if (galleon == null) { return; } p = new Point3D(p.X - Offset.X, p.Y - Offset.Y, p.Z - Offset.Z); if (galleon.CanFit(p, map, galleon.ItemID) && map != Map.Ilshenar && map != Map.Malas) { Delete(); galleon.Owner = from; galleon.ShipName = ShipName; uint keyValue = galleon.CreateKeys(from); if (galleon.Ropes != null) { for (int i = 0; i < galleon.Ropes.Count; ++i) { galleon.Ropes[i].KeyValue = keyValue; } } galleon.MoveToWorld(p, map); galleon.SetFacing(_chosenDirection); } else { galleon.Delete(); from.SendLocalizedMessage(1043284); // A ship can not be created here. } } }
protected override void OnTick() { if (_count == 5) { _galleon.Delete(); Stop(); } else { _galleon.Location = new Point3D(_galleon.X, _galleon.Y, _galleon.Z - 1); if (_galleon.TillerMan != null) { _galleon.TillerMan.TillerManSay(1007168 + _count); } ++_count; } }