Skip to content

Commit

Permalink
fix: quest condition
Browse files Browse the repository at this point in the history
  • Loading branch information
majestyotbr committed Feb 29, 2024
1 parent d97e5ec commit 458f9b9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 458f9b9

Please sign in to comment.