[Release] game_store module

metabob

New Member
Joined
Apr 15, 2019
Messages
2
Reaction score
4
Video Demonstration
https://wofofonod.tumblr.com%2Fpost%2F184207224312
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:

EduardoDantas

Intermediate OT User
Joined
Sep 25, 2013
Messages
95
Reaction score
36
Location
Brazil
I have a problem.
Message: "Unable to load 'game_interface' module"
 
Last edited:

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,419
Reaction score
203
Location
Chile
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:

StreamSide

Joseluis Gonzalez
Support Team
Joined
Aug 31, 2007
Messages
3,266
Reaction score
774
Location
Arica - Chile
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 :)
 

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,419
Reaction score
203
Location
Chile

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,419
Reaction score
203
Location
Chile
Btw what diferencies these game modules un comparission with the ones released by yamaken?
 
Top