Skip to content

Commit

Permalink
fix: lever create item convert to client id (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
RCP91 authored Feb 28, 2023
1 parent b193038 commit 7e6f3c3
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions data-otservbr-global/scripts/quests/giant_smithhammer/lever.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ local lever = Action()
function lever.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local position = { x = 32780 , y = 32231 , z = 8}
local tile = Tile(Position(position))
if item.itemid == 2772 then
if tile:getItemById(389) then
tile:getItemById(389):remove()
item:transform(2773)
else
Game.createItem(387, 1, position)
end
else
Game.createItem(387, 1, position)

if item.itemid == 2772 and tile:getItemById(389) then
tile:getItemById(389):remove()
item:transform(2773)
elseif item.itemid == 2773 and not tile:getItemById(389) then
Game.createItem(389, 1, position)
item:transform(2772)
end
return true
Expand Down

0 comments on commit 7e6f3c3

Please sign in to comment.