Jump to content

Documentation Script


Cryptochri

Recommended Posts

No there's not any decent documentation for the game engine.

Call game engine object to console.log -> it will show you all available getters

engine.on('GAME_ENDED', function (data) {
        console.log(data);
});

 

engine.on('GAME_BET', function(player) {

        console.log(player);

});

Hopefully you get the idea

Link to comment
Share on other sites

one thing that may actually be helpful as well is to look at the game api in the none worker side of things.  So just hope the dev console on one of the games like limbo or hashdice and then for hashdice the object your looking for is hdg and limbo it is lbg.  It contains all sort of useful information but it also has the function calls that pass the objects into the game/engine object since they are the same object.  You can also discover other events that are normally used in the scripts because of the lack of documentation. etc..

 

Link to comment
Share on other sites

ok and an even better way to get documentation is opening the dev console and using the command dirxml(objecttolookat) so like dirxml(hdg) for hash dice for instance

the object that is pass to your script as game or engine is in this case hdg so anything you see on that object you can access from the script

 

Link to comment
Share on other sites

On 2/16/2022 at 2:13 PM, NubsScripts said:

No there's not any decent documentation for the game engine.

Call game engine object to console.log -> it will show you all available getters

engine.on('GAME_ENDED', function (data) {
        console.log(data);
});

 

engine.on('GAME_BET', function(player) {

        console.log(player);

});

Hopefully you get the idea

This is the old API?

Link to comment
Share on other sites

well its the old eventing system, you can still technically handle the events that way, but more reliable way is using the call back delegates that javascript itself recommends for async calls using .then method of handling promises.

Link to comment
Share on other sites

7 hours ago, Skele said:

well its the old eventing system, you can still technically handle the events that way, but more reliable way is using the call back delegates that javascript itself recommends for async calls using .then method of handling promises.

Ok, the engine.on('GAME_ENDED and started are still working?

 

only engine.bet change to game.bet(nextBet, config.payout.value).then(function (payout) {?

Link to comment
Share on other sites

for some games the game_ended event is still working, there was at least one of them where it wasn't being emtted but i heard they fixed it.  I have never used those event personally but i can see where they are emitted when just reading the javascript which is minimized but you can't minimize string literals so if you search for that string like from the sources tab in the dev console it should pull up a number of p[laces and then you can look to see if they are still firing that event for that game.

Link to comment
Share on other sites

16 hours ago, Skele said:

for some games the game_ended event is still working, there was at least one of them where it wasn't being emtted but i heard they fixed it.  I have never used those event personally but i can see where they are emitted when just reading the javascript which is minimized but you can't minimize string literals so if you search for that string like from the sources tab in the dev console it should pull up a number of p[laces and then you can look to see if they are still firing that event for that game.

With functions works now at Crash?

engine.on('GAME_STARTING'

engine.on('GAME_BET'  --> was replaced by game.bet(CurrentBet, CurrentMultiplier).then(function(payout) {

engine.on('GAME_ENDED'

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...