public static void FindInnocentTarget(Mobile m) { string searchLocation = "the Land of Sosaria"; switch (Utility.RandomMinMax(0, 13)) { case 0: searchLocation = "the Land of Sosaria"; break; case 1: searchLocation = "the Land of Sosaria"; break; case 2: searchLocation = "the Land of Sosaria"; break; case 3: searchLocation = "the Land of Lodoria"; if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))) { searchLocation = "the Land of Sosaria"; } break; case 4: searchLocation = "the Land of Lodoria"; if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))) { searchLocation = "the Land of Sosaria"; } break; case 5: searchLocation = "the Land of Lodoria"; if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))) { searchLocation = "the Land of Sosaria"; } break; case 6: searchLocation = "the Serpent Island"; if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island"))) { searchLocation = "the Land of Sosaria"; } break; case 7: searchLocation = "the Serpent Island"; if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island"))) { searchLocation = "the Land of Sosaria"; } break; case 8: searchLocation = "the Serpent Island"; if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island"))) { searchLocation = "the Land of Sosaria"; } break; case 9: searchLocation = "the Isles of Dread"; if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread"))) { searchLocation = "the Land of Sosaria"; } break; case 10: searchLocation = "the Savaged Empire"; if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire"))) { searchLocation = "the Land of Sosaria"; } break; case 11: searchLocation = "the Savaged Empire"; if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire"))) { searchLocation = "the Land of Sosaria"; } break; case 12: searchLocation = "the Island of Umber Veil"; if (!(CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil"))) { searchLocation = "the Land of Sosaria"; } break; case 13: searchLocation = "the Bottle World of Kuldar"; if (!(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar"))) { searchLocation = "the Land of Sosaria"; } break; } int aCount = 0; Region reg = null; ArrayList targets = new ArrayList(); foreach (Mobile target in World.Mobiles.Values) { if (target is BaseVendor) { reg = Region.Find(target.Location, target.Map); string tWorld = Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y); if (target.Blessed == false && reg.IsPartOf(typeof(VillageRegion))) { if (searchLocation == "the Land of Sosaria" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Land of Lodoria" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Serpent Island" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Isles of Dread" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Savaged Empire" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Island of Umber Veil" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Bottle World of Kuldar" && tWorld == searchLocation) { targets.Add(target); aCount++; } } } } aCount = Utility.RandomMinMax(1, aCount); int xCount = 0; for (int i = 0; i < targets.Count; ++i) { xCount++; if (xCount == aCount) { Mobile theVictim = ( Mobile )targets[i]; string kWorld = Worlds.GetMyWorld(theVictim.Map, theVictim.Location, theVictim.X, theVictim.Y); string kVictim = theVictim.GetType().ToString(); int nFee = 1000; string kDollar = ((int)((Server.Misc.MyServerSettings.QuestRewardModifier() * 0.01) * nFee)).ToString(); string myexplorer = kVictim + "#" + theVictim.Title + "#" + theVictim.Name + "#" + Server.Misc.Worlds.GetRegionName(theVictim.Map, theVictim.Location) + "#0#" + kDollar + "#" + kWorld + "#Innocent"; CharacterDatabase.SetQuestInfo(m, "AssassinQuest", myexplorer); string theStory = myexplorer + "#" + AssassinFunctions.QuestSentence(m); // ADD THE STORY PART CharacterDatabase.SetQuestInfo(m, "AssassinQuest", theStory); } } }
public static void FindTarget(Mobile m, int fee) { string searchLocation = "the Land of Sosaria"; switch (Utility.RandomMinMax(0, 15)) { case 0: searchLocation = "the Land of Sosaria"; break; case 1: searchLocation = "the Land of Sosaria"; break; case 2: searchLocation = "the Land of Sosaria"; break; case 3: searchLocation = "the Land of Lodoria"; if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))) { searchLocation = "the Land of Sosaria"; } break; case 4: searchLocation = "the Land of Lodoria"; if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))) { searchLocation = "the Land of Sosaria"; } break; case 5: searchLocation = "the Land of Lodoria"; if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))) { searchLocation = "the Land of Sosaria"; } break; case 6: searchLocation = "the Serpent Island"; if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island"))) { searchLocation = "the Land of Sosaria"; } break; case 7: searchLocation = "the Serpent Island"; if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island"))) { searchLocation = "the Land of Sosaria"; } break; case 8: searchLocation = "the Serpent Island"; if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island"))) { searchLocation = "the Land of Sosaria"; } break; case 9: searchLocation = "the Isles of Dread"; if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread"))) { searchLocation = "the Land of Sosaria"; } break; case 10: searchLocation = "the Savaged Empire"; if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire"))) { searchLocation = "the Land of Sosaria"; } break; case 11: searchLocation = "the Savaged Empire"; if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire"))) { searchLocation = "the Land of Sosaria"; } break; case 12: searchLocation = "the Island of Umber Veil"; if (!(CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil"))) { searchLocation = "the Land of Sosaria"; } break; case 13: searchLocation = "the Bottle World of Kuldar"; if (!(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar"))) { searchLocation = "the Land of Sosaria"; } break; case 14: searchLocation = "the Underworld"; if (!(CharacterDatabase.GetDiscovered(m, "the Underworld"))) { searchLocation = "the Underworld"; } break; case 15: searchLocation = "the Land of Ambrosia"; if (!(CharacterDatabase.GetDiscovered(m, "the Land of Ambrosia"))) { searchLocation = "the Land of Sosaria"; } break; } int aCount = 0; Region reg = null; ArrayList targets = new ArrayList(); foreach (Mobile target in World.Mobiles.Values) { if (target is BaseCreature) { reg = Region.Find(target.Location, target.Map); string tWorld = Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y); if (target.EmoteHue != 123 && target.Karma < 0 && target.Fame < fee && (Worlds.GetDifficultyLevel(target.Location, target.Map) <= GetPlayerInfo.GetPlayerDifficulty(m)) && reg.IsPartOf(typeof(DungeonRegion))) { if (searchLocation == "the Land of Sosaria" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Land of Lodoria" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Serpent Island" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Isles of Dread" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Savaged Empire" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Island of Umber Veil" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Bottle World of Kuldar" && tWorld == searchLocation) { targets.Add(target); aCount++; } else if (searchLocation == "the Underworld" && tWorld == searchLocation) { targets.Add(target); aCount++; } } if (aCount < 1) // SAFETY CATCH IF IT FINDS NO CREATURES AT ALL...IT WILL FIND AT LEAST ONE IN SOSARIA // { if (target.Karma < 0 && target.Fame < fee && reg.IsPartOf(typeof(DungeonRegion)) && tWorld == "the Land of Sosaria") { targets.Add(target); aCount++; } } } } aCount = Utility.RandomMinMax(1, aCount); int xCount = 0; for (int i = 0; i < targets.Count; ++i) { xCount++; if (xCount == aCount) { Mobile theVictim = ( Mobile )targets[i]; string kWorld = Worlds.GetMyWorld(theVictim.Map, theVictim.Location, theVictim.X, theVictim.Y); string kVictim = theVictim.GetType().ToString(); int nFee = theVictim.Fame / 5; string kDollar = ((int)((Server.Misc.MyServerSettings.QuestRewardModifier() * 0.01) * nFee)).ToString(); string killName = theVictim.Name; string killTitle = theVictim.Title; if (theVictim is Wyrms) { killName = "a wyrm"; killTitle = ""; } if (theVictim is Daemon) { killName = "a daemon"; killTitle = ""; } if (theVictim is Balron) { killName = "a balron"; killTitle = ""; } if (theVictim is RidingDragon || theVictim is Dragons) { killName = "a dragon"; killTitle = ""; } if (theVictim is BombWorshipper) { killName = "a worshipper of the bomb"; killTitle = ""; } if (theVictim is Psionicist) { killName = "a psychic of the bomb"; killTitle = ""; } string myexplorer = kVictim + "#" + killTitle + "#" + killName + "#" + Server.Misc.Worlds.GetRegionName(theVictim.Map, theVictim.Location) + "#0#" + kDollar + "#" + kWorld + "#Monster"; CharacterDatabase.SetQuestInfo(m, "AssassinQuest", myexplorer); string theStory = myexplorer + "#" + AssassinFunctions.QuestSentence(m); // ADD THE STORY PART CharacterDatabase.SetQuestInfo(m, "AssassinQuest", theStory); } } }