디시인사이드 갤러리

갤러리 이슈박스, 최근방문 갤러리

갤러리 본문 영역

밑에 로컬도장 안 된다는 거 이거 보셈

루시드Lucid갤로그로 이동합니다. 2022.05.09 14:55:09
조회 59 추천 0 댓글 5

javascript: (

    /* ver.1911.1

    https://gall.dcinside.com/m/mobage/4640

    */

    function () {

        var safety = 30;

        var deal = 3000

        var local = {record: 0, use:2}

        var greeting = { use:0, msg:'ありがとうございました!' };

        var energy = [0]

        var home = "http://sp.pf.mbga.jp/12008305/?guid=ON&url=http://mobamas.net/idolmaster/"

        var main = home + "battles/";

        function find(s) { return document.querySelector(s); }

        function text(s, e, x) { return (e ? find(s).textContent.split(e)[x] : find(s).textContent) || ''}

        function number(s, e, x) { return ((e ? text(s).split(e)[x] : text(s)) || '0').replace(/[^0-9]/g, '') * 1 }

        function value(s) { return find(s) ? find(s).value : 0}

        const send = (type, url, request) => {

            const option = request || {}

            const form = new FormData()

            const xhr = new XMLHttpRequest()

            for (param in option.data) { form.append(param, option.data[param]) }

            xhr.open(type, url, option.async != undefined ? option.async : true)

            option.onprogress && (xhr.onprogress = (res) => { option.onprogress(res) })

            option.onload && (xhr.onload = (res) => { option.onload(res.target) })

            xhr.send(form)

            return xhr

        }

        function reload(target, action) {

            $('#top').load(main + target + " h1#JtextLimit, section.bg_gray_s.m-Top5.m-Btm10.m-Top8, form[action *= battle_processing]:eq(0), [value = 回復する], a[href *= 'profile'], table:nth-child(1), table:nth-child(4), form[action *= use_item]:eq(0)", function (response) {

                action && action()

            });

        }

        function index() {

            if (local.record || local.use) {

                var last = localStorage.getItem('vove.dojo.last') || '0000000000'

                var date = new Date()

                var now = [date.getFullYear(), date.getMonth() + 1, date.getDate(), date.getHours()];

                for (i in now) {

                    if (now[i] < 10) {

                        now[i] = "0" + now[i];

                    }

                    now[i] += ''

                }

                var now = now[0] + now[1] + now[2] + now[3]

                var nowdate = 1 * now.slice(0, 8),

                    nowhours = 1 * now.slice(8),

                    lastdate = 1 * last.slice(0, 8),

                    lasthours = 1 * last.slice(8)

                if ((nowdate > lastdate && nowhours >= 5) || (nowdate == lastdate && nowhours >= 5 && lasthours < 5)) {

                    console.log('reset')

                    if (local.use == 2) {

                        send("GET", "https://imcg.pink-check.school/api/v1/dojo?minLevel=300", {

                            async: false,

                            onload: (res) => {

                                const api = JSON.parse(res.response)

                                api.forEach((apiDojo) => {

                                    let found = DJ.some((localDojo) => {

                                        if (localDojo.id * 1 == apiDojo.mobageId * 1) {

                                            localDojo.lv = apiDojo.level

                                            localDojo.title = apiDojo.unitName

                                            return true

                                        }

                                    })

                                    if (!found) {

                                        DJ.push({ enable: 1, failed: 0, id: apiDojo.mobageId, lv: apiDojo.level, title: apiDojo.unitName })

                                    }

                                })

                                console.log(DJ)

                            }

                        })


                    }

                    for (var i = 0; i < DJ.length; i++) {

                        if (!DJ[i].id) {

                            DJ.splice(i, 1)

                        }

                        for (var j = i + 1; j < DJ.length; j++) {

                            if (DJ[i].id === DJ[j].id) {

                                DJ[i].failed > DJ[j].failed ? DJ.splice(j, 1) : DJ.splice(i, 1)

                            }

                        }

                    }

                    for (i = 0; i < DJ.length; i++) {

                        DJ[i].enable = 1

                    }

                    DJ.sort((a, b) => { return b.enable - a.enable || b.lv - a.lv || a.failed - b.failed });

                    localStorage.setItem('vove.dojo', JSON.stringify(DJ))

                }

                localStorage.setItem('vove.dojo.last', now)

            }

            var index = - 1

            for (i = 0; i < DJ.length; i++) {

                if (DJ[i].id == id) {

                    var index = i

                    break

                }

            }

            return index

        }

        function next(index, failed) {

            document.title = ">>>>"

            if (failed || local.record == 2) {

                if (index == - 1) {

                    DJ.push({ enable: 0, lv: level, id: id, failed: failed, title: title })

                    localStorage.setItem('vove.dojo', JSON.stringify(DJ))

                    var index = DJ.length - 1

                }

                if (index + 1) {

                    if (DJ[index].failed < failed) {

                        DJ[index].failed = failed

                    }

                    DJ[index].lv = level

                    DJ[index].title = title

                }

            }

            if (index + 1) {

                DJ[index].enable = 0

            }

            if (local.use) {

                DJ.sort((a, b) => { return b.enable - a.enable || b.lv - a.lv || a.failed - b.failed });

                localStorage.setItem('vove.dojo', JSON.stringify(DJ))

                for (i = 0; i < DJ.length; i++) {

                    if (DJ[i].enable && DJ[i].failed < deal) {

                        $('<input/>', { value: '送信中' }).appendTo('#top');

                        reload('battle_check/' + DJ[i].id, function () { document.title = "Ready" })

                        return

                    }

                }

                alert('모든 로컬 도장을 사용했습니다.')

            }

            window.close()

        }

        if (document.title == ">>>>" || find("[value = 送信中]") || document.readyState != 'complete') {

            return

        }

        if (find("#dojos")) {

            find("#dojos > div:nth-child(1) > a").click();

            document.title = ">>>>";

            setTimeout(() => { document.title = "Ready" }, 200);

        } else if (find("#dojoList")) {

            document.title = ">>>>";

            setTimeout(() => { document.title = "Ready" }, 200);

            document.querySelectorAll('#dojoList > tbody')[1].querySelector('a').click()

            document.querySelectorAll('#dojoList > tbody')[1].remove()

        } else if (find('div[onclick ^= navigateToDojo]')) {

            document.title = ">>>>";

            setTimeout(() => { document.title = "Ready" }, 200);

            find('div[onclick ^= navigateToDojo]').click();

        }else if (find("h1#JtextLimit")) {

            var DJ = JSON.parse(localStorage.getItem('vove.dojo') || '[]')

            if (find("a[href *= 'profile']")) {

                var id = decodeURIComponent(find("a[href *= 'profile']").href).split(/[/?]/)[11]

                find('#mbga-pf-footer').innerText = id

                var myLevel = number("td[align='left']", '\n', 2)

                var level = number("td[align='right']", '\n', 2)

                var title = text("td[align='right']", '\n', 1)

            }

            if (find("[value = LIVEバトル開始]")) {

                if (safety) {

                    if (value("[name = my_param_attack]") * 1 - number(".t-Cnt > div > span.red_mild") > safety) {

                        alert("[Safety] 사용 코스트가 " + safety + "를 초과했습니다.");

                        return

                    }

                }

                var gap = level / myLevel

                if (first = !(document.title * 1)) {

                    var index = index()

                    if (gap < 0.7 || /休業/.test(title) || /休止/.test(title) || ((index + 1) && (DJ[index].failed > deal))) {

                        next(index, 0)

                        return

                    }

                    document.title = id

                }

                find("[value = LIVEバトル開始]").value = '送信中';

                let failed = 0

                send('POST', main + "battle_processing", {

                    async: first && local.record ? false : true,

                    data: {

                        'enemy_id': value("[name = 'enemy_id']"),

                        'csrf_test_name': value("[name = 'csrf_test_name']")

                    },

                    onload: () => {

                        if (first && local.record) {

                            if (/start_lose/.test(send('GET', main + "win_or_lose?enemy_id=" + id, { async: false }).response) ? 1 : 0) {

                                document.title == "패배한 도장을 기록합니다."

                                failed = send('GET', main + "flash?enemy_id=" + id, { async: false }).response.split('self')[2].replace(/[^0-9]/g, "") * 1

                                next(index, failed)

                                throw new Error('this is not dojo. failed deal: ' + failed)

                                return

                            }

                        }

                    }

                })

                failed || reload("battle_check/" + id);

                return

            } else if (find("[value = 回復する]")) {

                find("[value = 回復する]").value = '送信中';

                for (i of energy) {

                    if (csrf = $(send('GET', home + 'item/check/' + i, { async: false }).response).find("[name = csrf_test_name]").val()) {

                        send('POST', home + 'item/use_item', {

                            async: false,

                            data: {

                                'item_id': i,

                                'csrf_test_name': csrf

                            },

                            onload: () => {

                                setTimeout(() => { reload('battle_check/' + find('#mbga-pf-footer').innerText) }, 100)

                            }

                        })

                        return

                    }

                }

                alert('공격 코스트 회복 아이템이 없어 보입니다.')

            }

            if ((document.title * 1) && greeting.use) {

                document.title = 'Now greeting...';

                find("#top").innerText = '';

                send('POST', home + "cheer/send_check", {

                    async: false,

                    data: {

                        'to_viewer_id': id,

                        'message': greeting.msg

                    }

                })

            }

            next(index(), 0)

            return

        }

    }

)();



