The problem was already solved. Just go to the modules/game_interface/interface.otmod folder and open it with Visual Studio Code or another similar editing program. I do not recommend using Notepad as errors sometimes occur. I suggest using Visual Studio Code or Sublime and adding the code at the end here.
- game_shop
The problem was already solved. Just go to the modules/game_interface/interface.otmod folder and open it with Visual Studio Code or another similar editing program. I do not recommend using Notepad as errors sometimes occur. I suggest using Visual Studio Code or Sublime and adding the code at the end here.
- game_shop
serverSide in tfs/data/scripts:

function toggleStore()
if g_game.getFeature(GameIngameStore) then -- [10.98-15.00]
modules.game_store.toggle() -- cipsoft packets
else
modules.game_shop.toggle() -- custom
end
end
function toggleStore()
modules.game_shop.toggle()
end
Hey brother, thanks, it's working, I made the changes you mentioned and some changes to the database and it's perfect, thanksotc redemption has store for cipsoft packets [10.98-15.00]
there is a custom version of shop by oskar
![]()
otclient/modules/game_shop at main · opentibiabr/otclient
An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to custom...github.com
if you don't have the cipsoft packets, use custom by oskar
modules/game_shop:
- Server:
copy dir:serverSidein tfs/data/scripts:
View attachment 93561
- in OTC
View attachment 93562![]()
otclient/modules/game_mainpanel/mainpanel.lua at main · opentibiabr/otclient
An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to custom...github.com
toLUA:function toggleStore() if g_game.getFeature(GameIngameStore) then -- [10.98-15.00] modules.game_store.toggle() -- cipsoft packets else modules.game_shop.toggle() -- custom end end
LUA:function toggleStore() modules.game_shop.toggle() end

