summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-07-11 09:56:46 -0300
committerJesusaves <cpntb1@ymail.com>2024-07-11 09:56:46 -0300
commitdd2931f3f23322aec6af69e626580e203db10e25 (patch)
treeefaddde443ad53f1a479c78a235eb08a7020969d
parentf1b0468e64c1ef6f5cf7520c9f72786fea8e9026 (diff)
downloadserverdata-dd2931f3f23322aec6af69e626580e203db10e25.tar.gz
serverdata-dd2931f3f23322aec6af69e626580e203db10e25.tar.bz2
serverdata-dd2931f3f23322aec6af69e626580e203db10e25.tar.xz
serverdata-dd2931f3f23322aec6af69e626580e203db10e25.zip
Hardcore Sentence Carryover (experimental)
-rw-r--r--npc/functions/clientversion.txt22
-rw-r--r--npc/functions/hub.txt7
2 files changed, 29 insertions, 0 deletions
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt
index 60d739903..1511cf016 100644
--- a/npc/functions/clientversion.txt
+++ b/npc/functions/clientversion.txt
@@ -15,6 +15,28 @@ function script clientupdater {
if (compare(getmap(), "000-0") || $@NOUPDATES) {
UPDATE=gettimetick(2);
}
+ // If you're in Jail, but this is HardCore server
+ if (getmap() == "sec_pri" && $HARDCORE) {
+ if (##HARDCORE_JAILTIME > 1) {
+ .@v1=getstatus(SC_JAILED, 1);
+ .@v2=getstatus(SC_JAILED, 2);
+ .@v3=getstatus(SC_JAILED, 3);
+ .@v4=getstatus(SC_JAILED, 4);
+ .@ti=getstatus(SC_JAILED, 5);
+ .@v1 = min(1, .@v1-##HARDCORE_JAILTIME+1);
+ if (.@ti > 60000)
+ .@ti = min(60000, .@ti - ((##HARDCORE_JAILTIME+1) * 60000));
+ sc_end SC_JAILED;
+ sc_start4 SC_JAILED, .@ti, .@v1, .@v2, .@v3, .@v4, 10000, SCFLAG_FIXEDRATE|SCFLAG_FIXEDTICK|SCFLAG_NOAVOID;
+ dispbottom l("Information: Your sentence was reduced in %d minute(s).", (##HARDCORE_JAILTIME-1));
+ }
+ dispbottom l("You will revive automatically. Use %s to see remaining jail time.", b("@jailtime"));
+ ##HARDCORE_JAILTIME=1;
+ }
+ // If you're in Jail on HardCore and this is Beta Server
+ if (##HARDCORE_JAILTIME && $BETASERVER) {
+ LOGIN_TIME=gettimetick(2);
+ }
// If you're in Jail, show a minor message
if (getmap() == "sec_pri") {
dispbottom l("You seem to be jailed. We cannot unjail offline players, so please don't logout.");
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 74d817a83..a96e7538e 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -303,6 +303,13 @@ function script HUB_Logout {
warp "Save", 0, 0;
}
}
+ // HardCore Sentence Bonus
+ if (LOGIN_TIME) {
+ if (##HARDCORE_JAILTIME) {
+ ##HARDCORE_JAILTIME += (gettimetick(2) - LOGIN_TIME) / 60;
+ }
+ LOGIN_TIME = 0;
+ }
// Crazyfefe hot fix
if (.@dead) {
// It was PK