Last active
August 29, 2015 14:05
-
-
Save roseforyou/ed79ba6419a9ee880e25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//中央球场列表 | |
$('.football_bg').removeClass('football_bg').css({ | |
width: '93px', | |
height: '106px', | |
position: 'absolute', | |
left: '14px', | |
top: '27px', | |
'font-size': '12px' | |
}).show(); | |
$('.football_bg2').removeClass('football_bg2').css({ | |
'width': '93px', | |
'height': '106px', | |
'position': 'absolute', | |
'left': '14px', | |
'top': '27px', | |
'font-size': '12px' | |
}).show(); | |
$('.football_bg1').removeClass('football_bg1').css({ | |
'width': '93px', | |
'height': '106px', | |
'position': 'absolute', | |
'left': '14px', | |
'top': '27px', | |
'font-size': '12px' | |
}).show(); | |
//$('body').append('<input id="js_europe" type="button" value="欧洲杯领奖 跳过比赛后点击" style="position: fixed;right: 100px;bottom: 160px;">'); | |
$('body').append('<button id="js_europe" type="button" style="position: fixed;right: 100px;bottom: 160px;">欧洲杯领奖<br>跳过比赛后点击</button>'); | |
var macthListId= '#fb_match_20'; | |
$('#js_europe').click(function(){ | |
//点击结束比赛后执行 | |
var st = 50; | |
if ($('#match_win').length===0) { | |
$('.macthclose').click();//关闭比赛窗口 | |
$(macthListId).click();//打开欧洲杯 | |
st = 500; | |
} | |
setTimeout(function(){ | |
if ($('.pai_b').length===0) { | |
return; | |
} | |
if ($('.pai_f').length>0) { | |
$('.match_win_btn').click();//点击领取 | |
} else{ | |
$('.pai_b').eq(Math.floor(Math.random()*5)).click(); | |
var closeTimer = setInterval(function(){ | |
if ($('.match_win_btn').is(':visible')) { | |
$('.match_win_btn').click();//点击领取 | |
} | |
clearInterval(closeTimer); | |
},400); | |
} | |
}, st); | |
}); | |
$('.footballbtn ul, #fb_match_yuanzheng, #fb_match_7').click(function(){ | |
var $ul = $(this); | |
macthListId = '#'+$ul.attr('id'); | |
$('#js_europe').html($ul.html()+'<br>跳过比赛后点击'); | |
}); | |
var css = | |
'<style>'+ | |
'.match_list_ul {'+ | |
'width: 54px;'+ | |
'}'+ | |
'.match_openbtn {'+ | |
'width: 45px;'+ | |
'}'+ | |
'.match_map_jinxing {'+ | |
'width: 19px;'+ | |
'}'+ | |
'.match_map_no_jinxing {'+ | |
'width: 19px;'+ | |
'}'+ | |
'.match_map_touxing {'+ | |
'left: 0'+ | |
'}'+ | |
'</style>'; | |
$('body').prepend(css); | |
$('body').append('<input id="js_match" type="button" value="葡萄牙" style="position: fixed;right: 100px;bottom: 210px;">'); | |
var macthId = '#match_openbtn_9'; | |
$('#js_match').click(function(){ | |
$(macthId).click(); | |
setTimeout(function(){ | |
$('.match_team_vs_btn').click() | |
},100); | |
}); | |
$('#index_main').on('click', '#match_select .match_list_ul .match_openbtn',function(){ | |
var $btn = $(this); | |
macthId = '#'+$btn.attr('id'); | |
$('#js_match').val($btn.html()); | |
}); | |
$('body').append('<input id="js_match2" type="button" value="联合会杯开始" style="position: fixed;right: 100px;bottom: 125px;">'); | |
$('#js_match2').on('click', function(){ | |
$('#asia_btn').click(); | |
setTimeout(function(){ | |
$('.asia_team_vs_btn ').click() | |
},400); | |
}); | |
$('body').append('<input id="js_match3" type="button" value="充 豆" style="position: fixed;right: 100px;bottom: 95px;">'); | |
$('#js_match3').on('click', function(){ | |
$.post('http://s18.bxsjb.g.1360.com/data/baghandler.ashx', {type:19,itno:16001}, function(d){if(d.indexOf('-')>-1){ alert('OK!')}}) | |
}); | |
/////////////// | |
siTime = 10000; | |
si = 0; | |
qiutan = function(){ | |
if (!$('#hire').is(':visible')) $('.footballbtn3').click(); | |
setTimeout(function(){ | |
//如果有球探豆 | |
if ($('.hire_qtxd').eq(0).hasClass('hire_qtxd1')) { | |
//如果没有球员位置 | |
// if ($('.plytime7').length) { | |
// $('.hire_player1').click(); | |
// setTimeout(function(){ | |
// $('#hire_this').find('.hire_btn2').click(); | |
// setTimeout(function(){ | |
// $('.msgbox .msgbox_btn').click(); | |
// },200); | |
// }, 200); | |
// } else { | |
setTimeout(function(){ | |
if ($('.hire_brtn3').hasClass('hire_offbtn')||$('.hire_brtn4').hasClass('hire_offbtn')) { | |
$('#hire .box_close').click(); | |
} else{ | |
$('.hire_brtn4').click(); | |
} | |
setTimeout(function(){ | |
siTime = (parseInt($('.hire_lasttime_info2 span').text().substr(0,2), 10)+1)*60000 || 60000; | |
clearInterval(si); | |
si = setInterval(find_he, siTime); | |
$('#hire .box_close').click(); | |
}, 200); | |
}, 200); | |
// } | |
} else { | |
clearInterval(si); | |
} | |
}, 1000); | |
}; | |
function find_he(){ | |
if ($('#hire_this').length) { | |
var tid = parseInt($('#hire_this').find('.box_content .hire_userinfo_tou_bg').attr('tid')); | |
if (tid==3||tid==2||tid==4) { | |
var dd = new Date(); | |
console.log($('#hire_this').find('.hire_userinfo_name').html() + ', '+ $('#hire_this').find('.hire_userinfo_9 span').html() +', 能力'+$('#hire_this').find('.hire_userinfo_power span').html() +' ,级别:'+ $('#hire_this').find('.hire_userinfo_tou_bg').attr('tid') +' '+ dd.getHours()+':'+dd.getMinutes()); | |
$('#hire_this').find('.hire_btn2').click(); | |
setTimeout(function(){ | |
$('.msgbox .msgbox_btn').click(); | |
},200); | |
} else{ | |
$('#hire_this').find('.hire_btn1').click(); | |
} | |
} | |
setTimeout(function(){ | |
qiutan(); | |
},500); | |
}; | |
//si = setInterval(find_he, siTime); | |
if (!parseInt($('.hire_lasttime_info2 span').text().substr(0,2)) ) { | |
find_he(); | |
} else{ | |
setTimeout(function(){ | |
siTime = (parseInt($('.hire_lasttime_info2 span').text().substr(0,2), 10)+1)*60000 || 60000; | |
clearInterval(si); | |
si = setInterval(find_he, siTime); | |
console.log('run OK!'); | |
}, 200); | |
} | |
/////////////////// | |
var match_url = 'http://s18.bxsjb.g.1360.com/data/challengehandler.ashx'; | |
function ajax(url, parm, fn){ | |
$.ajax(url, { | |
data: parm, | |
type: 'post', | |
beforeSend: function(xhr) { | |
xhr.setRequestHeader("ajax", true); | |
}, | |
success: fn | |
}); | |
}; | |
function test(){ | |
//开始比赛 | |
ajax(match_url, {StartMatch:61,matchlvl:1}, function(d1){ | |
var matchid = $.parseJSON(d1)[0].a1; | |
if (!matchid) return; | |
console.log(matchid); | |
//跳过比赛 | |
setTimeout(function(){ | |
ajax(match_url, {QuickEnd:1,MatchID:matchid}, function(d2){ | |
console.log(d2); | |
console.log('跳过比赛'); | |
//选择一张牌 | |
//返回值是 [{"ret":"-5"}]的时候, 可以重试!!!! | |
setTimeout(function(){ | |
ajax(match_url, {PickCard:1,CardIndex:Math.floor(5*Math.random())+1}, function(d3){ | |
console.log(d3); | |
//领取 | |
setTimeout(function(){ | |
ajax(match_url,{GetAward:1,IsDropPlayer:0}, function(){ | |
//判断是否还有翻牌 | |
setTimeout(function(){ | |
ajax(match_url, {ClubList:501}, function(d5){ | |
var pai = $.parseJSON(d5)[0].a8; | |
console.log(pai); | |
if (pai) { | |
//继续选择一张牌 | |
setTimeout(function(){ | |
ajax(match_url, {PickCard:1,CardIndex:Math.floor(5*Math.random())+1}, function(d6){ | |
console.log(d6); | |
//领取 | |
setTimeout(function(){ | |
console.log('OK~~'); | |
ajax(match_url,{GetAward:1,IsDropPlayer:0}, function(){ | |
test(); | |
}); | |
}, 1000); | |
}); | |
}, 3000); | |
}else{ | |
//go on | |
test(); | |
} | |
}); | |
},1000); | |
}); | |
}, 1000); | |
}); | |
}, 3000); | |
}); | |
}, 1000); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment