From ffe807b980cfbad0a36639558baec1cbb6abcfb6 Mon Sep 17 00:00:00 2001 From: nick <98576999+nicolassanchez02@users.noreply.github.com> Date: Sun, 17 May 2026 03:06:28 -0500 Subject: [PATCH] Fix RLS crates not dropping for grouped players xp.VAR_TOP_GROUP stores the GROUP object ID when the top attacker is in a group, not an individual player. The isPlayer() guard in addRareLoot() was then failing immediately, preventing any RLS chest from spawning whenever players were grouped. Pick a random member of the group as the RLS recipient, consistent with how other group loot mechanics work in the codebase. Fixes #343 --- sku.0/sys.server/compiled/game/script/library/loot.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sku.0/sys.server/compiled/game/script/library/loot.java b/sku.0/sys.server/compiled/game/script/library/loot.java index c6f79bf29..6f73cd349 100755 --- a/sku.0/sys.server/compiled/game/script/library/loot.java +++ b/sku.0/sys.server/compiled/game/script/library/loot.java @@ -2491,6 +2491,14 @@ public class loot extends script.base_script // get the attacker who did the most damage. obj_id player = getObjIdObjVar(target, xp.VAR_TOP_GROUP); + // VAR_TOP_GROUP stores a group object when the top damage dealer is grouped. + // Pick a random member of that group to receive the RLS chest. + if (group.isGroupObject(player)) { + obj_id[] members = utils.getLocalGroupMemberIds(player); + if (members == null || members.length == 0) return false; + player = members[rand(0, members.length - 1)]; + } + // make sure the attacker is a player. if(!isValidId(player) || !isPlayer(player)){ return false;