public static Item CreateArtifact(string arty) { Item artifact = null; int AddBonuses = 1; if (arty == "random") { arty = "any"; int HighSearch = 300 + 3; // THERE ARE 300 ARTIFACTS SO CHANGE THE SECOND NUMBER TO THE NUMBER OF CATEGORIES LISTED BELOW... switch (Utility.RandomMinMax(1, HighSearch)) { case 3: arty = "invulnerable"; break; } } if (arty == "driftwood") // ONLY FOR SEA TRAVELERS { artifact = CreateWoodItem(); if (artifact != null) { artifact.Hue = 0x5B2; artifact.Name = "runed driftwood " + artifact.Name; } } else if (arty == "kelp") // ONLY FOR SEA TRAVELERS { artifact = CreateLeatherArmor("any"); if (artifact != null) { artifact.Hue = 0x483; artifact.Name = artifact.Name.Replace("leather", "kelp woven"); } } else if (arty == "barnacle") // ONLY FOR SEA TRAVELERS { artifact = CreatePlateArmor("any"); if (Utility.RandomMinMax(1, 3) == 1) { artifact = CreateMetalShield(); } if (artifact != null) { artifact.Name = "barnacled " + artifact.Name; artifact.Hue = 0xB91; } } else if (arty == "bronzed") // ONLY FOR SEA TRAVELERS { artifact = CreateMetalItem("female"); if (artifact != null) { artifact.Name = "bronzed " + artifact.Name + " of the valkyrie"; artifact.Hue = 2418; } } else if (arty == "neptune") // ONLY FOR SEA TRAVELERS { switch (Utility.RandomMinMax(0, 4)) { case 1: artifact = CreateArmorItem("any"); break; case 2: artifact = CreateBowItem(); break; case 3: artifact = CreateMetalShield(); break; case 4: artifact = CreateMetalWeapon(); break; } if (artifact is PlateLegs) { artifact.ItemID = 0x2B6B; } else if (artifact is PlateArms) { artifact.ItemID = 0x2B6C; } else if (artifact is PlateChest) { artifact.ItemID = 0x2B67; } else if (artifact is PlateHelm) { artifact.ItemID = 0x140E; artifact.Name = "helm"; } if (artifact != null) { artifact.Name = artifact.Name + " of Neptune"; artifact.Hue = 0x84C; } } else if (arty == "invulnerable") { artifact = CreateMetalProtection("any"); if (artifact != null) { artifact.Hue = 0x4F2; artifact.Name = artifact.Name + " of invulnerability"; } } else { artifact = Loot.RandomArty(); AddBonuses = 0; } while (artifact == null) { artifact = Loot.RandomArty(); } if (AddBonuses == 1) { if (artifact is BaseWeapon) { PowerArtifactWeapon(artifact, arty); } else if (artifact is BaseShield) { PowerArtifactShield(artifact, arty); } else if (artifact is BaseArmor) { PowerArtifactArmor(artifact, arty); } else if (artifact is BaseJewel) { PowerArtifactJewel(artifact, arty); } } if (MyServerSettings.GetUnidentifiedChance() >= Utility.RandomMinMax(1, 100)) { LockableContainer box = new UnidentifiedArtifact(); box.DropItem(artifact); box.ItemID = artifact.ItemID; box.Hue = artifact.Hue; box.Name = RandomThings.GetOddityAdjective() + " artifact"; return(box); } return(artifact); }