public override bool OnMoveOver(Mobile m)
        {
            if (m.AccessLevel > AccessLevel.Player)
            {
                return(true);
            }

            // If the mobile is to the north of the barrier, allow him to pass
            if (this.Y >= m.Y)
            {
                return(true);
            }

            if (m is BaseCreature)
            {
                Mobile master = ((BaseCreature)m).GetMaster();

                // Allow creatures to cross from the south to the north only if their master is near to the north
                if (master != null && this.Y >= master.Y && master.InRange(this, 4))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            PlayerMobile pm = m as PlayerMobile;

            if (pm != null)
            {
                EminosUndertakingQuest qs = pm.Quest as EminosUndertakingQuest;

                if (qs != null)
                {
                    SneakPastGuardiansObjective obj = qs.FindObjective(typeof(SneakPastGuardiansObjective)) as SneakPastGuardiansObjective;

                    if (obj != null)
                    {
                        if (m.Hidden)
                        {
                            return(true);                            // Hidden ninjas can pass
                        }
                        if (!obj.TaughtHowToUseSkills)
                        {
                            obj.TaughtHowToUseSkills = true;
                            qs.AddConversation(new NeedToHideConversation());
                        }
                    }
                }
            }

            return(false);
        }
Exemple #2
0
        public override bool CanDrop(PlayerMobile player)
        {
            EminosUndertakingQuest qs = player.Quest as EminosUndertakingQuest;

            if (qs == null)
            {
                return(true);
            }

            return(false);
        }
        }// Daimyo Emino's Katana
        public override bool CanDrop(PlayerMobile player)
        {
            EminosUndertakingQuest qs = player.Quest as EminosUndertakingQuest;

            if (qs == null)
                return true;

            /*return !qs.IsObjectiveInProgress( typeof( ReturnSwordObjective ) )
            && !qs.IsObjectiveInProgress( typeof( SlayHenchmenObjective ) )
            && !qs.IsObjectiveInProgress( typeof( GiveEminoSwordObjective ) );*/
            return false;
        }
Exemple #4
0
        public override bool CanDrop(PlayerMobile player)
        {
            EminosUndertakingQuest qs = player.Quest as EminosUndertakingQuest;

            if (qs == null)
            {
                return(true);
            }

            //return !qs.IsObjectiveInProgress( typeof( GiveZoelNoteObjective ) );
            return(false);
        }
Exemple #5
0
        public override void OnDoubleClick(Mobile from)
        {
            var player = from as PlayerMobile;

            if (player != null && player.InRange(GetWorldLocation(), 2))
            {
                var qs = player.Quest;

                if (qs is EminosUndertakingQuest)
                {
                    if (EminosUndertakingQuest.HasLostEminosKatana(from))
                    {
                        Item katana = new EminosKatana();

                        if (!player.PlaceInBackpack(katana))
                        {
                            katana.Delete();
                            player.SendLocalizedMessage(1046260);
                            // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                        }
                    }
                    else
                    {
                        var obj = qs.FindObjective(typeof(HallwayWalkObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Item katana = new EminosKatana();

                            if (player.PlaceInBackpack(katana))
                            {
                                GenerateTreasure();
                                obj.Complete();
                            }
                            else
                            {
                                katana.Delete();
                                player.SendLocalizedMessage(1046260);
                                // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                            }
                        }
                    }
                }
            }

            base.OnDoubleClick(from);
        }
Exemple #6
0
        public override void OnTalk(PlayerMobile player, bool contextMenu)
        {
            QuestSystem qs = player.Quest;

            if (qs is EminosUndertakingQuest)
            {
                if (EminosUndertakingQuest.HasLostNoteForZoel(player))
                {
                    Item note = new NoteForZoel();

                    if (player.PlaceInBackpack(note))
                    {
                        qs.AddConversation(new LostNoteConversation());
                    }
                    else
                    {
                        note.Delete();
                        player.SendLocalizedMessage(1046260);                           // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                    }
                }
                else if (EminosUndertakingQuest.HasLostEminosKatana(player))
                {
                    qs.AddConversation(new LostSwordConversation());
                }
                else
                {
                    QuestObjective obj = qs.FindObjective(typeof(FindEminoBeginObjective));

                    if (obj != null && !obj.Completed)
                    {
                        obj.Complete();
                    }
                    else
                    {
                        obj = qs.FindObjective(typeof(UseTeleporterObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Item note = new NoteForZoel();

                            if (player.PlaceInBackpack(note))
                            {
                                obj.Complete();

                                player.AddToBackpack(new LeatherNinjaPants());
                                player.AddToBackpack(new LeatherNinjaMitts());
                            }
                            else
                            {
                                note.Delete();
                                player.SendLocalizedMessage(1046260);                                   // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                            }
                        }
                        else
                        {
                            obj = qs.FindObjective(typeof(ReturnFromInnObjective));

                            if (obj != null && !obj.Completed)
                            {
                                Container cont = GetNewContainer();

                                for (int i = 0; i < 10; i++)
                                {
                                    cont.DropItem(new LesserHealPotion());
                                }

                                cont.DropItem(new LeatherNinjaHood());
                                cont.DropItem(new LeatherNinjaJacket());

                                if (player.PlaceInBackpack(cont))
                                {
                                    obj.Complete();
                                }
                                else
                                {
                                    cont.Delete();
                                    player.SendLocalizedMessage(1046260);                                       // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                }
                            }
                            else
                            {
                                if (qs.IsObjectiveInProgress(typeof(SlayHenchmenObjective)))
                                {
                                    qs.AddConversation(new ContinueSlayHenchmenConversation());
                                }
                                else
                                {
                                    obj = qs.FindObjective(typeof(GiveEminoSwordObjective));

                                    if (obj != null && !obj.Completed)
                                    {
                                        Item katana = null;

                                        if (player.Backpack != null)
                                        {
                                            katana = player.Backpack.FindItemByType(typeof(EminosKatana));
                                        }

                                        if (katana != null)
                                        {
                                            bool stolenTreasure = false;

                                            HallwayWalkObjective walk = qs.FindObjective(typeof(HallwayWalkObjective)) as HallwayWalkObjective;
                                            if (walk != null)
                                            {
                                                stolenTreasure = walk.StolenTreasure;
                                            }

                                            Kama kama = new Kama();

                                            if (stolenTreasure)
                                            {
                                                BaseRunicTool.ApplyAttributesTo(kama, 1, 10, 20);
                                            }
                                            else
                                            {
                                                BaseRunicTool.ApplyAttributesTo(kama, 1, 10, 30);
                                            }

                                            if (player.PlaceInBackpack(kama))
                                            {
                                                katana.Delete();
                                                obj.Complete();

                                                if (stolenTreasure)
                                                {
                                                    qs.AddConversation(new EarnLessGiftsConversation());
                                                }
                                                else
                                                {
                                                    qs.AddConversation(new EarnGiftsConversation());
                                                }
                                            }
                                            else
                                            {
                                                kama.Delete();
                                                player.SendLocalizedMessage(1046260);                                                   // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }