public static void FixPlayer( PlayerMobile mob )
		{
			if ( mob != null )
			{
				Server.Skills skills = mob.Skills;

				int totalDecrease = 0;

				for ( int i = 0; i < skills.Length; i++ )
				{
					Skill skill = skills[i];

					if ( skill.CapFixedPoint > 1000 )
						skill.CapFixedPoint = 1000;

					if ( skill.BaseFixedPoint > 1000 )
					{
						totalDecrease += skill.BaseFixedPoint - 1000;
						skill.BaseFixedPoint = 1000;
					}
				}

				mob.SkillsCap = 7000;

				int totalGiveSkill = Math.Min( totalDecrease, 7000 - skills.Total );

				if ( totalGiveSkill > 0 )
				{
					EtherealSoulStone stone = new EtherealSoulStone( mob.Account.Username );
					stone.SkillValue = (totalGiveSkill / 10.0);
					mob.AddToBackpack( stone );
				}
			}
		}
Exemple #2
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is HeadOfReddix)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Unite My Family's Artifacts!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();

                    mobile.AddToBackpack(new BraceletOfKillar());
                    mobile.SendMessage("Unite My Family's Artifacts!");


                    return(true);
                }
                else if (dropped is HeadOfReddix)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Why on earth would I want to have that?", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #3
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is ReindeerFood)
                {
                    if (dropped.Amount != 10)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I did not ask for that amount! You're getting coal for Christmas!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    mobile.AddToBackpack(new ElfGiftBox2017());

                    return(true);
                }
                else if (dropped is ReindeerFood)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "That's not what I asked for!  You're getting coal for Christmas!", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #4
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is HoneyComb)
                {
                    if (dropped.Amount != 5)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I need five honeycombs!!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Thank you! Here, theres your Honeycomb Processing Kettle!", mobile.NetState);
                    mobile.AddToBackpack(new HoneycombProcessingKettle());


                    return(true);
                }
                else if (dropped is HoneycombProcessingKettle)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I dont want it back, you can keep it!", mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I didnt ask you for this stuff.", mobile.NetState);
                }
            }
            return(false);
        }
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is blueapple)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "ahhh my apple!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();

                    mobile.AddToBackpack(new ArrianasClips());
                    mobile.SendMessage("The Piece is now yours, now join them and bring it back to arriana!");


                    return(true);
                }
                else if (dropped is blueapple)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Why on earth would I want to have that?", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #6
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is ColdIronIngot)
                {
                    if (dropped.Amount == 3)
                    {
                        dropped.Delete();
                        SayTo(from, "Just what I needed! Here, you can have it now that I'm done with it.");
                        mobile.AddToBackpack(new MysticFletcherTools());

                        return(true);
                    }
                    else
                    {
                        SayTo(from, "That's not the amount I need.");
                    }
                }
                else
                {
                    SayTo(from, "No, I need cold iron ingots.");
                }
            }

            return(false);
        }
Exemple #7
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile m = from;

            PlayerMobile pm   = from as PlayerMobile;
            Account      acct = (Account)from.Account;
            bool         GingerbreadDoughRecieved = Convert.ToBoolean(acct.GetTag("HolidayReward"));

            if (pm != null && dropped is GingerbreadDough)
            {
                if (!GingerbreadDoughRecieved)            //added account tag check
                {
                    dropped.Delete();                     //
                    pm.AddToBackpack(new SantaStatuette());
                    SendMessage("Thank you for your help!");
                    acct.SetTag("HolidayReward", "true");
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Thank you, this is exactly what I needed!", pm.NetState);
                    pm.SendMessage("You have been awarded a christmas gift for your quest completion!");
                    return(true);
                }

                else
                {
                    pm.SendMessage("You are so kind to have taken the time to help me obtain a Gingerbread Dough.");
                    dropped.Delete();
                    return(true);
                }
            }
            else
            {
                this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I did not ask for this item.", pm.NetState);
                return(false);
            }
        }
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;



            if (mobile != null)
            {
                if (dropped is RavanasHead)
                {
                    dropped.Delete();
                    mobile.AddToBackpack(new RavanasEarrings());
                    //mobile.SendGump( new SitaGump( mobile ));
                    mobile.SendMessage("Thank you so much. Now I can return home.");
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Thank you so much. Now I can return home.", mobile.NetState);

                    return(true);
                }

                else
                {
                    mobile.SendMessage("I have no need for this item.");
                }
            }
            else
            {
                this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I have no need for this item.", mobile.NetState);
            }
            return(false);
        }
            public override void OnClick()
            {
                if (!(m_Mobile is PlayerMobile))
                {
                    return;
                }

                PlayerMobile mobile = (PlayerMobile)m_Mobile;
                {
                    if (!mobile.HasGump(typeof(SantaClausGump)))
                    {
                        mobile.SendGump(new SantaClausGump(mobile));
                        mobile.AddToBackpack(new SantasBook());

                        /*{
                         *      SantasBook sql = mobile.Backpack.FindItemByType( typeof ( SantasBook ) ) as SantasBook;
                         *      if ( sql != null )
                         *      {
                         *              return;
                         *      }
                         *      else if ( sql == null )
                         *      {
                         *              mobile.AddToBackpack( new SantasBook() );
                         *      }
                         *      return;
                         * }*/
                    }
                }
            }
Exemple #10
0
        public override void OnDeath(Container c)
        {
            Mobile m = this.FindMostRecentDamager(false);

            if (m is PlayerMobile)
            {
                PlayerMobile pm = m as PlayerMobile;


                Item a = pm.Backpack.FindItemByType(typeof(FallenWarriorMarker2));
                if (a != null)
                {
                    pm.AddToBackpack(new CrushedLeggings());
                }
            }
            else if (m is BaseCreature)
            {
                BaseCreature bc = m as BaseCreature;
                PlayerMobile pm = m as PlayerMobile;

                if (bc.Controlled == true)
                {
                    Item a = bc.ControlMaster.Backpack.FindItemByType(typeof(FallenWarriorMarker2));
                    if (a != null)
                    {
                        bc.ControlMaster.AddToBackpack(new CrushedLeggings());
                    }
                }
            }
            base.OnDeath(c);
        }
Exemple #11
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is ReaperCrystalBall)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1161, false, "Is this a joke?", mobile.NetState);
                        return(false);
                    }
                    else
                    {
                        mobile.SendMessage("Alright, here you go! Enjoy your box, thank you for the souls.");

                        dropped.Delete();
                        mobile.AddToBackpack(new BoxOfSouls());
                    }
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1161, false, "This isn't a Reaper Crystal Ball...", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #12
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is PegLegHead)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "That is not the item I asked for.", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    mobile.AddToBackpack(new SparrowBlade());


                    return(true);
                }
                else if (dropped is PegLeghook)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I did not ask for this item.", mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I did not ask for this item.", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #13
