Beispiel #1
0
            public override void OnClick()
            {
                if (!(m_Mobile is PlayerMobile))
                {
                    return;
                }

                string myQuest = CharacterDatabase.GetQuestInfo(m_Mobile, "FishingQuest");

                int    nAllowedForAnotherQuest = FishingQuestFunctions.QuestTimeNew(m_Mobile);
                int    nServerQuestTimeAllowed = DifficultyLevel.GetTimeBetweenQuests();
                int    nWhenForAnotherQuest    = nServerQuestTimeAllowed - nAllowedForAnotherQuest;
                string sAllowedForAnotherQuest = nWhenForAnotherQuest.ToString();

                if (CharacterDatabase.GetQuestState(m_Mobile, "FishingQuest"))
                {
                    m_Mobile.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You are already on a quest. Return here when you are done.", m_Mobile.NetState);
                }
                else if (nWhenForAnotherQuest > 0)
                {
                    m_Mobile.PrivateOverheadMessage(MessageType.Regular, 1150, false, "There are no quests at the moment. Check back in " + sAllowedForAnotherQuest + " minutes.", m_Mobile.NetState);
                }
                else
                {
                    int nFame = m_Mobile.Fame * 2;
                    nFame = Utility.RandomMinMax(0, nFame) + 2000;

                    FishingQuestFunctions.FindTarget(m_Mobile, nFame);

                    string TellQuest = FishingQuestFunctions.QuestStatus(m_Mobile) + ".";
                    m_Mobile.PrivateOverheadMessage(MessageType.Regular, 1150, false, TellQuest, m_Mobile.NetState);
                }
            }
Beispiel #2
0
            public override void OnClick()
            {
                if (!(m_Mobile is PlayerMobile))
                {
                    return;
                }

                string myQuest = CharacterDatabase.GetQuestInfo(m_Mobile, "FishingQuest");

                int nSucceed = FishingQuestFunctions.DidQuest(m_Mobile);

                if (nSucceed > 0)
                {
                    FishingQuestFunctions.PayAdventurer(m_Mobile);
                }
                else if (myQuest.Length > 0)
                {
                    if (!m_Mobile.HasGump(typeof(SpeechGump)))
                    {
                        m_Mobile.SendGump(new SpeechGump("Your Reputation Is At Stake", SpeechFunctions.SpeechText(m_Mobile.Name, m_Mobile.Name, "FishQuestBoardFail")));
                    }
                }
                else
                {
                    m_Mobile.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You are not currently on a quest.", m_Mobile.NetState);
                }
            }
Beispiel #3
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            if (dropped is Gold)
            {
                int nPenalty = FishingQuestFunctions.QuestFailure(from);

                if (dropped.Amount == nPenalty)
                {
                    CharacterDatabase.ClearQuestInfo(from, "FishingQuest");
                    from.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Someone else will eventually take care of this.", from.NetState);
                    dropped.Delete();
                }
                else
                {
                    from.AddToBackpack(dropped);
                }
            }
            else
            {
                from.AddToBackpack(dropped);
            }
            return(true);
        }