public static int QuestFailure(Mobile m) { int nPenalty = 0; string explorer = CharacterDatabase.GetQuestInfo(m, "StandardQuest"); if (CharacterDatabase.GetQuestState(m, "StandardQuest")) { StandardQuestFunctions.QuestTimeAllowed(m); string sPCTarget = ""; string sPCTitle = ""; string sPCName = ""; string sPCRegion = ""; int nPCDone = 0; int nPCFee = 0; string sPCWorld = ""; string sPCCategory = ""; string sPCStory = ""; string[] explorers = explorer.Split('#'); int nEntry = 1; foreach (string explorerz in explorers) { if (nEntry == 1) { sPCTarget = explorerz; } else if (nEntry == 2) { sPCTitle = explorerz; } else if (nEntry == 3) { sPCName = explorerz; } else if (nEntry == 4) { sPCRegion = explorerz; } else if (nEntry == 5) { nPCDone = Convert.ToInt32(explorerz); } else if (nEntry == 6) { nPCFee = Convert.ToInt32(explorerz); } else if (nEntry == 7) { sPCWorld = explorerz; } else if (nEntry == 8) { sPCCategory = explorerz; } else if (nEntry == 9) { sPCStory = explorerz; } nEntry++; } nPenalty = nPCFee; } return(nPenalty); }
public static void PayAdventurer(Mobile m) { string explorer = CharacterDatabase.GetQuestInfo(m, "StandardQuest"); if (CharacterDatabase.GetQuestState(m, "StandardQuest")) { string sPCTarget = ""; string sPCTitle = ""; string sPCName = ""; string sPCRegion = ""; int nPCDone = 0; int nPCFee = 0; string sPCWorld = ""; string sPCCategory = ""; string sPCStory = ""; string[] explorers = explorer.Split('#'); int nEntry = 1; foreach (string explorerz in explorers) { if (nEntry == 1) { sPCTarget = explorerz; } else if (nEntry == 2) { sPCTitle = explorerz; } else if (nEntry == 3) { sPCName = explorerz; } else if (nEntry == 4) { sPCRegion = explorerz; } else if (nEntry == 5) { nPCDone = Convert.ToInt32(explorerz); } else if (nEntry == 6) { nPCFee = Convert.ToInt32(explorerz); } else if (nEntry == 7) { sPCWorld = explorerz; } else if (nEntry == 8) { sPCCategory = explorerz; } else if (nEntry == 9) { sPCStory = explorerz; } nEntry++; } if (nPCDone > 0 && nPCFee > 0) { m.SendSound(0x3D); m.AddToBackpack(new Gold(nPCFee)); string sMessage = "Here is " + nPCFee.ToString() + " gold for you."; m.PrivateOverheadMessage(MessageType.Regular, 1150, false, sMessage, m.NetState); StandardQuestFunctions.QuestTimeAllowed(m); Titles.AwardFame(m, ((int)(nPCFee / 100)), true); if (((PlayerMobile)m).KarmaLocked == true) { Titles.AwardKarma(m, -((int)(nPCFee / 100)), true); } else { Titles.AwardKarma(m, ((int)(nPCFee / 100)), true); } } } }