You are viewing a single comment's thread from:

RE: SteemMonsters: What are your favorite battle rules?? Which players most often won battles for given rules in the last season?

in #steemmonsters5 years ago (edited)

Hi. Sorry I didn't reply earlier :)
It's hard for me to give a full script to do all the job because basically I do it in two steps:
First, I query data from SteemMonsters API and save it in my local database

https://api.steemmonsters.io/transactions/history?limit=1000&types=sm_battle&from_block=35600000

From this API you can query 1000 battles at once, so you need to take care of from_block parameter. I start from the latest block, query 1000 battles, remember the lowest block number and in the next iteration start from this new block number (from_block parameter).

When all data are in the database you have to only iterate over all battles and count rulesets.

If it's double ruleset it is separated by | character. For example: Aim True|Broken Arrows.

Sort:  

I appreciate the detailed reply. You put a lot of work into this game. No wonder you are one of the best.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63548.34
ETH 2646.78
USDT 1.00
SBD 2.74