재미삼아 스팀몬스터 봇 만들기 2 by realmankwon

View this thread on steempeak.com
· @realmankwon · (edited)
$16.47
재미삼아 스팀몬스터 봇 만들기 2
안녕하세요 @realmankwon입니다.

지금 이걸할 때가 아닌데 아닌데 하면서도 한번 손을 대니...
손이 가요 손이 가.... 상태가 되었습니다.

스몬에 대해서 잘 알지 못하다 보니 처음 시작이 아주아주 더디고 어렵습니다.
그래도 어제 일단 api를 통해서 게임에 진입을 했고 카드를 제출하는데까지는 성공을 했습니다.
하지만 필요한 정보를 가지고 유의미한 게임을 진행하려고 하니 관련 정보들을 쉽게 가지고 올 수 있도록 api 작성이 필요했습니다.

그래서 오늘 작업을 해서 다음과 같이 기본적인 api를 작성하였습니다.

    async function smonCommon(path
    async function getMyCards(account)
    async function getCardInfoById(id) 
    async function getCardAll()
    async function getCardStatsAll()
    async function getCardHistory(id)
    async function getPurchase(id)
    async function getAccountDetail (account)
    async function getBattleHistory(account) 
    async function getCurrentMyQuest(account)
    async function pickSummoner(account)

저는 일단 일퀘를 목표로 봇을 만들고 있습니다.
그래서 봇의 첫 시작은 현재 제가 하고 있는 퀘스트를 알아내고 summoner의 color가 어떤 것인지 찾는 것을 최우선으로 하였습니다.
현재 일퀘의 목표 color가 정해지면 동일한 summoner 카드를 찾으면 됩니다.

문제는 현재 api에서는 스타터팩 카드가 조회되지 않는다는 것입니다.
제가 가진 카드는 스타터팩이 대부분이고 11장이 실제 소유한 카드였습니다.
그렇다 보니 일퀘의 color를 알아내어 내가 가진 카드를 조회했을때 조회가 되지 않아서 현상태에서는 summoner 카드를 선택할 수가 없었습니다.

그래서 다음과 같이 제가 가진 스타터팩을 직접 작성하였습니다.

    {
    "Fire" : {
        "id" :"starter-5-LPIHU",
        "type" : "Summoner",
        "name" : "Malric Inferno",
        "color" : "Red"
    },
    "Water" : {
        "id" :"starter-16-esWzi",
        "type" : "Summoner",
        "name" : "Alric Stormbringer",
        "color" : "Blue"
    },
    "Earth" : {
        "id" :"starter-27-6KVbm",
        "type" : "Summoner",
        "name" : "Lyanna Natura",
        "color" : "Green"
    },
    "Life" : {
        "id" :"starter-38-rjqJ6",
        "type" : "Summoner",
        "name" : "Tyrus Paladium",
        "color" : "White"
    },
    "Death" : {
        "id" :"starter-49-hqb3S",
        "type" : "Summoner",
        "name" : "Zintar Mortalis",
        "color" : "Black"
    }
    }

steemd.com 에서 스몬을 한 내역을 보면 게임마다 제출한 카드의 id를 즉시 알 수 있기 때문에 그 방법으로 카드의 정보를 수집했습니다.
이 후 pickSummoner 함수를 통해서 현재 퀘스트의 color와 동일한 summoner를 찾는 것을 완료하였습니다.

하지만 그 이후에 카드 속성에 따라서 팀을 구성해야 하는데 여기서도 스타터팩이 검색이 되지 않기 때문에 난관에 부딪히고 말았습니다.
카드를 사야하는지 진지하게 고민이 되는군요.
역시나 잘 모르는 것에 대해서 개발하는 것이 쉬운 일이 아닌 듯 합니다.
카드를 어떻게 찾을지에 대해서 좀 더 궁리를 해야할 듯 합니다.

불금인데 다들 즐거운 시간 보내세요 ^^
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 80 others
properties (23)
post_id82,336,166
authorrealmankwon
permlink3kuxeb-2
categorysct
json_metadata{"tags":["sct","sct-kr","sct-freeboard","union","palnet","steemleo","zzan","liv","busy","spt"],"users":["realmankwon"],"app":"steemcoinpan\/0.1","format":"markdown","canonical_url":"https:\/\/www.steemcoinpan.com\/@realmankwon\/3kuxeb-2"}
created2019-12-06 14:50:00
last_update2019-12-07 14:49:45
depth0
children6
net_rshares59,840,634,894,468
last_payout2019-12-13 14:50:00
cashout_time1969-12-31 23:59:59
total_payout_value9.158 SBD
curator_payout_value7.310 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2,184
author_reputation3,146,138,068,696,221
root_title"재미삼아 스팀몬스터 봇 만들기 2"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (144)
@lucky2 ·
lucky2님이 realmankwon님의 이 포스팅에 따봉(7 SCT)을 하였습니다.
👍  
properties (23)
post_id82,338,507
authorlucky2
permlinkthumbsup-comment-realmankwon-3kuxeb-2
categorysct
json_metadata{"app":"steemcoinpan\/0.1","format":"markdown","canonical_url":"https:\/\/www.steemcoinpan.com\/@lucky2\/thumbsup-comment-realmankwon-3kuxeb-2"}
created2019-12-06 16:09:00
last_update2019-12-06 16:09:00
depth1
children1
net_rshares1,169,553,332
last_payout2019-12-13 16:09:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length47
author_reputation1,288,249,551,693,132
root_title"재미삼아 스팀몬스터 봇 만들기 2"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@realmankwon ·
오오 감사합니다~^^
properties (22)
post_id82,346,592
authorrealmankwon
permlinkq244la
categorysct
json_metadata{"tags":["sct"],"app":"steemcoinpan\/0.1","canonical_url":"https:\/\/www.steemcoinpan.com\/@realmankwon\/q244la"}
created2019-12-06 22:46:24
last_update2019-12-06 22:46:24
depth2
children0
net_rshares0
last_payout2019-12-13 22:46:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length11
author_reputation3,146,138,068,696,221
root_title"재미삼아 스팀몬스터 봇 만들기 2"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@tradingideas ·
스타트팩에 나오는 카드는 게임 히스토리에 나오는 uid사용하면 됩니다. 간단하게 팀 별로 모든 카드 사용한 후 history에서 팀 내역 확인하면 됩니다. 경험상 결국 지르게되어 있으니 미리 지르시는게 좋을 듯 합니다.

Posted using [Partiko Android](https://partiko.app/referral/tradingideas)
properties (22)
post_id82,338,716
authortradingideas
permlinktradingideas-re-realmankwon-3kuxeb-2-20191206t161825976z
categorysct
json_metadata{"app":"partiko","client":"android"}
created2019-12-06 16:18:27
last_update2019-12-06 16:18:27
depth1
children3
net_rshares0
last_payout2019-12-13 16:18:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length197
author_reputation3,154,197,541,442,728
root_title"재미삼아 스팀몬스터 봇 만들기 2"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@realmankwon ·
저도 그 방법을 생각했는데 왠지 귀찮은...ㅜㅜ
미리 지르는게 낫겠죠?^^
곧 질러야겠습니다 ㅋㅋ
감사합니다!!!
properties (22)
post_id82,346,613
authorrealmankwon
permlinkq244nb
categorysct
json_metadata{"tags":["sct"],"app":"steemcoinpan\/0.1","canonical_url":"https:\/\/www.steemcoinpan.com\/@realmankwon\/q244nb"}
created2019-12-06 22:47:36
last_update2019-12-06 22:47:36
depth2
children2
net_rshares0
last_payout2019-12-13 22:47:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length63
author_reputation3,146,138,068,696,221
root_title"재미삼아 스팀몬스터 봇 만들기 2"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@tradingideas ·
투자한만큼 수익이 나는 선이 있는 것 같습니다. 모든 카드를 골고루 사는 것 보다 특정 splinter 위주로 레벨을 올리는 전략이 좋은 것 같고요. 그리고 중립카드가가 싼 경우가 많으니 중립 위주로 레벨업하는 것이 투자 대비 효율이 좋은 것 같습니다. Welcome to splinter world!!
properties (22)
post_id82,350,402
authortradingideas
permlinkq24g5t
categorysct
json_metadata{"app":"steemit\/0.1"}
created2019-12-07 02:56:18
last_update2019-12-07 02:56:18
depth3
children1
net_rshares0
last_payout2019-12-14 02:56:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length169
author_reputation3,154,197,541,442,728
root_title"재미삼아 스팀몬스터 봇 만들기 2"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000