Ejemplo n.º 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted == m_Ticket)
                {
                    from.SendLocalizedMessage(501928);                       // You can't target the same ticket!
                }
                else if (targeted is HarrowerTicket)
                {
                    HarrowerTicket theirTicket = targeted as HarrowerTicket;
                    Mobile         them        = theirTicket.m_Owner;

                    if (them == null || them.Deleted)
                    {
                        from.SendLocalizedMessage(501930);                           // That is not a valid ticket.
                    }
                    else
                    {
                        from.SendGump(new InternalGump(from, m_Ticket));
                        them.SendGump(new InternalGump(them, theirTicket));
                    }
                }
                else if (targeted is Item && ((Item)targeted).ItemID == 0x14F0)
                {
                    from.SendLocalizedMessage(501931);                       // You need to find another ticket marked NEW PLAYER.
                }
                else
                {
                    from.SendLocalizedMessage(501929);                       // You will need to select a ticket.
                }
            }
Ejemplo n.º 2
0
            public InternalGump(Mobile from, HarrowerTicket ticket) : base(50, 50)
            {
                m_From   = from;
                m_Ticket = ticket;

                AddBackground(0, 0, 400, 385, 0xA28);

                AddHtml(30, 45, 340, 70, "Wow! You have defeated the Harrower!, for your courageousness we have given you a choice of rewards, you may choose only one though! so choose carefully brave hero...", true, true);

                AddButton(46, 128, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0);
                AddHtml(80, 129, 240, 24, "a Limited Seven GM Skillball", true, false);
                //AddLabel( 80, 128, 0x489, "a Seven GM Skillball" );  //# 1test

                AddButton(46, 163, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0);
                AddHtml(80, 164, 240, 24, "an Ethereal WolfRider", true, false);
                //AddLabel( 80, 163, 0x489, "an Ethereal WolfRider" );  //# 1test

                AddButton(46, 198, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0);
                AddHtml(80, 199, 240, 24, "a Special Hair Restyling Deed", true, false);
                //AddLabel( 80, 198, 0x489, "a Special Hair Restyling Deed" );  //# 1test

                AddButton(46, 233, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0);
                AddHtml(80, 234, 240, 24, "a Black Hair Dye", true, false);
                //AddLabel( 80, 233, 0x489, "a Black Hair Dye" );  //# 1test

                AddButton(46, 268, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0);
                AddHtml(80, 269, 240, 24, "a hooded shroud of the shadows", true, false);
                //AddLabel( 80, 268, 0x489, "a hooded shroud of the shadows" );  //# 1test

                //AddButton( 46, 303, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 );
                //AddLabel( 50, 320, 0x489, "a wreath deed" );  //# 1test

                AddButton(120, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(154, 342, 100, 35, 1011012, false, false);                   // CANCEL
            }
Ejemplo n.º 3
0
		public void GivePowerScrolls()
		{
			ArrayList toGive = new ArrayList();

			ArrayList list = Aggressors;
			for ( int i = 0; i < list.Count; ++i )
			{
				AggressorInfo info = (AggressorInfo)list[i];

				if ( info.Attacker.Player && info.Attacker.Alive && (DateTime.Now - info.LastCombatTime) < TimeSpan.FromSeconds( 30.0 ) && !toGive.Contains( info.Attacker ) )
					toGive.Add( info.Attacker );
			}

			list = Aggressed;
			for ( int i = 0; i < list.Count; ++i )
			{
				AggressorInfo info = (AggressorInfo)list[i];

				if ( info.Defender.Player && info.Defender.Alive && (DateTime.Now - info.LastCombatTime) < TimeSpan.FromSeconds( 30.0 ) && !toGive.Contains( info.Defender ) )
					toGive.Add( info.Defender );
			}

			if ( toGive.Count == 0 )
				return;

			// Randomize
			for ( int i = 0; i < toGive.Count; ++i )
			{
				int rand = Utility.Random( toGive.Count );
				object hold = toGive[i];
				toGive[i] = toGive[rand];
				toGive[rand] = hold;
			}

			for ( int i = 0; i < 16; ++i )
			{
				int level;
				double random = Utility.RandomDouble();

				if ( 0.1 >= random )
					level = 25;
				else if ( 0.25 >= random )
					level = 20;
				else if ( 0.45 >= random )
					level = 15;
				else if ( 0.70 >= random )
					level = 10;
				else
					level = 5;

				Mobile m = (Mobile)toGive[i % toGive.Count];

				HarrowerTicket ps  = new HarrowerTicket();

				m.SendLocalizedMessage( 1049524 ); // You have received a scroll of power!
				m.AddToBackpack( ps );

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

					for ( int j = 0; j < pm.JusticeProtectors.Count; ++j )
					{
						Mobile prot = (Mobile)pm.JusticeProtectors[j];

						if ( prot.Map != m.Map || prot.Kills >= 5 || prot.Criminal )
							continue;

						int chance = 0;

						switch ( VirtueHelper.GetLevel( prot, VirtueName.Justice ) )
						{
							case VirtueLevel.Seeker: chance = 60; break;
							case VirtueLevel.Follower: chance = 80; break;
							case VirtueLevel.Knight: chance = 100; break;
						}

						if ( chance > Utility.Random( 100 ) )
						{
							prot.SendLocalizedMessage( 1049368 ); // You have been rewarded for your dedication to Justice!
							//prot.AddToBackpack( new StatCapScroll( 225 + level ) );
						}
					}
				}
			}
		}
			public InternalTarget( HarrowerTicket ticket ) : base( 2, false, TargetFlags.None )
			{
				m_Ticket = ticket;
			}
			public InternalGump( Mobile from, HarrowerTicket ticket ) : base( 50, 50 )
			{
				m_From = from;
				m_Ticket = ticket;

				AddBackground( 0, 0, 400, 385, 0xA28 );

				AddHtml(30, 45, 340, 70,"Wow! You have defeated the Harrower!, for your courageousness we have given you a choice of rewards, you may choose only one though! so choose carefully brave hero...",true,true);

				AddButton( 46, 128, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
				AddHtml(80,129,240,24,"a Limited Seven GM Skillball",true,false);
				//AddLabel( 80, 128, 0x489, "a Seven GM Skillball" );  //# 1test

				AddButton( 46, 163, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );
				AddHtml(80,164,240,24,"an Ethereal WolfRider",true,false);
				//AddLabel( 80, 163, 0x489, "an Ethereal WolfRider" );  //# 1test

				AddButton( 46, 198, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
				AddHtml(80,199,240,24,"a Special Hair Restyling Deed",true,false);
				//AddLabel( 80, 198, 0x489, "a Special Hair Restyling Deed" );  //# 1test

				AddButton( 46, 233, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0 );
				AddHtml(80,234,240,24,"a Black Hair Dye",true,false);
				//AddLabel( 80, 233, 0x489, "a Black Hair Dye" );  //# 1test

				AddButton( 46, 268, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0 );
				AddHtml(80,269,240,24,"a hooded shroud of the shadows",true,false);
				//AddLabel( 80, 268, 0x489, "a hooded shroud of the shadows" );  //# 1test

				//AddButton( 46, 303, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 );
				//AddLabel( 50, 320, 0x489, "a wreath deed" );  //# 1test

				AddButton( 120, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 154, 342, 100, 35, 1011012, false, false ); // CANCEL
			}
Ejemplo n.º 6
0
 public InternalTarget(HarrowerTicket ticket) : base(2, false, TargetFlags.None)
 {
     m_Ticket = ticket;
 }