- 0
Need SQL help & Epoch help (maintenance/setDamage)
-
Similar Content
-
- 3 answers
- 1890 views
-
- 2 replies
- 1086 views
-
- 20 answers
- 2308 views
-
- 18 answers
- 2682 views
-
- 3 answers
- 1222 views
-
- Advertisement
Question
mgm
Hey guys,
I would like to improve my current base maintenance set up. First, copied below is what I have at the moment.
From what I understand the above code checks the Datestamp of any buildables and then sets Damage to "0.1" if it is older than 24 hours. (I added the last line it might be unnecessary - I'm not sure).
Goal:
The above being the current setup, what I would like to do next is, update my SQL query so that setDamage adds 10% every day, so that, if a user does not maintain for:
1 day, the damage will be 10%
2 days, the damage will be 20%
3 days, the damage will be 30%
...
...
9 days, the damage will be 90%
10 days, the damage will be 100% << from what I read in the forums here, then it will be automatically removed because the damage will be '1'.
(Furthermore, my "CleanupPlacedAfterDays" is set to 10 days so it will definitely go - exactly what I want).
Question #1: (SQL) So how can I accomplish this goal? Is there a simple SQL trigger such as "Damage = +0.1"?
Question #2: (Epoch) Once the SQL side is sorted, how can I setup an Epoch system to charge players skipping maintenance accordingly AND reward (not punish) diligent players paying daily?
Just to clarify with an example
( a ) Let's imagine a diligent player who logs in every day & maintains his base so he will be paying the maintenance fee for his items every day.In a 10 day period, he obviously will pay 10 times daily maintenance.
( b ) Let's also imagine a lazy-slash-busy player who (as you can guess) doesn't even log in to do any maintenance but logs in just before 10th day, so maintains every 9 days, thus pays 1 time daily maintenance every 10 days. This guy will be getting unfair discount which also means diligent dude will be getting punished for his diligence!
If anything, I would like to give the diligent players a discount (nothing much -business slow already!-, let's say 5% discount for first day maintenance, 4% for second day, 3% for third day, 2% for fourth day, and only 1% for fifth day)...
Let me add: I acknowledge the tiny (5% to 1%) discounts won't matter with gold bar payment system but I am still hoping we will reach our day, so it will make a difference when the day comes. Today, while we're at it I'd like to update maintenance related SQL queries in a way that the bonus code is active even though it won't matter for the next few week/months.
Thanks in advance for any input...
Link to comment
Share on other sites
14 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now