0
        public virtual void Reward(PlayerMobile player, CollectionItem reward, int hue)
        {
            Item item = QuestHelper.Construct(reward.Type) as Item;

            if (item != null && player.AddToBackpack(item))
            {
                if (hue > 0)
                {
                    item.Hue = hue;
                }

                player.AddCollectionPoints(CollectionID, (int)reward.Points * -1);
                player.SendLocalizedMessage(1073621); // Your reward has been placed in your backpack.
                player.PlaySound(0x5A7);

                if (reward.QuestItem)
                {
                    CollectionsObtainObjective.CheckReward(player, item);
                }
            }
            else if (item != null)
            {
                player.SendLocalizedMessage(1074361); // The reward could not be given.  Make sure you have room in your pack.
                item.Delete();
            }

            reward.OnGiveReward(player, this, hue);

            player.SendGump(new CommunityCollectionGump(player, this, Location));
        }
Exemple #14
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is HallowtreeLog)
                {
                    if (dropped.Amount != 20)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1161, false, "This isn't enough Hallowtree Wood to work with.", mobile.NetState);
                        return(false);
                    }
                    else
                    {
                        mobile.SendMessage("Thank you for avenging my son, here you go.");

                        dropped.Delete();

                        mobile.AddToBackpack(new HallowtreeChest());
                    }
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1161, false, "This isn't Hallowtree Wood.", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #15
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is Board)
                {
                    if (dropped.Amount != 500)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Ack, nay. There's nay enough here!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    mobile.AddToBackpack(new Gold(2500));
                    mobile.SendGump(new GavinFinishGump());



                    return(true);
                }
                else if (dropped is Board)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I have no need of this!", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #16
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            PlayerMobile pm = (PlayerMobile)e.Mobile;

            if (pm == null || mKeyword == "")
            {
                return;
            }

            if (e.Speech.Contains(mKeyword))
            {
                if (Backpack == null || Backpack.Items.Count <= 0)
                {
                    pm.SendMessage("This Steward has nothing to give.");
                    return;
                }

                if (mPlayers.Contains(pm))
                {
                    pm.SendMessage("You have already received an item from this Steward today.");
                    return;
                }

                if (pm.AddToBackpack(Backpack.Items[Utility.Random(Backpack.Items.Count)]))
                {
                    pm.SendLocalizedMessage(1072223); // An item has been placed in your backpack.
                    mPlayers.Add(pm);
                }
            }
        }
            public override void OnClick()
            {
                if (!(m_Mobile is PlayerMobile))
                {
                    return;
                }

                PlayerMobile mobile = (PlayerMobile)m_Mobile;

                {
                    if (!mobile.HasGump(typeof(VampQuestGump11)))
                    {
                        Item a = m_Mobile.Backpack.FindItemByType(typeof(EverClear));
                        if (a != null)
                        {
                            a.Delete();
                            mobile.SendGump(new VampQuestGump11(mobile));
                            mobile.AddToBackpack(new TubOfButter());
                        }
                        else
                        {
                            m_Mobile.SendMessage("Get out before you end up dead!");
                        }
                    }
                }
            }
Exemple #18
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is CaptainHead)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1127, false, "That doesn't prove that my father is gone...", mobile.NetState);
                        return(false);
                    }
                    else
                    {
                        mobile.SendMessage("Oh god... Well... Here, take his shield. He would have wanted you to have it. Thank you for proving to me that he's finally... Dead...");

                        dropped.Delete();

                        mobile.AddToBackpack(new CaptainsShield());
                        return(true);
                    }
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1127, false, "That doesn't prove that my father is gone...", mobile.NetState);
                }
            }
            return(false);
        }
                                                                  public override bool OnDragDrop(Mobile from, Item dropped)
                                                                  {
                                                                      Mobile m = from; PlayerMobile mobile = m as PlayerMobile;

                                                                      if (mobile != null)
                                                                      {
/////////////////////////////////////////////////////////// item to be dropped
                                                                          if (dropped is SantasHat)
                                                                          {
                                                                              if (dropped.Amount != 1)
                                                                              {
                                                                                  this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "There's not the right amount here!", mobile.NetState); return(false);
                                                                              }
                                                                              dropped.Delete();
///////////////the reward
                                                                              mobile.AddToBackpack(new Gold(500));

////////////////////////////////////////////////////////// thanksmessage
                                                                              this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Thank you for helping Save Christmas! You are a fine Warror!", mobile.NetState);
                                                                              return(true);
                                                                          }
                                                                          else if (dropped is Whip)
                                                                          {
                                                                              this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState); return(false);
                                                                          }
                                                                          else
                                                                          {
                                                                              this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I have no need for this...", mobile.NetState);
                                                                          }
                                                                      }
                                                                      return(false);
                                                                  }
Exemple #20
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            PlayerMobile pm = from as PlayerMobile;

            if (pm != null)
            {
                if (pm.ExploringTheDeepQuest < ExploringTheDeepQuestChain.CusteauPerron)
                {
                    pm.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
                }
                else if (dropped is IceWyrmScale && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CusteauPerron)
                {
                    pm.ExploringTheDeepQuest = ExploringTheDeepQuestChain.Sorcerers;
                    dropped.Delete();
                    pm.SendGump(new CousteauPerronCompleteGump());
                }
                else if (dropped is SalvagerSuitPlans && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.Sorcerers)
                {
                    pm.ExploringTheDeepQuest = ExploringTheDeepQuestChain.CollectTheComponent;
                    dropped.Delete();
                    pm.SendGump(new CousteauPerronPlansGump());
                    pm.AddToBackpack(new CusteauPerronNote());
                }
                else
                {
                    PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in this.
                }
            }
            return(false);
        }
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is MessageToKnolan)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "That is not the amount I asked for!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    mobile.AddToBackpack(new MinaxCrystal());

                    return(true);
                }
                else if (dropped is MessageToKnolan)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "What do I want with that?  Maybe something else...?", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #22
0
            public override void OnClick()
            {
                if (!(m_Mobile is PlayerMobile))
                {
                    return;
                }

                PlayerMobile mobile = (PlayerMobile)m_Mobile;
                {
                    Item x = mobile.Backpack.FindItemByType(typeof(MerlinsBook2));
                    if (x != null)
                    {
                        Item b = mobile.Backpack.FindItemByType(typeof(MerlinsStaff2));
                        if (b != null)
                        {
                            mobile.AddToBackpack(new BladeofTorment());
                            mobile.SendGump(new MerlinsQuestGump9(mobile));
                            b.Delete();
                            x.Delete();
                        }
                        else
                        {
                            mobile.PrivateOverheadMessage(MessageType.Regular, 1153, false, "You put the Staff in your pack", mobile.NetState);
                        }
                    }
                    else
                    {
                        mobile.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Do I know you?", mobile.NetState);
                    }
                }
            }
        public static void GiveArtifactTo( PlayerMobile pm )
        {
            Item item = (Item) Activator.CreateInstance( Artifacts[Utility.Random( Artifacts.Length )] );

            bool message = true;

            if ( !pm.AddToBackpack( item ) )
            {
                Container bank = pm.BankBox;

                if ( !( bank != null && bank.TryDropItem( pm, item, false ) ) )
                {
                    pm.SendLocalizedMessage( 1072523, "", 64 ); // You find an artifact, but your backpack and bank are too full to hold it.

                    message = false;

                    item.MoveToWorld( pm.Location, pm.Map );
                }
            }

            if ( message )
                pm.SendLocalizedMessage( 1062317, "", 64 ); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.

            EffectPool.ArtifactDrop( pm );

            pm.DoomCredits = 0;
        }
Exemple #24
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is LetterToArathan)
                {
                    dropped.Delete();
                    mobile.SendGump(new ArathanStartGump(mobile));
                    return(true);
                }

                if (dropped is SeafaringBracelet)
                {
                    dropped.Delete();
                    mobile.AddToBackpack(new GemOfControl());
                    mobile.SendGump(new ArathanFinishGump(mobile));
                    return(true);
                }
                else
                {
                    mobile.SendMessage("I have no need for this item.");
                }
            }
            else
            {
                this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I have no need for this item.", mobile.NetState);
            }
            return(false);
        }
Exemple #25
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is CraymaCrap)
                {
                    if (dropped.Amount != 20)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "That is not the amount I asked for.", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    mobile.AddToBackpack(new NobleSword());


                    return(true);
                }
                else if (dropped is CraymaCrap)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I did not ask for this item.", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #26
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is eParchment3)

                {
                    dropped.Delete();
                    mobile.SendGump(new ElementQuestGump10(from));
                    mobile.AddToBackpack(new BraceletElements());
                    return(true);
                }
                else
                {
                    from.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Have we met before ?", from.NetState);
                    return(false);
                }
            }
            else
            {
                from.PrivateOverheadMessage(MessageType.Regular, 1153, false, "What am I to do with this ?", from.NetState);
                return(false);
            }
        }
Exemple #27
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is GraniteStone)
                {
                    if (dropped.Amount != 35)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "That is not the amount I asked for!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    mobile.AddToBackpack(new RelicOfTheChurch());
                    mobile.SendGump(new NorivarFinishGump());

                    return(true);
                }
                else if (dropped is GraniteStone)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Why on earth would I want to have that?", mobile.NetState);
                }
            }
            return(false);
        }
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is LittleRedRiddingHoodStory)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "AH! You have done it by the gods! Many blessings be upon you! Here is your reward as promissed. I thank for all your hard work!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    mobile.SendGump(new TrinsicLibrarianGump2(m));

                    if (1 > Utility.RandomDouble())      // 1 = 100% = chance to drop

                    {
                        switch (Utility.Random(4))
                        {
                        case 0: mobile.AddToBackpack(new RedRidingHoodsShroudedHood()); break;

                        case 1: mobile.AddToBackpack(new WolfsSkinHood()); break;

                        case 2: mobile.AddToBackpack(new GrandmasEarrings()); break;

                        case 3: mobile.AddToBackpack(new LittleRedRiddingHoodNovel()); break;
                        }
                    }

                    return(true);
                }
                else if (dropped is LittleRedRiddingHoodStory)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "This is not the story I seek!", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #29
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is GoldilocksStory)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "AH! You have done it by the gods! Many blessings upon you and here is a reward as promised. I thank for all your hard work!", mobile.NetState);
                        return(false);
                    }

                    dropped.Delete();
                    mobile.SendGump(new JhelomLibrarianGump2(m));

                    if (1 > Utility.RandomDouble())      // 1 = 100% = chance to drop

                    {
                        switch (Utility.Random(4))
                        {
                        case 0: mobile.AddToBackpack(new GoldilocksDagger()); break;

                        case 1: mobile.AddToBackpack(new GoldilocksShield()); break;

                        case 2: mobile.AddToBackpack(new GoldBricks()); break;

                        case 3: mobile.AddToBackpack(new GoldilocksNovel()); break;
                        }
                    }

                    return(true);
                }
                else if (dropped is GoldilocksStory)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "This is not the story I was seeking! Please try again!", mobile.NetState);
                }
            }
            return(false);
        }
                                                                 public override bool OnDragDrop(Mobile from, Item dropped)
                                                                 {
                                                                     Mobile m = from; PlayerMobile mobile = m as PlayerMobile;

                                                                     if (mobile != null)
                                                                     {
//item to be dropped
                                                                         if (dropped is ReptileBone)
                                                                         {
                                                                             if (dropped.Amount < 20)
                                                                             {
                                                                                 this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "There's not the right amount here!", mobile.NetState); return(false);
                                                                             }
                                                                             dropped.Delete();
                                                                             if (dropped.Amount > 20)
                                                                             {
                                                                                 mobile.AddToBackpack(new ReptileBone((dropped.Amount - 20)));
                                                                             }

                                                                             dropped.Delete();

//the reward
                                                                             mobile.AddToBackpack(new Gold(5000));
                                                                             mobile.AddToBackpack(new JadeScimitar());
                                                                             if (0.10 > Utility.RandomDouble())
                                                                             {
                                                                                 mobile.AddToBackpack(new FabledFishingNet());
                                                                             }

//thanks message
                                                                             this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Thank you for gathering the resources for my test!", mobile.NetState);


                                                                             return(true);
                                                                         }
                                                                         else if (dropped is Whip)
                                                                         {
                                                                             this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState); return(false);
                                                                         }
                                                                         else
                                                                         {
                                                                             this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I have no need for this...", mobile.NetState);
                                                                         }
                                                                     }
                                                                     return(false);
                                                                 }
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is SpecialGingerbreadRecipe)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "This isnt the recipe!", mobile.NetState);
                        return(false);
                    }
                    dropped.Delete();


                    mobile.AddToBackpack(new Gold(20000));
                    switch (Utility.Random(3))
                    {
                    case 0: mobile.AddToBackpack(new SpecialGingerbreadCookie1()); break;

                    case 1: mobile.AddToBackpack(new SpecialGingerbreadCookie2()); break;

                    case 2: mobile.AddToBackpack(new SpecialGingerbreadCookie3()); break;


                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Thankyou for getting my recipe back! Merry Christmas!", mobile.NetState);


                        return(true);
                    }
                }
                else if (dropped is Whip)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, 1054071, mobile.NetState);
                    return(false);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I have no need for this...", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #32
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;
            Account      acct   = (Account)from.Account;
            bool         MysticalSextantReceived = Convert.ToBoolean(acct.GetTag("MysticalSextantReceived"));

            if (mobile != null)
            {
                if (dropped is CompletedSeafarerToolKit)
                {
                    if (dropped.Amount != 1)
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Complete the Seafarer's Tool Kit!", mobile.NetState);
                        return(false);
                    }
                    if (!MysticalSextantReceived)                       //added account tag check
                    {
                        dropped.Delete();
                        mobile.AddToBackpack(new MysticalSextant());
                        mobile.SendGump(new FinlorFinishGump(mobile));
                        acct.SetTag("MysticalSextantReceived", "true");
                    }
                    else                     //what to do if account has already been tagged
                    {
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I see you have decided to complete another seafarer's tool kit.  Here is your reward.", mobile.NetState);
                        mobile.AddToBackpack(new Gold(4000));
                        dropped.Delete();
                    }
                }
                if (dropped is MasterOfTheSeaChest)
                {
                    dropped.Delete();
                    mobile.AddToBackpack(new SeafarerToolKit());
                    mobile.AddToBackpack(new LetterToSnyden());
                    mobile.SendGump(new FinlorMidGump(mobile));
                    return(true);
                }
                else
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I have no need for this item.", mobile.NetState);
                }
            }
            return(false);
        }
Exemple #33
0
        public override void OnTalk( PlayerMobile player, bool contextMenu )
        {
            Direction = this.GetDirectionTo( player );

            QuestSystem qs = player.Quest;

            if ( qs is TerribleHatchlingsQuest )
            {
                if ( qs.IsObjectiveInProgress( typeof( ReturnToAnsellaGryenObjective ) ) )
                {
                    Container cont = GetNewContainer();

                    cont.DropItem( new Gold( Utility.RandomMinMax( 100, 200 ) ) );

                    switch ( Utility.Random( 1 ) )
                    {
                        case 0:
                            {
                                BaseWeapon weapon = Loot.RandomWeapon( true );

                                BaseRunicTool.ApplyAttributesTo( weapon, 3, 10, 30 );

                                cont.DropItem( weapon );

                                break;
                            }

                        case 1:
                            {
                                BaseArmor armor = Loot.RandomArmor( true );

                                BaseRunicTool.ApplyAttributesTo( armor, 1, 10, 20 );

                                cont.DropItem( armor );

                                break;
                            }
                    }

                    player.AddToBackpack( cont );

                    qs.AddConversation( new RewardsConversation() );
                }
                else
                {
                    qs.AddConversation( new DeathwatchBeetlesLocationConversation() );
                }
            }
            else
            {
                QuestSystem newQuest = new TerribleHatchlingsQuest( player );
                bool inRestartPeriod = false;

                if ( qs != null )
                {
                    SayTo( player, 1063322 ); // Before you can help me with the Terrible Hatchlings, you'll need to finish the quest you've already taken!
                }
                else if ( QuestSystem.CanOfferQuest( player, typeof( TerribleHatchlingsQuest ), out inRestartPeriod ) )
                {
                    PlaySound( 0x2A3 );

                    newQuest.SendOffer();
                }
                else if ( inRestartPeriod && contextMenu )
                {
                    SayTo( player, 1049357 ); // I have nothing more for you at this time.
                }
            }
        }
