• 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!

[Release] game_store module

metabob

Member
Joined
Apr 15, 2019
Messages
2
Reaction score
7
Video Demonstration

Note: errors regarding opcode 159 are not related to this module.

OTClient game_store module source
A pull request to the main repo is pending. Right now you can find this module with the corresponding client at:
How to test
Clone, compile and run these repositories:
Bonus: How to download store icons
If you want to download icons then open up Chrome and go to http://static.tibia.com Then:
  1. Open up console Ctrl+Shift+J and paste in the array with icon names available from this gist into your console and press Enter to execute.
  2. Execute the script given below (this will download all icons to your downloads folder):
    JavaScript:
    // tested on Chrome
    function get_download(url) {
      var xhr = new XMLHttpRequest()
      xhr.responseType = "blob";
          xhr.open("GET", url , true);
        xhr.onreadystatechange = function () {
          if(xhr.readyState === 4 && xhr.status === 200) {
            try {
              window.URL.createObjectURL(xhr.response)
              const a = document.createElement('a')
              a.href = url;
              a.download = name;
              a.click()
              window.URL.revokeObjectURL(url)
            } catch(e) {
              console.log('download failed: ' + name);
            }
          }
        };
        xhr.send();
    }
    
    items.forEach((icon, i) => {
      setTimeout(get_download.bind(this, "http://static.tibia.com/images/store/64/" + icon), i*200)
    })
  3. Copy icons into the directory /data/images/store/64/ of your OTClient.
Contributing
Pull requests of bug fixes, new features, improvements and issues at Github are welcome.

Note
Posts requesting help with implementing it on your own server are not welcome. All needed information that is required is already in the post.

This post is meant only for educational pruposes.
 
Last edited:
I have a problem.
Message: "Unable to load 'game_interface' module"
 
Last edited:
Would this work with tfs 0.4, otx2 por similar ?
Pd: you should make the PR i. Github.com/otland/otclient and not in github.com/edubart/otclient because its not being supported by the otland community no more
 
Last edited:
Would this work with tfs 0.4, otx2 por similar ?
Pd: you should make the PR i. Github.com/otland/otclient and not in github.com/edubart/otclient because its not being supported by the otland community no more
this is otclient, if you send the correct store packets then it should work ([WIP] Store System by brunominervino · Pull Request #2143 · otland/forgottenserver (https://github.com/otland/forgottenserver/pull/2143))
also if you add this, tibia clients wont work and because its 0.4 you might need some structural changes to this piece of code :)
 
Btw what diferencies these game modules un comparission with the ones released by yamaken?
 
has a bug (I do not know if it's in ot or otc) but when you buy something, for example I buy the premium time item of 180 days, then I buy the 30, I get 2x 180 days, the second purchase is counting in the amount the first
 
Hello @metabob , I want to adapt this for Tfs 1.3, can you enlighten me how does the game store module fetch the store products? I want to change that to check via database. Thanks!

@EduardoDantas

it is, i'm using

But it does not show any categories or products, right?

Did you fixed this part? Can you teach me?

Thanks.
 
Hey, nice project!
I integrated and compiled without errors, client showing store and coins balance working but it keep Fetching items and nothing appear, what it can be? In advance, thanks!
 
Back
Top