cward said:The NewPlayerTicket should be added in CharacterCreation.cs, the code you showed would not work the way it should.
I've not looked at this script so I'm not sure. You would need to do a check for the young player account tag.Saxum said:Well, the thing is I don't know what kind of code I should add and redirect it to the NewPlayerTicket to do a check. In the readme it said that code should be put into playermobile.cs and I got no errors when I ran it but I got no ticket either.
Mind enlightning me with a hint how to add it to the charactercreation.cs?
NewPlayerTicket playerticket = new NewPlayerTicket();
playerticket.Owner = newChar;
if ( account tag check here )
{
newChar.AddToBackpack( playerticket );
}
private static void AddBackpack( Mobile m )
{
Container pack = m.Backpack;
if ( pack == null )
{
pack = new Backpack();
pack.Movable = false;
m.AddItem( pack );
}
PackItem( new RedBook( "a book", m.Name, 20, true ) );
PackItem( new Gold( 1000 ) ); // Starting gold can be customized here
PackItem( new Dagger() );
PackItem( new Candle() );
[B] string tag = ((Account)m.Account).GetTag( "AllowYoung" );
NewPlayerTicket playerticket = new NewPlayerTicket();
if ( tag == "1" || tag == null )
{
m.AddToBackpack( playerticket );
}[/B]
}
cward said:I've not looked at this script so I'm not sure. You would need to do a check for the young player account tag.
This is how I did it on my young system I've been working on.
Code:NewPlayerTicket playerticket = new NewPlayerTicket(); playerticket.Owner = newChar; if ( account tag check here ) { newChar.AddToBackpack( playerticket ); }
Saxum said:I tried pretty much everything and I don't manage to get it working.. Any more help perhaps?
if ( from is PlayerMobile && ((PlayerMobile)from).YoungPlayer )
{
from.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young.
return false;
}
bean56 said:Also I noticed in moongate.cs you said to put thisbut if you do that then as you can see any young player will not be able to use a moongate so I think you need a Map.Felucca check in there too or take it out all together since the previous function also has something to stop them from going to felucca.Code:if ( from is PlayerMobile && ((PlayerMobile)from).YoungPlayer ) { from.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young. return false; }
bean56 said:That sounds good dude, but one thing. With your new version you just took out the ilsh region. True this would prevent players from being moved in ilsh, but then it would still search 200 tiles then 1000 then 5000 etc so it would be a big waste of resources. Why don't you just check this.Map != Map.Ilshenar in each if?
PrivateOverheadMessage( MessageType.Regular, 187, false, name, from.NetState );
Knight Wolf 748 said:I'm not sure if this will help but here's a link to some of the Features to the Young Players System from uo-statics
http://uo.stratics.com/content/misc/young.shtml
bean56 said:Change it toI'm such an idiot.Code:PrivateOverheadMessage( MessageType.Regular, 187, false, name, from.NetState );
I would also like to add that currently there is no code so young players insta log. There is nothing for ondisconnect or onlogout.
would a simple this.Map = Map.Internal do?
I'm also curious is the 24 hour account time check in the help gump correct?
public override TimeSpan GetLogoutDelay()
{
if ( this.YoungPlayer )
return TimeSpan.Zero;
else
return base.GetLogoutDelay();
}
What about regular young characters then? There is no check for them to get the young gump if they are still young.jaynigs said:as for your other question the 24 hours is for advanced characters only....
bean56 said:What about regular young characters then? There is no check for them to get the young gump if they are still young.