// ==UserScript== // @name 怪物归来 // @namespace http://tampermonkey.net/ // @version 3.1 // @description The monster come back,you'll game over! // @author Jack // @match http://*.gwgl.xh456.com/index.aspx /* @require https://greasyfork.org/scripts/367762-jquery-timer-js/code/jquerytimerjs.js?version=596413 */ // @require https://greasyfork.org/scripts/3465-jquery-timers/code/jQuerytimers.js?version=10415 // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; var mpid = 27; //30级 var lasthxs = 0; // 移除daoguang $('#div_boss_fight_aciton_container').remove() $('#div_role_fight_aciton_container').remove(); //list var html = ' show   签到   幻境扫荡'; //开始   $('.div_img_chongzhi').parent().append(html) $('.div_img_chongzhi').parent().parent().parent().css('width','250px'); // $(".start").click(function(){ var gid = $('#mp').val(); // stopit(); $('body').oneTime('5ds',function(){ qiangzhi_tuichu_monster_fight_check(); console.log("----------停止战斗----------"); }); $('body').oneTime('10ds',function(){ return_monster_fight_check(); console.log('退出fight'); }); $('body').oneTime('20ds',function(){ mpid = gid; //$('.div_img_chongzhi').click(); create_monster_fight_check(mpid);///77 console.log('开始挂机'); $('body').stopTime('B'); $('body').oneTime('8ds',function(){show_div_map_npc_check('剑灵')}); $('body').oneTime('1s',function(){checkbag(mpid);}); $('body').everyTime('60s','B',function(){checkbag(mpid);}); }); }) var qa =' '; $('#div_daguai_lianji .div_main_title_flow2').parent().append(qa); $('#qdao').click(function(){ //qiandao //获取当前挂机图 var mp = $('#span_role_boss_nick_name_monster_fight').text(); console.log(mp); var lv = mp.split('.'); mp = lv[0].split('('); lv[1] = lv[1].replace('\)',''); var id = 4; if(lv[1]<111){ id = 3;} stopit(); $('body').oneTime('10ds',function(){wancheng_qiandao_check();console.log('已签到');});//qiandao $('body').oneTime('12ds',function(){biwudahui_baoming_check();console.log('武林大会已报名');});//guozhan $('body').oneTime('15ds',function(){ show_div_map_npc_check('炼造坊') lanzhuang_liangang_equipment_all_check(); $('#div_lianzaofang').hide(); }); $('body').oneTime('18ds',function(){show_daguai_lianji_boss_list_container(id,'Map'+id);}); $('body').oneTime('30ds',function(){ $('#div_daguai_lianji_boss_list div').each(function(){ if($(this).html().indexOf(mp[0])>0){ $(this).find('img').click(); } }) }); }) $('#huanjing').click(function(){ var mp = $('#span_role_boss_nick_name_monster_fight').text(); show_div_map_npc_check('幻境冒险'); $('body').oneTime('5ds',function(){ var ii; $('#div_huanjing_maoxian_boss_list button').each(function(i,el){ if($(this).text() == '扫荡'){ ii = i; } }); $('#div_huanjing_maoxian_boss_list button').eq(ii).click() var cs = $('#span_huanjing_maoxian_cishu_vip').text()*1+100; $('#ipt_huanjing_saodang_cishu').val(cs); }) }) $('#showqa').click(function(){ $('#quick').show(); }) $('.dirct').click(function(){ mpid = $(this).attr('data'); create_monster_fight_check(mpid);///77 })//dirct /* if($('#span_role_player_shengming_monster_fight').is(":visible")){ $.getScript('http://jianfeile.com:91/Public/js/jquery.timer.js',function(){ ex.Timer.play(); }) } */ $('.div_img_chongzhi').removeAttr('onclick').html('挂机').click(function(){ $('body').oneTime('5ds',function(){ qiangzhi_tuichu_monster_fight_check(); }); $('body').oneTime('10ds',function(){ return_monster_fight_check(); }); $('body').oneTime('20ds',function(){ create_monster_fight_check(mpid);///77 console.log('开始挂机'); $('body').stopTime('B'); $('body').oneTime('1s',function(){checkbag(mpid);}); $('body').everyTime('60s','B',function(){checkbag(mpid);}); }); }) // check bag, if the bag is full then sell function checkbag(mpid){ $('body').oneTime('1ds',function(){ show_flow_renwu_shuxing_check(); $('#div_renwu_shuxing').hide(); }); $('body').oneTime('3ds',function(){ show_material_list_renwu_shuxing_check2(); }); $('body').oneTime('8ds',function(){ var hxs = $('#div_baoguo_list_flow_renwu_shuxing div').eq(0).text().trim(); var tar = $('#span_need_huanxianshi_jianling').text()*1; var s = hxs.replace(/[^0-9]/ig,""); var xs = lasthxs == 0 ? 0 : s - lasthxs ; tar = tar - s; lasthxs = s; console.log( hxs+ " ↑" +xs +' →'+tar); console.log("大约需要:"+parseInt(tar/xs)+' min'); }); $('body').oneTime('10ds',function(){ var t = $('#span_equipment_num_limit_system_state').text().split('/'); console.log("包裹: "+t[0]+'/'+t[1]); if(t[1]-t[0]<20){ stopit(); $('body').oneTime('15ds',function(){ ronglian_equipment_all_jianling_check(); console.log('兑换:'+t[0]); }); $('body').oneTime('20ds',function(){ create_monster_fight_check(mpid); }); // } }); var s = 0; $('body').stopTime('SS'); $('body').everyTime('1s','SS',function(){ s++; $('#Button1').html('查看 '+ s +'s'); }) } //stop fight function stopit(){ qiangzhi_tuichu_monster_fight_check(); $('body').oneTime('6ds',function(){ return_monster_fight_check(); console.log('stopme战斗'); }); } })();