From 458f9b951bf25fe3402479acd48571efa4d5937d Mon Sep 17 00:00:00 2001 From: Majesty <32709570+majestyotbr@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:57:16 -0300 Subject: [PATCH] fix: quest condition --- .../scripts/actions/rookgaard/rapier_quest.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua index 4598cfd3e0f..5afd15c76e6 100644 --- a/data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua +++ b/data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua @@ -2,13 +2,12 @@ local rapierQuest = Action() function rapierQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) local rewardId = 3272 - if player:questKV("rapier"):get("completed") then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The box is empty.") - else + if not player:canGetReward(rewardId, "rapier") then + return true + end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a rapier.") player:addItem(rewardId, 1) player:questKV("rapier"):set("completed", true) - end return true end