diff options
Diffstat (limited to 'npc/functions/honor.txt')
-rw-r--r-- | npc/functions/honor.txt | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |