From 1180ad7f3a428409853637ca9240c60bf42b1e98 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 9 Oct 2023 14:08:31 -0300 Subject: 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. --- npc/items/alcohol.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'npc') 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 -- cgit v1.2.3-70-g09d2