Exemple #34
0
        public static void DoStep( PlayerMobile pm )
        {
            switch ( pm.KRStartingQuestStep )
            {
                case 0:
                    {
                        pm.MoveToWorld( new Point3D( 3503, 2574, 14 ), Map.Trammel );

                        break;
                    }
                case 1:
                    {
                        pm.MoveToWorld( new Point3D( 3648, 2678, -2 ), Map.Trammel );

                        /*
                         * Introduction
                         *
                         * Greetings, Traveler! Welcome to
                         * the world of Ultima Online.
                         *
                         * I am Gwen. I am here to help
                         * you learn the basic skills
                         * needed to thrive in your travels
                         * to come.
                         *
                         * Left click on the Next button
                         * to continue.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078606, 1077642, true ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 2:
                    {
                        /*
                         * Movement
                         *
                         * Movement is controlled with the mouse.
                         *
                         * Do you see the glowing light?
                         *
                         * Right click and hold over it
                         * to walk in that direction.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078235, 1077643, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2674, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        break;
                    }
                case 3:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2666, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078267 ) ); // Run Toward Here

                        /*
                         * Movement
                         *
                         * Very good!
                         *
                         * Right click and hold, further
                         * away, to run to the glowing light.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078235, 1077644, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 4:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2655, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078268 ) ); // Pathfind Toward Here

                        /*
                         * Movement
                         *
                         * Very good!
                         *
                         * Good!
                         *
                         * Do you see the glowing light?
                         *
                         * Right click and hold over it to
                         * run in that direction.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078235, 1077645, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 5:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        /*
                         * Inventory
                         *
                         * Alright! Now you have your footing.
                         *
                         * Many things you find in the world,
                         * you will be able to pick up and carry.
                         *
                         * You have been given a backpack to carry
                         * all your belongings in.
                         *
                         * Left click on the Backpack Icon in
                         * the lower right corner of your screen.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078236, 1077646, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "ToggleInventory", 100000 ) );

                        pm.Send( new ContinueHighlightKRUIElement( pm.Serial, 0x7919, pm.Backpack.Serial ) );

                        break;
                    }
                case 6:
                    {
                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "ToggleInventory", 0 ) );

                        /*
                         * Inventory
                         *
                         * This is where you will carry items.
                         *
                         * Up ahead are some crates. There are
                         * supplies in them you may need.
                         *
                         * To open the crates, mouse over them
                         * until you see their item properties.
                         *
                         * Double Left click on it to see
                         * what's inside.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078236, 1077647, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 7:
                    {
                        /*
                         * Inventory
                         *
                         * To pick up an object, Left click
                         * and drag it into your backpack
                         * window.
                         *
                         * There are other goodies in the
                         * crates and barrels, go ahead and
                         * grab some for yourself.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078236, 1077648, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 8:
                    {
                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3672, 2653, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        /*
                         * Equipment
                         *
                         * Excellent!
                         *
                         * Now approach Hogarth the Keeper
                         * of Old Haven in the building to
                         * the East of you. He is the Keeper
                         * of Old Haven, and he has a task
                         * for you.
                         *
                         * A glowing light toward the East
                         * marks his location.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077649, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 9:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        /*
                         * Equipment
                         *
                         * To speak with the Keeper, Double
                         * Left click on him.
                         *
                         * Please read the quest text and
                         * accept the quest to proceed.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077650, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 10:
                    {
                        /*
                         * Equipment
                         *
                         * Great! You are on your first quest.
                         *
                         * It's a small one, but I'm sure you
                         * will be rewarded nonetheless.
                         *
                         * Remember to pick up the Worn Katana
                         * and then talk to the Keeper to
                         * complete the quest.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077651, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 11:
                    {
                        /*
                         * Equipment
                         *
                         * You found the Worn Katana.
                         * You need to toggle it as a
                         * quest item.
                         *
                         * Hold down the Shift key, Right
                         * click on yourself, and select
                         * 'Toggle Quest Item' from the
                         * context menu. A 'Targeting
                         * Cursor' will appear.
                         *
                         * Left click on the Worn Katana,
                         * press the Esc key, and then
                         * talk to Hogarth.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077652, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 12:
                    {
                        /*
                         * Equipment
                         *
                         * Great! The Keeper has given you
                         * a weapon. You need to equip it.
                         *
                         * Left click on the Paperdoll icon
                         * on the lower right of your screen.
                         *
                         * Drag the Worn Katana from your
                         * backpack to your hand slot in the
                         * Paperdoll.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077653, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "TogglePaperdoll", 100000 ) );

                        break;
                    }
                case 13:
                    {
                        /*
                         * Equipment
                         *
                         * You will use this same method to
                         * put on weapons, armor, and
                         * clothing. The slot has to be
                         * clear of any other items. So if
                         * you are wearing a hat, and want
                         * to put on a helmet, you will
                         * have to take off the hat, first.
                         *
                         * Left click the Next button to
                         * continue.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078237, 1077654, true ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "TogglePaperdoll", 0 ) );

                        break;
                    }
                case 14:
                    {
                        /*
                         * Navigation
                         *
                         * Alright, looks like you're ready
                         * to go.
                         *
                         * Before you can start your
                         * adventures, you'll have to complete
                         * a few challenges.
                         *
                         * Open your map at the bottom of
                         * the screen.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078238, 1078246, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3665, 2630, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "ToggleMap", 100000 ) );
                        pm.Send( new ContinueHighlightKRUIElement( pm.Serial, 31007, pm.Serial ) );

                        break;
                    }
                case 15:
                    {
                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31006, "ToggleMap", 0 ) );

                        /*
                         * Navigation
                         *
                         * You'll notice a little marker
                         * on the map. That's a waypoint.
                         * This waypoint shows you where
                         * a gate is.
                         *
                         * Follow the alley towards the
                         * marker, and head through the
                         * gate.
                         *
                         * Once you arrive at the gate,
                         * Double Left click on it.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078238, 1078247, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 16:
                    {
                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        /*
                         * First Combat
                         *
                         * This is the town of Old Haven,
                         * or what remains of it. The
                         * former residents have been
                         * reanimated from the dead.
                         *
                         * Your first challenge is to
                         * return just one of these
                         * skeletons to the grave.
                         *
                         * Left click on the War/Peace
                         * button on the bar at the
                         * bottom left of your screen.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078239, 1078248, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31009, "", 100000 ) );

                        break;
                    }
                case 17:
                    {
                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31009, "", 0 ) );

                        /*
                         * First Combat
                         *
                         * Great, now you are in an
                         * aggressive stance. Perfect
                         * for fighting.
                         *
                         * Now remember to toggle back
                         * into Peace mode before you
                         * try to interact with friendly
                         * townsfolk. They don't usually
                         * take kindly to being attacked.
                         *
                         * Left click on the Next button
                         * to continue.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078239, 1078249, true ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 18:
                    {
                        /*
                         * First Combat
                         *
                         * Now, let's slay a skeleton.
                         *
                         * Left click on the skeleton,
                         * and move within reach.
                         *
                         * Once you begin attacking, you
                         * will continue to do so until
                         * the skeleton is laid to rest.
                         *
                         * You may need to kill more than
                         * one skeleton if another
                         * adventurer is also attacking it.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078239, 1078320, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 19:
                    {
                        /*
                         * First Loot
                         *
                         * You destroyed the skeleton!
                         * Nice work!
                         *
                         * Now you can check it to see if
                         * it was carrying anything of
                         * value.
                         *
                         * Double Left click on its corpse.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078251, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 20:
                    {
                        /*
                         * First Loot
                         *
                         * This is what the poor thing was
                         * carrying, remnants of its life
                         * long past. It's sad, really.
                         *
                         * Anyway, drag all of these items
                         * to your inventory. You can right
                         * click on each item to loot as well.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078252, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 21:
                    {
                        /*
                         * First Loot
                         *
                         * Well done! When you have taken
                         * any damage, it's a good idea to
                         * heal up before going into battle
                         * again.
                         *
                         * You have a Potion of Healing in
                         * your inventory. To drink the
                         * potion, Double Left click on it
                         * and you will drink it.
                         *
                         * Even if you are not injured, try
                         * and drink the potion now.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078253, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 22:
                    {
                        /*
                         * First Loot
                         *
                         * Very good!
                         *
                         * You should have a scroll of
                         * Magic Arrow in your backpack.
                         *
                         * Scrolls, and other items, like
                         * the healing potion or bandages,
                         * can be put into your hotbar on
                         * the bottom left of your screen.
                         *
                         * Drag the scroll of Magic Arrow
                         * from your inventory to an open
                         * slot on the hotbar.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078254, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31005, "", 100000 ) );

                        pm.Send( EnableKRHotbar.Enable );

                        break;
                    }
                case 23:
                    {
                        /*
                         * First Loot
                         *
                         * Don't use that scroll yet. You
                         * will need it against your next
                         * opponent.
                         *
                         * Let's head to the next waypoint
                         * on your map. Head Northwest,
                         * then North, and follow path to
                         * the East.
                         *
                         * I'm waiting for you to approach
                         * the next gate.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078240, 1078255, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3655, 2604, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        pm.Send( new ToggleHighlightKRUIElement( pm.Serial, 31005, "", 0 ) );

                        pm.Send( EnableKRHotbar.Enable );

                        break;
                    }
                case 24:
                    {
                        /*
                         * Zombies
                         *
                         * Alright, the zombies beyond this
                         * gate are tough, but you have
                         * proven to be pretty good with a
                         * weapon thus far.
                         *
                         * Head through the gate and take
                         * one of those zombies out.
                         *
                         * When you have a zombie targeted,
                         * Left click on the Magic Arrow
                         * scroll icon in the hotbar to cast
                         * the spell.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078241, 1078256, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        break;
                    }
                case 25:
                    {
                        /*
                         * The Healer
                         *
                         * Oh No! They got you.
                         *
                         * Death in the world of Sosaria
                         * is not a trivial thing, but
                         * neither is it the end of your
                         * adventures.
                         *
                         * You now exist in a ghostly state,
                         * and cannot interact with the
                         * world of the living.
                         *
                         * The location of the nearest
                         * Healer appears on your map.
                         * Go to the location marked
                         * Resurrection on your map.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078242, 1078257, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3623, 2611, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        break;
                    }
                case 26:
                    {
                        /*
                         * Your Corpse
                         *
                         * Good! You are back among the
                         * living.
                         *
                         * Once you are resurrected you
                         * will have only 15 minutes to
                         * return to your body and collect
                         * your equipment from your corpse.
                         * Your corpse location is now
                         * marked on the map.
                         *
                         * Double Left click on your corpse
                         * to retrieve your items.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078243, 1078258, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 27:
                    {
                        /*
                         * Your Corpse
                         *
                         * Good job! You have retrieved
                         * your items. Take a look in your
                         * backpack and re-equip your
                         * weapon. You will also find a
                         * small gift from me.
                         *
                         * The Token of Passage will allow
                         * you to get through a gate
                         * protected by an energy field.
                         * I have marked the gate on your
                         * map.
                         *
                         * Head to the gate and pass through
                         * the energy field.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078243, 1078259, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3632, 2578, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        pm.Backpack.DropItem( new TokenOfPassage() );

                        break;
                    }
                case 28:
                    {
                        /*
                         * A Challenge
                         *
                         * Uh oh. It's the Dark Knight.
                         * I don't see a way to slip
                         * past him.
                         *
                         * So, it looks like you're
                         * going to have to talk to him.
                         *
                         * Double Left click on the Dark
                         * Knight to speak with him, and
                         * let's hope he's in a good mood.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078244, 1078260, false ) );

                        pm.PlaySound( 0x505 );

                        break;
                    }
                case 29:
                    {
                        pm.SendGump( new DarkKnightGump() );

                        pm.AddToBackpack( new DarkKnightRune() );

                        break;
                    }
                case 30:
                    {
                        /*
                         * To New Haven
                         *
                         * This gate will lead you out of
                         * here, and on the road to New
                         * Haven. It's a town of learning,
                         * a place where you will get trained
                         * and learn how to advance in all
                         * of the skills vital to your
                         * prosperity in the world of
                         * Sosaria.
                         *
                         * Follow the path to the West.
                         */
                        pm.SendGump( new KRStartingQuestGump( 1078608, 1078261, false ) );

                        pm.PlaySound( 0x505 );

                        pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3540, 2568, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here

                        break;
                    }
                case 31:
                    {
                        pm.SendGump( new KRStartingQuestGumpGoodbye() );

                        pm.PlaySound( 0x505 );

                        pm.Send( new RemoveWaypoint( Serial.MinusOne ) );

                        pm.FinishKRStartingQuest();

                        break;
                    }
            }
        }
		public virtual void Reward( PlayerMobile player, CollectionItem reward, int hue )
		{
			Item item = QuestHelper.Construct( reward.Type ) as Item;
			
			if ( item != null && player.AddToBackpack( item ) )
			{
				if ( hue > 0 )
					item.Hue = hue;
				
				player.AddCollectionPoints( CollectionID, (int) reward.Points * -1 );
				player.SendLocalizedMessage( 1073621 ); // Your reward has been placed in your backpack.
				player.PlaySound( 0x5A7 );	
			}			
			else if ( item != null )
			{
				player.SendLocalizedMessage( 1074361 ); // The reward could not be given.  Make sure you have room in your pack.
				item.Delete();
			}
			
			reward.OnGiveReward( player, this, hue );	
			
			player.SendGump( new ComunityCollectionGump( player, this, Location ) );
		}
