// ==UserScript== // @name Steam Auto Mass Craft Cards Badges in Bulk // @name:zh-CN Steam一键批量合卡合徽章 // @name:zh-TW Steam一鍵批量合卡合徽章 // @version 0.2 // @description It will automatically use up ALL your gamecard sets for crafting badges and you should use it at your own risk, Though you can control the which card sets and how many sets to craft by using it. // @description:zh-CN 这是一个自动合卡插件,可以指定徽章合成的数量和种类 // @description:zh-TW 這是一個自動合卡挿件,可以指定徽章合成的數量和種類 // @author QHS // @include *steamcommunity.com/*/badges* // @require https://code.jquery.com/jquery-3.2.1.min.js // @grant GM_addStyle // @supportURL https://greasyfork.org/zh-CN/scripts/36393 // @icon http://pan.hriq.org/steam.green.ico // @namespace https://greasyfork.org/users/155548 // @namespace https://steamcommunity.com/profiles/76561198132556503 // @downloadURL none // ==/UserScript== const timer_scan = 1000; //扫描卡组间隔 const timer_craft = 500; //合成卡牌间隔 (function() { 'use strict'; GM_addStyle('.profile_xp_block_right{display: block; width: 230px; border: 1px #aaa solid; border-radius: 4px; padding: 8px 0px; cursor: pointer;transition:.5s}.profile_xp_block_right:hover{color:#333;background:#aaa}.craft_list p{margin: 2px 10px;}.craft_list p input{width: 36px; height: 13px; background-color: #152f4a; border: 1px #fff solid; color: #fff; padding: 2px 0 0 10px; font-weight: bold;transition: .5s; background-repeat: no-repeat; background-position-x: -46px; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAPCAYAAACbSf2kAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAKUlEQVR42mOIOmPwfyhihlGHjzp81OGjDh91+KjDRx0+6vBRh486HI4BdWZJdZDgwMoAAAAASUVORK5CYII=)}.cannot_craft{-webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: grayscale(100%); filter: gray;cursor:not-allowed;}.sum_show{width: 882px;height: 95px;position: relative; top: -115px; z-index: 10000001; padding: 10px 0; background: #1d1d1d;}div.craft_list{padding:10px 0 95px 0;;}.craft_list.dischange input{border: 1px #827d7d solid; color: #827d7d;cursor:not-allowed;}p.do_not_craft{opacity:.5;}input.ready_to_craft.finished{background-color: #ff0909;}input.ready_to_craft.in_progress{border: 1px #ffffff solid!important; color: #ffffff!important;}#start img{padding-top: 30px;}'); var g_sessionID, g_appID; var lan = getCookie("Steam_Language"); var text = {}; if (lan == "schinese" || lan == "tchinese") { text.start = "批量合成徽章"; text.title = "批量合卡"; text.notice = '
这是一个自动合卡插件,可以指定徽章合成的数量和种类。请自行承担操作不当带来的风险
可在Greasy Fork反馈问题,也可以在我的资料页下方留言(ASF经常吞消息可能看不到私聊0.0)
我知道只有你们这些土豪才会需要这种插件,求神壕们包养qwq
可以随时关闭本标签页来停止插件的自动操作'; text.button1 = "开始统计你的可合成卡组"; text.button2 = "确认无误后开始合卡"; text.button2no = "不合卡的吗?"; text.calculating = "计算中(输入想要合成的次数,计算过程中可以关闭本弹出窗口)"; text.calculated = "请在每个徽章前输入想要合成的次数,并确认合成"; text.crafting = "合成中,合成过程中可以关闭本弹出窗口"; text.crafted = "合成完毕"; text.list1 = '←输入合成套数'; text.list2 = '可升'; text.list3 = '级 (当前'; text.list4 = '级) 游戏:'; } else { text.start = "Craft Badges in Bulk"; text.title = "Craft Badges in Bulk"; text.notice = 'It will automatically use up ALL your gamecard sets for crafting badges and you should use it at your own risk.
Greasy Fork or comment on Steam profile for feedback.
Click the bottom button to start after you understand fully and agree with the notice above.Close this WEBPAGE at any time you want to stop!'; text.button1 = "Start to calculate how many badges you can craft"; text.button2 = "Start Crafting!"; text.button2no = "No Cards for Crafting!"; text.calculating = "Calculating,you can close this pop-up window in the process of calculation"; text.calculated = "Enter the times you want to craft for the badges. Confirm and craft them by click the green button below"; text.crafting = "Crafting!,you can close this pop-up window in the process of crafting"; text.crafted = "Finished!"; text.list1 = 'sets to craft'; text.list2 = 'can craft'; text.list3 = 'more (Level'; text.list4 = 'now) GAME:'; } $('body').prepend(' '); $('.profile_xp_block_right').html(text.start); function craft() { $('.window_title').html(text.calculating); $('.craft_title').slideUp(); $('#start').html('" + text.list1 + " APPID:" + _appID + " " + text.list2 + " " + upgrade_sets + " " + text.list3 + " " + badge_level + " " + text.list4 + " " + gamename + "
"); sum_sets += upgrade_sets; sum_badges += 1; if (i == (total_number - 1)) { //total_number $('#start').html('' + sum_sets + ' sets(' + sum_badges + ' badges) to craft!
'); $('.craft_list').append("=========END=========
"); } }); }, i * timer_scan); }); } //craft(); function craft_do() { var queue = [], finished_count = {}, all_count = {}, sum_crafted = 0, sum_sets = 0; $('.ready_to_craft').attr("disabled", true); $('.craft_list').addClass("dischange"); $('.ready_to_craft').each(function() { if ($(this).val() > $(this).attr("max")) { $(this).val($(this).attr("max")); } if ($(this).val() > 0) { sum_sets += parseInt($(this).val()); } }); $('#start').html('