• Vote in May Mapping Competition to select a winner!
  • 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
Best answers
0
Reaction score
5
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

Well-Known Member
Joined
Sep 25, 2013
Messages
132
Best answers
4
Reaction score
62
Location
Brazil
I have a problem.
Message: "Unable to load 'game_interface' module"
 
Last edited:

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,611
Best answers
9
Reaction score
244
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,382
Best answers
37
Reaction score
889
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,611
Best answers
9
Reaction score
244
Location
Chile

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,611
Best answers
9
Reaction score
244
Location
Chile
Btw what diferencies these game modules un comparission with the ones released by yamaken?
 

marcoshps11

New Member
Joined
Jan 29, 2011
Messages
24
Best answers
0
Reaction score
0
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
 

vinivst

New Member
Joined
Mar 15, 2012
Messages
16
Best answers
0
Reaction score
0
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.
 
Top