public void DropTMap(Mobile from, DaviesLockerEntry e, int index) { if (m_DefaultIndex == index) { m_DefaultIndex = -1; } m_Entries.RemoveAt(index); if (e.type == 1) { TreasureMap tmap = new TreasureMap(e.Level, e.Map) { Decoder = e.Decoder, ChestLocation = e.Location2d, ChestMap = e.Map, Bounds = e.Bounds }; tmap.ClearPins(); tmap.AddWorldPin(e.Location2d.X, e.Location2d.Y); from.AddToBackpack(tmap); from.SendMessage("You have removed the Treasure Map"); } else if (e.type == 2) { SOS sos = new SOS(e.Map, e.Level) { TargetLocation = e.Location3d }; from.AddToBackpack(sos); from.SendMessage("You have removed the S.O.S."); } else { MessageInABottle mib = new MessageInABottle(e.Map, e.Level); from.AddToBackpack(mib); from.SendMessage("You have removed the message in a bottle"); } }
public void DropTMap(Mobile from, TMapBookEntry e, int index) { if (m_DefaultIndex == index) { m_DefaultIndex = -1; } m_Entries.RemoveAt(index); TreasureMap tmap = new TreasureMap(e.Level, e.Map); tmap.Decoder = e.Decoder; tmap.ChestLocation = e.Location; tmap.ChestMap = e.Map; tmap.Bounds = e.Bounds; tmap.ClearPins(); tmap.AddWorldPin(e.Location.X, e.Location.Y); from.AddToBackpack(tmap); from.SendMessage("You have removed the Treasure Map"); }
public void DropTMap(Mobile from, TMapBookEntry e, int index) { if (m_DefaultIndex == index) { m_DefaultIndex = -1; } m_Entries.RemoveAt(index); var tmap = new TreasureMap(e.Level, e.Map) { Decoder = e.Decoder, ChestLocation = e.Location, ChestMap = e.Map, Bounds = e.Bounds }; tmap.ClearPins(); tmap.AddWorldPin(e.Location.X, e.Location.Y); from.AddToBackpack(tmap); from.SendMessage("You have removed the Treasure Map"); }
public void DropTMap(Mobile from, DaviesLockerEntry e, int index) { if (m_DefaultIndex == index) m_DefaultIndex = -1; m_Entries.RemoveAt(index); if (e.type == 1) { TreasureMap tmap = new TreasureMap(e.Level, e.Map) { Decoder = e.Decoder, ChestLocation = e.Location2d, ChestMap = e.Map, Bounds = e.Bounds }; tmap.ClearPins(); tmap.AddWorldPin(e.Location2d.X, e.Location2d.Y); from.AddToBackpack(tmap); from.SendMessage("You have removed the Treasure Map"); } else if (e.type == 2) { SOS sos = new SOS(e.Map, e.Level) {TargetLocation = e.Location3d}; from.AddToBackpack(sos); from.SendMessage("You have removed the S.O.S."); } else { MessageInABottle mib = new MessageInABottle(e.Map, e.Level); from.AddToBackpack(mib); from.SendMessage("You have removed the message in a bottle"); } }
private static void UpdateTreasureMap(TreasureMap Tmap) { Map map = Tmap.ChestMap; Point2D loc = Tmap.ChestLocation; Point3D location = new Point3D(loc.X, loc.Y, 0); string world = Worlds.GetMyWorld(map, location, loc.X, loc.Y); Tmap.Width = 300; Tmap.Height = 300; int width = 600; int height = 600; int x1 = loc.X - Utility.RandomMinMax(width / 4, (width / 4) * 3); int y1 = loc.Y - Utility.RandomMinMax(height / 4, (height / 4) * 3); if (x1 < 0) { x1 = 0; } if (y1 < 0) { y1 = 0; } if (world == "the Land of Ambrosia") { if (x1 < 5122) { x1 = 5122; } if (y1 < 3036) { y1 = 3036; } } else if (world == "the Island of Umber Veil") { if (x1 < 699) { x1 = 699; } if (y1 < 3129) { y1 = 3129; } } else if (world == "the Bottle World of Kuldar") { if (x1 < 6127) { x1 = 6127; } if (y1 < 828) { y1 = 828; } } else if (world == "the Savaged Empire") { if (x1 < 136) { x1 = 136; } if (y1 < 8) { y1 = 8; } } int x2 = x1 + width; int y2 = y1 + height; if (x2 > Map.Maps[map.MapID].Width) { x2 = Map.Maps[map.MapID].Width; } if (y2 > Map.Maps[map.MapID].Height) { y2 = Map.Maps[map.MapID].Height; } if (world == "the Moon of Luna") { if (x2 >= 6125) { x2 = 6125; } if (y2 >= 3034) { y2 = 3034; } } else if (world == "the Land of Ambrosia") { if (x2 >= 6126) { x2 = 6126; } if (y2 >= 4095) { y2 = 4095; } } else if (world == "the Island of Umber Veil") { if (x2 >= 2272) { x2 = 2272; } if (y2 >= 4095) { y2 = 4095; } } else if (world == "the Bottle World of Kuldar") { if (x2 >= 7167) { x2 = 7167; } if (y2 >= 2742) { y2 = 2742; } } else if (world == "the Land of Lodoria") { if (x2 >= 5120) { x2 = 5119; } if (y2 >= 4096) { y2 = 4095; } } else if (world == "the Land of Sosaria") { if (x2 >= 5119) { x2 = 5118; } if (y2 >= 3127) { y2 = 3126; } } else if (world == "the Underworld") { if (x2 >= 1581) { x2 = 1581; } if (y2 >= 1599) { y2 = 1599; } } else if (world == "the Serpent Island") { if (x2 >= 1870) { x2 = 1869; } if (y2 >= 2047) { y2 = 2046; } } else if (world == "the Isles of Dread") { if (x2 >= 1447) { x2 = 1446; } if (y2 >= 1447) { y2 = 1446; } } else if (world == "the Savaged Empire") { if (x2 >= 1160) { x2 = 1159; } if (y2 >= 1792) { y2 = 1791; } } x1 = x2 - width; y1 = y2 - height; Tmap.Bounds = new Rectangle2D(x1, y1, width, height); Tmap.ClearPins(); Tmap.Protected = true; if (Tmap.Pins.Count > 0) { Tmap.ChangePin(1, loc.X, loc.Y); } else { Tmap.AddWorldPin(loc.X, loc.Y); } }