public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } string myQuest = CharacterDatabase.GetQuestInfo(m_Mobile, "AssassinQuest"); int nSucceed = AssassinFunctions.DidAssassin(m_Mobile); if (nSucceed > 0) { AssassinFunctions.PayAssassin(m_Mobile, m_Giver); } else if (myQuest.Length > 0) { if (!m_Mobile.HasGump(typeof(SpeechGump))) { m_Mobile.SendGump(new SpeechGump("Failure Is Frowned Upon", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "XardokFail"))); } } else { m_Giver.Say("Done? With what? I am not sure what things you speak of."); } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; string myQuest = CharacterDatabase.GetQuestInfo(m_Mobile, "AssassinQuest"); int nAllowedForAnotherQuest = AssassinFunctions.QuestTimeNew(m_Mobile); int nServerQuestTimeAllowed = DifficultyLevel.GetTimeBetweenQuests(); int nWhenForAnotherQuest = nServerQuestTimeAllowed - nAllowedForAnotherQuest; string sAllowedForAnotherQuest = nWhenForAnotherQuest.ToString(); if (CharacterDatabase.GetQuestState(m_Mobile, "AssassinQuest")) { m_Giver.Say("You already have your orders. Return to me when you are done with the task."); } else if (mobile.NpcGuild != NpcGuild.AssassinsGuild) // HE WILL ONLY TALK GUILD MEMBERS { m_Giver.Say("Hmmm...you do not seem the type I wish to discuss matters with."); } else if (m_Mobile.Karma > -1250) // HE WILL ONLY TALK TO THE UNSAVORY GUILD MEMBERS { m_Giver.Say("Hmmm...maybe show me that you could handle such tasks first."); } else if (nWhenForAnotherQuest > 0) { m_Giver.Say("I have nothing for you at the moment. Check back in " + sAllowedForAnotherQuest + " minutes."); } else { int nFame = m_Mobile.Fame * 2; nFame = Utility.RandomMinMax(0, nFame) + 2000; if (Utility.RandomMinMax(1, 100) > 30) { AssassinFunctions.FindTarget(m_Mobile, nFame); } else { AssassinFunctions.FindInnocentTarget(m_Mobile); } string TellQuest = AssassinFunctions.QuestStatus(m_Mobile) + "."; m_Giver.Say(TellQuest); } }
public override bool OnDragDrop(Mobile from, Item dropped) { if (dropped is Gold) { int nPenalty = AssassinFunctions.QuestFailure(from); if (dropped.Amount == nPenalty) { CharacterDatabase.ClearQuestInfo(from, "AssassinQuest"); from.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Your failure in this task has been forgiven.", from.NetState); dropped.Delete(); } else { from.AddToBackpack(dropped); } } else { from.AddToBackpack(dropped); } return(true); }