JavaScript自动刷票脚本,解放双手吧,脚本很简单,  技术宅拯救世界

技术宅官方网站: www.zhaisoft.com

var random1= Math.floor(Math.random()*2);
document.getElementsByName("q1")[random1].checked= true;
for(var i=2;i<=5;+i++){

var name= "q"+i;
var random= Math.floor(Math.random()*4);
document.getElementsByName(name)[random].checked= true;

}

for(var i=6;i<=100;i++){
        var name3= "q"+i+"_0";
var random3= Math.floor(Math.random()*4);
document.getElementsByName(name3)[random3].checked= true;

使用方法:复制到chrome地址栏: 然后前面添加 javascript:最后回车

Ps:配合按键精灵  定期刷票 ,自动重启路由器获取新的动态IP地址,世界就解放了.

升级版的刷票脚本,这个是具有概率的.

var cardType = [‘0′,’1′,’2′,’3′,’4’];
var cardNum = [5,9,19,46,21];

function playCard(cardType, cardNum){
var cards = [];
for(var i = 0; i < cardType.length; i++){ cards.push.apply(cards, new Array(cardNum[i]+1).join(cardType[i]).split('')); } for(var i = 0; i < 10; i++){ //可以多洗几次牌 cards.sort(function(){return Math.random()>0.5?1:-1});
}
return cards;
}

for(var i=1;i<=12;i++){ var name3= "q"+i+"_0"; var random3=Math.ceil(Math.random()*(4-2)+2); document.getElementsByName(name3)[playCard(cardType, cardNum)[1]].checked=true; }

以下是录制的按键精灵的脚本

‘==========以下是按键精灵录制的内容==========

MoveTo 126, 73
Delay 112
LeftDown 1
Delay 4
LeftClick 1
Delay 1
LeftUp 1

Delay 500

MoveTo 414, 795
Delay 80
LeftDown 1
Delay 1
LeftClick 1
Delay 1
LeftUp 1
Delay 651
KeyDown “Ctrl”, 1
Delay 392
KeyDown “V”, 1
Delay 80
KeyUp “Ctrl”, 1
Delay 40
KeyUp “V”, 1
Delay 640
KeyDown “Enter”, 1
Delay 64
KeyUp “Enter”, 1
Delay 740

MoveTo 440, 651
Delay 184
LeftDown 1
Delay 1
LeftClick 1
Delay 596
KeyDown “Ctrl”, 1
Delay 120
KeyDown “End”, 1
Delay 80
KeyUp “End”, 1
Delay 16
KeyUp “Ctrl”, 1
Delay 876

MoveTo 880, 337
Delay 136
LeftDown 1
Delay 1
LeftClick 1
Delay 1
LeftUp 1
Delay 623
MoveTo 866, 337
Delay 8
MoveTo 846, 337
Delay 10
MoveTo 812, 337
Delay 6
MoveTo 770, 331
Delay 8
MoveTo 720, 327
Delay 8
MoveTo 674, 321
Delay 8
MoveTo 626, 315
Delay 8
MoveTo 584, 305
Delay 8
MoveTo 540, 291
Delay 8
MoveTo 500, 275
Delay 8
MoveTo 460, 257
Delay 8
MoveTo 420, 239
Delay 8
MoveTo 384, 223
Delay 11
MoveTo 352, 205
Delay 5
MoveTo 332, 187
Delay 8
MoveTo 314, 171
Delay 8
MoveTo 302, 155
Delay 10
MoveTo 292, 141
Delay 7
MoveTo 284, 129
Delay 7
MoveTo 280, 121
Delay 8
MoveTo 276, 113
Delay 8
MoveTo 274, 107
Delay 8
MoveTo 272, 101
Delay 8
MoveTo 270, 95
Delay 8
MoveTo 268, 93
Delay 8
MoveTo 266, 91
Delay 8
MoveTo 262, 85
Delay 8
MoveTo 260, 83
Delay 12
MoveTo 258, 83
Delay 4
MoveTo 254, 81
Delay 16
MoveTo 250, 79
Delay 16
MoveTo 244, 77
Delay 55
MoveTo 228, 73
Delay 5
MoveTo 226, 73
Delay 12
MoveTo 224, 71
Delay 8
MoveTo 222, 71
Delay 8
MoveTo 220, 71
Delay 8
MoveTo 216, 71
Delay 8
MoveTo 212, 71
Delay 8
MoveTo 208, 71
Delay 8
MoveTo 204, 71
Delay 8
MoveTo 198, 71
Delay 8
MoveTo 192, 69
Delay 8
MoveTo 186, 69
Delay 8
MoveTo 182, 69
Delay 8
MoveTo 178, 67
Delay 88
MoveTo 174, 67
Delay 8
MoveTo 170, 67
Delay 8
MoveTo 166, 67
Delay 8
MoveTo 162, 67
Delay 8
MoveTo 160, 67
Delay 8
MoveTo 158, 67
Delay 8
MoveTo 156, 67
Delay 16
MoveTo 154, 67
Delay 72
MoveTo 150, 67
Delay 8
MoveTo 148, 67
Delay 8
MoveTo 146, 67
Delay 8
MoveTo 142, 69
Delay 24
MoveTo 142, 71
Delay 8
MoveTo 142, 73
Delay 8
MoveTo 142, 77
Delay 9
MoveTo 142, 81
Delay 7
MoveTo 150, 89
Delay 8
MoveTo 158, 97
Delay 8
MoveTo 170, 105
Delay 9
MoveTo 184, 117
Delay 7
MoveTo 198, 129
Delay 8
MoveTo 218, 143
Delay 8
MoveTo 236, 155
Delay 8
MoveTo 258, 171
Delay 8
MoveTo 280, 187
Delay 8
MoveTo 306, 205
Delay 8
MoveTo 334, 225
Delay 8
MoveTo 360, 245
Delay 8
MoveTo 396, 267
Delay 8
MoveTo 432, 289
Delay 8
MoveTo 470, 309
Delay 8
MoveTo 502, 327
Delay 8
MoveTo 534, 341
Delay 8
MoveTo 558, 353
Delay 8
MoveTo 580, 361
Delay 8
MoveTo 600, 371
Delay 8
MoveTo 618, 379
Delay 8
MoveTo 636, 387
Delay 8
MoveTo 650, 393
Delay 8
MoveTo 668, 401
Delay 8
MoveTo 678, 407
Delay 8
MoveTo 692, 415
Delay 8
MoveTo 706, 423
Delay 9
MoveTo 716, 427
Delay 7
MoveTo 730, 433
Delay 8
MoveTo 738, 437
Delay 8
MoveTo 748, 441
Delay 8
MoveTo 756, 445
Delay 8
MoveTo 764, 449
Delay 8
MoveTo 768, 453
Delay 8
MoveTo 774, 457
Delay 8
MoveTo 778, 461
Delay 8
MoveTo 782, 465
Delay 8
MoveTo 786, 467
Delay 8
MoveTo 788, 469
Delay 8
MoveTo 790, 471
Delay 16
MoveTo 792, 475
Delay 8
MoveTo 794, 479
Delay 8
MoveTo 796, 483
Delay 8
MoveTo 798, 485
Delay 16
MoveTo 800, 487
Delay 8
MoveTo 802, 489
Delay 8
MoveTo 804, 493
Delay 8
MoveTo 808, 497
Delay 8
MoveTo 810, 499
Delay 8
MoveTo 814, 503
Delay 8
MoveTo 816, 507
Delay 8
MoveTo 820, 511
Delay 8
MoveTo 822, 515
Delay 8
MoveTo 826, 519
Delay 8
MoveTo 828, 523
Delay 8
MoveTo 832, 527
Delay 104
MoveTo 866, 553
Delay 8
MoveTo 870, 553
Delay 8
MoveTo 874, 555
Delay 8
MoveTo 882, 555
Delay 8
MoveTo 888, 557
Delay 8
MoveTo 898, 557
Delay 8
MoveTo 908, 559
Delay 7
MoveTo 916, 559
Delay 9
MoveTo 922, 559
Delay 8
MoveTo 928, 559
Delay 8
MoveTo 930, 559
Delay 8
MoveTo 932, 559
Delay 8
MoveTo 934, 557
Delay 24
MoveTo 936, 555
Delay 32
MoveTo 936, 553
‘==========以上是按键精灵录制的内容==========