summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2023-10-09 14:08:31 -0300
committerJesusaves <cpntb1@ymail.com>2023-10-09 14:08:31 -0300
commit1180ad7f3a428409853637ca9240c60bf42b1e98 (patch)
treeeae2d228e35e15cab3d307e632243069811bc975 /npc/items
parent8ff79ad5866d012528e34ac28a11aa79954305f7 (diff)
downloadserverdata-1180ad7f3a428409853637ca9240c60bf42b1e98.tar.gz
serverdata-1180ad7f3a428409853637ca9240c60bf42b1e98.tar.bz2
serverdata-1180ad7f3a428409853637ca9240c60bf42b1e98.tar.xz
serverdata-1180ad7f3a428409853637ca9240c60bf42b1e98.zip
Alcohol Nearby Bonus increases if more than 75% of online players are around.
The maximum is 3.2% exp bonus per player, if everyone connected is in range.
Diffstat (limited to 'npc/items')
-rw-r--r--npc/items/alcohol.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/npc/items/alcohol.txt b/npc/items/alcohol.txt
index 0305ad4c7..74274066a 100644
--- a/npc/items/alcohol.txt
+++ b/npc/items/alcohol.txt
@@ -63,7 +63,9 @@ OnUse:
// (Rounded down : So there's a "bonus" every ~3 people)
getmapxy(.@m$, .@x, .@y, 0);
.@bonus=getareausers(.@m$, .@x-14, .@y-14, .@x+14, .@y+14)-1;
- .@bonus=.@bonus*24/10;
+ .@server = getusers(1);
+ .@multiplier = limit(24, (32 * .@bonus / .@server), 32); // 2.4% ~ 3.2% bonus
+ .@bonus=.@bonus*.@multiplier/10;
@taste+=min(@taste, .@bonus);
// Alcohol EXP Bonus is ponderate average, so having more VIT doesn't means