Thanks for the report!Good afternoon everyone, I think I discovered a problem. Could someone help?
It's like this:
If a player transfers a certain amount of points, they keep the points in their account. They can buy other things in the shop, and the player receives the transfer. After logging out, they have a negative balance of -20, for example. However, they bought the item for 20 and transferred 20. In other words, with 20 points, they spent 40. A small problem in the transfer area. thanks!
exemple:
View attachment 93765 View attachment 93767
if amount > 0 then
db.query("UPDATE `znote_accounts` set `points` = `points` - " .. amount .. " WHERE `id` = " .. aid)
db.query("UPDATE `znote_accounts` set `points` = `points` + " .. amount .. " WHERE `id` = " .. accountId)
db.asyncQuery("INSERT INTO `shop_history` VALUES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amount) .. ", 0, 1, " .. db.escapeString(receiver) .. ")")
db.asyncQuery("INSERT INTO `shop_history` VALUES (NULL, '" .. accountId .. "', '" .. GUID .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(amount) .. ", 0, 1, " .. db.escapeString(player:getName()) .. ")")
end
if amountSecond > 0 then
db.query("UPDATE `znote_accounts` set `points_second` = `points_second` - " .. amountSecond .. " WHERE `id` = " .. aid)
db.query("UPDATE `znote_accounts` set `points_second` = `points_second` + " .. amountSecond .. " WHERE `id` = " .. accountId)
db.asyncQuery("INSERT INTO `shop_history` VALUES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amountSecond) .. ", 1, 1, " .. db.escapeString(receiver) .. ")")
db.asyncQuery("INSERT INTO `shop_history` VALUES (NULL, '" .. accountId .. "', '" .. GUID .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(amountSecond) .. ", 1, 1, " .. db.escapeString(player:getName()) .. ")")
end
if amount > 0 then
db.query("UPDATE `znote_accounts` set `points` = `points` - " .. amount .. " WHERE `id` = " .. aid)
db.query("UPDATE `znote_accounts` set `points` = `points` + " .. amount .. " WHERE `id` = " .. accountId)
if pointsCache[aid] then
pointsCache[aid].points = pointsCache[aid].points - amount
pointsCache[aid].time = os.time()
end
db.asyncQuery("INSERT INTO `shop_history` VALUES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amount) .. ", 0, 1, " .. db.escapeString(receiver) .. ")")
db.asyncQuery("INSERT INTO `shop_history` VALUES (NULL, '" .. accountId .. "', '" .. GUID .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(amount) .. ", 0, 1, " .. db.escapeString(player:getName()) .. ")")
end
if amountSecond > 0 then
db.query("UPDATE `znote_accounts` set `points_second` = `points_second` - " .. amountSecond .. " WHERE `id` = " .. aid)
db.query("UPDATE `znote_accounts` set `points_second` = `points_second` + " .. amountSecond .. " WHERE `id` = " .. accountId)
if secondPointsCache[aid] then
secondPointsCache[aid].points = secondPointsCache[aid].points - amountSecond
secondPointsCache[aid].time = os.time()
end
db.asyncQuery("INSERT INTO `shop_history` VALUES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amountSecond) .. ", 1, 1, " .. db.escapeString(receiver) .. ")")
db.asyncQuery("INSERT INTO `shop_history` VALUES (NULL, '" .. accountId .. "', '" .. GUID .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(amountSecond) .. ", 1, 1, " .. db.escapeString(player:getName()) .. ")")
end
Obrigado pelo relatório!
Fui eu quem trouxe a Loja personalizada do Oskar para o OTClient Redemption com muitas correções
Aqui está a solução para o problema:
Pesquise a função gameShopTransferCoins
Substitua isto:
[código=lua]
se a quantidade > 0 então
db.query("ATUALIZAÇÃOznote_accountsdefinirpontos=pontos- " .. valor .. " ONDEid= " .. ajuda)
db.query("ATUALIZAÇÃOznote_accountsdefinirpontos=pontos+ " .. valor .. " ONDEid= " .. accountId)
db.asyncQuery("INSERIR EMshop_historyVALORES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amount) .. ", 0, 1, " .. db.escapeString(receiver) .. ")")
db.asyncQuery("INSERIR EMshop_historyVALORES (NULL, '" .. accountId .. "', '" .. GUID .. "', AGORA(), " .. escapeTitle .. ", " .. db.escapeString(valor) .. ", 0, 1, " .. db.escapeString(player:getName()) .. ")")
fim
se amountSecond > 0 então
db.query("ATUALIZAÇÃOznote_accountsdefinirpoints_second=points_second- " .. amountSecond .. " ONDEid= " .. aid)
db.query("ATUALIZAÇÃOznote_accountsdefinirpoints_second=points_second+ " .. amountSecond .. " ONDEid= " .. accountId)
db.asyncQuery("INSERIR EMshop_historyVALORES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amountSecond) .. ", 1, 1, " .. db.escapeString(receptor) .. ")")
db.asyncQuery("INSERIR EMshop_historyVALORES (NULL, '" .. accountId .. "', '" .. GUID .. "', AGORA(), " .. escapeTitle .. ", " .. db.escapeString(amountSecond) .. ", 1, 1, " .. db.escapeString(player:getName()) .. ")")
fim[/código]
Com isto:
[código=lua]
se a quantidade > 0 então
db.query("ATUALIZAÇÃOznote_accountsdefinirpontos=pontos- " .. valor .. " ONDEid= " .. ajuda)
db.query("ATUALIZAÇÃOznote_accountsdefinirpontos=pontos+ " .. valor .. " ONDEid= " .. accountId)
se pointsCache[aid] então
pointsCache[aid].points = pointsCache[aid].points - quantidade
pointsCache[aid].time = os.time()
fim
db.asyncQuery("INSERIR EMshop_historyVALORES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amount) .. ", 0, 1, " .. db.escapeString(receiver) .. ")")
db.asyncQuery("INSERIR EMshop_historyVALORES (NULL, '" .. accountId .. "', '" .. GUID .. "', AGORA(), " .. escapeTitle .. ", " .. db.escapeString(valor) .. ", 0, 1, " .. db.escapeString(player:getName()) .. ")")
fim
se amountSecond > 0 então
db.query("ATUALIZAÇÃOznote_accountsdefinirpoints_second=points_second- " .. amountSecond .. " ONDEid= " .. aid)
db.query("ATUALIZAÇÃOznote_accountsdefinirpoints_second=points_second+ " .. amountSecond .. " ONDEid= " .. accountId)
se secondPointsCache[aid] então
secondPointsCache[aid].points = secondPointsCache[aid].points - quantidadeSegundo
secondPointsCache[aid].time = os.time()
fim
db.asyncQuery("INSERIR EMshop_historyVALORES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amountSecond) .. ", 1, 1, " .. db.escapeString(receptor) .. ")")
db.asyncQuery("INSERIR EMshop_historyVALORES (NULL, '" .. accountId .. "', '" .. GUID .. "', AGORA(), " .. escapeTitle .. ", " .. db.escapeString(amountSecond) .. ", 1, 1, " .. db.escapeString(player:getName()) .. ")")
fim[/código]