public InternalGump(Mobile from, NewerPlayerTicket ticket) : base(50, 50) { m_From = from; m_Ticket = ticket; AddBackground(0, 0, 400, 385, 0xA28); AddHtmlLocalized(30, 45, 340, 70, 1013011, true, true); // Choose the gift you prefer. WARNING: if you cancel, and your partner does not, you will need to find another matching ticket! AddButton(46, 128, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 130, 320, 35, 1013012, false, false); // A sextant AddButton(46, 163, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 165, 320, 35, 1013013, false, false); // A coupon for a single hair restyling AddButton(46, 198, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 200, 320, 35, 1013014, false, false); // A spellbook with all 1st - 4th spells. AddButton(46, 233, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 235, 320, 35, 1013015, false, false); // A wand of fireworks AddButton(46, 268, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 270, 320, 35, 1013016, false, false); // A spyglass AddButton(46, 303, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 305, 320, 35, 1013017, false, false); // Dyes and a dye tub AddButton(120, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(154, 342, 100, 35, 1011012, false, false); // CANCEL }
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 NewerPlayerTicket) { NewerPlayerTicket theirTicket = targeted as NewerPlayerTicket; 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. } }
public InternalTarget(NewerPlayerTicket ticket) : base(2, false, TargetFlags.None) { m_Ticket = ticket; }
public InternalTarget( NewerPlayerTicket ticket ) : base( 2, false, TargetFlags.None ) { m_Ticket = ticket; }
public InternalGump( Mobile from, NewerPlayerTicket ticket ) : base( 50, 50 ) { m_From = from; m_Ticket = ticket; AddBackground( 0, 0, 400, 385, 0xA28 ); AddHtmlLocalized( 30, 45, 340, 70, 1013011, true, true ); // Choose the gift you prefer. WARNING: if you cancel, and your partner does not, you will need to find another matching ticket! AddButton( 46, 128, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 130, 320, 35, 1013012, false, false ); // A sextant AddButton( 46, 163, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 165, 320, 35, 1013013, false, false ); // A coupon for a single hair restyling AddButton( 46, 198, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 200, 320, 35, 1013014, false, false ); // A spellbook with all 1st - 4th spells. AddButton( 46, 233, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 235, 320, 35, 1013015, false, false ); // A wand of fireworks AddButton( 46, 268, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 270, 320, 35, 1013016, false, false ); // A spyglass AddButton( 46, 303, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 305, 320, 35, 1013017, false, false ); // Dyes and a dye tub AddButton( 120, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 154, 342, 100, 35, 1011012, false, false ); // CANCEL }
private static void EventSink_CharacterCreated( CharacterCreatedEventArgs args ) { if ( !VerifyProfession( args.Profession ) ) args.Profession = 0; Mobile newChar = CreateMobile( args.Account as Account ); if ( newChar == null ) { Console.WriteLine( "Login: {0}: Character creation failed, account full", args.State ); return; } args.Mobile = newChar; m_Mobile = newChar; // newChar.Player = true; newChar.AccessLevel = ((Account)args.Account).AccessLevel; newChar.Female = args.Female; newChar.Body = newChar.Female ? 0x191 : 0x190; newChar.Hue = Utility.ClipSkinHue( args.Hue & 0x3FFF ) | 0x8000; newChar.Hunger = 20; bool young = false; if ( newChar is PlayerMobile ) { PlayerMobile pm = (PlayerMobile) newChar; pm.Profession = args.Profession; if ( pm.AccessLevel == AccessLevel.Player && ((Account)pm.Account).Young ) young = pm.Young = true; } SetName( newChar, args.Name ); AddBackpack( newChar ); SetStats( newChar, args.Str, args.Dex, args.Int ); SetSkills( newChar, args.Skills, args.Profession ); AddHair( newChar, args.HairID, Utility.ClipHairHue( args.HairHue & 0x3FFF ) ); AddBeard( newChar, args.BeardID, Utility.ClipHairHue( args.BeardHue & 0x3FFF ) ); if ( args.Profession <= 3 ) { AddShirt( newChar, args.ShirtHue ); AddPants( newChar, args.PantsHue ); AddShoes( newChar ); } if( TestCenter.Enabled ) FillBankbox( newChar ); if ( young ) { PackItem( new NewPlayerBook() ); } if ( young && newChar.BankBox != null ) { NewerPlayerTicket ticket = new NewerPlayerTicket(); ticket.Owner = newChar; newChar.BankBox.DropItem( new Spellbook( UInt64.MaxValue ) );//Al: Fix for unblessed spellbook newChar.BankBox.DropItem( ticket ); newChar.BankBox.DropItem( MakeNewbie( new BlackPearl( 30 ) ) ); newChar.BankBox.DropItem( MakeNewbie( new Bloodmoss( 30 ) ) ); newChar.BankBox.DropItem( MakeNewbie( new Garlic( 30 ) ) ); newChar.BankBox.DropItem( MakeNewbie( new Ginseng( 30 ) ) ); newChar.BankBox.DropItem( MakeNewbie( new MandrakeRoot( 30 ) ) ); newChar.BankBox.DropItem( MakeNewbie( new Nightshade( 30 ) ) ); newChar.BankBox.DropItem( MakeNewbie( new SulfurousAsh( 30 ) ) ); newChar.BankBox.DropItem( MakeNewbie( new SpidersSilk( 30 ) ) ); } //Al: personalized skill/statsball for wiped veteran accounts if ( newChar.Account is Account && ((Account)newChar.Account).CharacterCount == 1 && (DateTime.Now - ((Account)newChar.Account).Created) >= TimeSpan.FromDays(10000) ) { int skillballsReceived; try { skillballsReceived = Int32.Parse(((Account)newChar.Account).GetTag("WelcomeBackSkillballsReceived")); } catch { skillballsReceived = 0; } if (skillballsReceived < MAXIMUM_WELCOME_BACK_SKILLBALLS) { ((Account)newChar.Account).SetTag("WelcomeBackSkillballsReceived", (++skillballsReceived).ToString()); newChar.AddToBackpack(new WelcomeBackSkillball(newChar)); newChar.AddToBackpack(new NewPlayerStatsBall(newChar)); } } //CityInfo city = GetStartLocation( args, young ); � CityInfo city = new CityInfo( "Young Town", "Young Town Entrance", 1243, 1193, -29, Map.Ilshenar ); // Added 2011-Feb-06 //CityInfo city = new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Felucca ); //**** ADDED FOR 1ST MARCH SPECIAL //if (newChar.Account.Count <= 1 /*|| (GetSharedAccounts((newChar.Account as Account).LoginIPs)).Count <= 1*/) //{ // city = new CityInfo("Newbie City", "Start room", 5738, 797, 0, Map.Felucca); //} //**** END 1ST MARCH SPECIAL newChar.MoveToWorld( city.Location, city.Map ); Console.WriteLine( "Login: {0}: New character being created (account={1})", args.State, ((Account)args.Account).Username ); Console.WriteLine( " - Character: {0} (serial={1})", newChar.Name, newChar.Serial ); Console.WriteLine( " - Started: {0} {1} in {2}", city.City, city.Location, city.Map.ToString() ); //new WelcomeTimer( newChar ).Start(); //This has to be done here and not in a separate CharacterCreated-Event to get a reference to the new PlayerMobile //Player can set the email address till exactly 24 hours after account creation. if ( newChar.Account is Account && (DateTime.Now - ((Account)newChar.Account).Created <= TimeSpan.FromHours(24))) Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(EmailSystem.SendEmailGump), newChar as PlayerMobile); }