• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Does anyone know how I activate store via otclient mehah?

Mateus Robeerto

Legendary OT User
Joined
Jun 5, 2016
Messages
1,856
Solutions
95
Reaction score
1,482
Location
ლ(ಠ益ಠლ)
Does anyone know how I activate the store via otclient mehah?loja.png

I went to test v8's module_game and played mehah, but it didn't show up... I know it's not compatible ok. but is there a way to dwell on the store in it?

@Mehah
 
Last edited:
Solution
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.
LUA:
- 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.
LUA:
- game_shop
 
Solution
Good evening everyone, could someone help me integrate the game_store and/or game_shop, I'm trying, I did what's here and it doesn't work in mehah, only in otcv8

1752022010920.webp
 
Last edited:
otc redemption has store for cipsoft packets [10.98-15.00]

there is a custom version of shop by oskar

if you don't have the cipsoft packets, use custom by oskar

modules/game_shop:

- Server:
copy dir: serverSide in tfs/data/scripts:

1752023731482.webp
- in OTC

1752023793862.webp
LUA:
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
to
LUA:
function toggleStore()
     modules.game_shop.toggle()
end
 
Last edited:
otc redemption has store for cipsoft packets [10.98-15.00]

there is a custom version of shop by oskar

if you don't have the cipsoft packets, use custom by oskar

modules/game_shop:

- Server:
copy dir: serverSide in tfs/data/scripts:

View attachment 93561
- in OTC

View attachment 93562
LUA:
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
to
LUA:
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, thanks
 
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:


1752857530239.webp 1752857700692.webp
 
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
Thanks for the report!

I'm the one who brought the custom Store by Oskar to OTClient Redemption with alot of fixes
Here's the fix for the problem:

Search for the function gameShopTransferCoins

Replace this:
LUA:
    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

With this:

LUA:
    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ÇÃO znote_accounts definir pontos = pontos - " .. valor .. " ONDE id = " .. ajuda)
db.query("ATUALIZAÇÃO znote_accounts definir pontos = pontos + " .. valor .. " ONDE id = " .. accountId)

db.asyncQuery("INSERIR EM shop_history VALORES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amount) .. ", 0, 1, " .. db.escapeString(receiver) .. ")")
db.asyncQuery("INSERIR EM shop_history VALORES (NULL, '" .. accountId .. "', '" .. GUID .. "', AGORA(), " .. escapeTitle .. ", " .. db.escapeString(valor) .. ", 0, 1, " .. db.escapeString(player:getName()) .. ")")
fim

se amountSecond > 0 então
db.query("ATUALIZAÇÃO znote_accounts definir points_second = points_second - " .. amountSecond .. " ONDE id = " .. aid)
db.query("ATUALIZAÇÃO znote_accounts definir points_second = points_second + " .. amountSecond .. " ONDE id = " .. accountId)

db.asyncQuery("INSERIR EM shop_history VALORES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amountSecond) .. ", 1, 1, " .. db.escapeString(receptor) .. ")")
db.asyncQuery("INSERIR EM shop_history VALORES (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ÇÃO znote_accounts definir pontos = pontos - " .. valor .. " ONDE id = " .. ajuda)
db.query("ATUALIZAÇÃO znote_accounts definir pontos = pontos + " .. valor .. " ONDE id = " .. accountId)

se pointsCache[aid] então
pointsCache[aid].points = pointsCache[aid].points - quantidade
pointsCache[aid].time = os.time()
fim

db.asyncQuery("INSERIR EM shop_history VALORES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amount) .. ", 0, 1, " .. db.escapeString(receiver) .. ")")
db.asyncQuery("INSERIR EM shop_history VALORES (NULL, '" .. accountId .. "', '" .. GUID .. "', AGORA(), " .. escapeTitle .. ", " .. db.escapeString(valor) .. ", 0, 1, " .. db.escapeString(player:getName()) .. ")")
fim

se amountSecond > 0 então
db.query("ATUALIZAÇÃO znote_accounts definir points_second = points_second - " .. amountSecond .. " ONDE id = " .. aid)
db.query("ATUALIZAÇÃO znote_accounts definir points_second = points_second + " .. amountSecond .. " ONDE id = " .. accountId)

se secondPointsCache[aid] então
secondPointsCache[aid].points = secondPointsCache[aid].points - quantidadeSegundo
secondPointsCache[aid].time = os.time()
fim

db.asyncQuery("INSERIR EM shop_history VALORES (NULL, '" .. aid .. "', '" .. player:getGuid() .. "', NOW(), " .. escapeTitle .. ", " .. db.escapeString(-amountSecond) .. ", 1, 1, " .. db.escapeString(receptor) .. ")")
db.asyncQuery("INSERIR EM shop_history VALORES (NULL, '" .. accountId .. "', '" .. GUID .. "', AGORA(), " .. escapeTitle .. ", " .. db.escapeString(amountSecond) .. ", 1, 1, " .. db.escapeString(player:getName()) .. ")")
fim[/código]

This shop is very good, and the correction worked perfectly, after transferring the points are removed automatically, thank you very much for your attention.
 
Back
Top