bolachapanco
Member
I have this script that when using the item it gives tibia coins, but I would like it to give tibia coins (transferable).
it's possible?
it's possible?
Lua:
local addCoins = Action()
function addCoins.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local coins = 25
db.query("UPDATE `accounts` SET `coins` = `coins` + '" .. coins .. "' WHERE `id` = '" .. player:getAccountId() .. "';")
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You received "..coins.." coins")
item:remove(1)
return true
end
addCoins:id(22118)
addCoins:register()