Exemple #36
0
        public override void OnTalk(PlayerMobile player, bool contextMenu)
        {
            QuestSystem qs = player.Quest;

            if (qs.GetType() == ParentQuestSystem)
            {
                if (HaochisTrialsQuest.HasLostHaochisKatana(player))
                {
                    qs.AddConversation(new LostSwordConversation());
                    return;
                }

                QuestObjective obj = qs.FindObjective(typeof(FindHaochiObjective));

                if (obj != null && !obj.Completed)
                {
                    obj.Complete();
                    return;
                }

                obj = qs.FindObjective(typeof(FirstTrialReturnObjective));

                if (obj != null && !obj.Completed)
                {
                    player.AddToBackpack(new LeatherDo());
                    obj.Complete();
                    return;
                }

                obj = qs.FindObjective(typeof(SecondTrialReturnObjective));

                if (obj != null && !obj.Completed)
                {
                    if (((SecondTrialReturnObjective)obj).Dragon)
                        player.AddToBackpack(new LeatherSuneate());

                    obj.Complete();
                    return;
                }

                obj = qs.FindObjective(typeof(ThirdTrialReturnObjective));

                if (obj != null && !obj.Completed)
                {
                    player.AddToBackpack(new LeatherHiroSode());
                    obj.Complete();
                    return;
                }

                obj = qs.FindObjective(typeof(FourthTrialReturnObjective));

                if (obj != null && !obj.Completed)
                {
                    if (!((FourthTrialReturnObjective)obj).KilledCat)
                    {
                        Container cont = GetNewContainer();
                        cont.DropItem(new LeatherHiroSode());
                        cont.DropItem(new JinBaori());
                        player.AddToBackpack(cont);
                    }

                    obj.Complete();
                    return;
                }

                obj = qs.FindObjective(typeof(FifthTrialReturnObjective));

                if (obj != null && !obj.Completed)
                {
                    Container pack = player.Backpack;
                    if (pack != null)
                    {
                        Item katana = pack.FindItemByType(typeof(HaochisKatana));
                        if (katana != null)
                        {
                            katana.Delete();
                            obj.Complete();

                            obj = qs.FindObjective(typeof(FifthTrialIntroObjective));
                            if (obj != null && ((FifthTrialIntroObjective)obj).StolenTreasure)
                                qs.AddConversation(new SixthTrialIntroConversation(true));
                            else
                                qs.AddConversation(new SixthTrialIntroConversation(false));
                        }
                    }

                    return;
                }

                obj = qs.FindObjective(typeof(SixthTrialReturnObjective));

                if (obj != null && !obj.Completed)
                {
                    obj.Complete();
                    return;
                }

                obj = qs.FindObjective(typeof(SeventhTrialReturnObjective));

                if (obj != null && !obj.Completed)
                {
                    BaseWeapon weapon = new Daisho();
                    BaseRunicTool.ApplyAttributesTo(weapon, Utility.Random(1, 3), 10, 30);
                    player.AddToBackpack(weapon);

                    BaseArmor armor = new LeatherDo();
                    BaseRunicTool.ApplyAttributesTo(armor, Utility.Random(1, 3), 10, 20);
                    player.AddToBackpack(armor);

                    obj.Complete();
                    return;
                }
            }
        }
Exemple #37
0
        public void OnGivenFungi( PlayerMobile player, ZoogiFungus fungi )
        {
            this.Direction = this.GetDirectionTo( player );

            SolenMatriarchQuest qs = player.Quest as SolenMatriarchQuest;

            if ( qs != null && qs.RedSolen == this.RedSolen )
            {
                QuestObjective obj = qs.FindObjective( typeof( ProcessFungiObjective ) );

                if ( obj != null && !obj.Completed )
                {
                    int amount = fungi.Amount / 2;

                    if ( amount > 100 )
                    {
                        amount = 100;
                    }

                    if ( amount > 0 )
                    {
                        if ( amount * 2 >= fungi.Amount )
                        {
                            fungi.Delete();
                        }
                        else
                        {
                            fungi.Amount -= amount * 2;
                        }

                        PowderOfTranslocation powder = new PowderOfTranslocation( amount );
                        player.AddToBackpack( powder );

                        player.SendLocalizedMessage( 1054100 ); // You receive some powder of translocation.

                        obj.Complete();
                    }
                }
            }
        }
Exemple #38
0
        public override void OnTeamMemberAdded(PvPTeam team, PlayerMobile pm)
        {
            if (TeamStats.ContainsKey(pm))
            {
                TeamStats[pm] = team;
            }
            else
            {
                TeamStats.Add(pm, team);
            }

            base.OnTeamMemberAdded(team, pm);

            if (UseTemplates)
            {
                PvPTemplates.FetchProfile(pm).ApplyDelta(UseTemplateEquipment);
            }

            if (IncognitoMode)
            {
                IncogMode(pm);
            }

            if (ThrowableMode)
            {
                if (_Axes == null)
                {
                    _Axes = new Dictionary<PlayerMobile, ThrowableAxe>();
                }
                if (ThrowableID == 0)
                {
                    ThrowableID = 0x13FB;
                }
                if (ThrowableHue == 0)
                {
                    ThrowableHue = 1161;        
                }
                var Axe = new ThrowableAxe
                {
                    Movable = false,
                    ItemID = ThrowableID,
                };
                if (Utility.RandomDouble() <= 0.1)
                {
                    Axe.Name = "Stone Chair";
                    Axe.ItemID = 4632;
                }
                Axe.EffectID = Axe.ItemID;
                Axe.Hue = ThrowableHue;
                Axe.EffectHue = Axe.Hue-1;
                Axe.Stackable = false;
                if (_Axes != null && !_Axes.ContainsKey(pm))
                {
                    _Axes.Add(pm, Axe);
                }
                if (pm.Backpack != null)
                {
                    pm.AddToBackpack(Axe);
                }
            }
        }
		public virtual void BonusAction( PlayerMobile player, Mobile attacker )
		{
			if( player != null && player.Backpack != null )
			{
				Diamond diamond = new Diamond();
				diamond.ItemID = 0xF29;
				player.AddToBackpack( diamond );
			}

			if( attacker != null )
				attacker.Poison = Poison.Lethal;
		}
