Skip to content

Commit

Permalink
Lua code format - (Stylua)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 11, 2024
1 parent 4f03598 commit 8930d52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
local rapierQuest = Action()

function rapierQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:questKV('rapier'):get('completed') then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The box is empty.")
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a rapier.")
player:addItem(3272, 1)
player:kv():scoped('quests'):scoped('rapier'):set('completed', true)
end
return true
if player:questKV("rapier"):get("completed") then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The box is empty.")
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a rapier.")
player:addItem(3272, 1)
player:kv():scoped("quests"):scoped("rapier"):set("completed", true)
end
return true
end

rapierQuest:position{x = 32099, y = 32198, z = 9}
rapierQuest:position({ x = 32099, y = 32198, z = 9 })
rapierQuest:register()
2 changes: 1 addition & 1 deletion data/libs/functions/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -750,5 +750,5 @@ function Player:canFightBoss(bossNameOrId)
end

function Player:questKV(questName)
return self:kv():scoped('quests'):scoped(questName)
return self:kv():scoped("quests"):scoped(questName)
end

0 comments on commit 8930d52

Please sign in to comment.