나도 같은 문제 있었음

결국 어디가 문제였는지는 모르겠는데

암튼 원래 쓰던 스크립트로 쓰니까 해결됐었음


도장 스크립트에 복붙하셈

추천 비추천

0

고정닉 0

0

댓글 영역

전체 댓글 0
등록순정렬 기준선택
본문 보기

하단 갤러리 리스트 영역

왼쪽 컨텐츠 영역

갤러리 리스트 영역

갤러리 리스트
번호 제목 글쓴이 작성일 조회 추천
설문 비난 여론에도 뻔뻔하게 잘 살 것 같은 스타는? 운영자 24/06/03 - -
공지 아이돌마스터 게임 공략, 팁 및 정보 모음글 [94] 빅공지맨갤로그로 이동합니다. 21.08.31 57280 10
공지 아이돌마스터 갤러리 이용 안내 [89] 운영자 21.08.31 28026 27
5990737 학마 망했으면 ㄹㅇ @는 끝이었겠네 ㅇㅇ(124.198) 02:43 0 0
5990736 내일은 퇴근하고 이 두 짤 합체시켜야지 K마에다갤로그로 이동합니다. 02:42 4 0
5990735 몸무게재는 테마리 [1] 야모갤로그로 이동합니다. 02:41 11 0
5990733 개 씨발내 S각이 !!!!!!!!!!!!!!!!!!!!!!! 야나미갤로그로 이동합니다. 02:41 7 0
5990732 우우 잉센이 힘들다 oo갤로그로 이동합니다. 02:40 5 0
5990731 아 보급 5회 채워야되는데 자꾸 오데가케 가네 ㅁㄴㅇㄹㅎ갤로그로 이동합니다. 02:39 7 0
5990730 센징징 토벌 완료 도촌묘월갤로그로 이동합니다. 02:39 8 0
5990729 아오 우메야 시발 [4] ㅁㄴㅇㄹㅎ갤로그로 이동합니다. 02:38 26 0
5990728 와 끝날때까지 확성기 단 한장도 안나오는 판이 있네 소계갤로그로 이동합니다. 02:38 9 0
5990727 🔴 요즘 꽁떡하기 개쉬움 .jpg ㅇㅇ(59.13) 02:37 4 0
5990726 지금 그룹2등인놈 어떻게 저 라인업으로 트럭 안치였지 [4] Perusan갤로그로 이동합니다. 02:36 25 0
5990725 호인상 메모리좆창나서 렌탈없인 못하겠네 [2] 눈떴어갤로그로 이동합니다. 02:36 12 0
5990724 사키 스알 a+ 쉽지 않군 [2] 두부참치갤로그로 이동합니다. 02:35 17 0
5990723 아 개시 시발 Perusan갤로그로 이동합니다. 02:33 12 0
5990722 🔴 섹톡 레전드 ,jpg ㅇㅇ(59.13) 02:33 4 0
5990721 🔴 섹톡 레전드.jpg ㅇㅇ(220.124) 02:32 4 0
5990720 허각p이새끼 왤케 악귀임 [10] ㅎㅈ갤로그로 이동합니다. 02:32 56 0
5990719 망딩이가슴골에코박고싶다 [4] 메로나갤로그로 이동합니다. 02:31 14 0
5990717 님들 쿨태리 B덱에 슬액위치는 상관없죠 ? waffle갤로그로 이동합니다. 02:31 6 0
5990716 아니 진짜 경험치 ㅈㄴ안오르네 [1] 마마유갤로그로 이동합니다. 02:30 19 0
5990714 그러고보니우메가사키보다작앗던시절도잇엇겟지 ♣♧♣갤로그로 이동합니다. 02:29 12 0
5990713 치나 프니프니 하면서 잠들어야지 digitalcloud갤로그로 이동합니다. 02:28 25 0
5990710 센스 하는데 대북확성기 안뜨면 진짜 개답답하네 소계갤로그로 이동합니다. 02:27 19 0
5990709 님들 큰일났음!!!! [2] 후카갤로그로 이동합니다. 02:26 20 0
5990708 담당함대 수동 타워 등반은 즐거워 [2] 귤아리스갤로그로 이동합니다. 02:26 13 0
5990707 릴쟈랑 떡치구십네 야모갤로그로 이동합니다. 02:26 13 0
5990706 치나 세나 비데마냥 후빨하는거 보기 좀 그렇네 [1] 신립갤로그로 이동합니다. 02:25 37 0
5990705 수학은 진짜 재능인가... 김도연24갤로그로 이동합니다. 02:25 14 0
5990702 미호 브라이드 볼수있을까 [1] 코히나타갤로그로 이동합니다. 02:24 15 1
5990701 s24+가야겟군 ♣♧♣갤로그로 이동합니다. 02:24 16 0
5990700 아 자야되는데 왤케 잠이 안오지 [2] 마호갤로그로 이동합니다. 02:24 12 0
5990699 와오 이 그린 작가 한국인이길래 트윗 좀 봤는데 [17] ㅎㅈ갤로그로 이동합니다. 02:24 95 0
5990698 개훔괄 시발 ㅁㄴㅇㄹㅎ갤로그로 이동합니다. 02:24 14 0
5990697 코토네 30 어치브 언제 채우지 ㅁㄴㅇㄹㅎ갤로그로 이동합니다. 02:22 7 0
5990693 ㅋㅋㅋㅋ 딜카드 한장도 안집은거봐 Ortholinear갤로그로 이동합니다. 02:19 24 0
5990692 아니 사키야 거기가 아니라니까 [7] 야나미갤로그로 이동합니다. 02:18 61 0
5990691 어우 세상에 이 작가 하나미 자매 뭐야 [4] ㅎㅈ갤로그로 이동합니다. 02:18 58 0
5990689 세상에 클릭한번으로 레슨을클리어하는 사기캐가잇다고 ??? [2] 야나미갤로그로 이동합니다. 02:17 39 1
5990688 이거 핫산은 없었나 [3] 신립갤로그로 이동합니다. 02:17 54 0
5990687 바이오가 단 하루 남았어 맑텗핡궭갤로그로 이동합니다. 02:16 11 0
5990685 아니 이거 신데 큐트 로고 아닌가 [1] 129_283갤로그로 이동합니다. 02:16 27 0
5990684 하 시발 토요일 경력직 채용 시험 있어서 잠깐 책봤는데 ㅎㅈ갤로그로 이동합니다. 02:16 22 0
5990683 닭집 4컷은 재미없는데 1컷은 재밌는듯 [1] 신립갤로그로 이동합니다. 02:15 32 0
5990682 아오 한턴더있는데 이걸 쓸수도 없고 Ortholinear갤로그로 이동합니다. 02:15 47 0
5990681 지갑열엇다가눈물남 [2] ♣♧♣갤로그로 이동합니다. 02:14 38 0
5990680 젖꼭지 문질문질 야모갤로그로 이동합니다. 02:13 21 0
5990679 센세~ 신립갤로그로 이동합니다. 02:12 48 0
5990678 세나이년전구를쓰레기로바꿔버리네 [1] 메로나갤로그로 이동합니다. 02:12 27 0
갤러리 내부 검색
제목+내용게시물 정렬 옵션

오른쪽 컨텐츠 영역

실시간 베스트

1/8

뉴스

디시미디어

디시이슈

1/2