sahisahi
Member
I made a chest that can only be opened by players with 30 days of Ingame time
first i added this
Then this to the ondoubleclickmethod
first i added this
Code:
public static readonly TimeSpan RewardTime = TimeSpan.FromDays( 30.0 );
Then this to the ondoubleclickmethod
Code:
public override void OnDoubleClick( Mobile from )
{
// Mobile m = args.Mobile;
Account ac = (Account)from.Account;
if ( ac == null )
return;
if (from == null)
return;
//PlayerMobile pm = (PlayerMobile)from;
Guild guild = from.Guild as Guild;
if (guild != null && from is PlayerMobile && from.InRange( this, 1 ) && ac.TotalGameTime >= RewardTime)
base.OnDoubleClick( from );
}