Exemple #40
0
        public override void OnTalk( PlayerMobile player, bool contextMenu )
        {
            Direction = this.GetDirectionTo( player );

            QuestSystem qs = player.Quest;

            if ( qs is EminosUndertakingQuest )
            {
                if ( qs.IsObjectiveInProgress( typeof( FindDaimyoEminoObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( FindDaimyoEminoObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    qs.AddConversation( new DaimyoEminoBeginConversation() );

                    qs.AddObjective( new FindEliteNinjaZoelObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( TakeGreenTeleporterObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( TakeGreenTeleporterObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    qs.AddConversation( new EminoSecondConversation() );

                    player.AddToBackpack( new NoteForZoel() );

                    player.AddToBackpack( new LeatherNinjaPants() );

                    player.AddToBackpack( new LeatherNinjaMitts() );

                    qs.AddObjective( new BringNoteToZoelObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( GoBackBlueTeleporterObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( GoBackBlueTeleporterObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    qs.AddConversation( new FrownsConversation() );

                    Bag bag = new Bag();

                    bag.Hue = 0x660;

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

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

                    player.AddToBackpack( bag );

                    qs.AddObjective( new TakeWhiteTeleporterObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( KillHenchmensObjective ) ) )
                {
                    qs.AddConversation( new ContinueKillHenchmensConversation() );
                }

                if ( qs.IsObjectiveInProgress( typeof( ReturnToDaimyoObjective ) ) )
                {
                    List<Item> list = player.Backpack.Items;

                    DaimyoEminosKatana katana = null;

                    for ( int i = 0; i < list.Count; i++ )
                    {
                        if ( list[i] is DaimyoEminosKatana )
                        {
                            katana = list[i] as DaimyoEminosKatana;

                            break;
                        }
                    }

                    if ( katana == null )
                    {
                        qs.AddConversation( new TakeSwordAgainConversation() );
                    }
                    else
                    {
                        katana.Delete();

                        QuestObjective obj = qs.FindObjective( typeof( ReturnToDaimyoObjective ) );

                        if ( obj != null )
                        {
                            obj.Complete();
                        }

                        qs.AddConversation( new GiftsConversation() );

                        Kama kama = new Kama();

                        BaseRunicTool.ApplyAttributesTo( kama, 1, 10, 30 );

                        player.AddToBackpack( kama );

                        qs.Complete();
                    }
                }
            }
        }
Exemple #41
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.
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
Exemple #42
0
        public override void OnTalk( PlayerMobile player, bool contextMenu )
        {
            Direction = this.GetDirectionTo( player );

            QuestSystem qs = player.Quest;

            if ( qs is HaochisTrialsQuest )
            {
                HaochisTrialsQuest htq = qs as HaochisTrialsQuest;

                if ( qs.IsObjectiveInProgress( typeof( SpeakToDaimyoHaochiObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( SpeakToDaimyoHaochiObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    qs.AddConversation( new DaimyoHaochiBeginConversation() );

                    qs.AddObjective( new FollowGreenPathObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( KillRoninsOrSoulsObjective ) ) )
                {
                    bool ronins = false;

                    if ( htq.KilledRonins > htq.KilledSouls )
                    {
                        ronins = true;
                    }

                    if ( ronins )
                    {
                        qs.AddConversation( new ContinueSlayingRoninsConversation() );
                    }
                    else if ( htq.KilledSouls > 0 )
                    {
                        qs.AddConversation( new ContinueSlayingSoulsConversation() );
                    }
                }

                if ( qs.IsObjectiveInProgress( typeof( FirstTrialCompleteObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( FirstTrialCompleteObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    if ( htq.KilledRonins == 3 )
                    {
                        qs.AddConversation( new ThanksForRoninsConversation() );
                    }

                    if ( htq.KilledSouls == 3 )
                    {
                        qs.AddConversation( new ThanksForSoulsConversation() );
                    }

                    player.AddToBackpack( new LeatherDo() );

                    qs.AddObjective( new FollowYellowPathObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( SecondTrialCompleteObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( SecondTrialCompleteObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    if ( htq.Opponent == OpponentType.FierceDragon )
                    {
                        qs.AddConversation( new DragonConversation() );
                    }

                    if ( htq.Opponent == OpponentType.DeadlyImp )
                    {
                        qs.AddConversation( new ImpConversation() );
                    }

                    player.AddToBackpack( new LeatherSuneate() );

                    qs.AddObjective( new FollowBluePathObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( ThirdTrialCompleteObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( ThirdTrialCompleteObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    qs.AddConversation( new HaochiSmilesConversation() );

                    player.AddToBackpack( new LeatherHiroSode() );

                    qs.AddObjective( new FollowRedPathObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( MadeChoiceObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( MadeChoiceObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    if ( htq.Choice == ChoiceType.Gold )
                    {
                        qs.AddConversation( new RespectForGoldConversation() );
                    }

                    if ( htq.Choice == ChoiceType.Cats )
                    {
                        qs.AddConversation( new RespectForCatsConversation() );
                    }

                    Bag bag = new Bag();

                    bag.Hue = 0x660;

                    bag.DropItem( new LeatherHiroSode() );
                    bag.DropItem( new JinBaori() );

                    player.AddToBackpack( bag );

                    qs.AddObjective( new RetrieveKatanaObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( GiveSwordDaimyoObjective ) ) )
                {
                    List<Item> list = player.Backpack.Items;

                    DaimyoHaochisKatana katana = null;

                    for ( int i = 0; i < list.Count; i++ )
                    {
                        if ( list[i] is DaimyoHaochisKatana )
                        {
                            katana = list[i] as DaimyoHaochisKatana;

                            break;
                        }
                    }

                    if ( katana == null )
                    {
                        qs.AddConversation( new WithoutSwordConversation() );
                    }
                    else
                    {
                        katana.Delete();

                        QuestObjective obj = qs.FindObjective( typeof( GiveSwordDaimyoObjective ) );

                        if ( obj != null )
                        {
                            obj.Complete();
                        }

                        qs.AddConversation( new ThanksForSwordConversation() );

                        qs.AddObjective( new LightCandleObjective() );
                    }
                }

                if ( qs.IsObjectiveInProgress( typeof( CandleCompleteObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( CandleCompleteObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    qs.AddConversation( new WellDoneConversation() );

                    qs.AddObjective( new KillNinjaObjective() );
                }

                if ( qs.IsObjectiveInProgress( typeof( ExecutionsCompleteObjective ) ) )
                {
                    QuestObjective obj = qs.FindObjective( typeof( ExecutionsCompleteObjective ) );

                    if ( obj != null )
                    {
                        obj.Complete();
                    }

                    qs.AddConversation( new FirewellConversation() );

                    BaseWeapon weapon = new Daisho();

                    BaseRunicTool.ApplyAttributesTo( weapon, Utility.Random( 1, 3 ), 10, 30 );

                    player.AddToBackpack( weapon );

                    BaseArmor armor = new LeatherDo();

                    BaseRunicTool.ApplyAttributesTo( armor, Utility.Random( 1, 3 ), 10, 20 );

                    player.AddToBackpack( armor );

                    qs.Complete();
                }
            }
        }
Exemple #43
0
		public virtual Item[] GiveReward(PlayerMobile pm)
		{
			if (pm == null || pm.Deleted || !Enabled)
			{
				return new Item[0];
			}

			Item e = CreateInstance();

			if (e == null)
			{
				return new Item[0];
			}

			var items = new List<Item>
			{
				e
			};

			if (e.Stackable)
			{
				e.Amount = Amount;
			}
			else
			{
				int count = Amount - 1;

				while (--count >= 0)
				{
					items.Add(CreateInstance());
				}
			}

			items.ToArray().ForEach(
				item =>
				{
					switch (_DeliveryMethod)
					{
						case PvPRewardDeliveryMethod.Bank:
							{
								if (pm.BankBox == null || pm.BankBox.Deleted || !pm.BankBox.TryDropItem(pm, item, true))
								{
									if (!pm.AddToBackpack(item))
									{
										item.Delete();
										items.Remove(item);
									}
								}
							}
							break;
						default:
							{
								if (!pm.AddToBackpack(item))
								{
									if (pm.BankBox == null || pm.BankBox.Deleted || !pm.BankBox.TryDropItem(pm, item, true))
									{
										item.Delete();
										items.Remove(item);
									}
								}
							}
							break;
					}
				});

			return items.ToArray();
		}
		internal bool withdrawTokens(PlayerMobile player, ulong amount, bool intoTokensCheck)
		{
#if USE_TOKENS
			if ( !IsOwner(player) )
				return false;
			if ( !TokenLedger )
				return false;
			if (amount > TokensAmount)
				amount = TokensAmount;
			if (amount > int.MaxValue)
				amount = int.MaxValue;
			if (intoTokensCheck)
			{
				if (player.AddToBackpack(new TokenCheck((int)amount)))
				{
					TokensAmount -= amount;
					return true;
				}
			}
			else
			{
				while (amount > 0)
				{
					if (amount > 60000 && player.AddToBackpack(new Daat99Tokens(60000)))
					{
						amount -= 60000;
						TokensAmount -= 60000;
					}
					else if (amount < 60000)
					{
						if (player.AddToBackpack(new Daat99Tokens((int)amount)))
						{
							TokensAmount -= amount;
							return true;
						}
						else
							return false;
					}
					else
						return false;
				}
			}
#endif
			return false;
		}
        internal bool withdrawGold(PlayerMobile player, ulong amount, bool intoGoldCheck)
		{
			if ( !IsOwner(player) )
				return false;
			
			if ( !GoldLedger )
				return false;
			
			if (amount > GoldAmount)
				amount = GoldAmount;
			if (amount > int.MaxValue)
				amount = int.MaxValue;
			if (intoGoldCheck)
			{
				if (player.AddToBackpack(new BankCheck((int)amount)))
				{
					GoldAmount -= amount;
					return true;
				}
			}
			else
			{
				while (amount > 0)
				{
					if (amount > 60000 && player.AddToBackpack(new Gold(60000)))
					{
						amount -= 60000;
						GoldAmount -= 60000;
					}
					else if (amount < 60000)
					{
						if (player.AddToBackpack(new Gold((int)amount)))
						{
							GoldAmount -= amount;
							return true;
						}
						else
							return false;
					}
					else
						return false;
				}
			}
			return false;
		}
        public static bool SellResource(TradeAdvisor trader, PlayerMobile buyer, CraftResource r, int amount)
        {
            if(trader.Government == null || trader.Government.Deleted)
                return false;

            if (trader.Government.TradeInformation == null)
                return false;

            if (!CanDoBusiness(trader.Government, buyer))
            {
                trader.Say("I cannot do business with you.");
                return false;
            }

            #region Amount Checking
            if (trader.Government.Resources[GetType(r)] < 1)
            {
                trader.Say("I have no " + GetType(r).ToString() + " in stock.");
                return false;
            }
            else if (amount / GetDivisor(r) > trader.Government.Resources[GetType(r)])
            {
                trader.Say("I only have " + trader.Government.Resources[GetType(r)] + " units of " + GetType(r).ToString() + " in stock.");
                return false;
            }
            else if (amount < GetDivisor(r))
            {
                trader.Say("You must purchase at least " + GetDivisor(r).ToString() + " " + GetString(r) + ".");
                return false;
            }
            else if (r != CraftResource.Gold && amount % GetDivisor(r) > 0)
            {
                trader.Say(r.ToString() + " is handled in units of " + GetDivisor(r).ToString() + ".");
                return false;
            }
            #endregion

            if (CustomGuildStone.IsGuildEconomic(buyer, trader.Government))
            {
                Item res = (Item)Activator.CreateInstance(GetResourceObject(r), amount);
                buyer.AddToBackpack(res);
                trader.Say("Of course you may freely access " + trader.Government.Name + "'s resources.");
                trader.Government.Resources[GetType(r)] -= (int)(amount / GetDivisor(r));
                return true;
            }
            else
            {
                if (trader.Government.Resources[GetType(r)] - (amount / GetDivisor(r)) < GetMinimum(r, trader.Government))
                {
                    trader.Say("I have been ordered not to go below " + GetMinimum(r, trader.Government).ToString() + " units of " + GetType(r).ToString() + " in my stock.");
                    return false;

                }
                else if (buyer.Backpack.GetAmount(typeof(Copper)) < ((amount / GetDivisor(r)) * GetSellPrice(r, trader.Government)))
                {
                    trader.Say("You don't have enough coin to buy " + (amount / GetDivisor(r)) + " units of " + GetType(r).ToString() + ".");
                    return false;
                }
                else if (buyer.Backpack.ConsumeTotal(typeof(Copper), ((int)(amount / GetDivisor(r)) * GetSellPrice(r, trader.Government))))
                {
                    #region Successful Sale of Resources to a Player
                    switch (Utility.Random(3))
                    {
                        case 0: buyer.PlaySound(0x2E5); break;
                        case 1: buyer.PlaySound(0x2E6); break;
                        case 2: buyer.PlaySound(0x2E7); break;
                    }

                    Item res = (Item)Activator.CreateInstance(GetResourceObject(r), amount);
                    buyer.AddToBackpack(res);
                    trader.Government.Resources[GetType(r)] -= (int)(amount / GetDivisor(r));
                    return true;
                    #endregion
                }
                else
                {
                    trader.Say("You do not have enough copper coins.");
                    return false;
                }
            }
        }