diff options
author | Jesusaves <cpntb1@ymail.com> | 2025-03-04 15:53:38 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2025-03-04 15:53:38 -0300 |
commit | 864810fb600c89576ca3605f18c647b7158e6a02 (patch) | |
tree | 258d4fc321fb6c1b6cc522f631a6bdc34ff567cb | |
parent | f30b085ebac6cc6f8fde38f2841ed6bc7eda485f (diff) | |
download | serverdata-864810fb600c89576ca3605f18c647b7158e6a02.tar.gz serverdata-864810fb600c89576ca3605f18c647b7158e6a02.tar.bz2 serverdata-864810fb600c89576ca3605f18c647b7158e6a02.tar.xz serverdata-864810fb600c89576ca3605f18c647b7158e6a02.zip |
If you work at least 4 hours and leave normally instead of logout, pay fraction
Only 50% of the fraction will be paid. Also informs you about the limit if you forgot.
-rw-r--r-- | npc/003-11/alfred.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/npc/003-11/alfred.txt b/npc/003-11/alfred.txt index 1bfae4b77..96d8ca27d 100644 --- a/npc/003-11/alfred.txt +++ b/npc/003-11/alfred.txt @@ -25,7 +25,7 @@ mesn; mesq l("Do you want to work? The current wage is %s GP/hour, and if you leave the building, I'll assume you've stopped working and will emit payment.", fnum(_calc_wage())); mesc l("There is no payment for fraction of hours worked."), 1; - mesc l("If you logout without leaving the map first, fees will be deducted from your payment."), 1; + //mesc l("If you logout without leaving the map first, fees will be deducted from your payment."), 1; if (askyesno() == ASK_YES) { dispbottom l("You've started to fill paperwork."); tutmes l("As long that you do not leave the map, your char will keep generating money. Do note you cannot work more than %d hours straight.", .maxHours); @@ -41,6 +41,11 @@ OnBleep: .@current = gettimeparam(GETTIME_MINUTE); // Pay you for every 60 minutes .@pay = min(.maxHours, (.@current - @alfred_st) / 60) * _calc_wage(); + // Pay fraction of hour if you spent over 4 hours here + // But ONLY if you leave manually, logout won't pay you fractions. + // There's a deflator of 50% over the fraction, however + if (((.@current - @alfred_st) / 60) >= 4) + .@pay += (((.@current - @alfred_st) % 60) * _calc_wage()) / 120; // Fraction of hour code pending .maxHours enforcement // i.e. preventing you from working more than .maxHours per day //.@pay += ((.@current - @alfred_st) % 60) * _calc_wage() / 60; @@ -60,6 +65,8 @@ L_Working: .@current = gettimeparam(GETTIME_MINUTE) - @alfred_st; if (.@current / 60 >= .maxHours) npctalk3 l("You have worked the limit of %d hours and will not be paid for overtime.", .maxHours); + else if (.@current / 60 >= 4) + npctalk3 l("You have currently worked %d hour(s) and %d minute(s). Fraction of hour may be paid in half. The limit is %d hours.", .@current / 60, .@current % 60, .maxHours); else npctalk3 l("You have currently worked %d hour(s) and %d minute(s). Fraction of hour won't be paid.", .@current / 60, .@current % 60); end; |