Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Feb 22, 2024
2 parents 4fe44c6 + c798b3c commit bc446e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
local storeCoin = Action()

function storeCoin.onUse(player, item, fromPosition, target, toPosition, isHotkey)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
local count = item:getCount()
item:remove()
player:addTransferableCoins(count)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have added " .. count .. " tibia coins to your balance. Your total is now " .. player:getTransferableCoins() .. ".")
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
item:remove()

logger.warn("[StoreCoinScript - ITEM_STORE_COIN] The player {} used the item to store Tibia Coins.", player:getName())
return true
end

storeCoin:id(ITEM_STORE_COIN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function scroll.onUse(player, item, fromPosition, target, toPosition, isHotkey)
player:setStorageValueByName(scrollData.storageName, 1)
player:sendTextMessage(MESSAGE_LOOK, "You have gained " .. scrollData.points .. " promotion points for the Wheel of Destiny by deciphering the " .. scrollData.name .. ".")
item:remove(1)

return true
end

Expand Down

0 comments on commit bc446e3

Please sign in to comment.