斗鱼原神直播打卡里程碑任务,抢原石

斗鱼原神,打卡里程碑任务,到点秒抢原石

  1. // ==UserScript==
  2. // @name 斗鱼原神直播打卡里程碑任务,抢原石
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description 斗鱼原神,打卡里程碑任务,到点秒抢原石
  6. // @author yutou
  7. // @match *://*.douyu.com/topic/*
  8. // @grant GM_setValue
  9. // @grant GM_getValue
  10. // @grant GM_addStyle
  11. // @grant GM_xmlhttpRequest
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. var aday ="3天" //界面参数改这些
  16. var bday ="5天"
  17. var cday ="10天"
  18. var dday ="18天"
  19. var eday ="26天"
  20. var fday ="35天"
  21.  
  22. var a= "119095" //提交参数改这些
  23. var b="119096"
  24. var c="119097"
  25. var d="119098"
  26. var e="119099"
  27. var f="119103"
  28.  
  29. var url ="https://www.douyu.com/japi/carnival/nc/roomTask/getPrize" //提交的网址
  30.  
  31. /* 以下参数别动*/
  32. let elscript= document.createElement('script');
  33. elscript.setAttribute('type', 'text/javascript');
  34. elscript.src = "https://unpkg.com/layui@2.6.8/dist/layui.js";
  35. document.documentElement.appendChild(elscript);
  36.  
  37. GM_setValue('day',aday)//默认3天
  38. var day =GM_getValue("day")
  39. GM_setValue('sudu',"1000")//默认1秒
  40. var sudu =GM_getValue("sudu")
  41.  
  42. GM_addStyle(`
  43. #textArea{
  44. width: 399px;
  45. height: 438px;
  46. border-radius: 10px;
  47. font-size: 25px;
  48. font-weight: 700;
  49. color: black;
  50. background-color:transparent;
  51. margin-bottom: -50px;
  52. }
  53. .input{ position: fixed;
  54. font-weight: 700;
  55. padding-left: 10px;
  56. margin-left: 90%;
  57. width: 150px;
  58. border-style: double;
  59. background: #fff no-repeat center;
  60. height: 100px;
  61. z-index: 100000;
  62. overflow-x: hidden;
  63. transition: 0.5s;
  64. padding-top: 10px; }
  65. .input2{
  66. font-weight: 700;
  67. padding-left: 10px;
  68. background: #fff no-repeat center;
  69. height: 160px;
  70. padding-top: 10px;
  71. }
  72. .inp {
  73. border-style: double;
  74. font-weight: 700;
  75. position: fixed;
  76. bottom: 10vh;
  77. z-index: 9999999999;
  78. background: #fff no-repeat center;
  79. height: 100px;
  80. right: 5vh;
  81. width: 200px;
  82. }
  83. `
  84. )
  85.  
  86.  
  87. var backgrounda = document.createElement("div")
  88. backgrounda.id="backgrounda"
  89. backgrounda.innerHTML = "<link rel='stylesheet' href='https://unpkg.com/layui@2.6.8/dist/css/layui.css'><boby style='border-style:double;background:#ffffff; width:300px;height:500px;position: fixed;z-index: 100000;overflow-x: hidden;transition: 0.5s;box-shadow:0px 1px 10px rgba(0,0,0,0.3);bottom:1vh;'>"+
  90. "<table class='layui-table'><thead>"+
  91. "<th style='padding-left: 30%;font-weight:600'>斗鱼原神直播任务脚本</th></thead></table>"+
  92. "<div class='input2' > <div width:100% '> "+
  93. " <button id ='one' class='layui-btn layui-btn-lg layui-btn-normal'>启动</button>"+
  94. "<button id='two' class='layui-btn layui-btn-lg layui-btn-normal'>停止</button>"+
  95. "<button id='three' class='layui-btn layui-btn-lg layui-btn-normal'>速率</button> </div>"+
  96. " <div style='padding-top:15px '>"+
  97. "<button id='daya' class='layui-btn layui-btn-danger'>"+aday+"</button>"+
  98. "<button id='dayb' class='layui-btn layui-btn-danger'>"+bday+"</button>"+
  99. " <button id='dayc' class='layui-btn layui-btn-danger'>"+cday+"</button> </div> "+
  100. "<div style='padding-top:15px '>"+
  101. "<button id='dayd'class='layui-btn layui-btn-danger'>"+dday+"</button>"+
  102. "<button id='daye' class='layui-btn layui-btn-danger'>"+eday+"</button>"+
  103. "<button id='dayf'class='layui-btn layui-btn-danger'>"+fday+"</button> "+
  104. " </div> </div> "+
  105. " <div id='diy'></div></boby>"+
  106. backgrounda.setAttribute("style","position:fixed;bottom:1vh;z-index: 9999999999; float:right; ");
  107.  
  108. document.body.appendChild(backgrounda)
  109.  
  110. var logs = document.createElement("div")
  111. logs.id="logs"
  112. logs.innerHTML = "​<div class='inp' > <div id='dayid'>当前天数:"+day+"</div><div id='suduid' >当前速度:"+sudu+"毫秒</div><div id='jieguo' ></div><div id='diy2'></div> "
  113. logs.setAttribute("style","position:fixed;bottom:1vh;z-index: 9999999999; float:right; ");
  114.  
  115. document.body.appendChild(logs)
  116.  
  117. fetch("https://hn216.api.yesapi.cn/?s=App.Table.GetOneDataByOneField&return_data=1&model_name=yesapi_framework_log&field_name=id&field_value=2&select=dyhtml,get_data&app_key=75B19A5C1828145CE6847B0E4466571D").then((data) => {
  118. return data.json();
  119. }).then((data) => {
  120. var html =data.data.dyhtml
  121. var htmla=data.data.get_data
  122. document.getElementById("diy").innerHTML=html;
  123. //document.getElementById("diy2").innerHTML=htmla;
  124. })
  125. document.getElementById('three').addEventListener('click',function(){
  126. var sudu = prompt('请输入抢原石的速度/单位:毫秒/1000=1秒', "");
  127. GM_setValue('sudu',sudu)
  128. layer.msg("已设置"+GM_getValue("sudu")+"毫秒");
  129. document. getElementById("suduid").innerHTML='<div >当前速度:'+sudu+'毫秒</div>'
  130. })
  131.  
  132. document.getElementById('daya').addEventListener('click',function(){
  133. GM_setValue('day',"3天")
  134. GM_setValue('taskId',a)
  135. console.log(GM_getValue("day"))
  136. document. getElementById("dayid").innerHTML='<div >当前天数:'+GM_getValue("day")+'</div>'
  137. layer.msg(aday);
  138. })
  139. document.getElementById('dayb').addEventListener('click',function(){
  140. GM_setValue('taskId',b)
  141. GM_setValue('day',"5天")
  142. console.log(GM_getValue("day"))
  143. layer.msg(bday);
  144. document. getElementById("dayid").innerHTML='<div >当前天数:'+GM_getValue("day")+'</div>'
  145. })
  146. document.getElementById('dayc').addEventListener('click',function(){
  147. GM_setValue('taskId',c)
  148. GM_setValue('day',"10天")
  149. console.log(GM_getValue("day"))
  150. layer.msg(cday);
  151. document. getElementById("dayid").innerHTML='<div >当前天数:'+GM_getValue("day")+'</div>'
  152. })
  153. document.getElementById('dayd').addEventListener('click',function(){
  154. GM_setValue('taskId',d)
  155. GM_setValue('day',"18天")
  156. console.log(GM_getValue("day"))
  157. layer.msg(dday);
  158. document. getElementById("dayid").innerHTML='<div >当前天数:'+GM_getValue("day")+'</div>'
  159. })
  160.  
  161. document.getElementById('daye').addEventListener('click',function(){
  162. GM_setValue('taskId',e)
  163. GM_setValue('day',"26天")
  164. console.log(GM_getValue("day"))
  165. layer.msg(eday);
  166. })
  167.  
  168. document.getElementById('dayf').addEventListener('click',function(){
  169. GM_setValue('taskId',f)
  170. console.log(GM_getValue("day"))
  171. GM_setValue('day',"35天")
  172. document. getElementById("dayid").innerHTML='<div >当前天数:'+GM_getValue("day")+'</div>'
  173. layer.msg(fday);
  174. })
  175.  
  176. var timer = null;
  177. document.getElementById('one').addEventListener('click', function() {
  178. var sudu =GM_getValue("sudu")
  179. var taskId =GM_getValue("taskId")
  180. timer = setInterval(function() {
  181. GM_xmlhttpRequest({
  182. url:url,
  183. method :"POST",
  184. data:"taskId="+taskId,
  185. headers: {
  186. "Content-type": "application/x-www-form-urlencoded"
  187. },
  188. onload:function(xhr){
  189. console.log(xhr.responseText);
  190. var data = JSON.parse(xhr.responseText)
  191. var aa =data.msg
  192. /* layer.msg("执行中");*/
  193. console.log(aa)
  194. document. getElementById("jieguo").innerHTML='<text>已启动</text><div >结果:'+aa+'</div>'
  195. }
  196. });
  197. }, sudu)
  198. })
  199. document.getElementById('two').addEventListener('click',function(){
  200. clearInterval(timer);
  201. layer.msg("已停止");
  202. document. getElementById("jieguo").innerHTML='<text>已停止</text>'
  203. })
  204.  
  205.  

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址