summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-02-04 12:27:36 -0300
committerJesusaves <cpntb1@ymail.com>2020-02-04 12:27:36 -0300
commit0d5aea7a6d8cfdc32db34673f92945e4dcbae291 (patch)
tree3a04eabf8a295e10e4a332d135ade565f7b885d6
parentb5e37e3f33df9068127d8dd5c3e557a71dbc23d2 (diff)
downloadserverdata-0d5aea7a6d8cfdc32db34673f92945e4dcbae291.tar.gz
serverdata-0d5aea7a6d8cfdc32db34673f92945e4dcbae291.tar.bz2
serverdata-0d5aea7a6d8cfdc32db34673f92945e4dcbae291.tar.xz
serverdata-0d5aea7a6d8cfdc32db34673f92945e4dcbae291.zip
Remove some protection, PVP cooldown timers
-rw-r--r--db/constants.conf1
-rw-r--r--npc/functions/honor.txt8
-rw-r--r--npc/functions/hub.txt17
3 files changed, 17 insertions, 9 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 5581e6d2b..faa108520 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -4442,6 +4442,7 @@ constants_db: {
comment__: "Configuration constants"
MAX_CYCLE_PC: 40
CHEST_WAITTIME: 900 // 15 minutes
+ PVP_WAITTIME: 1800 // 30 minutes
BCONFN_SPAWN: 70
BCONFD_SPAWN: 100
BCONFN_MOBHP: 100
diff --git a/npc/functions/honor.txt b/npc/functions/honor.txt
index 255fafcb9..1606d6a10 100644
--- a/npc/functions/honor.txt
+++ b/npc/functions/honor.txt
@@ -62,6 +62,7 @@ function script calc_HR {
//.@def_br=get_BR(getarg(1));
.@atk=readparam(BaseLevel, getarg(0));
.@def=readparam(BaseLevel, getarg(1));
+ .@log=getarg(2, true);
// Calculate how much levels you've used above needed
.@overpower=.@atk-.@def;
@@ -73,6 +74,13 @@ function script calc_HR {
.@honor=BaseLevel/4;
}
+ // Log cooldown (30 minutes)
+ // If cooldown already in effect, do not gain honor.
+ if (.@log) {
+ if (.@honor > 0 && PVP_COOLDOWN[.@def] >= gettimetick(2))
+ .@honor=0;
+ PVP_COOLDOWN[.@def]=gettimetick(2)+PVP_WAITTIME;
+ }
return .@honor;
}
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 046eb7f40..2dc883545 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -18,6 +18,10 @@ function script HUB_Login {
if (CLEANUP < gettimetick(2)-CHEST_WAITTIME)
deletearray RNGTREASURE_DATE;
+ // PVP Cooldown cleaning
+ if (CLEANUP < gettimetick(2)-PVP_WAITTIME)
+ deletearray PVP_COOLDOWN;
+
return;
}
@@ -276,19 +280,14 @@ function script HUB_PvP {
// This is an official PVP Map
if (ispvpmap(.@m$)) {
// Honorable Death
- if (.@honor) {
+ if (.@honor >= 0) {
HONOR+=.@honor;
} else {
// Dishonorable... But... Legit?
- if (is_bandit(killedrid)) {
+ if (is_bandit(killedrid))
HONOR+=1;
- } else {
- // Did the defensor cheat? (within Level+30% rule)
- if (BaseLevel < readparam(BaseLevel, killedrid)*13/10)
- HONOR+=1; // Ehhhhhh............ Well.
- else
- HONOR+=.@honor; // It's negative.
- }
+ else
+ HONOR+=.@honor; // It's negative.
}
// It was a duel!