From 0607aadd62a98cdda5763c31f85709e1e92ceb80 Mon Sep 17 00:00:00 2001 From: James Huston Date: Mon, 27 Nov 2023 17:48:48 -0500 Subject: [PATCH] Got script working to double up on badges of justice --- loot/badgeloot.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/loot/badgeloot.lua b/loot/badgeloot.lua index e76da04..c474676 100644 --- a/loot/badgeloot.lua +++ b/loot/badgeloot.lua @@ -1,2 +1,13 @@ -local PLAYER_EVENT_ON_LOOT_ITEM = 32 +local PLAYER_EVENT_ON_LOOT_ITEM = 32 +local ITEM_BADGE_OF_JUSTICE = 29434 + +local function OnPlayerLootItem(event, player, item, count) + local entry = item:GetDisplayId() + + if (entry == 29434) then + player:AddItem(ITEM_BADGE_OF_JUSTICE, count) + end +end + +RegisterPlayerEvent(PLAYER_EVENT_ON_LOOT_ITEM, OnPlayerLootItem)