public void AwardLoot()
        {
            List <Mobile> list = new List <Mobile>();

            foreach (Mobile m in GetMobilesInRange(12))
            {
                if (!CanBeHarmful(m))
                {
                    continue;
                }

                if (m.Player)
                {
                    list.Add(m);
                }
            }

            foreach (Mobile m in list)
            {
                StaffOfMongbats       staff   = new StaffOfMongbats();
                MongbatHideoutBossKey bosskey = new MongbatHideoutBossKey();

                PlayerMobile player = m as PlayerMobile;
                QuestSystem  qs     = player.Quest;

                if (qs is StaffOfFlyingMonkeysQuest && qs.IsObjectiveInProgress(typeof(SeekElderObjective)))
                {
                    qs.AddObjective(new EscapeObjective());

                    m.AddToBackpack(new StaffOfMongbats());
                    m.SendMessage("You receive a strange look staff.");
                    DoHarmful(m);
                }
                else
                {
                    m.AddToBackpack(new MongbatHideoutBossKey());
                    m.SendMessage("You receive a key needed to get pass the fog gates.");
                    DoHarmful(m);
                }
            }
        }
Пример #2
0
        public override void OnMovement( Mobile m, Point3D oldLocation )
        {
            base.OnMovement( m, oldLocation );

                        if ( m.Alive )
                        {
                    if ( InRange( m.Location, 10 ) && !InRange( oldLocation, 10 ) && m is PlayerMobile )
                    {
                        PlayerMobile pm = (PlayerMobile)m;
                        QuestSystem qs = pm.Quest;

                        if ( qs is StaffOfFlyingMonkeysQuest )
                        {
                                 QuestObjective obj = qs.FindObjective( typeof( EscapeObjective ) );

                             if ( obj != null && !obj.Completed )
                                                 {
                                      StaffOfMongbats staffofmongbats = pm.Backpack.FindItemByType( typeof ( StaffOfMongbats ) ) as StaffOfMongbats;

                                      if ( staffofmongbats != null )
                                      {
                                                                 // hey!
                                                     PlaySound( 1069 );

                                     obj.Complete();
                                             qs.AddConversation( new HandStaffOverConversation() );
                                                          }
                                      else if ( staffofmongbats == null )
                                      {
                                                                 // growls!
                                                     PlaySound( 1068 );
                                                          }
                             }
                    }
                }
                                else
                                {
                            if ( InRange( m.Location, 2 ) && !InRange( oldLocation, 2 ) && m is PlayerMobile )
                            {
                                PlayerMobile pm = (PlayerMobile)m;
                                QuestSystem qs = pm.Quest;

                                if ( qs is StaffOfFlyingMonkeysQuest )
                                {
                                          QuestObjective obj = qs.FindObjective( typeof( HandStaffOverObjective ) );

                                      if ( obj != null && !obj.Completed )
                                                          {
                                             StaffOfMongbats staffofmongbats = pm.Backpack.FindItemByType( typeof ( StaffOfMongbats ) ) as StaffOfMongbats;

                                             if ( staffofmongbats != null )
                                             {
                                                                        // ah!
                                                            PlaySound( 1049 );

                                                                 }
                                             else if ( staffofmongbats == null )
                                             {
                                                                        // ahhhh!
                                                            PlaySound( 1088 );
                                                                 }
                                                          }
                             }
                    }
                }
            }
        }