Dan(Tasanar)

Moderator
Account farming and devaluation of "Veteran Rewards" has always been a thing on free shards.

On my shard most items were removed from the list to:
1. Deter mass account farming
2. Remove the devaluation of some of the coolest items
3. Limit the amount of houses with 10000 mining carts, ect, in them.

Having a veteran reward system that "better" acknowledged the true vets of the server would be nice
I have thought about converting the system to instead look at the total in-game time of the account over just saying "Hey thanks for logging in 3 years ago and just coming back today to claim a bunch of items".
 
So here is what I did...and so far it seems to work. Can ANYONE think of anything I overlooked?

RewardSystem.cs

Code:
public static bool HasAccess(Mobile mob, RewardList list, out TimeSpan ts)
        {
            if (list == null)
            {
                ts = TimeSpan.Zero;
                return false;
            }

            Account acct = mob.Account as Account;

            if (acct == null)
            {
                ts = TimeSpan.Zero;
                return false;
            }
        
            TimeSpan totalTime = acct.TotalGameTime;

            ts = (list.Age - totalTime);


            if (ts <= TimeSpan.Zero)
                return true;

            return false;
        }

Code:
public static int GetRewardLevel(Account acct)
        {
            TimeSpan totalTime = acct.TotalGameTime;
            TimeSpan ositotalTime = (DateTime.UtcNow - new DateTime(1997, 9, 24));

            int level = (int)(totalTime.TotalDays / RewardInterval.TotalDays);
            int levelosi = (int)(ositotalTime.TotalDays / 365);

            if (level < 0)
                level = 0;

            level += StartingLevel;

            return Math.Min(level, levelosi);
        }
Code:
public static bool HasHalfLevel(Account acct)
        {
            TimeSpan totalTime = acct.TotalGameTime;

            Double level = (totalTime.TotalDays / RewardInterval.TotalDays);

            return level >= 0.5;
        }

acct.TotalGameTime; + removed any of the math associated with the old method.

Now rewards points based on actual game time.

If the bigger brains out there could point out any possible issues with how I coded it, it would be greatly appreciated.
 
Last edited:
Back