├── Alook
├── RemoveMoreOnBaidu.user.js
├── 好孩子看得见.alook
└── 百家号去更多.alook
├── GameScript
└── full2019.lua
├── JSBOX
├── 91
│ ├── .output
│ │ └── 91.box
│ ├── Arc
│ │ └── .DS_Store
│ ├── Download
│ │ └── README.MD
│ ├── README.md
│ ├── assets
│ │ └── icon.png
│ ├── config.json
│ ├── main.js
│ ├── main.jsp
│ ├── scripts
│ │ ├── md5.js
│ │ └── string.js
│ └── strings
│ │ ├── en.strings
│ │ └── zh-Hans.strings
├── .gitignore
├── 1024pic.js
├── 1024图库.js
├── 1024视频.js
├── 4hupic.js
├── 91🍉视频.js
├── Ciliso.js
├── HighSpeedCar.js
├── QRInstaller.js
├── haicao
│ ├── .output
│ │ ├── 91.box
│ │ └── haicao.box
│ ├── Download
│ │ └── README.MD
│ ├── README.md
│ ├── assets
│ │ └── icon.png
│ ├── config.json
│ ├── main.js
│ ├── main.jsp
│ ├── scripts
│ │ ├── config.js
│ │ └── string.js
│ └── strings
│ │ ├── en.strings
│ │ └── zh-Hans.strings
├── highway.js
├── n1🍉视频.js
└── 麻豆.js
├── PureJs
└── Clear dead Weibos.js
├── README.MD
├── UserScripts
├── FuckReadMore_CSDN.user.js
├── RemoveAdsOn1024.user.js
├── aiyoweia.user.js
├── thunder.js
├── unlimitxiaoke.js
└── zhuzhupan.user.js
├── WPF
├── .gitignore
└── TicTacToe
│ ├── WpfApp2.sln
│ └── WpfApp2
│ ├── App.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ └── WpfApp2.csproj
└── codeVBA
├── M1.bas
├── M2.bas
├── Module1.bas
├── Sheet1.cls
├── stock.xlsm
└── vba - Copy.xls
/Alook/RemoveMoreOnBaidu.user.js:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | //@Author suertang
5 | //@Match zhidao.baidu.com
6 | //@Date 6/5/2020
7 | //@Apply Alook iOS
8 | //@Runat DOMContentLoaded
9 |
10 | //因为隐藏发生在页面载入之后,所以必须等隐藏结束后再调用此脚本,手动延时800ms
11 | setTimeout(()=>{
12 | //显示全部
13 | const div = document.querySelector(".w-detail-container.w-detail-index");
14 | div.style.maxHeight="";
15 | div.style.overflow="";
16 | //去除还剩多少的按钮
17 | document.querySelector(".w-detail-display-btn").style.display="none";
18 | },800);
--------------------------------------------------------------------------------
/Alook/好孩子看得见.alook:
--------------------------------------------------------------------------------
1 | {
2 | "author" : "github.com\/suertang",
3 | "code" : "Ly9SZW1vdmUgbGlnaHQgY29sb3JzCmxldCB3aGl0ZVRhZ3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCdkaXYubWVzc2FnZSBmb250W2NvbG9yXScpCndoaXRlVGFncy5mb3JFYWNoKCh0YWcpID0+IHsKICAgIHRhZy5jb2xvciA9ICcjMDBmJwp9KQovL1JlYnVpbHQgbGlua3MgYW5kIG1hZ25ldHMKbGV0IGxpbmtzPVtdCgpkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCdkaXYubWVzc2FnZSBhJykuZm9yRWFjaChsID0+IHsKICAgIGlmKCEvJltwdHVdaWQ9Ly50ZXN0KGwuaHJlZikpCiAgICAgICAgbGlua3MucHVzaCgnPGEgaHJlZj0iJytsLmhyZWYrJyI+JytsLmhyZWYrJzwvYT4nKQp9KQoKZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnZGl2Lm1lc3NhZ2UnKS5mb3JFYWNoKHR4dCA9PiB7CiAgICBsZXQgbWFnbmV0cz10eHQudGV4dENvbnRlbnQubWF0Y2goL21hZ25ldDpcP3h0PXVybjpidGloOlswLTlhLWZBLUZdezQwfS4qL2cpCiAgICBpZihtYWduZXRzIT1udWxsKXsKICAgICAgICBtYWduZXRzLmZvckVhY2gobT0+ewogICAgICAgICAgICBsaW5rcy5wdXNoKCc8YSBocmVmPSInK20rJyI+JyttKyc8L2E+JykKICAgICAgICB9KQogICAgfQp9KQoKaWYobGlua3MubGVuZ3RoPjApewogICAgbGV0IGVsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpCiAgICBlbGUuaW5uZXJIVE1MPSI8YnI+4oCU4oCU4oCU4oCU4oCU4oCU4oCUPGJyPuS7peS4i+WPr+iDveaYr+aYr+WlveWtqeWtkOWGheWuuTo8YnI+PGJyPjxkaXYgY2xhc3M9J2diJyBzdHlsZT0nY29sb3I9Ymx1ZSc+IitsaW5rcy5qb2luKCI8YnI+IikrIjwvZGl2PiIKICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJkaXYubWVzc2FnZSIpLmFwcGVuZENoaWxkKGVsZSkKfQoKCi8v5Yig6Zmk5aS05YOPCmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ2ltZycpLmZvckVhY2goaT0+ewogICAgaWYoaS5zcmMuaW5kZXhPZigiYXZhdGFyLnBocCIpIT0tMSl7CiAgICAgICAgaS5wYXJlbnROb2RlLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoaS5wYXJlbnROb2RlKTsKICAgIH0KCgp9KQ==",
4 | "version" : "1.0",
5 | "info" : "好孩子也要吃饭",
6 | "runat" : 0,
7 | "name" : "好孩子看得见",
8 | "regex" : "wnflb66.com",
9 | "match" : 0
10 | }
--------------------------------------------------------------------------------
/Alook/百家号去更多.alook:
--------------------------------------------------------------------------------
1 | {
2 | "regex" : "baijiahao.baidu.com",
3 | "version" : "1.0",
4 | "name" : "百家号去更多",
5 | "match" : 0,
6 | "author" : "suertang",
7 | "code" : "Ly\/lm6DkuLrpmpDol4\/lj5HnlJ\/lnKjpobXpnaLovb3lhaXkuYvlkI7vvIzmiYDku6Xlv4XpobvnrYnpmpDol4\/nu5PmnZ\/lkI7lho3osIPnlKjmraTohJrmnKzvvIzmiYvliqjlu7bml7Y4MDBtcwpzZXRUaW1lb3V0KCgpPT57Ci8v5pi+56S65YWo6YOoCmNvbnN0IGRpdiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5tYWluQ29udGVudCIpOwovL2FsZXJ0KCLmn6Xmib7liLDkuobvvJ8iK2Rpdj8idHJ1ZSI6ImZhbHNlIik7CmRpdi5zdHlsZS5oZWlnaHQ9IjEwMCUiOwpkaXYuc3R5bGUub3ZlcmZsb3c9IiI7Ci8v5Y676Zmk6L+Y5Ymp5aSa5bCR55qE5oyJ6ZKuCmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi51bmZvbGRGdWxsVGV4dCIpLnN0eWxlLmRpc3BsYXk9Im5vbmUiOwp9LDgwMCk7",
8 | "info" : "去除百家号点击更多",
9 | "runat" : 0
10 | }
--------------------------------------------------------------------------------
/GameScript/full2019.lua:
--------------------------------------------------------------------------------
1 |
2 | --Version 20190127
3 | init(1)
4 | setScreenScale(true, 720, 1280)--缩放
5 | require "TSLib"--使用本函数库必须在脚本开头引用并将文件放到设备 lua 目录下
6 | require 'sz' --设置
7 |
8 | function fly()
9 | mSleep(800)
10 | cfg_fly=true;
11 | routing=false
12 | local i
13 | if not isAutoFight() and isColor(476,206,0x63413a,85) and isColor(492,206,0x735d4a,85) and isColor(492,209,0x4a3531,85) then
14 | --toast("Fly")
15 | tap(489,195)
16 | mSleep(2000)
17 | end
18 |
19 | end
20 |
21 | function isAccept()
22 | local x
23 | local y
24 | local i
25 | --x,y = findMultiColorInRegionFuzzy( 0xeec28c, "-9|19|0xdeb27b,21|17|0xdea263", 90, 827, 289, 967, 462)
26 | if isColor(957,431,0x847973,85) and isColor(965,429,0x6b6552,85) and isColor(901,432,0xeec68c,85) then
27 | toast(" 日常任务接受")
28 | tap(896,435)
29 | mSleep(2000)
30 | return true
31 | elseif isColor(834,390,0x9c968c,85) and isColor(899,394,0xeec68c,85) and isColor(942,394,0xeec28c,85) and isColor(927,402,0xeec28c,85) then
32 | toast("商人")
33 | tap(895,390)
34 | mSleep(2000)
35 | return true
36 | elseif isColor(188,527,0xe6ba8c,85) and isColor(190,531,0x633521,85) and isColor(208,537,0xeebe94,85) then
37 | --除魔任务
38 |
39 | if isColor(384,431,0x3a2d21,85) and isColor(325,469,0x312819,85) and isColor(403,465,0x312819,85) then --任务没有结束
40 | tap(1029,538) --点击接受任务
41 | mSleep(2000)
42 | else --任务已经完成
43 | tap(1149,28)
44 | mSleep(2000) --点击关闭
45 | if isColor(1138,26,0x942829,85) and isColor(1148,28,0xe6dbc5,85) and isColor(1157,28,0x842421,85) then
46 | tap(1150,29)--关闭活动日历
47 | mSleep(1500)
48 | end
49 | end
50 |
51 | return true
52 |
53 | elseif (isColor(348,391,0x10df08,85) and isColor(351,391,0x08c608,85) and isColor(355,391,0x00f700,85) and isColor(359,390,0x08e708,85)) or (isColor(348,353,0x08df08,85) and isColor(355,354,0x00fb00,85) and isColor(382,361,0x08fb08,85)) then
54 | if isColor(348,353,0x08df08,85) and isColor(355,354,0x00fb00,85) and isColor(382,361,0x08fb08,85) then
55 | --药店购买
56 | tap(368,358)
57 | mSleep(2000)
58 | else
59 | --首饰店或者武器店购买
60 |
61 | tap(370,386)
62 | mSleep(2000) --如果不是
63 | end
64 | if isColor(887,517,0xeeebe6,85) and isColor(900,526,0xeeefee,85) and isColor(904,526,0x6b4d3a,85) and isColor(917,523,0xe6e7e6,85) then
65 | tap(1034,631) --找到跳过引导,点击购买
66 | mSleep(1500)
67 | tap(1034,631) --再次点击购买
68 | mSleep(1500)
69 |
70 | tap(537,466) --确认购买
71 | mSleep(2000)
72 | tap(1152,30) --关闭
73 | mSleep(3000)
74 |
75 | isBuy=true
76 | else
77 | tap(1152,30) --没有跳过引导,关闭,等待再次点击购买
78 | --mSleep(3000)
79 |
80 | end
81 | return true
82 | elseif isColor(436,315,0xded2c5,85) and isColor(436,326,0xcec2ad,85) and isColor(436,334,0xc5bead,85) and isColor(613,472,0x632400,85) and isColor(615,477,0xeec684,85) then
83 | --在线时间超过3小时
84 | tap(634,466)
85 | mSleep(3000)
86 | return true
87 | else
88 | return false
89 | end
90 | end
91 |
92 | function isFinish()
93 | local x
94 | local y
95 | --mSleep(3000)
96 | if isColor(610,557,0xdeb284,85) and isColor(612,557,0x7b3d19,85) and isColor(640,556,0xb58a5a,85) and isColor(640,561,0xcea67b,85) then
97 | --btnFin={648,563}--仰望
98 | tap(648,563)
99 | mSleep(2000)
100 | tap(1086,148)
101 | mSleep(2000)
102 | return true
103 | elseif isColor(672,553,0x73655a,85) and isColor(689,553,0xeec694,85) and isColor(693,554,0xd5ae7b,85) and isColor(694,561,0xe6ba8c,85) then
104 | tap(730,557) --新版仰望
105 | mSleep(800)
106 | tap(1086,148)
107 | mSleep(1000)
108 | return true
109 | elseif isColor(352,394,0xe6d2a4,85) and isColor(447,393,0x6bba19,85) and isColor(539,402,0xefca5a,85) then
110 | tap(907,390)
111 | return true
112 | elseif isColor(833,390,0x6b655a,85) and isColor(846,391,0xd6ae7b,85) and isColor(905,396,0xe6c28c,85) and isColor(933,397,0xe6be83,85) then
113 | --btnFin={898,386}--商人
114 | tap(898,386)
115 | mSleep(2000)
116 | return true
117 | elseif isColor(850,396,0xa47d52,85) and isColor(902,399,0xc59663,85) and isColor(932,377,0x8c693a,85) and isColor(940,398,0xdeba84,85) then
118 | --btnFin={892,392}
119 | tap(892,392)
120 | mSleep(2000)
121 | return true
122 | elseif isColor(888,396,0x42393a,85) and isColor(904,432,0xe6be83,85) and isColor(913,439,0xce924a,85) and isColor(942,437,0xe6ba84,85) then
123 | tap(890,432)
124 | mSleep(2000)
125 | --btnFin={890,432}
126 | return true
127 | elseif isColor(188,527,0xe6ba8c,85) and isColor(190,531,0x633521,85) and isColor(208,537,0xeebe94,85) then
128 | --除魔任务
129 |
130 | if isColor(384,431,0x3a2d21,85) and isColor(325,469,0x312819,85) and isColor(403,465,0x312819,85) then --任务没有结束
131 | tap(1029,538) --点击接受任务
132 | mSleep(2000)
133 | else --任务已经完成
134 | tap(1149,28)
135 | mSleep(2000) --点击关闭
136 | if isColor(1138,26,0x942829,85) and isColor(1148,28,0xe6dbc5,85) and isColor(1157,28,0x842421,85) then
137 | tap(1150,29)--关闭活动日历
138 | mSleep(1500)
139 | end
140 | end
141 |
142 | return true
143 | elseif isColor(337,379,0x211c19,85) and isColor(337,395,0xf7ebb5,85) and isColor(353,413,0xe6dbad,85) then
144 | tap(898,390) --行会任务完成奖励领取
145 | mSleep(2000)
146 | return true
147 | else
148 | return false
149 | end
150 | end
151 |
152 | function isDead()
153 | if isColor(710,423,0xb58e6b,85) and isColor(728,425,0xeec294,85) and isColor(768,431,0xa5714a,85) and isColor(794,426,0xc59e73,85) then
154 | tap(763,426)
155 | mSleep(5000)
156 | return true
157 | else
158 | return false
159 | end
160 | end
161 |
162 | function isShowTitle()
163 | if isColor(443,470,0xd6b27b,85) and isColor(448,469,0x521c00,85) and isColor(472,467,0xeec68c,85) and isColor(492,470,0xcea26b,85) then
164 | tap(487,464)
165 | mSleep(2000)
166 | return true
167 | else
168 | return false
169 | end
170 |
171 | end
172 |
173 |
174 | function isAutoFight()
175 | cls()
176 | closeToolbar()
177 | -- 自动战斗状态有蓝色动画,不利于取色
178 | if isColor(1221,347,0xd6965a,85) and isColor(1222,361,0xad9e63,85) and isColor(1208,366,0x837142,85) then
179 | --toast("非自动战斗中")
180 | return true
181 | else
182 | --toast("非战斗状态")
183 | return false
184 | end
185 | end
186 | ---test autofight
187 | function autofight()
188 | local r
189 | local x
190 | local y
191 |
192 | if(not isAutoFight()) then
193 | --r,x,y=isAutoFight()
194 | toast("点击自动战斗")
195 | mSleep(300)
196 | tap(1197,343)
197 | mSleep(2000)
198 | end
199 | end
200 |
201 | function stopFight()
202 | ClsWindows()
203 | cls()
204 | closeToolbar()
205 | if isAutoFight() then
206 | tap(1197,343)
207 | mSleep(2000)
208 | end
209 |
210 | end
211 |
212 |
213 |
214 | --autofight()
215 | function ClsWindows()
216 | if nil then --永远不要试图执行此函数 ,有不可预知的风险
217 | --mSleep(2000)
218 | local x
219 | local y
220 | if isColor(692,560,0xad855a,85) and isColor(705,559,0x9c6942,85) and isColor(718,565,0xb58a5a,85) and isColor(735,558,0xdeb684,85) then
221 | tap(1090,148)
222 | mSleep(3000)
223 | elseif isColor(560,319,0x3a3131,85) and isColor(554,354,0xc59242,85) and isColor(549,354,0x292421,85) and isColor(555,377,0x3a3531,85) and isColor(540,380,0x42414a,85) then
224 | tap(555,365) --关闭聊天
225 | mSleep(2000)
226 | end
227 | x,y = findMultiColorInRegionFuzzy( 0x7b2429, "5|0|0xd6cab5,12|0|0x842829", 90, 640, 0, 640, 360)
228 | while(x~=-1) do
229 | --keepScreen(true)
230 | toast("关闭无关窗口")
231 | tap(x,y)
232 | --keepScreen(false)
233 | mSleep(3000)
234 | --closewindow()
235 | x,y = findMultiColorInRegionFuzzy( 0x7b2429, "5|0|0xd6cab5,12|0|0x842829", 90, 640, 0, 640, 360)
236 | end
237 | end
238 | end
239 |
240 | function stop()
241 | stopFight()
242 | if(not isStop()) then
243 | tap(795,310)
244 | end
245 | cls()
246 | end
247 |
248 | function cls() --Clear screen
249 | --立即领取
250 | local ret=true
251 | isTransfer()
252 | actTaskbar()
253 | closeToolbar()
254 | if isColor(990,395,0x832429,85) and isColor(997,395,0xdeba94,85) and isColor(1004,395,0x732021,85) then
255 | toast("关闭立即领取",1)
256 | tap(999,393)
257 | mSleep(1000)
258 | --[[
259 | tap(913,557)
260 | toast("立即领取",1)
261 | mSleep(1500)
262 | tap(1078,235)
263 | mSleep(2000)
264 | if isColor(530,172,0xffd221,85) and isColor(600,169,0xffdb19,85) and isColor(657,182,0xffce3a,85) and isColor(729,191,0xeea619,85) and isColor(534,491,0x5a71b5,85) then
265 | toast("点击任意位置关闭 ",1)
266 | tap(1078,235)
267 | mSleep(2000)
268 | end
269 | --]]
270 | elseif isColor(530,172,0xffd221,85) and isColor(600,169,0xffdb19,85) and isColor(657,182,0xffce3a,85) and isColor(729,191,0xeea619,85) and isColor(534,491,0x5a71b5,85) then
271 | toast("点击任意位置关闭 ",1)
272 | tap(1078,235)
273 | mSleep(1000)
274 | elseif isColor(569,524,0x313131,85) and isColor(600,510,0xeec694,85) and isColor(621,511,0xe6be8c,85) and isColor(624,513,0x6b3108,85) then
275 | tap(647,505)
276 | toast("免费领取",1)
277 | mSleep(2000)
278 | if isColor(530,172,0xffd221,85) and isColor(600,169,0xffdb19,85) and isColor(657,182,0xffce3a,85) and isColor(729,191,0xeea619,85) and isColor(534,491,0x5a71b5,85) then
279 | tap(1078,235)
280 | mSleep(1000)
281 | end
282 | --elseif isColor(620,234,0xe6c294,85) and isColor(632,233,0xe6c294,85) and isColor(437,322,0xc5b6a4,85) and isColor(435,322,0xded2bd,85) then
283 | -- toast("取消龙源血路")
284 | -- tap(740,468)
285 | elseif isColor(678,458,0x423529,85) and isColor(712,470,0xd6aa73,85) and isColor(730,474,0xa47542,85) and isColor(765,461,0xeec284,85) then
286 | toast("取消进入")
287 | tap(740,468)
288 | elseif isColor(731,466,0xada69c,85) and isColor(746,464,0xefc68c,85) and isColor(764,469,0x632008,85) and isColor(778,468,0xd6aa73,85) and isColor(797,461,0xe6c284,85) and isColor(787,414,0x312d29,85) then
289 | toast("暂不显示")
290 | tap(794,465)
291 | elseif isColor(562,31,0xb59229,85) and isColor(583,34,0xb58a29,85) and isColor(649,38,0x9c6921,85) and isColor(658,38,0x292421,85) then
292 | toast("跳过剧情")
293 | tap(649,43)
294 | mSleep(2000)
295 | elseif isColor(453,360,0xded2bd,85) and isColor(453,367,0xd6cebd,85) and isColor(453,374,0x3a3129,85) and isColor(610,470,0xd6ae73,85) then
296 | toast("超3小时",1)
297 | tap(651,473)
298 | mSleep(2000)
299 | elseif isColor(565,39,0xce8e29,85) and isColor(580,40,0xc58521,85) and isColor(621,35,0x6b4d19,85) and isColor(622,32,0xf7d229,85) then
300 | toast("跳过引导",1)
301 | tap(631,33)
302 | mSleep(2000)
303 | elseif isColor(1092,39,0xdebe73,85) and isColor(1097,39,0x8c5921,85) and isColor(1100,39,0x3a2829,85) then
304 | toast('展开')
305 | tap(1099,33)
306 | mSleep(2000)
307 | elseif isColor(631,556,0x421810,85) and isColor(678,550,0x6b5d31,85) and isColor(721,556,0xd6b27b,85) and isColor(751,561,0x6b5d3a,85) then
308 | toast('充值')
309 | tap(1085,116)
310 | mSleep(2000)
311 | elseif isColor(444,430,0xeec694,85) and isColor(448,432,0x423d31,85) and isColor(466,431,0xe6be8c,85) and isColor(478,431,0x736152,85) then
312 | toast('夺宝')
313 | tap(1107,104)
314 | mSleep(2000)
315 | elseif isColor(560,319,0x3a3131,85) and isColor(554,354,0xc59242,85) and isColor(549,354,0x292421,85) and isColor(555,377,0x3a3531,85) and isColor(540,380,0x42414a,85) then
316 | tap(555,365) --关闭聊天
317 | mSleep(2000)
318 | else
319 | ret=false
320 | end
321 | return ret
322 | end
323 |
324 |
325 | function isSignIn()
326 | return (isColor(403,377,0x5a4121,85) and isColor(782,436,0x94855a,85) and isColor(827,589,0x5a4521,85) and isColor(401,577,0x735d3a,85))
327 | end
328 |
329 |
330 | --更换角色以后
331 | function s()
332 |
333 | function notToday()
334 | return isColor(740,453,0x94855a,85) and isColor(641,521,0x94855a,85) and isColor(870,555,0x6b4d29,85)
335 | end
336 |
337 | cls()
338 | if isColor(313,482,0xb52431,85) and isColor(407,513,0xbd283a,85) and isColor(488,435,0xde9a84,85) and isColor(240,463,0xd6b284,85) then
339 | toast("我和祖国",1)
340 | mSleep(2300)
341 | tap(1110,101)
342 | mSleep(3000)
343 | end
344 |
345 |
346 | if isColor(425,631,0xe6c294,85) and isColor(429,640,0x635542,85) and isColor(469,641,0xd6b684,85) and isColor(473,629,0x9c815a,85) then
347 | mSleep(2000)
348 | ---[[
349 | if isColor(949,659,0xce965a,85) and isColor(967,659,0x844119,85) and isColor(1027,656,0xdea663,85) and isColor(1041,664,0x633110,85) then
350 | toast("微信特权签到",1)
351 | tap(1003,649)--微信特权签到
352 |
353 | elseif isColor(425,631,0xe6c294,85) and isColor(429,640,0x635542,85) and isColor(469,641,0xd6b684,85) and isColor(473,629,0x9c815a,85) then
354 | --toast("普通签到",1)
355 | local currDay = tonumber(os.date("%d"))
356 | --toast("今天是第"..os.date("%d").."天",1)
357 | if( currDay==31 ) then
358 | tap(469,391) --31号比较特殊,最后一行独立
359 | else
360 | local i = math.fmod(currDay-1,5)
361 | tap(500+140*i,299) --日期对5取模
362 | end
363 | --0,1,2,3,4
364 | --5,6
365 | i = math.floor(currDay/5)
366 | if(i>0) then
367 | if(i>5) then i=5 end
368 | local j=1
369 | while( j<=i )
370 | do
371 | --mSleep(2000)
372 | tap(597+113*(j-1),575)
373 | --toast(tostring(597+113*(i-1))..",575",1)
374 | mSleep(2000)
375 | if(notToday()) then
376 | --mSleep(1000)
377 | tap(932,359) --点击窗口外
378 | --toast("click outside window")
379 | break
380 | end
381 | j = j+1
382 | end
383 | end
384 |
385 | end
386 | --]]
387 |
388 | toast("关闭签到",1)
389 |
390 | tap(1102,81) --关闭
391 | mSleep(3000)
392 | --if isColor(644,63,0x292d29,85) and isColor(728,65,0xe6c294,85) and isColor(772,69,0x424142,85) and isColor(770,74,0xefc694,85) then
393 | --还是在签到界面
394 | --签到失败
395 | --tap(1102,81) --关闭
396 | --mSleep(2000)
397 | --end
398 |
399 |
400 |
401 | --mSleep(3000)
402 | --tap(1099,84) --关闭界面
403 | --mSleep(2000)
404 | end
405 | cls()
406 | mSleep(2000)
407 | if isColor(580,507,0xa49a94,85) and isColor(599,508,0xb5855a,85) and isColor(622,510,0xdeb684,85) and isColor(648,512,0x6b3910,85) and isColor(656,528,0x292421,85) then
408 |
409 | tap(638,513) --免费领取
410 | mSleep(3000)
411 | cls()
412 | if isColor(566,434,0x6b85a4,85) and isColor(566,438,0x6b8aad,85) and isColor(572,438,0x738eb5,85) and isColor(575,438,0x423542,85) then
413 | --分解成功
414 | tap(972,377)
415 | --mSleep(3000)
416 | --toast("ready")
417 | return
418 | end
419 | --------------
420 | --tap(978,334)
421 | --mSleep(1000)
422 | end
423 |
424 | cls()
425 | mSleep(3000)
426 | if isColor(1126,94,0x7b2421,85) and isColor(1134,94,0xc5aa84,85) and isColor(1145,94,0x7b2421,85) then
427 | tap(1129,97)--关闭活动
428 | mSleep(2000)
429 | end
430 |
431 | cls()
432 | mSleep(3000)
433 | if isColor(577,431,0x7392bd,85) and isColor(595,431,0x7392b5,85) and isColor(624,432,0x6b819c,85) and isColor(641,439,0x423542,85) then
434 | --分解成功
435 | tap(1061,311)
436 | --mSleep(3000)
437 | --toast("ready")
438 | end
439 | end
440 |
441 |
442 |
443 | function slideupdown(startx,starty,endy,loopcnt,callback)
444 | function isSubTask()
445 | --[[任务栏是否出现支线任务]]
446 | local x,y
447 | x,y = findMultiColorInRegionFuzzy( 0x29aa63, "-7|6|0x31aa6b,7|6|0x31aa6b,1|14|0x31b26b", 90, 2, 182, 170, 381)
448 | if(x~=-1) then
449 | return true
450 | else
451 | return false
452 | end
453 |
454 | end
455 |
456 | if not isStop() then
457 | stop()
458 | --back2biqi()
459 | end
460 |
461 | local offset
462 | offset=starty-endy
463 | ---- [[if offset is nagtive]]
464 | ---- start 360 end 200 offset=160
465 | local i
466 | local j
467 | for i=1,loopcnt do
468 | cls()
469 | isFinish()
470 | touchDown( startx, starty)
471 | for j=0,offset,10 do
472 | touchMove( startx, starty-j)
473 | mSleep(80)
474 | end
475 | touchMove(startx,endy)
476 | mSleep(10)
477 | touchUp(startx, endy)
478 | mSleep(2000)
479 |
480 | if callback then
481 | mSleep(1000)
482 | cls()
483 |
484 | if(callback()) then
485 | return true --找到对应任务,开始执行
486 | elseif isSubTask() then
487 | return -1 --没有找到对应任务,并且找到支线任务,结束寻找
488 | end
489 |
490 | end
491 | end
492 | return -1
493 | end
494 | function slideright(startx,starty,endx)
495 |
496 | local offset
497 | offset=startx-endx
498 |
499 | local i
500 | local j
501 | --for i=1,loopcnt do
502 | cls()
503 | isFinish()
504 | touchDown( startx, starty)
505 | for j=0,offset,10 do
506 | touchMove( startx-j, starty)
507 | mSleep(80)
508 | end
509 | touchMove(endx,starty)
510 | mSleep(10)
511 | touchUp(endx,starty)
512 | mSleep(1000)
513 | --end
514 | return
515 | end
516 | function openToolbar()
517 | if not (isColor(986,651,0x42393a,85) and isColor(1009,651,0x5a4121,85) and isColor(1037,658,0xb58e4a,85)) then
518 | tap(642,655)
519 | mSleep(2000)
520 | end
521 | end
522 | function closeToolbar()
523 | --if (isColor(1000,639,0xbd9e52,85) and isColor(1017,639,0x524942,85) and isColor(1031,639,0x8c8a5a,85)) then
524 | if isColor(719,628,0x4a3d31,85) and isColor(724,650,0xceae52,85) and isColor(724,689,0xc5a683,85) then
525 | tap(642,655)
526 | mSleep(2000)
527 | end
528 | end
529 | function openEquipment()
530 | openToolbar()
531 | tap(533,663)--点击装备
532 | mSleep(2000)
533 | end
534 |
535 | function scrap()
536 | --分解装备
537 | cls()
538 | --ClsWindows()
539 | --mSleep(2000)
540 | openEquipment()
541 | tap(228,504)--点击分解
542 | mSleep(2000)
543 | cls()
544 | tap(890,536)--点击批量分解
545 | mSleep(1000)
546 | --先分解一次白色
547 | cls()
548 | if not(isColor(597,109,0xad8e29,85) and isColor(594,112,0xe6d75a,85) and isColor(595,111,0xe6ca73,85)) then
549 | --白色未勾选
550 | cls()
551 | tap(567,147) -- 勾选白色装备
552 | mSleep(1000)
553 | end
554 |
555 | --取消其他分解选项
556 |
557 | if not(isColor(561,189,0xefba31,85) and isColor(569,197,0xef6900,85) and isColor(575,191,0xe67500,85)) then
558 | --蓝色未勾选
559 | tap(566,199)--去除蓝色已勾选
560 | mSleep(1000)
561 | end
562 |
563 | if isColor(559,243,0xf7c663,85) and isColor(568,253,0xe66900,85) and isColor(575,247,0xde7100,85) then
564 | --紫色已经勾选
565 | tap(566,250)--去除紫色已勾选
566 | mSleep(1000)
567 | end
568 |
569 | if isColor(563,304,0xde7500,85) and isColor(573,304,0xde7100,85) and isColor(569,310,0xe66900,85) then
570 | --橙色已经勾选
571 | tap(566,301)--去除橙色已勾选
572 | mSleep(1000)
573 | end
574 |
575 | if isColor(560,357,0xefd26b,85) and isColor(568,367,0xe66d00,85) and isColor(575,362,0xde6d00,85) then
576 | --绿色已经勾选
577 | tap(566,350)--去除绿色已勾选
578 | mSleep(1000)
579 | end
580 |
581 | if isColor(560,431,0xde9e19,85) and isColor(568,440,0xef6d00,85) and isColor(581,429,0xef9e08,85) then
582 | --符石
583 | tap(566,438) --去除
584 | mSleep(1000)
585 | end
586 |
587 | tap(640,521) --确定分解
588 | mSleep(800)
589 |
590 | tap(539,465) --点击确定
591 | mSleep(2000)
592 |
593 | ---白色分解成功
594 | tap(1035,310)--点击窗口外
595 |
596 |
597 | mSleep(2000)
598 | tap(1152,27) --关闭
599 | cls()
600 | toast("分解完成",1)
601 | mSleep(2000)
602 | --ScrapWhite()
603 | --ScrapWhiteBlue()
604 |
605 | end
606 |
607 | function isStop()
608 |
609 | --取色列表
610 | local col={}
611 | local col2={}
612 | local h={
613 | {1209,57},
614 | {1209,61},
615 | {1228,61},
616 | {1240,61},
617 | {1258,61},
618 | }
619 | for k,v in ipairs(h) do
620 | col[k]=getColor(table.unpack(v))
621 | end
622 | mSleep(1000)
623 | for k,v in ipairs(h) do
624 | col2[k]=getColor(table.unpack(v))
625 | end
626 |
627 | for k,v in ipairs(col) do
628 | if(v~=col2[k]) then
629 | return false
630 | end
631 | end
632 | return true
633 |
634 | end
635 |
636 |
637 | function isPK() --等死
638 | cls()
639 | if not (isColor(143,711,0x7b2019,85) and isColor(176,711,0x731810,85) and isColor(1092,710,0x7b1c19,85) and isColor(1263,13,0x842019,85)) then
640 | return true
641 | else
642 | return false
643 | end
644 |
645 | end
646 |
647 |
648 | function actTaskbar()
649 |
650 | if isColor(33,158,0xad9a7b,85) and isColor(46,161,0x9c8a6b,85) and isColor(78,158,0xa49673,85) then
651 | tap(53,156)
652 | mSleep(1000)
653 | end
654 |
655 | end
656 |
657 |
658 |
659 | function ClearButtons()
660 |
661 | return true
662 | end
663 |
664 |
665 |
666 | function back2normal()
667 | ClearButtons()
668 | cls()
669 | ClsWindows()
670 | actTaskbar()
671 | end
672 |
673 | function autoStartGame()
674 | --如果游戏没有启动,则启动游戏
675 | --如果当日任务已经完成,则关闭游戏,关闭手机
676 | --如果游戏崩溃,则重启游戏
677 | function isCrash()
678 | --游戏卡死,人物在一分钟之内没有移动则表示游戏卡死
679 |
680 | --保存游戏上下文环境(context)
681 | --重启游戏
682 | --重新载入上下文环境(context)
683 | return false
684 | end
685 | function isGameRunning()
686 | if(isFrontApp()==1) then
687 | return true
688 | else
689 | return false
690 | end
691 | end
692 | function wakeupPhone()
693 | --唤醒手机
694 | --解锁手机
695 | --启动游戏
696 | end
697 | function loadGame()
698 | end
699 |
700 |
701 | end --end autoStartGame
702 |
703 | function entergame()
704 |
705 | if multiColor({
706 | { 617, 164, 0xe6c294},
707 | { 631, 164, 0xeec694},
708 | { 618, 176, 0xe6c294},
709 | { 630, 175, 0xeeca94},
710 | })==true then
711 | toast("公告")
712 | tap(642,487) --点击确定
713 | elseif isColor(617,163,0xd6b28c,85) and isColor(633,165,0xdeb694,85) and isColor(649,171,0xb59a84,85) and isColor(656,175,0xb59e7b,85) then
714 | tap(643,486)
715 | mSleep(5000)
716 | if isColor(794,523,0xc55110,85) and isColor(813,534,0x9c493a,85) and isColor(846,530,0xceae8c,85) and isColor(871,522,0xbd966b,85) then
717 | tap(851,527)
718 | mSleep(10000)
719 | end
720 | if isColor(596,184,0xe6c29c,85) and isColor(601,184,0x6b696b,85) and isColor(606,190,0xd6b694,85) and isColor(626,188,0xd6b694,85) then
721 | --挂机结束
722 | tap(642,508) --免费领取
723 | mSleep(2000)
724 | tap(1065,303)
725 | mSleep(2000) --点击屏幕外
726 | end
727 |
728 |
729 |
730 | end
731 |
732 | end
733 |
734 |
735 |
736 |
737 | function back2biqi(force,city)
738 | force = force or false
739 | city = city or "比奇"
740 | while not (isColor(113,56,0x7b5d29,85) and isColor(182,56,0x84653a,85) and isColor(173,54,0x846131,85)) do
741 | if (isColor(591,117,0xce9a31,85) and isColor(595,117,0xe6ae31,85) and isColor(583,129,0x634931,85) and isColor(620,45,0x312d31,85))
742 | or (isColor(835,28,0xefdfbd,85) and isColor(835,37,0xe6d2b5,85) and isColor(835,46,0x5a5142,85) and isColor(836,50,0x84756b,85)) then
743 | tap(1149,34)
744 | mSleep(1000)
745 | end
746 | mSleep(2000)
747 | cls()
748 | mSleep(1500)
749 | end
750 | if not(isColor(1176,15,0xc5a27b,85) and isColor(1190,17,0xe6be94,85) and isColor(1208,28,0xbda27b,85) and isColor(1212,31,0xcea684,85)) or force==true then
751 |
752 | tap(1212,27) --点开地图
753 | mSleep(2000)
754 | tap(1019,42) --世界地图
755 | mSleep(2000)
756 | cls()
757 | --以下内容实为cls 替换
758 | --[[
759 | mSleep(1000)
760 |
761 | if isColor(862,557,0x4a1c08,85) and isColor(875,561,0xcea273,85) and isColor(895,554,0x9d6132,85) and isColor(919,553,0xce9e6b,85) then
762 | tap(913,557)
763 | toast("立即领取",1)
764 | mSleep(1500)
765 | tap(1078,235)
766 | mSleep(2000)
767 | if isColor(530,172,0xffd221,85) and isColor(600,169,0xffdb19,85) and isColor(657,182,0xffce3a,85) and isColor(729,191,0xeea619,85) and isColor(534,491,0x5a71b5,85) then
768 | toast("点击任意位置关闭 ",1)
769 | tap(1078,235)
770 | mSleep(1000)
771 | end
772 | end
773 | --]]
774 | if(city == "比奇") then
775 | tap(860,468) --比奇
776 | elseif(city == "白日门") then
777 | tap(624,481) --白日门
778 | end
779 | --cls()
780 | mSleep(1000)
781 | tap(548,462) --确认
782 | mSleep(4500)
783 | end
784 |
785 |
786 | end
787 |
788 | function MengZhong()
789 |
790 | if not(isColor(1174,16,0xc5a67b,85) and isColor(1183,17,0x73654a,85) and isColor(1183,25,0xd6b684,85)) then
791 |
792 | tap(1212,27) --点开地图
793 | mSleep(2000)
794 | tap(1019,42) --世界地图
795 | mSleep(1000)
796 |
797 | if isColor(862,557,0x4a1c08,85) and isColor(875,561,0xcea273,85) and isColor(895,554,0x9d6132,85) and isColor(919,553,0xce9e6b,85) then
798 | tap(913,557)
799 | toast("立即领取",1)
800 | mSleep(1500)
801 | tap(1078,235)
802 | mSleep(2000)
803 | if isColor(530,172,0xffd221,85) and isColor(600,169,0xffdb19,85) and isColor(657,182,0xffce3a,85) and isColor(729,191,0xeea619,85) and isColor(534,491,0x5a71b5,85) then
804 | toast("点击任意位置关闭 ",1)
805 | tap(1078,235)
806 | mSleep(1000)
807 | end
808 | end
809 | tap(657,360) --萌重
810 | --cls()
811 | mSleep(3000)
812 | tap(548,462) --确认
813 | mSleep(4500)
814 | end
815 |
816 |
817 | end
818 |
819 |
820 |
821 |
822 | function findTask(callback)
823 | toast("Finding Task...")
824 |
825 | if isColor(1142,31,0x842429,85) and isColor(1149,31,0xd6cab5,85) and isColor(1156,31,0x842829,85) then
826 | tap(1147,34) --关闭其他按钮
827 | mSleep(2000)
828 | end
829 | if isColor(1145,31,0x631819,85) and isColor(1149,31,0xeed6bd,85) and isColor(1160,31,0x8c2829,85) then
830 | tap(1147,34) --关闭地图
831 | mSleep(2000)
832 | end
833 | back2biqi(true)
834 | --stop()
835 |
836 |
837 | mSleep(2000)
838 |
839 | --back2biqi()
840 | actTaskbar()
841 | local x
842 | local y
843 | --stop()
844 | if(callback()) then
845 | return true
846 | end
847 | mSleep(1000)
848 | isFinish()
849 | slideupdown(110,200,360,3) --move to top
850 |
851 | if(callback()) then
852 | return true
853 | end
854 | mSleep(1000)
855 | isFinish()
856 | if (slideupdown(110,360,260,8,callback))~=-1 then
857 | toast("Found! ")
858 | return true
859 | else
860 | return false
861 | end
862 | end
863 | function isEnterCopy()
864 | if isColor(351,356,0x08ef08,85) and isColor(362,354,0x00e700,85) and isColor(378,354,0x216e21,85) and isColor(410,360,0x08ce08,85) then
865 | tap(397,356) --捉拿劫匪
866 | toast("进入副本")
867 | mSleep(2000)
868 | return true
869 | else
870 | return false
871 | end
872 | end
873 |
874 | function isInCopy()
875 | if isColor(18,161,0xf7f7d6,85) and isColor(29,164,0xc5aa8c,85) and isColor(24,177,0xc5a284,85) then
876 | while isColor(18,161,0xf7f7d6,85) and isColor(29,164,0xc5aa8c,85) and isColor(24,177,0xc5a284,85) do
877 | toast("在副本内")
878 | autofight()
879 | mSleep(5000)
880 | end
881 | return true
882 | else
883 | return false
884 | end
885 | end
886 | function isTransfer()
887 | if isColor(398,354,0x00fb00,85) and isColor(411,356,0x08d608,85) and isColor(416,356,0x00ef00,85) then
888 | tap(429,359)
889 | mSleep(3000)
890 | return true
891 | elseif isColor(428,380,0x00ff00,85) and isColor(450,391,0x08f608,85) and isColor(474,395,0x19b210,85) then
892 | tap(423,391)
893 | mSleep(2000)
894 | return true
895 | elseif isColor(424,381,0x00fb00,85) and isColor(432,381,0x00e300,85) and isColor(432,398,0x00f700,85) then
896 | tap(430,395)
897 | mSleep(2000)
898 | return true
899 | elseif isColor(357,347,0x00f300,85) and isColor(357,354,0x393531,85) and isColor(357,356,0x08e308,85) and isColor(357,371,0x00ff00,85) then
900 | tap(391,361)
901 | mSleep(2000)
902 | return true
903 | elseif isColor(350,379,0x08eb08,85) and isColor(351,381,0x313531,85) and isColor(356,387,0x314d31,85) and isColor(355,387,0x00e600,85) then
904 | tap(378,393)
905 | mSleep(2000)
906 | return true
907 | else
908 |
909 | return false
910 | end
911 | end
912 |
913 | function isInStory()
914 | if isColor(1102,41,0xde9e21,85) and isColor(1126,40,0x211c19,85) and isColor(1128,47,0xde9a10,85) then
915 | toast("跳过剧情")
916 | tap(1180,31)
917 | mSleep(2000)
918 | return true
919 | else
920 | return false
921 | end
922 | end
923 |
924 |
925 |
926 | function doTask(taskName)
927 | toast(taskName.."开始",1)
928 | tbug=nil
929 | isBuy=false
930 | local callback=isTask(taskName)
931 | mSleep(2000)
932 | if findTask(callback) then
933 |
934 | local bl=true
935 | local s
936 | local x,y=pos[1],pos[2]
937 | local c=pos[3]--保存颜色
938 | mSleep(500)
939 | tap(x,y)
940 | --toast("tap,tap,tap")
941 | mSleep(2000)
942 |
943 | --back2normal()
944 | while true do
945 |
946 | cls()
947 |
948 | fly()
949 |
950 |
951 |
952 | if isInCopy() then
953 | mSleep(1000)
954 | cls()
955 | --autofight()
956 |
957 | toast("copy")
958 | elseif isStop() and not isFinish() and not isAutoFight() then
959 | isAccept()
960 |
961 | isShowTitle()
962 |
963 | isDead()
964 |
965 | isEnterCopy()
966 |
967 | isTransfer()
968 |
969 | isInStory()
970 | if isBuy then
971 |
972 | if not isStop() then
973 | while not isFinish() do
974 | mSleep(3000)
975 | fly()
976 | end
977 | isBuy=false
978 | else
979 | mSleep(3000)
980 | tap(pos[1],pos[2])
981 | mSleep(1000)
982 | fly()
983 | end
984 | else
985 | --cls()
986 | if not isInCopy() and not isAutoFight() then
987 | cls()
988 | if not isColor(pos[1],pos[2],pos[3],90) then
989 | if(taskName=="日常任务") then
990 | return
991 | end
992 | toast("没有找到")
993 | if not findTask(callback) then
994 | return
995 | end
996 | else
997 | tap(pos[1],pos[2])
998 | mSleep(1500)
999 | end
1000 | end
1001 | end
1002 | elseif isStop() and isFinish() then
1003 | mSleep(2000)
1004 | if isBuy then
1005 |
1006 | if not isStop() then
1007 | while not isFinish() do
1008 | mSleep(3000)
1009 | fly()
1010 | end
1011 | isBuy=false
1012 | else
1013 | if not isColor(pos[1],pos[2],pos[3],90) then
1014 | if(taskName=="日常任务2") then
1015 | return
1016 | end
1017 | toast("没有找到")
1018 | if not findTask(callback) then
1019 | return
1020 | end
1021 | else
1022 | tap(pos[1],pos[2])
1023 | mSleep(1500)
1024 | isBuy=false
1025 | end
1026 | end
1027 | end
1028 | if not isAccept() then
1029 | cls()
1030 | if not isColor(pos[1],pos[2],pos[3],90) then
1031 | if(taskName=="日常任务2") then
1032 | return
1033 | end
1034 | toast("没有找到")
1035 | if not findTask(callback) then
1036 | return
1037 | end
1038 | else
1039 | tap(pos[1],pos[2])
1040 | mSleep(1500)
1041 | end
1042 | end
1043 | toast('-----2-----')
1044 | else
1045 | cls()
1046 | if isAutoFight() then
1047 | if isStop() then
1048 | if tbug==nil then
1049 | tbug=os.time()
1050 | mSleep(1000)
1051 | tskcol={}
1052 | local h={
1053 | {1209,57},
1054 | {1209,61},
1055 | {1228,61},
1056 | {1240,61},
1057 | {1258,61},
1058 | }
1059 |
1060 | for k,v in ipairs(h) do
1061 | tskcol[k]=getColor(table.unpack(v))
1062 | end
1063 | elseif os.time()-tbug>60 then
1064 | local h={
1065 | {1209,57},
1066 | {1209,61},
1067 | {1228,61},
1068 | {1240,61},
1069 | {1258,61},
1070 | }
1071 |
1072 | for k,v in ipairs(tskcol) do
1073 | if v~=getColor(table.unpack(h[k])) then
1074 | --已经运动了
1075 | tbug=nil
1076 | end
1077 |
1078 | end
1079 | if tbug~=nil then
1080 | nobuggy()
1081 | autofight()
1082 | tbug=nil
1083 | end
1084 |
1085 |
1086 | end
1087 |
1088 |
1089 | end
1090 |
1091 | tap(pos[1],pos[2])
1092 | mSleep(3000)
1093 | toast("----4-----")
1094 | end
1095 |
1096 | end
1097 |
1098 |
1099 | end
1100 | else
1101 | toast(taskName.."结束",1)
1102 | return -1 --tasknotfind
1103 | end
1104 |
1105 | end
1106 |
1107 |
1108 |
1109 | function isnoSpace()
1110 | if isColor(462,207,0xcec6b5,85) and isColor(457,213,0xdecebd,85) and isColor(459,216,0x3a413a,85) then
1111 | tap(912,153)
1112 | mSleep(3000)
1113 | scrap()
1114 | return true
1115 | else
1116 | return false
1117 | end
1118 | end
1119 |
1120 | function isBonous()
1121 | --mSleep(2000)
1122 | ClsWindows()
1123 | actTaskbar()
1124 | local x,y
1125 |
1126 | local t={
1127 | {0x3189e6, "-2|5|0x3a8ade,-3|17|0x3181d5,5|18|0x318ae6", 90, 6, 182, 36, 377},
1128 | {0x3175c5, "-1|6|0x2969ad,-2|16|0x3175c5,5|18|0x2969b5", 90, 6, 182, 36, 377},}
1129 | for k,v in ipairs(t) do
1130 | x, y = findMultiColorInRegionFuzzy(table.unpack(v))
1131 | if(x~=-1) then
1132 | pos={x,y,getColor(x,y)}
1133 | return true
1134 | end
1135 | end
1136 | return false
1137 | end
1138 |
1139 |
1140 | function nobuggy()
1141 | local x,y=101,541
1142 | touchDown(x,y)
1143 | x=x+math.random(10,50)-20
1144 | y=y+math.random(10,50)-20
1145 | mSleep(1000)
1146 | touchMove(x,y)
1147 | mSleep(3000)
1148 | touchUp(x,y)
1149 | end
1150 |
1151 |
1152 | function isTask(taskName)
1153 | --任务栏任务
1154 | local t={
1155 | 日常任务={
1156 | --{0xb555ad, "0|11|0xa451a4,14|11|0xad55a4,0|-8|0xad55ad", 90, 9, 177, 33, 383},
1157 | {0xb559b5, "5|4|0xb559b5,0|13|0xb559b5,9|18|0xb559b5", 90, 108, 174, 133, 382}
1158 | },
1159 | 日常任务2={{0xb555ad, "0|11|0xa451a4,14|11|0xad55a4,0|-8|0xad55ad", 90, 9, 177, 33, 383}},
1160 | 皇城悬赏={
1161 | --{0x3189e6, "-2|5|0x3a8ade,-3|17|0x3181d5,5|18|0x318ae6", 90, 6, 182, 36, 377},
1162 | --{0x3175c5, "-1|6|0x2969ad,-2|16|0x3175c5,5|18|0x2969b5", 90, 6, 182, 36, 377},
1163 | {0x3a79bd, "5|0|0x2979ce,5|9|0x3181d6,0|11|0x3186de,3|9|0x3a92ff", 90, 87, 182, 114, 383}
1164 | },
1165 |
1166 | 行会任务={
1167 | {0x3a91f6, "20|12|0x3a96ff,32|11|0x318eee", 90, 2, 184, 63, 383},
1168 | {0x2975cd, "14|-3|0x2975c5,30|4|0x3179cd", 90, 2, 184, 63, 383},
1169 | },
1170 | 任务栏任务={
1171 | {0xb559b5, "5|4|0xb559b5,0|13|0xb559b5,9|18|0xb559b5", 90, 108, 174, 133, 382},
1172 | {0xb555ad, "0|11|0xa451a4,14|11|0xad55a4,0|-8|0xad55ad", 90, 9, 177, 33, 383},
1173 | {0x3a79bd, "5|0|0x2979ce,5|9|0x3181d6,0|11|0x3186de,3|9|0x3a92ff", 90, 87, 182, 114, 383},
1174 | {0x3a91f6, "20|12|0x3a96ff,32|11|0x318eee", 90, 2, 184, 63, 383},
1175 | {0x2975cd, "14|-3|0x2975c5,30|4|0x3179cd", 90, 2, 184, 63, 383}
1176 | },
1177 | 周常任务={{0x00fbf7, "-2|4|0x00fbf7,-4|8|0x00f7f7,-5|15|0x00f7f7", 90, 90, 169, 119, 392}},
1178 | 除魔任务={{0x3a8eee, "11|11|0x3a8eee,37|18|0x318ae6", 90, 4, 183, 62, 382}},
1179 | 降伏兽兵={{0x3a8eee, "11|11|0x3a8eee,37|18|0x318ae6", 90, 4, 183, 62, 382}},
1180 | 世界任务={{0xdecebd, "11|8|0xbdb6a4,24|7|0xcec6b5,24|14|0xc5baad", 90, 8, 186, 95, 378}},
1181 | 主线任务={{0xf7f37b, "6|15|0xf7f77b,22|14|0xe6e77b,22|9|0xf7f37b", 90, 5, 190, 59, 354}},
1182 | 事件任务={{0xee75e6, "16|0|0xc569c5,31|1|0xf67df6,31|8|0xff81ff", 90, 3, 181, 63, 378}},
1183 | --支线任务={}, 支线任务可能导致卡死
1184 | }
1185 | local k,v,p,q,x,y,f
1186 | for k,v in pairs(t) do
1187 | if taskName==k then
1188 |
1189 | f=function()
1190 | for p,q in ipairs(v) do
1191 | x, y = findMultiColorInRegionFuzzy(table.unpack(q))
1192 | if x~=-1 then
1193 | pos={x,y,getColor(x,y)}
1194 | return true
1195 | end
1196 | end
1197 | return false
1198 | end
1199 | return f
1200 | end
1201 |
1202 | end
1203 |
1204 | end
1205 |
1206 |
1207 |
1208 | --doTask('日常任务')
1209 |
1210 |
1211 |
1212 |
1213 |
1214 |
1215 | function openCal()
1216 | --if isColor(1158,17,0xc53131,85) and isColor(1148,28,0xe6dbc5,85) and isColor(1136,41,0x7b2021,85) then
1217 | -- tap(1146,20)
1218 | --end
1219 |
1220 | cls()
1221 | --ClsWindows()
1222 | --ClearButtons()
1223 | tap(949,149)
1224 | mSleep(3000)
1225 | return true
1226 |
1227 |
1228 | end
1229 |
1230 |
1231 | function Admire() --参拜龙卫
1232 | toast("开始参拜龙卫",1)
1233 | cls()
1234 | back2biqi()
1235 | openCal()
1236 | cls()
1237 | if isColor(552,668,0xa49e8c,85) and isColor(557,667,0x8c8173,85) and isColor(558,654,0x292d29,85) then
1238 |
1239 | --今天没有参拜过
1240 | toast("参拜龙卫",1)
1241 | tap(568,612)
1242 | mSleep(4000)
1243 |
1244 | if isColor(728,567,0xac815a,85) and isColor(729,569,0x4a1c08,85) and isColor(729,572,0xd6ae84,85) then
1245 | toast("参与活动")
1246 | tap(779,568)
1247 | mSleep(2000)
1248 | end
1249 | while not ( isColor(475,643,0x4a2000,85) and isColor(479,643,0xd6ae7b,85) and isColor(484,643,0x522008,85) and isColor(530,649,0xe6be8c,85)) do
1250 | cls()
1251 | mSleep(1500)
1252 | fly()
1253 | mSleep(1500)
1254 | end
1255 | tap(521,641)--免费参拜
1256 | mSleep(3000)
1257 | --tap(1131,25) --点击关闭
1258 | else
1259 | toast("已经参拜过了!")
1260 | tap(1149,26) --关闭日历
1261 | mSleep(2000)
1262 | end
1263 | toast("参拜结束!")
1264 | end
1265 |
1266 | function antiEvil()
1267 | mSleep(2000)
1268 | cls()
1269 | mSleep(1500)
1270 | openCal()
1271 | --tap(1004,612)
1272 |
1273 | mSleep(2000)
1274 | cls()
1275 | if isColor(982,510,0x52be84,85) and isColor(995,510,0xe6ba63,85) and isColor(1008,505,0x5ac684,85) then
1276 | toast("除魔已经做完")
1277 | tap(1149,26) --关闭日历
1278 | mSleep(2000)
1279 |
1280 | else
1281 | toast("除魔")
1282 | --除魔还没有做完
1283 | tap(1004,612)
1284 | mSleep(2000)
1285 | tap(1027,539) --点击领取任务
1286 | mSleep(900)
1287 | stop()
1288 | mSleep(2000)
1289 | cls()
1290 | mSleep(2000)
1291 | stop()
1292 | doTask("除魔任务")
1293 | if isColor(1142,24,0xd69252,85) and isColor(1142,28,0x842421,85) and isColor(1147,28,0xe6caad,85) then
1294 | tap(1149,26) --关闭日历
1295 | mSleep(2000)
1296 | end
1297 |
1298 |
1299 | end
1300 | end
1301 |
1302 | function reject()
1303 | if isColor(323,317,0xceae84,85) and isColor(328,323,0xceae7b,85) and isColor(334,327,0xdeb684,85) then
1304 | tap(1000,152)
1305 | mSleep(1000)
1306 | end
1307 |
1308 | end
1309 |
1310 | function brave()
1311 | --勇者令
1312 | back2biqi()
1313 | mSleep(2000)
1314 | cls()
1315 | mSleep(1500)
1316 | openCal()
1317 | mSleep(1500)
1318 | slideupdown(1097,671,0,3)
1319 | cls()
1320 | --tap(791,591)
1321 | tap(1010,302)--版本更新,位置移动
1322 | fly()
1323 |
1324 | while not isStop() do
1325 | cls()
1326 | --reject()
1327 | mSleep(3000)
1328 | fly()
1329 | end
1330 | if (isColor(373,303,0x08f708,85) and isColor(370,315,0x217121,85) and isColor(383,308,0x08eb00,85)) then
1331 | tap(410,310)
1332 | mSleep(500)
1333 | stop()
1334 | mSleep(1500)
1335 | doTask("降伏兽兵")
1336 | else
1337 | return brave()
1338 | end
1339 |
1340 | end
1341 |
1342 |
1343 |
1344 | function Treasure()
1345 | back2biqi()
1346 | mSleep(1500)
1347 | cls()
1348 | mSleep(1500)
1349 | openCal()
1350 | tap(305,291) --打开限时任务
1351 | mSleep(2000)
1352 | cls()
1353 | tap(998,325) --神龙宝藏地址变化
1354 | toast("点击神龙宝藏",3)
1355 | mSleep(4000)
1356 | if not(isColor(414,167,0xf7be4a,85) and isColor(416,174,0x523129,85) and isColor(418,181,0xdeae42,85) and isColor(412,178,0xe6b64a,85)) then
1357 | if isColor(426,590,0x6b3919,85) and isColor(430,592,0xefbe8c,85) and isColor(437,602,0xdeae7b,85) then
1358 | toast("点击进入副本",3)
1359 | tap(463,592)
1360 | mSleep(3000)
1361 | autofight()
1362 | mSleep(3000)
1363 | --if isColor(458,12,0xf70000,85) and isColor(469,21,0xff0000,85) and isColor(485,21,0xde0408,85) then
1364 | toast("退出副本")
1365 | tap(1184,34)
1366 | --end
1367 | end
1368 | else
1369 | toast("神龙宝藏已经完成",1)
1370 | tap(1063,112)
1371 | mSleep(2000)
1372 | tap(1143,23)--关闭活动日历
1373 | mSleep(2000)
1374 | return false
1375 | end
1376 | toast("神龙宝藏结束",2)
1377 | --slideupdown()
1378 | end
1379 |
1380 |
1381 | function Hall()
1382 | back2biqi()
1383 | mSleep(1500)
1384 | cls()
1385 | mSleep(1500)
1386 | openCal()
1387 | mSleep(1500)
1388 | slideupdown(1097,671,0,1)
1389 | mSleep(1500)
1390 | local x,y
1391 | x,y = findMultiColorInRegionFuzzy( 0xe6be8c, "5|7|0xbd926b,33|7|0x6b2d08,59|7|0xd6ae84", 90, 494, 109, 636, 680)
1392 | if(x~=-1) then
1393 | tap(x,y)
1394 | mSleep(2000)
1395 | if isColor(587,631,0xdeb68c,85) and isColor(606,631,0xdeb284,85) and isColor(616,637,0xe6be8c,85) then
1396 | tap(639,628)
1397 | mSleep(2000)
1398 | tap(540,467) --确认
1399 | mSleep(2000)
1400 | while isInCopy() do
1401 | cls()
1402 | mSleep(1500)
1403 | autofight()
1404 |
1405 | if isColor(439,385,0x423d31,85) and isColor(449,385,0xf7efa4,85) and isColor(465,385,0xa49263,85) then
1406 | --通关奖励
1407 | tap(587,386)
1408 | mSleep(3000)
1409 | if isColor(1136,24,0xbd9e19,85) and isColor(1136,28,0x7b4d00,85) and isColor(1146,34,0xad7d29,85) and isColor(1152,45,0x291c21,85) then
1410 | tap(1178,33)--离开副本
1411 | mSleep(2000)
1412 | end
1413 | if isColor(612,342,0xded2bd,85) and isColor(612,353,0xc5bead,85) and isColor(630,353,0xded2bd,85) then
1414 | tap(538,471) --确认
1415 | mSleep(2000)
1416 | end
1417 |
1418 |
1419 | if isColor(1140,28,0x842421,85) and isColor(1148,28,0xe6dbc5,85) and isColor(1156,28,0x842421,85) then
1420 | tap(1143,23)--关闭活动日历
1421 | end
1422 |
1423 |
1424 | return
1425 | end
1426 | end
1427 | else
1428 | --已经完成了 点击关闭
1429 | cls()
1430 | mSleep(1500)
1431 | tap(1124,116)
1432 | mSleep(2000)
1433 | tap(1143,23)--关闭活动日历
1434 | mSleep(2000)
1435 | return
1436 | end
1437 | else
1438 | return
1439 | end
1440 | end
1441 | --Hall()
1442 | function Hell()
1443 | cls()
1444 | mSleep(1500)
1445 | back2biqi()
1446 | mSleep(1500)
1447 | openCal()
1448 | mSleep(1500)
1449 | tap(787,605)
1450 | mSleep(2500)
1451 | tap(645,635)--点击挑战
1452 | mSleep(2000)
1453 | cls()
1454 | tap(649,544)--前往挑战
1455 | mSleep(1500)
1456 | --do 自动战斗
1457 |
1458 | while not (isColor(511,493,0x5a75bd,85) and isColor(523,495,0x4a495a,85) and isColor(539,495,0x5a71b5,85)) do
1459 | --领奖界面
1460 | cls()
1461 | mSleep(1500)
1462 | autofight()
1463 | mSleep(3000)
1464 | end
1465 | tap(587,392) -- 领取第二个宝箱
1466 | mSleep(4000)
1467 |
1468 | if isColor(467,462,0xefc68c,85) and isColor(467,464,0x8c5d31,85) and isColor(467,475,0xefc68c,85) and isColor(457,498,0x42413a,85) then
1469 | --离开按钮
1470 | tap(486,466)
1471 | mSleep(2000)
1472 | else --没有找到离开按钮
1473 | tap(1186,36)--离开副本
1474 | mSleep(2000)
1475 | if isColor(465,475,0x4a4942,85) and isColor(510,472,0xb58152,85) and isColor(534,470,0x632d08,85) and isColor(552,498,0x4a4542,85) then
1476 | tap(530,463) --点击确认
1477 | mSleep(2000)
1478 | end
1479 |
1480 | end
1481 |
1482 | if isColor(511,493,0x5a75bd,85) and isColor(523,495,0x4a495a,85) and isColor(539,495,0x5a71b5,85) then
1483 | --是否有没有领取的宝箱
1484 | tap(587,392) -- 领取第二个宝箱
1485 | mSleep(4000)
1486 | end
1487 |
1488 | --直到领取奖励
1489 | --离开副本
1490 | --关闭日历
1491 |
1492 | end
1493 | --mSleep(5000)
1494 | --Hell()
1495 | function autogroup()
1496 | --自动组队 等待
1497 | end
1498 |
1499 | function Hole()
1500 | back2biqi()
1501 | mSleep(1500)
1502 | openCal()
1503 |
1504 |
1505 |
1506 | slideupdown(1088,641,0,2) --挪动三次到达算卦
1507 |
1508 | tap(1003,394) --点击降魔
1509 |
1510 | cls()
1511 | mSleep(1500)
1512 | if isColor(559,551,0x848184,85) and isColor(625,615,0x7b7d7b,85) and isColor(600,628,0x6b696b,85) and isColor(646,632,0x4a494a,85) and isColor(671,637,0x313131,85) then--已经完成 退出
1513 | tap(1127,107)--关闭降魔洞
1514 | mSleep(300)
1515 | tap(1159,33) --关闭日历
1516 | return
1517 | end
1518 | tap(637,631)--开始挑战
1519 | mSleep(2000)
1520 | --if isColor(488,471,0xeec68c,85) and isColor(492,470,0x522408,85) and isColor(496,470,0xe6ba84,85) and isColor(502,470,0xbd9663,85) then
1521 | tap(539,468) --前往参与
1522 |
1523 | mSleep(3000)
1524 | if isColor(487,384,0xded2bd,85) and isColor(500,463,0xeec68c,85) and isColor(517,467,0xe6be84,85) and isColor(569,467,0xe6be84,85) and isColor(512,405,0x313129,85) then
1525 | tap(739,463) --令牌不够,点击关闭
1526 | mSleep(3000)
1527 | tap(1125,119) --关闭降魔界面
1528 | mSleep(2000)
1529 | clsCal()
1530 | mSleep(800)
1531 | end
1532 | --if isColor(1149,16,0xceaa84,85) and isColor(1152,16,0x635142,85) and isColor(1154,16,0xc5a27b,85) and isColor(1154,21,0xd6b28c,85) then
1533 | --在洞窟里面,点击退出
1534 | tap(1191,121)
1535 | mSleep(2000)
1536 | tap(536,467) --点击确定退出
1537 | mSleep(3000)
1538 | --end
1539 |
1540 |
1541 |
1542 | end
1543 |
1544 | function Competition()
1545 | back2biqi()
1546 | openCal()
1547 | slideupdown(1097,407,100,1)
1548 | cls()
1549 | local x,y
1550 | x,y = findMultiColorInRegionFuzzy( 0xdeb684, "2|5|0xdeae84,2|7|0x632808,24|6|0xe6be8b", 90, 716, 129, 858, 705)
1551 | if (x~=-1) then
1552 | tap(x,y)
1553 | mSleep(2000)
1554 | else
1555 | tap(1151,30)
1556 | mSleep(2000)
1557 |
1558 | return
1559 | end
1560 |
1561 |
1562 | local i
1563 | for i=1,3 do
1564 | if isColor(586,612,0xde6942,85) and isColor(592,612,0xd6cece,85) and isColor(592,616,0xf7fbf7,85) and isColor(601,616,0xeff3ef,85) and isColor(597,619,0x3a353a,85) then
1565 | --剩余次数0
1566 | tap(1149,28)
1567 | mSleep(2000)
1568 | tap(1150,26)
1569 | mSleep(2000)
1570 | return
1571 |
1572 | end
1573 |
1574 |
1575 |
1576 |
1577 | tap(1034,168)--第一对手
1578 | mSleep(2000)
1579 | if isColor(506,469,0xb58a5a,85) and isColor(511,469,0x7b3d21,85) and isColor(520,469,0x632400,85) and isColor(452,462,0x4a4542,85) then
1580 | tap(536,458)--确认
1581 | mSleep(2000)
1582 | --autofight()
1583 | end
1584 | if isColor(616,493,0xe6be94,85) and isColor(620,493,0x844921,85) and isColor(623,496,0x6b3108,85) and isColor(629,496,0xefc29c,85) then
1585 | --胜利或者失败
1586 | tap(645,488) --点击返回
1587 | mSleep(3000)
1588 | end
1589 | tap(1194,34) --退出挑战
1590 | mSleep(3000)
1591 | if isColor(616,493,0xe6be94,85) and isColor(620,493,0x844921,85) and isColor(623,496,0x6b3108,85) and isColor(629,496,0xefc29c,85) then
1592 | --胜利或者失败
1593 | tap(645,488) --点击返回
1594 | mSleep(2000)
1595 | end
1596 | end
1597 |
1598 | --满3次,退出
1599 | tap(1149,28)
1600 | mSleep(2000)
1601 | if isColor(1140,29,0x7b2421,85) and isColor(1146,29,0xc58a52,85) and isColor(1153,29,0x5a1819,85) then
1602 | tap(1150,26)
1603 | mSleep(2000)
1604 | end
1605 |
1606 | return
1607 |
1608 | end
1609 |
1610 |
1611 | function Training()
1612 | back2biqi()
1613 | cls()
1614 | openCal()
1615 | cls()
1616 | tap(784,318) --click traing
1617 | mSleep(3000)
1618 | tap(847,578) --click onekey
1619 | --tap(confirm)
1620 | mSleep(2000)
1621 | if isColor(556,319,0x08ff08,85) and isColor(554,337,0x00ff00,85) and isColor(581,337,0x00f700,85) and isColor(564,334,0x315929,85) then
1622 | --RMB jump
1623 | tap(742,461)--click cancel
1624 | mSleep(2000)
1625 | tap(1109,105)--click close
1626 | mSleep(2000)
1627 | tap(1149,29) --close calendar
1628 | mSleep(2000)
1629 | else
1630 | tap(539,460) --click confirm
1631 | mSleep(4000)
1632 | cls()
1633 | tap(638,504) --click confirm
1634 | mSleep(2000)
1635 | tap(1103,101) --click close
1636 | mSleep(2000)
1637 | tap(1149,29)
1638 | mSleep(2000)
1639 | end
1640 | end
1641 | function clsCal()
1642 | if isColor(1139,29,0x842429,85) and isColor(1147,29,0xdebe94,85) and isColor(1156,29,0x7b2421,85) then
1643 | tap(1150,27)
1644 | mSleep(2000)
1645 | end
1646 | end
1647 |
1648 |
1649 | function mine()
1650 | cls()
1651 | openCal()
1652 | slideupdown(1088,661,0,1)
1653 | tap(1011,609)--前往挖矿
1654 | while not (isColor(363,462,0x10b210,85) and isColor(400,470,0x08db08,85) and isColor(467,499,0x313131,85) and isColor(487,413,0x3a4531,85) ) do
1655 | cls()
1656 | fly()
1657 | mSleep(2500)
1658 | end
1659 | tap(437,403)--矿洞三层
1660 | mSleep(2000)
1661 | --function selfmove()
1662 | local x,y=101,541
1663 | touchDown(x,y)
1664 |
1665 | --y=y+20
1666 | x=x-40
1667 | mSleep(500)
1668 | touchMove(x,y)
1669 | mSleep(10000) -- 跑步十秒,应该怎么都到边了
1670 | touchUp(x,y)
1671 | mSleep(1000)
1672 | cls()
1673 | --end
1674 | selfmove()
1675 | while (isColor(1154,29,0x9c8663,85) and isColor(1157,56,0xb51008,85) and isColor(1172,67,0xde0400,85) and isColor(1175,28,0xe6be8c,85) ) do
1676 | cls()
1677 | if isColor(941,624,0xbd9642,85) and isColor(950,630,0x3a3131,85) and isColor(969,627,0x5a4521,85) and isColor(952,642,0x3a2810,85) then
1678 | tap(955,620) --挖矿
1679 | end
1680 | mSleep(10000)
1681 | end
1682 |
1683 |
1684 |
1685 | end
1686 |
1687 | function openTools()
1688 | openToolbar()
1689 | tap(360,652)
1690 | mSleep(2000)
1691 | end
1692 |
1693 |
1694 | function Smith()
1695 | toast("开始铁匠铺",1)
1696 |
1697 | mSleep(2000)
1698 | openTools()
1699 | local x=-1
1700 | local y=-1
1701 | function useSmithBox()
1702 | toast("铁匠铺宝箱在"..x..","..y)
1703 | mSleep(1500)
1704 | tap(x,y)
1705 | mSleep(1500)
1706 | if isColor(1037,509,0x7b4519,85) and isColor(1061,516,0xb5855a,85) and isColor(1070,514,0xdeb683,85) and isColor(1111,511,0x311400,85) then
1707 | --找到使用按钮
1708 | tap(1059,513)
1709 | mSleep(500)
1710 | if isColor(526,591,0x834d21,85) and isColor(556,564,0x212021,85) and isColor(556,594,0xc59e73,85) and isColor(591,587,0x845d3a,85) then
1711 | --确定使用
1712 | tap(545,592)
1713 | mSleep(500)
1714 | end
1715 | end
1716 | --关闭当前窗口
1717 | tap(1144,25)
1718 | mSleep(500)
1719 | end
1720 | x,y = findMultiColorInRegionFuzzy( 0xada6a4, "20|10|0x9c5d3a,24|12|0xd6966b,9|30|0x3a3531,20|32|0x292929,26|-1|0xbdbabd", 90, 151, 103, 617, 563)
1721 | if(x~=-1) then
1722 | useSmithBox()
1723 | else
1724 | --关闭当前窗口
1725 | tap(1144,25)
1726 | --mSleep(1500)
1727 | toast("背包没有宝箱")
1728 | openCurrentMap()
1729 | mSleep(2000)
1730 | --点击武器店老板
1731 | tap(983,190)
1732 | mSleep(12000)
1733 | if isColor(561,391,0x312d29,85) and isColor(558,389,0x08f308,85) and isColor(559,403,0x00ff00,85) and isColor(565,398,0x10d208,85) then
1734 | --铁匠铺
1735 | tap(572,392)
1736 | mSleep(1000)
1737 | end
1738 | --金币购买
1739 | tap(322,599)
1740 | mSleep(1000)
1741 | --关闭购买
1742 | tap(1075,76)
1743 | mSleep(1000)
1744 | --关闭地图
1745 | tap(1159,31)
1746 | mSleep(1000)
1747 | openTools()
1748 | x,y = findMultiColorInRegionFuzzy( 0xada6a4, "20|10|0x9c5d3a,24|12|0xd6966b,9|30|0x3a3531,20|32|0x292929,26|-1|0xbdbabd", 90, 151, 103, 617, 563)
1749 | if(x~=-1) then
1750 | useSmithBox()
1751 | end
1752 | end
1753 | toast("铁匠铺结束")
1754 | mSleep(2000)
1755 | end
1756 | function MaFatower()
1757 | cls()
1758 | back2biqi()
1759 | openCal()
1760 | slideupdown(1088,641,0,3)
1761 |
1762 | --if isColor(542,646,0xd6d2bd,85) and isColor(545,646,0x212021,85) and isColor(550,646,0xcec6b5,85) and isColor(547,651,0x3a3531,85) then
1763 | if isColor(766,347,0xc5baad,85) and isColor(766,349,0x424142,85) and isColor(762,352,0xb5b29c,85) and isColor(772,353,0xcec2ad,85) then
1764 | --玛珐塔没有做过,哪怕一层
1765 | tap(784,301)
1766 | mSleep(2000)
1767 | if isColor(595,638,0x633919,85) and isColor(611,638,0x845129,85) and isColor(653,640,0xc5956b,85) then
1768 | --找到挑战按钮
1769 | tap(643,641)
1770 | mSleep(2000)
1771 | tap(637,545)--前往挑战
1772 | mSleep(3000)
1773 | while not (isColor(453,463,0x733d10,85) and isColor(459,463,0xcea26b,85) and isColor(505,464,0x94693a,85) and isColor(528,472,0x4a1c08,85)) do
1774 | --没有离开
1775 |
1776 |
1777 | if isColor(956,20,0xc5a631,85) and isColor(998,28,0xdeb252,85) and isColor(1028,19,0x212021,85) then
1778 | --超时
1779 | tap(1193,27)--点击离开副本
1780 | mSleep(2000)
1781 |
1782 | tap(535,461) --确定离开
1783 | mSleep(2000)
1784 | clsCal()
1785 | return
1786 | end
1787 | cls()
1788 | mSleep(3000)
1789 | end
1790 | tap(495,466)
1791 | mSleep(2000)
1792 | cls()
1793 | mSleep(3000)
1794 | return
1795 |
1796 |
1797 |
1798 | --end
1799 |
1800 | else
1801 | --挑战灰色
1802 | tap(1148,21)--关闭玛珐塔
1803 | mSleep(2000)
1804 | clsCal()
1805 | end
1806 | else
1807 | clsCal()
1808 | end
1809 |
1810 |
1811 | end
1812 |
1813 |
1814 |
1815 |
1816 |
1817 | function fate()
1818 | cls()
1819 | back2biqi(true,"白日门")
1820 | mSleep(2000)
1821 | function findDaXian(wait,noneed)
1822 | openCurrentMap()
1823 | if(not noneed) then
1824 | slideupdown(1067,650,100,1) --上滑两次到郑大仙
1825 | end
1826 | tap(984,513) --点击郑大仙
1827 | mSleep(wait)
1828 | end
1829 | function buyBone(count)
1830 |
1831 | tap(535,467) --点击确认
1832 |
1833 | --tap(407,386)
1834 |
1835 |
1836 | mSleep(2000)
1837 | tap(777,426)
1838 |
1839 | mSleep(2000)
1840 | tap(545,589)
1841 | mSleep(1500)
1842 | --tap(1153,29)
1843 | end
1844 | function BoneFate()
1845 | tap(735,586) --甲骨算卦1
1846 | mSleep(2000)
1847 | tap(503,467)--确认
1848 | mSleep(2000)
1849 | if isColor(562,335,0xcec2b5,85) and isColor(581,335,0xbdbaa4,85) and isColor(575,340,0x5a514a,85) then
1850 | --甲骨不够
1851 | buyBone()
1852 | tap(735,586) --再次甲骨算卦1
1853 | mSleep(2000)
1854 | tap(503,467)--确认
1855 | end
1856 |
1857 | mSleep(2000)
1858 | tap(735,586) --甲骨算卦2
1859 | mSleep(2000)
1860 | tap(503,467)--确认
1861 | mSleep(2500)
1862 | if isColor(562,335,0xcec2b5,85) and isColor(581,335,0xbdbaa4,85) and isColor(575,340,0x5a514a,85) then
1863 | --甲骨不够
1864 | buyBone()
1865 | tap(735,586) --再次甲骨算卦2
1866 | mSleep(2000)
1867 | tap(503,467)--确认
1868 | end
1869 | mSleep(2000)
1870 | end
1871 |
1872 | findDaXian(6000)
1873 |
1874 |
1875 | --buyBone()
1876 | --findDaXian(1000,true)
1877 | tap(649,395)--绿色算卦的文字
1878 | mSleep(2000)
1879 | tap(1153,29)--点击算卦
1880 | mSleep(2000)
1881 |
1882 | if isColor(688,586,0x6b4121,85) and isColor(689,586,0xa47d52,85) and isColor(690,586,0xe6ba8c,85) and isColor(698,584,0xefc694,85) and isColor(696,587,0x522000,85) then
1883 | --甲骨算卦
1884 | BoneFate()
1885 | tap(1100,111) --退出算卦
1886 | mSleep(2000)
1887 | end
1888 | if isColor(718,594,0xdeb683,85) and isColor(721,594,0x6b3510,85) and isColor(728,594,0xe6c28b,85) then
1889 | --挂金算卦
1890 | tap(1100,111) --退出算卦
1891 | mSleep(2000)
1892 | end
1893 |
1894 | if isColor(698,581,0x733d10,85) and isColor(698,579,0xdeb684,85) and isColor(698,589,0xe6c28c,85) and isColor(694,591,0x421c00,85) then
1895 | --免费算卦
1896 | tap(734,584) --点击免费算卦
1897 | mSleep(14000) --等待11秒
1898 | --if isColor(707,591,0x632408,85) and isColor(715,591,0xefc694,85) and isColor(729,591,0xe6be8c,85) and isColor(737,591,0x8c5931,85) then
1899 | cls()
1900 | mSleep(2000)
1901 | tap(735,586) --解卦
1902 | mSleep(2000)
1903 |
1904 | BoneFate()
1905 | mSleep(2000)
1906 | cls()
1907 | tap(1100,111) --退出算卦
1908 | mSleep(2000)
1909 | --end
1910 | end
1911 | if isColor(707,591,0x632408,85) and isColor(715,591,0xefc694,85) and isColor(729,591,0xe6be8c,85) and isColor(737,591,0x8c5931,85) then
1912 | cls()
1913 | tap(735,586) --解卦
1914 | mSleep(2000)
1915 | BoneFate()
1916 | cls()
1917 | tap(1100,111) --退出算卦
1918 | mSleep(2000)
1919 | end
1920 | cls()
1921 | findDaXian(1000)
1922 | cls()
1923 | tap(739,390)--点击炼丹
1924 |
1925 | mSleep(2000)
1926 | if isColor(714,592,0x521c00,85) and isColor(716,598,0xefc294,85) and isColor(718,600,0x5a2408,85) and isColor(720,600,0xe6be8c,85) then
1927 | --免费炼丹
1928 | cls()
1929 | tap(714,592) --免费炼丹
1930 | mSleep(4000)
1931 |
1932 | end
1933 | cls()
1934 | tap(1100,111)--关闭
1935 | mSleep(2000)
1936 | tap(1153,29)
1937 | end
1938 |
1939 | ---------------没有任何提示----------------
1940 | function DrognCityGift() --魔龙四礼
1941 | toast("开始魔龙四礼",5)
1942 | cls()
1943 | tap(1212,27) --点开地图
1944 | mSleep(2000)
1945 | tap(1019,42) --世界地图
1946 | mSleep(3000)
1947 |
1948 |
1949 | tap(920,325) --molong
1950 | --cls()
1951 | mSleep(1000)
1952 | tap(548,462) --确认
1953 | mSleep(4500)
1954 |
1955 |
1956 |
1957 | --toast("")
1958 | tap(1198,26) --点开当前地图
1959 | mSleep(2000)
1960 | slideupdown(1067,187,650,2)
1961 | cls()
1962 | tap(981,444) --严将军
1963 | mSleep(2000)
1964 | while not (isColor(326,430,0x6b6d6b,85) and isColor(333,523,0x5a555a,85) and isColor(504,475,0x313131,85) and isColor(931,518,0x63615a,85)) do
1965 | mSleep(2000)
1966 | end
1967 | tap(454,354)
1968 | mSleep(2000)
1969 | if isColor(903,163,0x732421,85) and isColor(910,160,0xdea263,85) and isColor(918,159,0x631819,85) then
1970 | tap(908,162) --关闭
1971 | mSleep(2000)
1972 | end
1973 | cls()
1974 | tap(984,586) --药店老板
1975 | mSleep(2000)
1976 | while not (isColor(327,412,0x636563,85) and isColor(331,520,0x3a3d3a,85) and isColor(930,522,0x313131,85) and isColor(785,455,0x3a393a,85)) do
1977 |
1978 | mSleep(2000)
1979 | end
1980 | if isColor(450,348,0x08ef08,85) and isColor(450,353,0x293529,85) and isColor(450,357,0x00df00,85) then
1981 | tap(540,353)
1982 | mSleep(2000)
1983 | end
1984 |
1985 | if isColor(903,163,0x732421,85) and isColor(910,160,0xdea263,85) and isColor(918,159,0x631819,85) then
1986 | tap(908,162) --关闭
1987 | mSleep(2000)
1988 | end
1989 | cls()
1990 | tap(1002,510) --武器店老板
1991 | mSleep(2000)
1992 | while not (isColor(326,402,0x6b696b,85) and isColor(349,402,0x3a3531,85) and isColor(333,520,0x3a3d3a,85) ) do
1993 | mSleep(2000)
1994 | end
1995 | tap(582,361)
1996 | mSleep(2000)
1997 | if isColor(903,163,0x732421,85) and isColor(910,160,0xdea263,85) and isColor(918,159,0x631819,85) then
1998 | tap(908,162) --关闭
1999 | mSleep(2000)
2000 | end
2001 |
2002 |
2003 | --[[ 取消杂货店老板
2004 | --x,y==杂货店老板
2005 | slideupdown(1083,642,446,1)
2006 | cls()
2007 | tap(1006,602)
2008 | while not (isColor(494,348,0x10ca10,85) and isColor(495,359,0x08e708,85) and isColor(518,363,0x00ef00,85)) do
2009 | mSleep(3000)
2010 | end
2011 | tap(565,358)
2012 | mSleep(2000)
2013 |
2014 | if isColor(903,163,0x732421,85) and isColor(910,160,0xdea263,85) and isColor(918,159,0x631819,85) then
2015 | tap(908,162) --关闭
2016 | mSleep(2000)
2017 | end
2018 | --]]
2019 | tap(1154,39)
2020 | mSleep(1500)
2021 | end
2022 |
2023 | function FakeShaBuck() --幻沙老兵
2024 | MengZhong()
2025 | mSleep(2000)
2026 | tap(1198,26) --点开当前地图
2027 | slideupdown(1081,167,650,3)
2028 | local find=slideupdown(1081,650,120,3,function()
2029 | local x,y = findMultiColorInRegionFuzzy( 0xeea619, "0|5|0x523110,27|13|0xd6b284,32|13|0x423931,38|9|0x423931,45|19|0xb59a73,48|8|0xeec694", 90, 909, 165, 1057, 658)
2030 | if x~=-1 then
2031 | laobing={x,y}
2032 | return true
2033 | else return false
2034 | end
2035 | end)
2036 | if find==-1 then
2037 | --寻找失败
2038 | tap(1149,30) --关闭地图
2039 | mSleep(1500)
2040 | return false
2041 | else
2042 | cls()
2043 | tap(laobing[1],laobing[2])
2044 | mSleep(2000)
2045 |
2046 | while not (isColor(352,470,0x10b610,85) and isColor(354,475,0x218a21,85) and isColor(354,480,0x19a210,85) and isColor(375,480,0x294929,85)) do
2047 | mSleep(2000)
2048 | end
2049 | cls()
2050 | tap(598,416) --全服经验
2051 | mSleep(2000)
2052 | cls()
2053 | tap(laobing[1],laobing[2])
2054 | mSleep(2000)
2055 | tap(785,416) --全服礼包
2056 | mSleep(2000)
2057 | if isColor(905,152,0xce9263,85) and isColor(905,158,0x842429,85) and isColor(913,158,0xd6c6ad,85) and isColor(919,158,0x842421,85) then
2058 | tap(911,157) --关闭老兵
2059 | mSleep(2000)
2060 | end
2061 | if isColor(1143,32,0x7b2421,85) and isColor(1147,32,0x632810,85) and isColor(1156,31,0x521010,85) then
2062 | tap(1147,27)--关闭地图
2063 | mSleep(800)
2064 | end
2065 |
2066 |
2067 | end
2068 |
2069 | end
2070 |
2071 | ----------------需要定时点击进入---------------
2072 | function WinnerKing() --胜者为王
2073 | --15:00
2074 | --21:00
2075 | end
2076 | function Grap() --地下夺宝
2077 | --14:00
2078 | --20:00
2079 | end
2080 | function getWine() -- 卧龙领酒(无提示)
2081 | --after 9:25
2082 | end
2083 | ----------------寻路---------------
2084 | function heavyKnight() --兽人重骑
2085 | end
2086 |
2087 | function wolfSpider() --天狼蜘蛛
2088 | end
2089 |
2090 | ----------------领取奖励----------
2091 | function TargetToday() --今日目标
2092 | back2biqi()
2093 | mSleep(1000)
2094 | openCal()
2095 | cls()
2096 | tap(1007,610)
2097 | mSleep(1500)
2098 | local x=1040
2099 | local btns={
2100 | 203,335,472,607}
2101 | local i
2102 | for i=1,4 do
2103 | cls()
2104 | tap(x,btns[i])
2105 | mSleep(1500)
2106 | end
2107 | slideupdown(1029,600,327,1)
2108 | cls()
2109 | tap(1040,607) --点击最后一个
2110 | mSleep(2000)
2111 | tap(1149,27)--点击关闭
2112 | mSleep(1500)
2113 |
2114 | clsCal()
2115 | --end Target
2116 | end
2117 | ----------------邮件---------------
2118 | function mail()
2119 |
2120 | openToolbar()
2121 | tap(748,657) --点击社交
2122 | mSleep(5000)
2123 | tap(756,37)
2124 | mSleep(6000) --点击邮件
2125 | tap(479,143) --点击一键领取
2126 | mSleep(1500)
2127 | tap(534,472) --点击确定
2128 | mSleep(2000)
2129 | ------------------------------
2130 |
2131 | if not (isColor(169,201,0xc5b294,85) and isColor(182,201,0xbd413a,85) and isColor(182,214,0xad2429,85)) then
2132 | tap(479,143) --点击全部删除
2133 | mSleep(1500)
2134 | tap(534,472) --点击确定
2135 | mSleep(2000)
2136 | end
2137 |
2138 | tap(1155,25) --关闭界面
2139 |
2140 |
2141 |
2142 | --end mail
2143 | end
2144 |
2145 | function donation()
2146 | cls()
2147 | back2biqi()
2148 | mSleep(1500)
2149 | tap(76,33)--点击头像
2150 | mSleep(5000)
2151 | touch():on(1068,45):move(300,45):off()
2152 | mSleep(1000)
2153 | tap(604,41)--尝试点击官阶
2154 | mSleep(1500)
2155 | cls()
2156 | --if isColor(992,527,0xad865a,85) and isColor(993,535,0xefca9c,85) and isColor(993,538,0x5a3919,85) and isColor(993,541,0xe6ba8c,85) and isColor(1018,541,0xdeba84,85) then
2157 | if isColor(626,121,0x7b5d21,85) and isColor(641,112,0xad6921,85) and isColor(832,538,0xc5966b,85) then
2158 | --确定是官阶
2159 | --开始捐献
2160 | mSleep(1000)
2161 | elseif isColor(612,110,0xbd7921,85) and isColor(638,121,0xdea23a,85) and isColor(695,128,0x844d29,85) and isColor(597,133,0xad815a,85) then
2162 | tap(1171,333) --金榜题名,点后一个页面
2163 | mSleep(1000)
2164 | else
2165 | --不是官阶
2166 | tap(1097,41) --点击后一个按钮
2167 | mSleep(2000)
2168 | cls()
2169 | --if isColor(992,527,0xad865a,85) and isColor(993,535,0xefca9c,85) and isColor(993,538,0x5a3919,85) and isColor(993,541,0xe6ba8c,85) and isColor(1018,541,0xdeba84,85) then
2170 | if isColor(626,121,0x7b5d21,85) and isColor(641,112,0xad6921,85) and isColor(832,538,0xc5966b,85) then
2171 | --确定这把是官阶了,开始捐献
2172 | mSleep(1000)
2173 | else
2174 | --没有找到官阶
2175 | tap(1150,30)--关闭
2176 | mSleep(500)
2177 | return
2178 | end
2179 | end
2180 | --开始领取俸禄
2181 | tap(853,536) --点击俸禄
2182 | mSleep(1000)
2183 | tap(621,532) --点击领取俸禄
2184 | mSleep(1500)
2185 | if isColor(909,164,0x7b2421,85) and isColor(914,164,0xbd713a,85) and isColor(924,164,0x7b2421,85) then
2186 | --如果领取之后窗口没有关闭则点击关闭按钮
2187 | tap(920,161)
2188 | mSleep(1500)
2189 | end
2190 | cls()
2191 | tap(1040,539) --点击获取功勋
2192 | mSleep(2000)
2193 | local dt=os.time()
2194 | mSleep(1000)
2195 | while not(isColor(169,171,0xdeba8c,85) and isColor(173,171,0x423d42,85) and isColor(176,171,0xdeba8c,85) and isColor(176,177,0xbda27b,85) and isColor(176,182,0x4a3d3a,85)) do
2196 | --寻路
2197 | --todo:超时
2198 | local ct=os.time()
2199 | mSleep(1000)
2200 | if(ct-dt>60) then
2201 | return
2202 | end
2203 | mSleep(3000)
2204 | cls()
2205 | mSleep(1000)
2206 | fly()
2207 | end
2208 | --tap(521,635) --点击最下面的一个捐献按钮
2209 | --mSleep(1500)
2210 | local btnidx=1
2211 | local btnx=514
2212 | local btny={
2213 | 634,508,385,262
2214 | }
2215 | local n
2216 | for n=1,4 do
2217 | tap(btnx,btny[btnidx]) --点击最下面一个捐献按钮
2218 | mSleep(1500)
2219 | if isColor(669,640,0x5271b5,85) and isColor(683,636,0x5a75c5,85) and isColor(683,640,0x3a495a,85) then
2220 | --技能书
2221 | tap(828,68)--关闭技能书
2222 | mSleep(2000)
2223 | tap(1148,34) --关闭捐献界面
2224 | mSleep(2000)
2225 | --确保离开PK区
2226 | local x,y=101,541
2227 | touchDown(x,y)
2228 |
2229 | y=y+20
2230 | x=x-20
2231 | mSleep(500)
2232 | touchMove(x,y)
2233 | mSleep(2000)
2234 | touchUp(x,y)
2235 | mSleep(1500)
2236 | return
2237 | elseif isColor(499,422,0xe6be8c,85) and isColor(499,431,0x732d08,85) and isColor(493,408,0x8c5d21,85) then
2238 | --找到物品
2239 | slideright(473,484,787) --右滑最大
2240 | mSleep(1500)
2241 | tap(545,597) --点击捐赠
2242 | mSleep(1500)
2243 |
2244 | if isColor(509,466,0xefc68c,85) and isColor(512,470,0x844521,85) and isColor(520,469,0x632400,85) and isColor(523,469,0xe6be84,85) then
2245 | tap(541,469) --确认捐献
2246 | mSleep(2000)
2247 | end
2248 |
2249 |
2250 | elseif isColor(682,635,0x5271b5,85) and isColor(688,635,0x526dad,85) and isColor(697,635,0x5a79c5,85) then
2251 | --装备捐献
2252 | if isColor(458,284,0x8c8eef,85) and isColor(462,284,0x6b69a4,85) and isColor(460,289,0x8486de,85) then
2253 | --没有装备
2254 | tap(828,63)--关闭装备
2255 | btnidx=btnidx+1
2256 | mSleep(1500)
2257 | --没有装备
2258 | else --找到装备
2259 |
2260 | tap(705,177) --点第一个装备
2261 | mSleep(1500)
2262 | if isColor(509,466,0xefc68c,85) and isColor(512,470,0x844521,85) and isColor(520,469,0x632400,85) and isColor(523,469,0xe6be84,85) then
2263 | tap(541,469) --确认捐献
2264 | mSleep(2000)
2265 | end
2266 |
2267 |
2268 | end
2269 | elseif isColor(544,344,0xbdb6a4,85) and isColor(553,347,0xcec2b5,85) and isColor(621,471,0xbd8e5a,85) and isColor(623,471,0x945931,85) then
2270 | --没有可捐献的物品
2271 | tap(639,464) --确定
2272 | mSleep(1500)
2273 | btnidx=btnidx+1
2274 | end
2275 | end
2276 |
2277 |
2278 | tap(1148,34) --关闭捐献界面
2279 | mSleep(2000)
2280 | --确保离开PK区
2281 | local x,y=101,541
2282 | touchDown(x,y)
2283 |
2284 | y=y+20
2285 | x=x-20
2286 | mSleep(500)
2287 | touchMove(x,y)
2288 | mSleep(1500)
2289 | touchUp(x,y)
2290 | mSleep(1000)
2291 | end
2292 | --mSleep(5000)
2293 | --donation()
2294 |
2295 |
2296 | function wait(callback,timeout) --秒为单位
2297 | local now=os.time()
2298 | local newtime=os.time()
2299 | while not callback() do
2300 | newtime=os.time()
2301 | if(newtime-now>timeout) then
2302 | return false
2303 | end
2304 | mSleep(3000)
2305 | end
2306 | return true
2307 | end
2308 |
2309 |
2310 |
2311 | function openWorldMap()
2312 | cls()
2313 | openCurrentMap()
2314 | tap(1015,42)
2315 | mSleep(2000)
2316 | end
2317 |
2318 |
2319 |
2320 | function toKinght()
2321 | openWorldMap()
2322 | tap(1073,597) --点击石原
2323 | mSleep(2000)
2324 | tap(544,457) --点击确认
2325 | mSleep(5000)
2326 | slideupdown(1012,424,244,1)--下滑
2327 | mSleep(2000)
2328 | tap(1002,633) --点击兽人帝国
2329 | mSleep(1000)
2330 | tap(1151,35) --点击确认
2331 | mSleep(10000)
2332 | openCurrentMap()
2333 | slideupdown(1012,424,244,1) --下滑
2334 | tap(1002,633) --点击兽人陵墓
2335 | mSleep(1000)
2336 | ClsWindows()
2337 | fly()
2338 |
2339 | end
2340 |
2341 | function isNight()
2342 | if isColor(1157,17,0x423929,85) and isColor(1233,20,0xceae84,85) and isColor(1229,30,0x312829,85) and isColor(1174,13,0xeec294,85) then
2343 | return true
2344 | else
2345 | return false
2346 | end
2347 | end
2348 | function openCurrentMap()
2349 | --ClsWindows()
2350 | tap(1204,20)
2351 | mSleep(1000)
2352 | end
2353 |
2354 | function hitKnight()
2355 | openCurrentMap()
2356 | tap(1003,317)
2357 | mSleep(2000)
2358 | tap(1152,26)
2359 | mSleep(8000)
2360 | end
2361 |
2362 |
2363 | function overNight()
2364 | toKinght()
2365 | while true do
2366 | if isPK() then
2367 | mSleep(5000)
2368 | elseif isDead() then
2369 | mSleep(1000)
2370 | toKinght()
2371 | elseif not isNight() then
2372 | toKinght()
2373 | else
2374 |
2375 | hitKnight()
2376 | end
2377 | end
2378 | end
2379 |
2380 |
2381 |
2382 |
2383 |
2384 | function getLevel()
2385 | whitelist = "1234567890"
2386 | return ocrText(1120, 239, 1177, 265,0,whitelist,0)
2387 | end
2388 |
2389 |
2390 |
2391 | function changeChar(id)
2392 |
2393 |
2394 | local T={
2395 | {182,135},
2396 | {115,240},
2397 | {184,351},
2398 | {119,452},
2399 | {176,571},
2400 | }
2401 |
2402 |
2403 | openToolbar()
2404 | --cls()
2405 | tap(1016,652) --点击设置
2406 | mSleep(2000)
2407 | cls()
2408 | tap(491,40) --点击账号管理
2409 | mSleep(2000)
2410 | cls()
2411 | tap(341,339) --点击选择角色
2412 | mSleep(4000)
2413 |
2414 | if isColor(177,81,0xfffbd6,85) and isColor(177,90,0xce8a31,85) and isColor(187,93,0xd69242,85) then
2415 | currid=1
2416 | elseif isColor(113,187,0xf7f7de,85) and isColor(113,196,0xce8631,85) and isColor(130,200,0x734100,85) then
2417 | currid=2
2418 | elseif isColor(175,300,0xad7931,85) and isColor(169,301,0x9c6929,85) and isColor(186,303,0xce8e29,85) then
2419 | currid=3
2420 | elseif isColor(112,399,0xf7f3ce,85) and isColor(112,408,0xce8a3a,85) and isColor(107,408,0x844d10,85) then
2421 | currid=4
2422 | else
2423 | currid=5
2424 | return -1
2425 | end
2426 |
2427 |
2428 |
2429 | tap(table.unpack(T[currid+1])) --点击角色
2430 | mSleep(2000)
2431 |
2432 | --if isColor(589,67,0xf7ebce,85) and isColor(591,81,0xa4814a,85) and isColor(595,86,0xe6c29c,85) and isColor(613,85,0x947542,85) then
2433 | if isColor(776,646,0xefe7bd,85) and isColor(779,646,0x080408,85) and isColor(786,654,0x080000,85) and isColor(793,657,0xffffe6,85) then
2434 | --如果 创建角色,退出
2435 | tap(178,662)--返回
2436 | mSleep(2000)
2437 | return -1
2438 | else
2439 | level=tonumber(getLevel()) --convert string to number
2440 | mSleep(2000)
2441 | end
2442 |
2443 | tap(637,663) --点击进入游戏
2444 | mSleep(15000) --等待loading
2445 | end
2446 |
2447 |
2448 |
2449 | function findZone(num)
2450 | local whitelist = "1234567890"
2451 | local col,row
2452 |
2453 |
2454 | local x,y=560,240
2455 | local xoff,yoff=230,70
2456 | local t={
2457 | {473, 228, 517, 555},
2458 | {707, 225, 749, 546},
2459 | {938, 228, 983, 553},
2460 | }
2461 | for k,v in ipairs(t) do
2462 | local m=ocrText(v[1],v[2],v[3],v[4],0,whitelist,true)
2463 |
2464 | tt=strSplit(m,'\n')
2465 | for i=1,#tt do
2466 | if tt[i]==num then
2467 | row=i
2468 | col=k
2469 | --toast(num.."小区在第"..col.."列 第"..row.."行")
2470 | return x+(col-1)*xoff,y+(row-1)*yoff
2471 | end
2472 | end
2473 | end
2474 | return -1,-1
2475 | end
2476 | function changeZone()
2477 | mSleep(2000)
2478 | tap(177,665)--返回
2479 | mSleep(1500)
2480 | if isColor(617,163,0xd6b28c,85) and isColor(620,170,0xd6b68c,85) and isColor(617,176,0xefc294,85) and isColor(634,176,0x636563,85) and isColor(617,481,0xce9e73,85) then
2481 | tap(640,480) --公告
2482 | mSleep(2000)
2483 | end
2484 | if isColor(581,528,0xd6c694,85) and isColor(593,528,0xadaa9c,85) and isColor(624,535,0xa49663,85) and isColor(655,530,0xad9a7b,85) then
2485 | tap(486,526) --选择小区
2486 | mSleep(2000)
2487 | end
2488 |
2489 | local whitelist = "1234567890"
2490 | local currZone=ocrText(185, 209, 227, 234,0,whitelist,0)
2491 | --toast("当前服务器"..currZone)
2492 | local targetZone
2493 | if(currZone=="327") then
2494 | targetZone="330"
2495 | else
2496 | targetZone="327"
2497 | end
2498 | local x,y=findZone(targetZone)
2499 | if(x~=-1) then
2500 | --toast("330号小区位置"..x..y)
2501 | tap(x,y)
2502 | mSleep(2000)
2503 | tap(778,619) --确定
2504 | mSleep(2000)
2505 | tap(824,527) --进入游戏
2506 | mSleep(10000)
2507 | return true
2508 | end
2509 | return false
2510 | --toast(table.concat(t[1],','))
2511 |
2512 | end
2513 |
2514 |
2515 | function regpack()
2516 | openCal()
2517 | slideupdown(376,617,166,1)
2518 | mSleep(2000)
2519 | tap(309,630)
2520 | mSleep(2000)
2521 | cls()
2522 | tap(986,607)
2523 | mSleep(1500)
2524 | tap(1147,32)
2525 | mSleep(1500)
2526 | end
2527 | function tidy()
2528 | back2biqi()
2529 | mSleep(10000)
2530 | openToolbar()
2531 | tap(353,655) --打开背包
2532 | end
2533 |
2534 |
2535 |
2536 |
2537 | function startGame()
2538 | zone=0
2539 | id=1
2540 | while true do
2541 | mSleep(2000)
2542 |
2543 | s() --开始游戏
2544 | cls()
2545 | mSleep(2000)
2546 |
2547 | --mSleep(3000)
2548 |
2549 | back2biqi(true) --返回比奇
2550 | mSleep(2000)
2551 | scrap() --分解
2552 | --toast("识别"..getLevel() or "")
2553 |
2554 |
2555 | donation() --捐献
2556 | doTask("日常任务")
2557 | doTask("皇城悬赏")
2558 |
2559 | Treasure()
2560 | mSleep(2000)
2561 |
2562 |
2563 | DrognCityGift()
2564 | mSleep(2000)
2565 | Admire()
2566 | Training()
2567 | Competition()
2568 | fate()
2569 | Hell()
2570 | Hole() --洞窟
2571 | cls()
2572 | --back2biqi(true)
2573 |
2574 | --doTask("行会任务")
2575 |
2576 | --brave()
2577 | if ((os.date("%w") == "6" or os.date("%w") == "0") and findTask(isTask("周常任务")) ~= false) then
2578 | doTask("周常任务")
2579 | else
2580 | doTask("日常任务2")
2581 | doTask("行会任务")
2582 | Smith()
2583 | MaFatower()
2584 | brave()
2585 | end
2586 |
2587 | --mine()
2588 | TargetToday()
2589 | mail()
2590 | mSleep(3000)
2591 |
2592 | back2biqi()
2593 | id=id+1
2594 | if (-1==changeChar(id)) then
2595 | if(zone==0) then
2596 | if changeZone()==true then --换区
2597 | mSleep(5000)
2598 | tap(175,132) --第一个角色
2599 | mSleep(2000)
2600 | id=1
2601 | zone=zone+1
2602 | tap(637,663) --点击进入游戏
2603 | mSleep(15000) --等待loading
2604 | else
2605 | return
2606 | end
2607 |
2608 | else --换过区,且所有角色任务都已经完成,准备做周俸
2609 | tap(175,132) --第一个角色
2610 | mSleep(2000)
2611 | return
2612 | end
2613 | end
2614 |
2615 |
2616 |
2617 | end
2618 |
2619 | toast(getLevel())
2620 |
2621 |
2622 |
2623 | end
2624 | function goWeek()
2625 | mSleep(2000)
2626 | tap(637,663) --点击进入游戏
2627 | mSleep(10000) --等待loading
2628 | zone=0
2629 | id=1
2630 | while true do
2631 | mSleep(2000)
2632 | s()
2633 | --mSleep(2000)
2634 | cls()
2635 | --mSleep(3000)
2636 | back2biqi()
2637 | mSleep(2000)
2638 | scrap()
2639 | cls()
2640 | Admire()
2641 | Training()
2642 | --mSleep(3000)
2643 | Hall()
2644 | --mSleep(2000)
2645 |
2646 | Competition()
2647 | --mSleep(3000)
2648 | fate()
2649 | --mSleep(3000)
2650 | Hell()
2651 | --mSleep(3000)
2652 | --Smith()
2653 | --mSleep(3000)
2654 | MaFatower()
2655 | --mSleep(2000)
2656 | Hole() --洞窟
2657 | Smith() --铁匠铺
2658 | --donation()-- doTask("日常任务2")
2659 | cls()
2660 | back2biqi(true)
2661 | --antiEvil()
2662 |
2663 | doTask("行会任务")
2664 |
2665 | brave()
2666 | if(os.date("%w") == "6" or os.date("%w") == "0") then
2667 | doTask("周常任务")
2668 | end
2669 | mine()
2670 | TargetToday()
2671 | mSleep(2000)
2672 | back2biqi()
2673 | id=id+1
2674 | if (-1==changeChar(id)) then
2675 | if(zone==0) then
2676 | if changeZone()==true then --换区
2677 | mSleep(5000)
2678 | tap(175,132) --第一个角色
2679 | mSleep(2000)
2680 | id=1
2681 | zone=zone+1
2682 | tap(637,663) --点击进入游戏
2683 | mSleep(15000) --等待loading
2684 | else
2685 | return
2686 | end
2687 |
2688 | else
2689 |
2690 | return
2691 | end
2692 | end
2693 | end
2694 | toast(getLevel())
2695 | end
2696 | function closeGame()
2697 | closeApp("com.tencent.tmgp.rxcq")
2698 | lockDevice();
2699 | lua_exit()
2700 | end
2701 | ----
2702 |
2703 | --[[
2704 | toast('debug',3)
2705 | mSleep(3000)
2706 |
2707 | toast(os.date("%w"))
2708 | if(os.date("%w") == "6" or os.date("%w") == "0") then
2709 | toast("今天是周末,开始周常")
2710 | doTask("周常任务")
2711 | end
2712 | toast('end debug')
2713 | --]]
2714 | startGame() --先循环所有人物做做官任务,捐献,仰望强者,皇城悬赏,魔龙四礼,龙柱
2715 |
2716 | closeGame()
2717 |
2718 |
2719 |
2720 |
2721 |
2722 |
2723 |
2724 |
2725 |
2726 |
--------------------------------------------------------------------------------
/JSBOX/.gitignore:
--------------------------------------------------------------------------------
1 | /91/Download/*.mp4
--------------------------------------------------------------------------------
/JSBOX/1024pic.js:
--------------------------------------------------------------------------------
1 | /*
2 | 2020/06/24
3 | 1.优化了页面显示
4 | 2.增加了前后导航按钮
5 |
6 | by https://github.com/suertang
7 |
8 | */
9 | $cache.set("id", "16")
10 | $cache.set("pg", 1)
11 | var urlt = "请自行获取地址"
12 |
13 | var data = [{ "name": "盖区", "id": "16" },
14 | { "name": "新区", "id": "8" }, ]
15 | /// helper functions
16 | function myGetName(myid) {
17 | for (let comb of data) {
18 | const { name, id } = comb;
19 | if (myid == id) {
20 | return name;
21 | }
22 | }
23 | return null;
24 | }
25 | String.prototype.getMatchGroup = function(reg, group) {
26 | let matches = this.match(reg);
27 | if (matches != null) {
28 | return matches.map(i => {
29 | return i.replace(reg, "$" + group);
30 | });
31 | }
32 | return null;
33 | };
34 | ///end of helper functions
35 |
36 | function loadPage(url, title) {
37 | $http.get({
38 | url: urlt + url,
39 | header: {'User-Agent': "mozilla/5.0 (iphone; cpu iphone os 11_0 like mac os x) applewebkit/604.1.38 (khtml, like gecko) version/11.0 mobile/15a372 safari/604.1"},
40 | handler: function(resp) {
41 | $ui.loading(false);
42 | // 获取图片真实地址的属性名称
43 | let attr = ""
44 | try{
45 | attr = resp.data.match(/img\[(.*?)\]/)[1]
46 | }catch(e){
47 | console.info(resp.data)
48 | console.info(url)
49 | $ui.toast("没有获取图片属性")
50 | return
51 | }
52 | // 获取图片地址的正则表达式
53 | const imgReg = new RegExp(attr+"='(.*?)'","g")
54 |
55 | var text = resp.data.replace(/\n|\s|\r/g, "");
56 | var ingz = "";
57 | text.getMatchGroup(imgReg, 1).forEach(i => {
58 | ingz += `
`;
59 | });
60 |
61 | //console.info(ingz);
62 | const style = `
63 |
95 | `;
96 |
97 | const html = `
98 |
99 |
100 |
101 |
102 | ${title}
103 | ${style}
104 |
105 |
106 |
107 | ${title}
108 |
109 | ${ingz}
110 |
111 | 到底了
112 |
113 |
114 | `;
115 | $("web1").html = html;
116 |
117 | }
118 | });
119 | }
120 | $ui.render({
121 | props: {
122 | title: "1024BT图片"
123 | },
124 | views: [{
125 | type: "menu",
126 | props: {
127 | id: "meun",
128 | items: data.map(function (item) {
129 | return item.name
130 | }),
131 | },
132 | layout: function (make,view) {
133 | make.left.top.right.equalTo(0)
134 | make.height.equalTo(50)
135 | make.width.equalTo(view.width)
136 | },
137 | events: {
138 | changed: function (sender) {
139 | $cache.set("id", data[sender.index].id)
140 | $cache.set("pg", 1)
141 | getdata()
142 | }
143 | }
144 | },
145 | {
146 | type: "list",
147 | layout: function(make,view){make.top.equalTo($("meun").bottom)
148 | make.left.right.inset(10)
149 | make.height.equalTo(view.super.height)
150 | },
151 | props:{
152 | rowHeight:80,
153 | template:[{
154 | type:"label",
155 | props:{
156 | id:"label",
157 | font:$font(14),
158 | lines:0
159 | },
160 | layout:(make,view)=>{
161 | make.left.right.inset(10)
162 | make.width.equalTo(view.width)
163 | make.top.bottom.equalTo(0)
164 |
165 | //make.right.inset(10)
166 | }
167 | }
168 | ]},
169 | events: {
170 | didSelect: function (sender, indexPath, data) {
171 | // 对象解构
172 | let {label:{text:title},url}=data
173 |
174 | geting(url, title, indexPath)
175 | },
176 | didReachBottom: function (sender) {
177 | sender.endFetchingMore()
178 | var page = $cache.get("pg") + 1
179 | $cache.set("pg", page)
180 | getdata()
181 | }
182 | }
183 |
184 | },]
185 | })
186 |
187 | function getdata() {
188 | var id = $cache.get("id")
189 | var pg = $cache.get("pg")
190 | $ui.loading(true)
191 | $http.get({
192 | url: urlt + "thread0806.php?fid=" + id + "&page=" + pg+"",
193 | header: {
194 | 'User-Agent': "mozilla/5.0 (iphone; cpu iphone os 11_0 like mac os x) applewebkit/604.1.38 (khtml, like gecko) version/11.0 mobile/15a372 safari/604.1"},
195 | handler: function (resp) {
196 | $ui.loading(false)
197 |
198 | let data = pg==1?[]:$("list").data
199 |
200 | /**************
201 | var text = resp.data.replace(/\n|\s|\r/g, "")
202 | if(text.indexOf("普通主題") !== -1) {
203 | const para = text.split("普通主題")
204 | text = para[para.length-1]
205 | }
206 | const reg = /(htm_data.*?)".*id="">(<.*?>)?(.*?)(<\/font>)?<\/a>+?/g
207 | let match=reg.exec(resp.data)
208 | while(match)
209 | {
210 | data.push({label:{text:match[3]},url:match[1]})
211 | match=reg.exec(resp.data)
212 | }
213 | *********/
214 | let posts = resp.data.replace(/\n|\r/g,"").match(//g)
215 |
216 | //标题正则
217 | //" | ↑3 "
218 | const texts = posts.filter((i)=>{return !/↑/.test(i) && !/read.php/.test(i) })
219 |
220 | texts.forEach(text=>{
221 | const title = text.replace(/<.*?>/g,"").replace(/\s/g,"")
222 | const url = text.match(/href="(.*?)"/)[1]
223 | data.push({label:{text:title},url:url})
224 | })
225 | $("list").data = data
226 | $("list").endFetchingMore()
227 | }
228 | })
229 | }
230 |
231 | getdata()
232 |
233 | function geting(id, mc, index) {
234 | $ui.loading(true);
235 | $ui.push({
236 | props: {
237 | id: "myweb",
238 | title: myGetName($cache.get("id"))
239 | },
240 | views: [
241 | {
242 | type: "web",
243 | props: {
244 | html: "加载中...",
245 | id: "web1"
246 | },
247 | layout: function(make, view) {
248 | make.bottom.equalTo(view.bottom); //.offset(50)
249 | make.height.equalTo(view.super.height).offset(-50);
250 | make.left.right.equalTo(0);
251 | //make.width.equalTo(view.super.width)
252 | //make.top.equalTo(view.top)
253 | //make.size.equalTo($size(200,50))
254 | },
255 | events: {
256 | didReachBottom: function(sender) {
257 | alert("滑到底了!!!");
258 | }
259 | }
260 | },
261 | {
262 | type: "button",
263 | events: {
264 | tapped: function() {
265 | getprev();
266 | }
267 | },
268 | props: {
269 | title: "上一篇"
270 | },
271 | layout: function(make, view) {
272 | make.bottom.equalTo(view.super.bottom);
273 | make.size.equalTo($size(200, 50));
274 | }
275 | },
276 | {
277 | type: "button",
278 | events: {
279 | tapped: function() {
280 | //alert(index.next())
281 | getnext();
282 | //console.log(data)
283 | }
284 | },
285 | props: {
286 | title: "下一篇"
287 | },
288 | layout: function(make, view) {
289 | make.bottom.equalTo(view.super.bottom);
290 | make.right.equalTo(view.super.right);
291 | make.size.equalTo($size(200, 50));
292 | }
293 | }
294 | ]
295 | });
296 | $cache.set("index", index);
297 | loadPage(id, mc);
298 | }
299 | function getnext() {
300 | const currentindex = $cache.get("index");
301 | const maxIndex = $("list").data.length;
302 | let row = currentindex.row;
303 | if (row == maxIndex - 2) {
304 | alert("最后一个了");
305 | return;
306 | } else {
307 | //$ui.pop()
308 | const idx = $indexPath(row + 1, row + 1);
309 | const data = $("list").object(idx);
310 | let {label:{text:title},url}=data
311 | $cache.set("index", idx);
312 | loadPage(url, title);
313 | }
314 | }
315 | function getprev() {
316 | //const maxIndex = $("list").data.length
317 | const currentindex = $cache.get("index");
318 | let row = currentindex.row;
319 | if (row == 0) {
320 | alert("已经是第一个");
321 | return;
322 | } else {
323 | const idx = $indexPath(row - 1, row - 1);
324 | const data = $("list").object(idx);
325 | let {label:{text:title},url}=data
326 | //var id=data.split("\n")
327 | $cache.set("index", idx);
328 | loadPage(url, title);
329 | }
330 | }
331 |
--------------------------------------------------------------------------------
/JSBOX/1024图库.js:
--------------------------------------------------------------------------------
1 | /*
2 | 2019年5月28日 更新
3 | 脚本仅供代码学习,请勿分享。非法传播照成法律问题与作者无关。
4 |
5 | by:iPhone 8、小良
6 | https://ae85.cn/
7 | */
8 | /*
9 | 2020年6月23日 优化
10 |
11 | 0. 修复某些板块无法显示的bug
12 | 1. 采用网页视图
13 | 2. 优化图片宽度
14 | 3. 增加导航按钮,方便查看上下页面
15 | 4. 优化代码
16 |
17 | 本脚本基于小良的脚本二次开发
18 | by suertang https://github.com/suertang
19 | */
20 | $cache.set("id", "15");
21 | $cache.set("pg", 1);
22 | var urlt = "请自行填入地址";
23 | var data = [
24 | { "name": "SelfShot", "id": "15" },
25 | { "name": "RealMe", "id": "14" },
26 | { "name": "Out", "id": "16" },
27 | { "name": "Street", "id": "49" },
28 | { "name": "Sock", "id": "21" },
29 | { "name": "West", "id": "114" }
30 | ];
31 | function myGetName(myid) {
32 | for (let comb of data) {
33 | const { name, id } = comb;
34 | if (myid == id) {
35 | return name;
36 | }
37 | }
38 | return null;
39 | }
40 | //console.info(myGetName("15"))
41 | $ui.render({
42 | props: {
43 | title: "7086图库"
44 | },
45 | views: [
46 | {
47 | type: "menu",
48 | props: {
49 | id: "meun",
50 | items: data.map(function(item) {
51 | return item.name;
52 | })
53 | },
54 | layout: function(make) {
55 | make.left.top.right.equalTo(0);
56 | make.height.equalTo(50);
57 | },
58 | events: {
59 | changed: function(sender) {
60 | $cache.set("id", data[sender.index].id);
61 | $cache.set("pg", 1);
62 | getdata();
63 | }
64 | }
65 | },
66 | {
67 | type: "list",
68 | layout: function(make) {
69 | make.right.left.bottom.inset(0);
70 | make.top.equalTo($("meun").bottom);
71 | },
72 | events: {
73 | didSelect: function(sender, indexPath, data) {
74 | var id = data.split("\n");
75 | geting(id[1], id[0], indexPath);
76 | },
77 | didReachBottom: function(sender) {
78 | sender.endFetchingMore();
79 | var page = $cache.get("pg") + 1;
80 | $cache.set("pg", page);
81 | getdata();
82 | }
83 | }
84 | }
85 | ]
86 | });
87 |
88 | function getdata() {
89 | var id = $cache.get("id");
90 | var pg = $cache.get("pg");
91 | $ui.loading(true);
92 | $http.get({
93 | url: urlt + "pw/thread.php?fid=" + id + "&page=" + pg,
94 | handler: function(resp) {
95 | $ui.loading(false);
96 | var text = resp.data.replace(/\n|\s|\r/g, "");
97 | if (text.indexOf("普通主题") !== -1) {
98 | text = text.split("普通主题")[1];
99 | }
100 | var shu = text.match(/class="tr3t_one">(\S*?)<\/h3>/g);
101 | let data = [];
102 | if (pg !== 1) {
103 | data = $("list").data;
104 | }
105 | for (let i in shu) {
106 | var a = shu[i];
107 | if (a.indexOf("href=") !== -1) {
108 | var txt = a.split("")[1];
109 | var mc = txt.match(/">(\S*?)<\/a>/)[1];
110 | var id = a.match(/href="(\S*?)"/)[1];
111 | data.push(mc + "\n" + id);
112 | }
113 | }
114 | $("list").data = data;
115 | $("list").endFetchingMore();
116 | }
117 | });
118 | }
119 |
120 | getdata();
121 | String.prototype.getMatchGroup = function(reg, group) {
122 | let matches = this.match(reg);
123 | if (matches != null) {
124 | return matches.map(i => {
125 | return i.replace(reg, "$" + group);
126 | });
127 | }
128 | return null;
129 | };
130 | function loadPage(url, title) {
131 | $http.get({
132 | url: urlt + "pw/" + url,
133 | handler: function(resp) {
134 | $ui.loading(false);
135 | var text = resp.data.replace(/\n|\s|\r/g, "");
136 | var ingz = "";
137 | text.getMatchGroup(/(
)? {
138 | ingz += ` `;
139 | });
140 |
141 | console.info(ingz);
142 | const style = `
143 |
165 | `;
166 | const scrollJs = `
167 | //文档高度
168 | function getDocumentTop() {
169 | var scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0;
170 | if (document.body) {
171 | bodyScrollTop = document.body.scrollTop;
172 | }
173 | if (document.documentElement) {
174 | documentScrollTop = document.documentElement.scrollTop;
175 | }
176 | scrollTop = (bodyScrollTop - documentScrollTop > 0) ? bodyScrollTop : documentScrollTop;
177 | return scrollTop;
178 | }
179 |
180 | //可视窗口高度
181 | function getWindowHeight() {
182 | var windowHeight = 0;
183 | if (document.compatMode == "CSS1Compat") {
184 | windowHeight = document.documentElement.clientHeight;
185 | } else {
186 | windowHeight = document.body.clientHeight;
187 | }
188 | return windowHeight;
189 | }
190 |
191 | //滚动条滚动高度
192 | function getScrollHeight() {
193 | var scrollHeight = 0, bodyScrollHeight = 0, documentScrollHeight = 0;
194 | if (document.body) {
195 | bodyScrollHeight = document.body.scrollHeight;
196 | }
197 |
198 | if (document.documentElement) {
199 | documentScrollHeight = document.documentElement.scrollHeight;
200 | }
201 | scrollHeight = (bodyScrollHeight - documentScrollHeight > 0) ? bodyScrollHeight : documentScrollHeight;
202 | return scrollHeight;
203 | }
204 |
205 |
206 | /*
207 | 当滚动条滑动,触发事件,判断是否到达最底部
208 | 然后调用ajax处理函数异步加载数据
209 | */
210 |
211 | window.onscroll = function () {
212 | //监听事件内容
213 | if (getScrollHeight() == (getWindowHeight() + getDocumentTop() )) {
214 | //当滚动条到底时,这里是触发内容
215 | //异步请求数据,局部刷新dom
216 | //alert("Hello");
217 | }
218 | }
219 | `;
220 | const html = `
221 |
222 |
223 |
224 |
225 | ${title}
226 | ${style}
227 |
228 |
229 |
230 | ${title}
231 | ${ingz}
232 | 到底了
233 |
234 |
235 | `;
236 | $("web1").html = html;
237 | $("myweb").title = title;
238 | }
239 | });
240 | }
241 | function geting(id, mc, index) {
242 | $ui.loading(true);
243 | $ui.push({
244 | props: {
245 | id: "myweb",
246 | title: "板块名称:"+myGetName($cache.get("id"))
247 | },
248 | views: [
249 | {
250 | type: "web",
251 | props: {
252 | html: "加载中...",
253 | id: "web1"
254 | },
255 | layout: function(make, view) {
256 | make.bottom.equalTo(view.bottom); //.offset(50)
257 | make.height.equalTo(view.super.height).offset(-50);
258 | make.left.right.equalTo(0);
259 | //make.width.equalTo(view.super.width)
260 | //make.top.equalTo(view.top)
261 | //make.size.equalTo($size(200,50))
262 | },
263 | events: {
264 | didReachBottom: function(sender) {
265 | alert("滑到底了!!!");
266 | }
267 | }
268 | },
269 | {
270 | type: "button",
271 | events: {
272 | tapped: function() {
273 | getprev();
274 | }
275 | },
276 | props: {
277 | title: "上一篇"
278 | },
279 | layout: function(make, view) {
280 | make.bottom.equalTo(view.super.bottom);
281 | make.size.equalTo($size(200, 50));
282 | }
283 | },
284 | {
285 | type: "button",
286 | events: {
287 | tapped: function() {
288 | //alert(index.next())
289 | getnext();
290 | //console.log(data)
291 | }
292 | },
293 | props: {
294 | title: "下一篇"
295 | },
296 | layout: function(make, view) {
297 | make.bottom.equalTo(view.super.bottom);
298 | make.right.equalTo(view.super.right);
299 | make.size.equalTo($size(200, 50));
300 | }
301 | }
302 | ]
303 | });
304 | $cache.set("index", index);
305 | loadPage(id, mc);
306 | }
307 | function getnext() {
308 | const currentindex = $cache.get("index");
309 | const maxIndex = $("list").data.length;
310 | let row = currentindex.row;
311 | if (row == maxIndex - 2) {
312 | alert("最后一个了");
313 | return;
314 | } else {
315 | //$ui.pop()
316 | const idx = $indexPath(row + 1, row + 1);
317 | const data = $("list").object(idx);
318 | const [title, url] = data.split("\n");
319 | //var id=data.split("\n")
320 | $cache.set("index", idx);
321 | loadPage(url, title);
322 | }
323 | }
324 | function getprev() {
325 | //const maxIndex = $("list").data.length
326 | const currentindex = $cache.get("index");
327 | let row = currentindex.row;
328 | if (row == 0) {
329 | alert("已经是第一个");
330 | return;
331 | } else {
332 | const idx = $indexPath(row - 1, row - 1);
333 | const data = $("list").object(idx);
334 | const [title, url] = data.split("\n");
335 | //var id=data.split("\n")
336 | $cache.set("index", idx);
337 | loadPage(url, title);
338 | }
339 | }
340 |
--------------------------------------------------------------------------------
/JSBOX/1024视频.js:
--------------------------------------------------------------------------------
1 | /*
2 | 2024年1月18日 更新
3 | 修复列表点击无法跳播放页面问题
4 |
5 | 脚本仅供代码学习,请勿分享。非法传播照成法律问题与作者无关。
6 |
7 | by:iPhone8、小良
8 | https://iphone8.vip/
9 | https://ae85.cn/
10 | */
11 |
12 | $cache.set("id", "L2xpc3QvaHkvMg")
13 | $cache.set("pg", 1)
14 | var urlt = $text.base64Decode("aHR0cHM6Ly9iYnMubXlsejB2LmNvbS8yMDQ4Lw==");
15 | var js_name = "1024视频"
16 | var data = [{ "id": "L2xpc3QvaHkvMg", "name": "乱伦无码" }, { "id": "L2xpc3QvaHkvMTI", "name": "巨乳无码" }, { "id": "L2xpc3QvaHkvMw", "name": "强奸无码" }, { "id": "L2xpc3QvaHkvNA", "name": "人妻无码" }, { "id": "L2xpc3QvaHkvNQ", "name": "制服无码" }]
17 |
18 | $ui.render({
19 | props: {
20 | title: js_name
21 | },
22 | views: [{
23 | type: "menu",
24 | props: {
25 | id: "meun",
26 | items: data.map(function (item) {
27 | return item.name
28 | }),
29 | },
30 | layout: function (make) {
31 | make.left.top.right.equalTo(0)
32 | make.height.equalTo(50)
33 |
34 | },
35 | events: {
36 | changed: function (sender) {
37 | $cache.set("id", data[sender.index].id)
38 | $cache.set("pg", 1)
39 | getdata()
40 | }
41 | }
42 | },
43 | {
44 | type: "list",
45 | layout: function (make) {
46 | make.right.left.bottom.inset(0)
47 | make.top.equalTo($("meun").bottom)
48 | },
49 | events: {
50 | didSelect: function (sender, indexPath, data) {
51 | var id = data.split("\n")
52 | geting(id[1], id[0])
53 | },
54 | didReachBottom: function (sender) {
55 | sender.endFetchingMore()
56 | var page = $cache.get("pg") + 1
57 | $cache.set("pg", page)
58 | getdata()
59 | }
60 | }
61 |
62 | },
63 | ]
64 |
65 | })
66 |
67 | function getdata() {
68 | var id = $cache.get("id")
69 | var pg = $cache.get("pg")
70 | $ui.loading(true)
71 | $http.get({
72 | url: urlt + "thread.php?fid=291&goo=" + id + "&page=" + pg,
73 | header: {
74 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1"
75 | },
76 | handler: function (resp) {
77 | $ui.loading(false)
78 | var text = resp.data.replace(/\n|\s|\r/g, "")
79 | var shu = text.match(/subjectbreak-all\"data-url=\"read.*?<\/div>/g)
80 | if (pg == 1) {
81 | var data = []
82 | } else {
83 | var data = $("list").data
84 | }
85 |
86 | for (i in shu) {
87 | var a = shu[i]
88 | if (i > 3) {
89 | var mc = a.match(/\">(.*?)<\/a>/)[1]
90 | var id = a.match(/ahref=\"(.*?)\"/)[1]
91 | data.push(mc + "\n" + id)
92 | }
93 | }
94 | $("list").data = data
95 | $("list").endFetchingMore()
96 | }
97 | })
98 | }
99 |
100 | getdata()
101 |
102 | function geting(id, mc) {
103 | $ui.loading(true)
104 | $http.get({
105 | url: urlt + id,
106 | handler: function (resp) {
107 | var text = resp.data.replace(/\n|\s|\r/g, "")
108 | var video = text.match(/mapping\/player\/\?url=(\S*?)\"/)[1]
109 | video = video.replace(/%2F/g, "/");
110 | video = video.replace(/%3D/g, "=");
111 | video = video.split("&")[0]
112 | video = $text.base64Decode(video);
113 | $ui.push({
114 | props: {
115 | title: mc
116 | },
117 | views: [{
118 | type: "web",
119 | props: {
120 | url: video,
121 | },
122 | layout: $layout.fill
123 | }]
124 | })
125 | }
126 | });
127 | }
128 |
129 |
130 | async function get_updata() {
131 | const resp = await $http.get($text.base64Decode("aHR0cHM6Ly9pcGhvbmU4LnZpcC9jb25maWcvMTAyNC5qc29u"));
132 | if (resp.response.statusCode === 200) {
133 | if (resp.data.vdieo.version != "2.9.1") {
134 | $ui.alert({
135 | title: "发现新版本 - " + resp.data.vdieo.version,
136 | message: resp.data.vdieo.upexplain,
137 | actions: [
138 | {
139 | title: "立即更新",
140 | handler: function () {
141 | download(resp.data.vdieo.updata)
142 | }
143 | }, {
144 | title: "取消"
145 | }
146 | ]
147 |
148 | });
149 |
150 | }
151 | }
152 | }
153 | get_updata()
154 |
155 | function download(url) {
156 | $ui.toast("正在安装中 ...");
157 | $http.download({
158 | url: url,
159 | handler: function (resp) {
160 | $addin.save({
161 | name: js_name,
162 | data: resp.data,
163 | handler: function () {
164 | $ui.alert({
165 | title: "安装完成",
166 | message: "\n是否打开?\n" + js_name,
167 | actions: [
168 | {
169 | title: "打开",
170 | handler: function () {
171 | $app.openExtension(js_name)
172 | }
173 | },
174 | {
175 | title: "不了"
176 | }]
177 | });
178 | }
179 | })
180 | }
181 | })
182 | }
--------------------------------------------------------------------------------
/JSBOX/4hupic.js:
--------------------------------------------------------------------------------
1 | /*
2 | 2022年 suertang
3 |
4 | 本脚本基于小良的脚本二次开发,脚本仅供代码学习
5 | by suertang https://github.com/suertang
6 | */
7 | $cache.set("id", "toupai");
8 | $cache.set("pg", 1);
9 |
10 | var urlt = "https://4hu.tv/"//$text.base64Decode('aHR0cHM6Ly93d3cuODNzcy5uZXQv');
11 | var data = [
12 | { "name": "自拍", "id": "toupai" },
13 | { "name": "美腿", "id": "meitui" },
14 | { "name": "欧美", "id": "oumei" },
15 | { "name": "卡通", "id": "katong" }
16 | ];
17 | function myGetName(myid) {
18 | for (let comb of data) {
19 | const { name, id } = comb;
20 | if (myid == id) {
21 | return name;
22 | }
23 | }
24 | return null;
25 | }
26 | //console.info(myGetName("15"))
27 | $ui.render({
28 | props: {
29 | title: "4Hu图库"
30 | },
31 | views: [
32 | {
33 | type: "menu",
34 | props: {
35 | id: "menu",
36 | items: data.map(function(item) {
37 | return item.name;
38 | })
39 | },
40 | layout: function(make) {
41 | make.left.top.right.equalTo(0);
42 | make.height.equalTo(50);
43 | },
44 | events: {
45 | changed: function(sender) {
46 | $cache.set("id", data[sender.index].id);
47 | $cache.set("pg", 1);
48 | getdata();
49 | }
50 | }
51 | },
52 | {
53 | type: "matrix",
54 | props: {
55 | id: "mat",
56 | itemHeight: 180,
57 | columns: 2,
58 | spacing: 7,
59 | template: [
60 | {
61 | type: "image",
62 | props: {
63 | id: "img",
64 | radius: 3
65 | },
66 | layout: function(make, view) {
67 | make.centerX.equalTo(view.super);
68 | make.height.equalTo(90);
69 | make.width.equalTo(180);
70 | }
71 | },
72 | {
73 | type: "label",
74 | props: {
75 | id: "label",
76 | align: $align.center,
77 | lines: 0,
78 | font: $font("bold", 15)
79 | },
80 | layout: function(make, view) {
81 | make.top.equalTo($("img").bottom).offset(10);
82 | make.right.left.inset(0);
83 | }
84 | }
85 | ]
86 | },
87 | layout: function(make) {
88 | make.top.equalTo($("menu").bottom);
89 | make.bottom.left.right.inset(0);
90 | },
91 | events: {
92 | didSelect: function(sender, indexPath, data) {
93 | let {
94 | label: { text: title },
95 | url
96 | } = data;
97 |
98 | geting(url, title, indexPath);
99 | },
100 | didReachBottom: function(sender) {
101 | sender.endFetchingMore();
102 | var page = $cache.get("pg") + 1;
103 | $cache.set("pg", page);
104 | getdata();
105 | }
106 | }
107 | }
108 | ]
109 | });
110 |
111 | function getdata() {
112 | let cacheurl = $cache.get("urlt")
113 | let url = cacheurl ? cacheurl : urlt
114 |
115 | $ui.toast(url)
116 | url = url + "pic/"
117 | var id = $cache.get("id");
118 | var pg = $cache.get("pg");
119 | let suffix = pg == 1 ? "" : "index_" + pg + ".html";
120 | $ui.loading(true);
121 | $http.get({
122 | url: url + id + "/" + suffix,
123 | timeout: 5,
124 | handler: function(resp) {
125 | $ui.loading(false);
126 | if (resp.error) {
127 | // console.log("no response");
128 | $ui.alert("网站没有响应");
129 | return;
130 | } else {
131 | // console.log(resp);
132 | //$cache.set("urlt", url);
133 | }
134 | if (
135 | resp.response.statusCode != 200 ||
136 | !resp.response.url.startsWith(url)
137 | ) {
138 | $ui.toast("地址跳转到" + resp.response.url.match(/(https?:\/\/.*?\/)/)[1]);
139 | $cache.set("urlt", resp.response.url.match(/(https?:\/\/.*?\/)/)[1]);
140 |
141 |
142 | getdata();
143 |
144 | return;
145 | }
146 |
147 | let data = resp.data.replace(/>(\s+)<");
148 | console.log(data)
149 | /*
150 | 
151 | -
152 |
153 |
154 | */
155 | const res = data.match(/.*?original.*?document\.write.*?<\/dl>/g).map(i => {
156 | console.log(i)
157 | const ret = {
158 | img: {
159 | src: i.match(/original="(.*?)"/)[1]
160 | },
161 | label: {
162 | text:
163 | $text.base64Decode(i.match(/d\('(.*?)'/)[1])
164 | },
165 | url: i.match(/href="\/(.*?\.html)/)[1]
166 | };
167 | // console.log(ret);
168 | return ret;
169 | });
170 |
171 | if (pg == 1) $("mat").data = [];
172 | if ($("mat").data) {
173 | $("mat").data = [...$("mat").data, ...res];
174 | } else {
175 | $("mat").data = res;
176 | }
177 | $("mat").endFetchingMore();
178 | }
179 | });
180 | }
181 |
182 | getdata();
183 |
184 | function loadPage(url, title) {
185 | // let cacheurl = $cache.get("urlt")
186 |
187 | // let urlt = cacheurl?cacheurl:urlt
188 |
189 | $cache.set("title",title)
190 | $http.get({
191 | url: urlt + url,
192 | handler: function(resp) {
193 | if(resp.error){
194 | $ui.alert("发生错误或超时")
195 | $ui.toast(resp.error)
196 | return
197 | }
198 | $ui.loading(false);
199 | var text = resp.data.replace(/\n|\s|\r/g, "");
200 | // console.log(text);
201 | if (!text) {
202 | $ui.toast("🈚️内容");
203 | return;
204 | }
205 | var ingz = "";
206 |
207 | text.match(/imgsrc='(.*?)'/g).forEach(i=>{
208 | const it = i.match(/'(.*)'/)[1]
209 | ingz += ` \n`;
210 | });
211 |
212 | // console.info(ingz);
213 | const style = `
214 |
236 | `;
237 |
238 | const html = `
239 |
240 |
241 |
242 |
243 | ${title}
244 | ${style}
245 | ${prefetch()}
246 |
247 |
248 |
249 | ${title}
250 | ${ingz}
251 | 到底了
252 |
253 |
254 | `;
255 | $("web1").html = html;
256 | $("myweb").title = title;
257 | }
258 | });
259 | }
260 | function geting(id, mc, index) {
261 | $ui.loading(true);
262 | $ui.push({
263 | props: {
264 | id: "myweb",
265 | title: "板块名称:" + myGetName($cache.get("id"))
266 | },
267 | views: [
268 | {
269 | type: "web",
270 | props: {
271 | html: "加载中...",
272 | id: "web1"
273 | },
274 | layout: function(make, view) {
275 | make.bottom.equalTo(view.bottom); //.offset(50)
276 | make.height.equalTo(view.super.height).offset(-50);
277 | make.left.right.equalTo(0);
278 | //make.width.equalTo(view.super.width)
279 | //make.top.equalTo(view.top)
280 | //make.size.equalTo($size(200,50))
281 | },
282 | events: {
283 | didFinish:(s,n)=>{
284 | //console.log($("myweb").title)
285 | $ui.get("myweb").title=$cache.get("title")
286 | },
287 | didReachBottom: function(sender) {
288 | $ui.alert("滑到底了!!!");
289 | }
290 | }
291 | },
292 | {
293 | type: "button",
294 | events: {
295 | tapped: function() {
296 | getprev();
297 | }
298 | },
299 | props: {
300 | title: "上一篇"
301 | },
302 | layout: function(make, view) {
303 | make.bottom.equalTo(view.super.bottom);
304 | make.size.equalTo($size(200, 50));
305 | }
306 | },
307 | {
308 | type: "button",
309 | events: {
310 | tapped: function() {
311 | //alert(index.next())
312 | getnext();
313 | //console.log(data)
314 | }
315 | },
316 | props: {
317 | title: "下一篇"
318 | },
319 | layout: function(make, view) {
320 | make.bottom.equalTo(view.super.bottom);
321 | make.right.equalTo(view.super.right);
322 | make.size.equalTo($size(200, 50));
323 | }
324 | }
325 | ]
326 | });
327 | $cache.set("index", index);
328 | loadPage(id, mc);
329 | }
330 | function prefetch() {
331 | const currentindex = $cache.get("index");
332 | const maxIndex = $("mat").data.length;
333 | let row = currentindex.row;
334 | if (row == maxIndex - 2) {
335 | // alert("最后一个了");
336 | return "";
337 | } else {
338 | //$ui.pop()
339 | const idx = $indexPath(row + 1, row + 1);
340 | const data = $("mat").object(idx);
341 | //const [title, url] = data.split("\n");
342 | let {
343 | url,
344 | label: { text: title }
345 | } = data;
346 |
347 | //geting(url, title, indexPath)
348 | console.log("Prefetching " + title);
349 | return ``;
350 | //var id=data.split("\n")
351 | }
352 | }
353 | function getnext() {
354 | const currentindex = $cache.get("index");
355 | const maxIndex = $("mat").data.length;
356 | let row = currentindex.row;
357 | if (row == maxIndex - 2) {
358 | $ui.alert("最后一个了");
359 | return;
360 | } else {
361 | //$ui.pop()
362 | const idx = $indexPath(row + 1, row + 1);
363 | const data = $("mat").object(idx);
364 | //const [title, url] = data.split("\n");
365 | //var id=data.split("\n")
366 | let {
367 | label: { text: title },
368 | url
369 | } = data;
370 | $cache.set("index", idx);
371 | loadPage(url, title);
372 | }
373 | }
374 | function getprev() {
375 | //const maxIndex = $("list").data.length
376 | const currentindex = $cache.get("index");
377 | let row = currentindex.row;
378 | if (row == 0) {
379 | $ui.alert("已经是第一个");
380 | return;
381 | } else {
382 | const idx = $indexPath(row - 1, row - 1);
383 | const data = $("mat").object(idx);
384 | //const [title, url] = data.split("\n");
385 | let {
386 | label: { text: title },
387 | url
388 | } = data;
389 | //var id=data.split("\n")
390 | $cache.set("index", idx);
391 | loadPage(url, title);
392 | }
393 | }
--------------------------------------------------------------------------------
/JSBOX/91/.output/91.box:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/91/.output/91.box
--------------------------------------------------------------------------------
/JSBOX/91/Arc/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/91/Arc/.DS_Store
--------------------------------------------------------------------------------
/JSBOX/91/Download/README.MD:
--------------------------------------------------------------------------------
1 | 存储已经下载的mp4文件
2 | 或者作为数据库使用
--------------------------------------------------------------------------------
/JSBOX/91/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/91/README.md
--------------------------------------------------------------------------------
/JSBOX/91/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/91/assets/icon.png
--------------------------------------------------------------------------------
/JSBOX/91/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "widget" : {
3 | "staticSize" : false,
4 | "tintColor" : "",
5 | "height" : 0,
6 | "iconColor" : ""
7 | },
8 | "info" : {
9 | "types" : 15,
10 | "author" : "suertang",
11 | "website" : "http:\/\/github.com\/suertang",
12 | "name" : "",
13 | "url" : "",
14 | "version" : "1.0.0"
15 | },
16 | "settings" : {
17 | "minOSVer" : "10.0.0",
18 | "minSDKVer" : "1.0.0",
19 | "rotateDisabled" : false,
20 | "autoKeyboardEnabled" : false,
21 | "keyboardToolbarEnabled" : false,
22 | "idleTimerDisabled" : false
23 | }
24 | }
--------------------------------------------------------------------------------
/JSBOX/91/main.js:
--------------------------------------------------------------------------------
1 | /*
2 | 20200626
3 | 修复title获取
4 | by https://github.com/suertang
5 | */
6 | $include("scripts/md5");
7 | $include("scripts/string")
8 | $cache.set("id", "rf")
9 | $cache.set("pg", 1)
10 |
11 | // encode the url to keep it safe and cool
12 | var urlt = "请自行填入地址"
13 |
14 | // menu data
15 | var data = [{ "name": "最近加精", "id": "rf" },
16 | { "name": "当前最热", "id": "hot" },
17 | { "name": "最近得分", "id": "rp" },
18 | { "name": "10+分钟", "id": "long" },]
19 | // main ui, which is a list of entries
20 | $ui.render({
21 | props: {
22 | title: "数字视频查看器"
23 | },
24 | views: [{
25 | type: "menu",
26 | props: {
27 | id: "menu",
28 | items: data.map(item=> item.name),
29 | },
30 | layout: function (make) {
31 | make.left.top.right.equalTo(0)
32 | make.height.equalTo(50)
33 |
34 | },
35 | events: {
36 | // on tap item getdata and push another view
37 | changed: function (sender) {
38 | $cache.set("id", data[sender.index].id)
39 | $cache.set("pg", 1)
40 | getdata()
41 | }
42 | }
43 | },
44 | {
45 | type: "list",
46 | props: {
47 | id:"list",
48 | rowHeight: 100,
49 | template: [
50 | {
51 | type: "image",
52 | props: {
53 | id: "image"
54 | },
55 | layout: (make, view) => {
56 | make.left.top.bottom.inset(5);
57 | make.width.equalTo(view.height);
58 | }
59 | },
60 | {
61 | type: "label",
62 | props: {
63 | id: "label",
64 | font: $font("bold", 17),
65 | lines: 0
66 | },
67 | layout: make => {
68 | make.left.equalTo($("image").right).offset(10);
69 | make.top.bottom.equalTo(0);
70 | make.right.inset(10);
71 | }
72 | }
73 | ]
74 | },
75 | layout: function(make) {
76 | make.top.equalTo($("menu").bottom);
77 | make.bottom.left.right.inset(0);
78 | },
79 | events: {
80 | didSelect: function(sender, indexPath, data) {
81 | geturl(data);
82 | },
83 | didReachBottom: function(sender) {
84 | sender.endFetchingMore();
85 | var page = $cache.get("pg") + 1;
86 | $cache.set("pg", page);
87 |
88 | getdata();
89 | }
90 | }
91 | }
92 | ]
93 | })
94 |
95 |
96 |
97 |
98 |
99 |
100 | // fill the list with data get from page
101 | // random ip address to simulate proxy, cheat the server as we are from different IPs.
102 | function getdata() {
103 | var id = $cache.get("id")
104 | var pg = $cache.get("pg")
105 |
106 | $ui.loading(true)
107 | $http.get({
108 | url: urlt +"v.php?category="+ id + "&page=" + pg,
109 | header: {
110 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Version/12.0 Safari/604.1',
111 | 'X-Forwarded-For':random_ip(),
112 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
113 | 'referer':urlt
114 | },
115 | handler: function (resp) {
116 | $ui.loading(false)
117 | // remove blank characters
118 | var text = resp.data.replace(/\n|\s|\r/g, "")
119 | // matches the img src on page, as small preview picture.
120 | var videourls=text.match(//g)
121 | if(!videourls){
122 | // if no data match, mostly caused by network problem
123 | $ui.alert({
124 | title: "对不起",
125 | message: "当前网络环境引起了CDN阻滞,建议更换代理"
126 | })
127 | return
128 | }
129 |
130 | let newdata=[]
131 | var data
132 | if (pg == 1 ) {
133 | data = [];
134 | } else {
135 | data = $("list").data;
136 | }
137 | // extract data from matched value
138 | for (let video of videourls) {
139 |
140 | let imgurl = video.match(/src="(http\S*jpg)"/)[1]
141 | imgurl = imgurl.replace(/\d_/,'').replace(/^http:/,'https:');
142 |
143 | const videokey = video.match(/viewkey=([0-9a-fA-F]*?)&/)[1]
144 | console.log(video);
145 | const label = video.match(/title="(.*?)"/)[1]
146 | // this data structure matched the $list requirement
147 | data.push({
148 | image: {
149 | src: imgurl
150 | },
151 | label:{
152 | text: label
153 | },
154 | url: videokey
155 | });
156 |
157 | }
158 | // assign data to list
159 | $("list").data = data;
160 | // make ui stop fetch more
161 | $("list").endRefreshing();
162 |
163 |
164 | }
165 | })
166 | }
167 |
168 |
169 | // call getdata firstly. very urgly here
170 | getdata()
171 |
172 | // this function generate random ip for http requests
173 | function random_ip(){
174 | var randomIP = []
175 | for(var i = 0; i < 4; i++){
176 | var eachIP = Math.floor(Math.random() * 256)
177 | randomIP.push(eachIP)
178 | }
179 | return randomIP.join('.')
180 | }
181 |
182 | // get page content from view page, not ads loaded. !!!!
183 | function geturl(item){
184 |
185 | $http.get({
186 | url: urlt + "view_video.php?viewkey=" + item.url,
187 | header: {
188 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36',
189 | 'X-Forwarded-For':random_ip(),
190 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
191 | 'referer':urlt
192 | },
193 | handler: function(resp) {
194 | const data = resp.data
195 | // sometimes the video is not encoded
196 | let videourl = data.match(//);
197 | // if it is encodeded
198 | if(videourl==null){
199 | const code = data.match(/strencode.*?\)/)[0];
200 | // use self assigned encode function, this is not a trick
201 | videourl = eval(code);
202 |
203 | videourl = videourl.match(/(http.*?)['"]/)[1]
204 |
205 | }else{
206 | videourl=videourl[1]
207 | }
208 | play({
209 | text:item.label.text,
210 | url:videourl,
211 | image:item.image.src
212 | });
213 | }
214 | })
215 | }
216 |
217 |
218 |
219 | function play(item) {
220 |
221 | $ui.push({
222 | props: {
223 | title: "91飞车"
224 | },
225 | views: [
226 | {
227 | type: "label",
228 | id:"title",
229 | props:
230 | {
231 | text: item.text
232 | },
233 | layout: function(make, view)
234 | {
235 | make.left.right.insets(10)
236 |
237 | }
238 | },
239 | {
240 | type: "video",
241 | id:"player",
242 | props: {
243 | src: item.url,
244 | poster: item.image
245 | },
246 | layout: function(make, view) {
247 | make.top.equalTo(90)
248 | make.left.right.equalTo(0)
249 | make.height.equalTo(256)
250 | }
251 | },
252 | {
253 | type: "button",
254 | props: {
255 | title: "下载"
256 | },
257 | layout: function(make, view) {
258 | make.top.equalTo(346)
259 | make.left.right.insets(10)
260 | //make.height.equalTo(256)
261 | },
262 | events:
263 | {
264 | // this download function need to be updated.
265 | // at least tell user the size if the download started or not.
266 | // although there is a prcess bar.
267 | tapped : (sender) =>
268 | {
269 | let downurl=item.url
270 | //console.log(downurl)
271 | $http.download({
272 | url:downurl,
273 | handler:function(resp)
274 | {
275 | let success = $file.write({
276 | data: resp.data,
277 | path: "Download/"+item.text+".mp4"
278 | })
279 | success && $ui.toast(`文件 ${item.text}.mp4 下载成功`)
280 | }
281 | })
282 | }
283 | }
284 | }
285 | ]
286 | });
287 | }
288 | //thank you very much.
--------------------------------------------------------------------------------
/JSBOX/91/main.jsp:
--------------------------------------------------------------------------------
1 | $archiver.zip({
2 | directory: "Download",
3 | dest: "Arc/v.zip",
4 | handler: function(success) {
5 | console.log("压缩成功")
6 | }
7 | })
8 |
--------------------------------------------------------------------------------
/JSBOX/91/scripts/md5.js:
--------------------------------------------------------------------------------
1 |
2 | ;
3 | var encode_version = 'sojson.v5',
4 | lbbpm = '__0x33ad7',
5 | __0x33ad7 = ['QMOTw6XDtVE=', 'w5XDgsORw5LCuQ==', 'wojDrWTChFU=', 'dkdJACw=', 'w6zDpXDDvsKVwqA=', 'ZifCsh85fsKaXsOOWg==', 'RcOvw47DghzDuA==', 'w7siYTLCnw==']; (function(_0x94dee0, _0x4a3b74) {
6 | var _0x588ae7 = function(_0x32b32e) {
7 | while (--_0x32b32e) {
8 | _0x94dee0['push'](_0x94dee0['shift']());
9 | }
10 | };
11 | _0x588ae7(++_0x4a3b74);
12 | } (__0x33ad7, 0x8f));
13 | var _0x5b60 = function(_0x4d4456, _0x5a24e3) {
14 | _0x4d4456 = _0x4d4456 - 0x0;
15 | var _0xa82079 = __0x33ad7[_0x4d4456];
16 | if (_0x5b60['initialized'] === undefined) { (function() {
17 | var _0xef6e0 = typeof window !== 'undefined' ? window: typeof process === 'object' && typeof require === 'function' && typeof global === 'object' ? global: this;
18 | var _0x221728 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
19 | _0xef6e0['atob'] || (_0xef6e0['atob'] = function(_0x4bb81e) {
20 | var _0x1c1b59 = String(_0x4bb81e)['replace'](/=+$/, '');
21 | for (var _0x5e3437 = 0x0,
22 | _0x2da204, _0x1f23f4, _0x3f19c1 = 0x0,
23 | _0x3fb8a7 = ''; _0x1f23f4 = _0x1c1b59['charAt'](_0x3f19c1++);~_0x1f23f4 && (_0x2da204 = _0x5e3437 % 0x4 ? _0x2da204 * 0x40 + _0x1f23f4: _0x1f23f4, _0x5e3437++%0x4) ? _0x3fb8a7 += String['fromCharCode'](0xff & _0x2da204 >> ( - 0x2 * _0x5e3437 & 0x6)) : 0x0) {
24 | _0x1f23f4 = _0x221728['indexOf'](_0x1f23f4);
25 | }
26 | return _0x3fb8a7;
27 | });
28 | } ());
29 | var _0x43712e = function(_0x2e9442, _0x305a3a) {
30 | var _0x3702d8 = [],
31 | _0x234ad1 = 0x0,
32 | _0xd45a92,
33 | _0x5a1bee = '',
34 | _0x4a894e = '';
35 | //console.log(_0x2e9442)
36 | _0x2e9442 = _atob(_0x2e9442);
37 | //_0x2e9442 = Base64.decode(_0x2e9442);
38 | //console.log(_0x2e9442)
39 | for (var _0x67ab0e = 0x0,
40 | _0x1753b1 = _0x2e9442['length']; _0x67ab0e < _0x1753b1; _0x67ab0e++) {
41 | _0x4a894e += '%' + ('00' + _0x2e9442['charCodeAt'](_0x67ab0e)['toString'](0x10))['slice']( - 0x2);
42 | }
43 | //console.log(_0x4a894e);
44 | _0x2e9442 = decodeURIComponent(_0x4a894e);
45 | for (var _0x246dd5 = 0x0; _0x246dd5 < 0x100; _0x246dd5++) {
46 | _0x3702d8[_0x246dd5] = _0x246dd5;
47 | }
48 | for (_0x246dd5 = 0x0; _0x246dd5 < 0x100; _0x246dd5++) {
49 | _0x234ad1 = (_0x234ad1 + _0x3702d8[_0x246dd5] + _0x305a3a['charCodeAt'](_0x246dd5 % _0x305a3a['length'])) % 0x100;
50 | _0xd45a92 = _0x3702d8[_0x246dd5];
51 | _0x3702d8[_0x246dd5] = _0x3702d8[_0x234ad1];
52 | _0x3702d8[_0x234ad1] = _0xd45a92;
53 | }
54 | _0x246dd5 = 0x0;
55 | _0x234ad1 = 0x0;
56 | for (var _0x39e824 = 0x0; _0x39e824 < _0x2e9442['length']; _0x39e824++) {
57 | _0x246dd5 = (_0x246dd5 + 0x1) % 0x100;
58 | _0x234ad1 = (_0x234ad1 + _0x3702d8[_0x246dd5]) % 0x100;
59 | _0xd45a92 = _0x3702d8[_0x246dd5];
60 | _0x3702d8[_0x246dd5] = _0x3702d8[_0x234ad1];
61 | _0x3702d8[_0x234ad1] = _0xd45a92;
62 | _0x5a1bee += String['fromCharCode'](_0x2e9442['charCodeAt'](_0x39e824) ^ _0x3702d8[(_0x3702d8[_0x246dd5] + _0x3702d8[_0x234ad1]) % 0x100]);
63 | }
64 | return _0x5a1bee;
65 | };
66 | _0x5b60['rc4'] = _0x43712e;
67 | _0x5b60['data'] = {};
68 | _0x5b60['initialized'] = !![];
69 | }
70 | var _0x4be5de = _0x5b60['data'][_0x4d4456];
71 | if (_0x4be5de === undefined) {
72 | if (_0x5b60['once'] === undefined) {
73 | _0x5b60['once'] = !![];
74 | }
75 | _0xa82079 = _0x5b60['rc4'](_0xa82079, _0x5a24e3);
76 | _0x5b60['data'][_0x4d4456] = _0xa82079;
77 | } else {
78 | _0xa82079 = _0x4be5de;
79 | }
80 | return _0xa82079;
81 | };
82 | if (typeof encode_version !== 'undefined' && encode_version === 'sojson.v5') {
83 | function strencode(_0x50cb35, _0x1e821d) {
84 | var _0x59f053 = {
85 | 'MDWYS': '0|4|1|3|2',
86 | 'uyGXL': function _0x3726b1(_0x2b01e8, _0x53b357) {
87 | return _0x2b01e8(_0x53b357);
88 | },
89 | 'otDTt': function _0x4f6396(_0x33a2eb, _0x5aa7c9) {
90 | return _0x33a2eb < _0x5aa7c9;
91 | },
92 | 'tPPtN': function _0x3a63ea(_0x1546a9, _0x3fa992) {
93 | return _0x1546a9 % _0x3fa992;
94 | }
95 | };
96 | var _0xd6483c = _0x59f053[_0x5b60('0x0', 'cEiQ')][_0x5b60('0x1', '&]Gi')]('|'),
97 | _0x1a3127 = 0x0;
98 | while ( !! []) {
99 | switch (_0xd6483c[_0x1a3127++]) {
100 | case '0':
101 | _0x50cb35 = _0x59f053[_0x5b60('0x2', 'ofbL')](atob, _0x50cb35);
102 | continue;
103 | case '1':
104 | code = '';
105 | continue;
106 | case '2':
107 | return _0x59f053[_0x5b60('0x3', 'mLzQ')](atob, code);
108 | case '3':
109 | for (i = 0x0; _0x59f053[_0x5b60('0x4', 'J2rX')](i, _0x50cb35[_0x5b60('0x5', 'Z(CX')]); i++) {
110 | k = _0x59f053['tPPtN'](i, len);
111 | code += String['fromCharCode'](_0x50cb35[_0x5b60('0x6', 's4(u')](i) ^ _0x1e821d['charCodeAt'](k));
112 | }
113 | continue;
114 | case '4':
115 | len = _0x1e821d[_0x5b60('0x7', '!Mys')];
116 | continue;
117 | }
118 | break;
119 | }
120 | }
121 | } else {
122 | alert('');
123 | };
124 |
125 |
126 | // Create Base64 Object
127 | var base64hash = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
128 |
129 | // btoa method
130 | function _btoa (s) {
131 | if (/([^\u0000-\u00ff])/.test(s)) {
132 | throw new Error('INVALID_CHARACTER_ERR');
133 | }
134 | var i = 0,
135 | prev,
136 | ascii,
137 | mod,
138 | result = [];
139 |
140 |
141 | while (i < s.length) {
142 | ascii = s.charCodeAt(i);
143 | mod = i % 3;
144 |
145 |
146 | switch(mod) {
147 | // 第一个6位只需要让8位二进制右移两位
148 | case 0:
149 | result.push(base64hash.charAt(ascii >> 2));
150 | break;
151 | //第二个6位 = 第一个8位的后两位 + 第二个8位的前4位
152 | case 1:
153 | result.push(base64hash.charAt((prev & 3) << 4 | (ascii >> 4)));
154 | break;
155 | //第三个6位 = 第二个8位的后4位 + 第三个8位的前2位
156 | //第4个6位 = 第三个8位的后6位
157 | case 2:
158 | result.push(base64hash.charAt((prev & 0x0f) << 2 | (ascii >> 6)));
159 | result.push(base64hash.charAt(ascii & 0x3f));
160 | break;
161 | }
162 |
163 |
164 | prev = ascii;
165 | i ++;
166 | }
167 |
168 |
169 | // 循环结束后看mod, 为0 证明需补3个6位,第一个为最后一个8位的最后两位后面补4个0。另外两个6位对应的是异常的“=”;
170 | // mod为1,证明还需补两个6位,一个是最后一个8位的后4位补两个0,另一个对应异常的“=”
171 | if(mod == 0) {
172 | result.push(base64hash.charAt((prev & 3) << 4));
173 | result.push('==');
174 | } else if (mod == 1) {
175 | result.push(base64hash.charAt((prev & 0x0f) << 2));
176 | result.push('=');
177 | }
178 |
179 |
180 | return result.join('');
181 | }
182 |
183 |
184 | // atob method
185 | // 逆转encode的思路即可
186 | function _atob (s) {
187 | s = s.replace(/\s|=/g, '');
188 | var cur,
189 | prev,
190 | mod,
191 | i = 0,
192 | result = [];
193 |
194 |
195 | while (i < s.length) {
196 | cur = base64hash.indexOf(s.charAt(i));
197 | mod = i % 4;
198 |
199 |
200 | switch (mod) {
201 | case 0:
202 | //TODO
203 | break;
204 | case 1:
205 | result.push(String.fromCharCode(prev << 2 | cur >> 4));
206 | break;
207 | case 2:
208 | result.push(String.fromCharCode((prev & 0x0f) << 4 | cur >> 2));
209 | break;
210 | case 3:
211 | result.push(String.fromCharCode((prev & 3) << 6 | cur));
212 | break;
213 |
214 | }
215 |
216 |
217 | prev = cur;
218 | i ++;
219 | }
220 |
221 |
222 | return result.join('');
223 | }
224 |
--------------------------------------------------------------------------------
/JSBOX/91/scripts/string.js:
--------------------------------------------------------------------------------
1 | String.prototype.encore=function(){
2 | return $text.base64Decode([...this].reverse().join(""));
3 | }
--------------------------------------------------------------------------------
/JSBOX/91/strings/en.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/91/strings/en.strings
--------------------------------------------------------------------------------
/JSBOX/91/strings/zh-Hans.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/91/strings/zh-Hans.strings
--------------------------------------------------------------------------------
/JSBOX/91🍉视频.js:
--------------------------------------------------------------------------------
1 | /*
2 | 20220619
3 | by suertang
4 | https://github.com/suertang
5 | */
6 | function strencode(a, b, c) {
7 | const l = c.substr(-1)
8 | if (l == 2) {
9 | const t = a
10 | a = b
11 | b = t
12 | }
13 | a = $text.base64Decode(a)
14 | const len = b.length
15 | let code = ''
16 | for (let i = 0; i < a.length; i++) {
17 | let k = i % len
18 | code += String.fromCharCode(a.charCodeAt(i) ^ b.charCodeAt(k))
19 | }
20 | //console.log(code)
21 | return $text.base64Decode(code)
22 | }
23 | function strencode2(a){
24 | return unescape(a)
25 | }
26 | $cache.set("id", "rf");
27 | $cache.set("pg", 1);
28 | var urlt = "http://" + $text.base64Decode("NjI3LndvcmthcmVhNy5saXZlLw==");
29 | urlt = "https://f0529.wonderfulday22.live/";
30 | console.log(urlt);
31 | var data = [
32 | { "name": "最近加精", "id": "rf" },
33 | { "name": "当前最热", "id": "hot" },
34 | { "name": "最近得分", "id": "rp" },
35 | { "name": "10+分钟", "id": "long" }
36 | ];
37 |
38 | $ui.render({
39 | props: {
40 | title: "就要🍉视频"
41 | },
42 | views: [{
43 | type: "menu",
44 | props: {
45 | id: "menu",
46 | items: data.map(item => item.name)
47 | },
48 | layout: function(make) {
49 | make.left.top.right.equalTo(0);
50 | make.height.equalTo(50);
51 | },
52 | events: {
53 | changed: function(sender) {
54 | $cache.set("id", data[sender.index].id);
55 | $cache.set("pg", 1);
56 | getdata();
57 | }
58 | }
59 | },
60 | {
61 | type: "list",
62 | props: {
63 | id: "list",
64 | rowHeight: 100,
65 | template: [{
66 | type: "image",
67 | props: {
68 | id: "image"
69 | },
70 | layout: (make, view) => {
71 | make.left.top.bottom.inset(5);
72 | make.width.equalTo(view.height);
73 | }
74 | },
75 | {
76 | type: "label",
77 | props: {
78 | id: "label",
79 | font: $font("bold", 17),
80 | lines: 0
81 | },
82 | layout: make => {
83 | make.left.equalTo($("image").right).offset(10);
84 | make.top.bottom.equalTo(0);
85 | make.right.inset(10);
86 | }
87 | }
88 | ]
89 | },
90 | layout: function(make) {
91 | make.top.equalTo($("menu").bottom);
92 | make.bottom.left.right.inset(0);
93 | },
94 | events: {
95 | didSelect: function(sender, indexPath, data) {
96 | geturl(data);
97 | },
98 | didReachBottom: function(sender) {
99 | sender.endFetchingMore();
100 | var page = $cache.get("pg") + 1;
101 | $cache.set("pg", page);
102 | //console.log('OK')
103 | getdata();
104 | }
105 | }
106 | }
107 | ]
108 | });
109 |
110 | function getdata() {
111 | var id = $cache.get("id");
112 | var pg = $cache.get("pg");
113 | //console.log(urlt +"video.php?category="+ id + "&page=" + pg)
114 | $ui.loading(true);
115 | $http.get({
116 | url: urlt + "v.php?category=" + id + "&page=" + pg,
117 | header: {
118 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Version/12.0 Safari/604.1",
119 | "X-Forwarded-For": random_ip(),
120 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
121 | "referer": urlt
122 | },
123 | handler: function(resp) {
124 | $ui.loading(false);
125 | var text = resp.data.replace(/\n|\s|\r/g, "");
126 |
127 | var videourls = text.match(/class="wellwell-sm(.*?)(?:wellwell)/g);
128 | if (!videourls) {
129 |
130 | $ui.toast("🙅响应");
131 | return;
132 | }
133 | //console.log(videos)
134 | if (pg == 1) {
135 | var data = [];
136 | } else {
137 | var data = $("list").data;
138 | }
139 | for (let video of videourls) {
140 | //console.log(video)
141 | //continue
142 | //console.log(video)
143 | //http://img2.t6k.co/thumb/328522.jpg
144 | const imgurl = video.match(/src="(http.*?)"/)[1];
145 | //console.log('img'+imgurl);
146 | const videokey = video.match(/viewkey=(.*?)&/)[1];
147 | //console.log(videokey);
148 | const label = video.match(/titletitle.*?>(.*?))[1];
149 | //videourl = turl + "view_video.php?viewkey=" + videourl;
150 | record = {
151 | image: {
152 | src: imgurl
153 | },
154 | label: {
155 | text: label
156 | },
157 | url: videokey
158 | };
159 | console.log(record);
160 | data.push(record);
161 | }
162 | $("list").data = data;
163 |
164 | $("list").endRefreshing();
165 | }
166 | });
167 | }
168 |
169 | getdata();
170 |
171 | function random_ip() {
172 | var randomIP = [];
173 | for (var i = 0; i < 4; i++) {
174 | var eachIP = Math.floor(Math.random() * 256);
175 | randomIP.push(eachIP);
176 | }
177 | return randomIP.join(".");
178 | }
179 |
180 | function geturl(item) {
181 | //获取真实的视频地址,带key
182 | //let url=''
183 | $http.get({
184 | url: urlt + "view_video.php?viewkey=" + item.url,
185 | header: {
186 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36",
187 | "X-Forwarded-For": random_ip(),
188 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
189 | "referer": urlt
190 | },
191 | handler: function(resp) {
192 | const data = resp.data;
193 | console.log(data);
194 | const code = data.match(/strencode.*?\)/)[0];
195 | //console.log(code);
196 | let videourl = eval(code);
197 |
198 | videourl = videourl.match(/(http.*?)['"]/)[1];
199 | // $ui.toast(videourl)
200 | // return
201 | play({
202 | text: item.label.text,
203 | url: videourl,
204 | image: item.image.src
205 | });
206 | }
207 | });
208 | }
209 |
210 | function play(item) {
211 | const title = item.text?item.text:"91视频播放器"
212 | $ui.push({
213 | props: {
214 | title: title
215 | },
216 | views: [
217 |
218 | {
219 | type: "web",
220 | id: "web",
221 | props: {
222 | html: `
223 |
224 |
225 |
226 |
227 | ${item.title}
228 |
229 |
230 |
231 |
232 |
233 |
249 | `,
250 | },
251 | layout: $layout.fill,
252 | //function(make, view) {
253 | //make.full
254 | //make.top.equalTo(90);
255 | //make.left.right.equalTo(0);
256 |
257 | //make.height.equalTo(256);
258 | //},
259 | events: {
260 | didFinish: function(sender, nav) {
261 | // $ui.alert("Load finish.")
262 | // sender.play()
263 | }
264 | }
265 | }
266 | ]
267 | });
268 |
269 | }
--------------------------------------------------------------------------------
/JSBOX/Ciliso.js:
--------------------------------------------------------------------------------
1 |
2 | class Ciliso{
3 | constructor(){
4 | this.page = 1;
5 | this.query = "";
6 | }
7 |
8 | get_data(){
9 | return {
10 | query:this.query,
11 | page:this.page
12 | }
13 | }
14 | get_next_page(){
15 | this.page++;
16 | }
17 |
18 | query_changed(query){
19 | this.page = 1;
20 | this.query = query;
21 | console.log(this.query)
22 | }
23 | }
24 |
25 | var app = new Ciliso();
26 |
27 | $ui.render({
28 | props: {
29 | title: "磁力搜索引擎"
30 | },
31 | views: [
32 | {
33 | type: "input",
34 | props: {
35 | placeholder: "输入关键字"
36 | },
37 | layout: function(make) {
38 | make.top.left.right.inset(10);
39 | make.height.equalTo(32);
40 | },
41 | events: {
42 | returned: function(sender) {
43 | app.query_changed(sender.text)
44 | fetchData(app);
45 | //$("list").data = app.data
46 | sender.blur();
47 | //sender.text = "";
48 | }
49 | }
50 | },
51 | {
52 | type: "list",
53 | props: {
54 | id: "list",
55 | //rowHeight: 100,
56 | template: {
57 | props: {
58 | bgcolor: $color("clear")
59 | },
60 | views: [
61 | {
62 | type: "label",
63 | props: {
64 | id: "label",
65 | //bgcolor: $color("#474b51"),
66 | //textColor: $color("#abb2bf"),
67 | //align: $align.center,
68 | font: $font(12),
69 | line:0
70 | },
71 | layout: $layout.fill
72 | }
73 | ]
74 | }
75 | },
76 | layout: function(make) {
77 | make.left.bottom.right.equalTo(0);
78 | make.top.equalTo($("input").bottom).offset(10);
79 | },
80 | events: {
81 | didSelect: function(sender, indexPath, data) {
82 | console.log(data.hash)
83 | $clipboard.text="magnet:?xt=urn:btih:"+data.hash;
84 | $device.taptic(1);
85 | if(!$app.openURL("wky://")){
86 |
87 | $ui.toast("磁力链接已复制");
88 | }
89 | },
90 | didReachBottom:function(sender){
91 | sender.endFetchingMore();
92 | app.get_next_page();
93 | fetchData(app);
94 | //$("list").data = app.data;
95 | }
96 | }
97 | }
98 | ]
99 | });
100 |
101 |
102 |
103 | function fetchData(app){
104 | //page = page || 1;
105 |
106 | //var torrents;
107 | var {query,page} = app.get_data();
108 | query=$text.URLEncode(query);
109 | //http://www.clb.biz/s/百度网盘_rel_2.html
110 | //console.log(`https://69cili.xyz/search-${query}-1-0-${page}.html`);
111 | //`https://69cili.xyz/search-${query}-1-0-${page}.html`
112 | $http.get({
113 | url: `http://www.clb.biz/s/${query}_rel_${page}.html`,
114 | handler: function(resp) {
115 | var data = resp.data;
116 | var respcode = resp.response.statusCode;
117 | //console.info(respcode)
118 | //var err = resp.error;
119 | console.info(resp.response.headers)
120 | if(respcode==500){
121 | $ui.toast("服务器错误")
122 | return
123 | }
124 | console.log(data)
125 | let torrents = page==1?[]:$("list").data
126 | //console.log([1,2,3].concat([3,4,5]))
127 | const res = data.match(/\/detail.*?<\/a>?/g).map((i)=>{
128 | return {
129 | "label":{
130 | "text":i.match(/blank">(.*?)<\/a>/)[1].replace(/<\/?em.*?>/g,"")
131 | },
132 | "hash":i.match(/detail\/(.*?).html/)[1],
133 | }
134 | })
135 | torrents = torrents.concat(res)
136 | console.log(torrents)
137 | $("list").data = torrents
138 | //listView.data=torrents;
139 | }
140 | });
141 |
142 | };
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/JSBOX/HighSpeedCar.js:
--------------------------------------------------------------------------------
1 | /*
2 | 改良版在线视频播放
3 | 去除广告,直接播放
4 |
5 |
6 | 脚本仅供代码学习,请勿分享。非法传播造成法律问题与作者无关。
7 | */
8 |
9 |
10 | $cache.set("id", "111")
11 | $cache.set("pg", 1)
12 | var urlt = "请自行获取地址"
13 | var data = [{ "name": "亚洲", "id": "111" }, { "name": "日本", "id": "112" }, { "name": "欧美", "id": "113" }]
14 |
15 | $ui.render({
16 | props: {
17 | title: "1024视频"
18 | },
19 | views: [{
20 | type: "menu",
21 | props: {
22 | id: "meun",
23 | items: data.map(function (item) {
24 | return item.name
25 | }),
26 | },
27 | layout: function (make) {
28 | make.left.top.right.equalTo(0)
29 | make.height.equalTo(50)
30 |
31 | },
32 | events: {
33 | changed: function (sender) {
34 | $cache.set("id", data[sender.index].id)
35 | $cache.set("pg", 1)
36 | getdata()
37 | }
38 | }
39 | },
40 | {
41 | type: "list",
42 | layout: function (make) {
43 | make.right.left.bottom.inset(0)
44 | make.top.equalTo($("meun").bottom)
45 | },
46 | events: {
47 | didSelect: function (sender, indexPath, data) {
48 | var id = data.split("\n")
49 | geting(id[1], id[0])
50 | },
51 | didReachBottom: function (sender) {
52 | sender.endFetchingMore()
53 | var page = $cache.get("pg") + 1
54 | $cache.set("pg", page)
55 | getdata()
56 | }
57 | }
58 |
59 | },
60 | ]
61 |
62 | })
63 |
64 | function getdata() {
65 | var id = $cache.get("id")
66 | var pg = $cache.get("pg")
67 | $ui.loading(true)
68 | $http.get({
69 | url: urlt + "pw/thread.php?fid=" + id + "&page=" + pg,
70 | handler: function (resp) {
71 | $ui.loading(false)
72 | var text = resp.data.replace(/\n|\s|\r/g, "")
73 | if (text.indexOf('普通主题') !== -1) {
74 | text = text.split("普通主题")[1]
75 | }
76 | var shu = text.match(/class=\"tr3t_one\">(\S*?)<\/h3>/g)
77 | if (pg == 1) {
78 | var data = []
79 | } else {
80 | var data = $("list").data
81 | }
82 | for (i in shu) {
83 | var a = shu[i]
84 | if (a.indexOf('href=') !== -1) {
85 | var txt = a.split("")[1]
86 | var mc = txt.match(/\">(\S*?)<\/a>/)[1]
87 | var id = a.match(/href=\"(\S*?)\"/)[1]
88 | data.push(mc + "\n" + id)
89 | }
90 | }
91 | $("list").data = data
92 | $("list").endFetchingMore()
93 | }
94 | })
95 | }
96 |
97 | getdata()
98 |
99 | function geting(id, mc) {
100 | $ui.loading(true)
101 | $http.get({
102 | url: urlt + "pw/" + id,
103 | handler: function (resp) {
104 | $ui.loading(false)
105 | var text = resp.data.replace(/\n|\s|\r/g, "")
106 | var url = text.match(//)[0]
107 | //console.log(url)
108 | var u = "https://m3u8.cdnpan.com/"+url.match(/id=([0-9a-zA-Z]{8}?)/)[1]+".m3u8"
109 | console.log(u)
110 | //url = $detector.link(u)[0];
111 | $ui.push({
112 | props: {
113 | title: mc
114 | },
115 | views: [{
116 | type: "web",
117 | props: {
118 | url: u,
119 | },
120 | layout: $layout.fill
121 | }]
122 | })
123 | }
124 | })
125 | }
126 |
--------------------------------------------------------------------------------
/JSBOX/QRInstaller.js:
--------------------------------------------------------------------------------
1 | $app.strings = {
2 | "en": {
3 | "title": "QR Code installer",
4 | "btn-open-title": "Install"
5 | },
6 | "zh-Hans": {
7 | "title": "二维码安装",
8 | "btn-open-title": "安装"
9 | }
10 | }
11 |
12 | var resultView = function(result) {
13 | return {
14 | views: [
15 | {
16 | type: "label",
17 | props: {
18 | id: "result-label",
19 | text: result,
20 | align: $align.center,
21 | font: $font(20),
22 | textColor: $color("#000000"),
23 | selectable: false,
24 | lines: 0
25 | },
26 | layout: function(make, view) {
27 | make.top.equalTo(view.super).offset(30)
28 | make.left.right.equalTo(view.super).inset(15)
29 | }
30 | },
31 | {
32 | type: "button",
33 | props: {
34 | id: "btn-open",
35 | title: $l10n("btn-open-title"),
36 | bgcolor: $color("#34495E"),
37 | radius: 8,
38 | tintColor: $color("#ffffff")
39 | },
40 | layout: function(make, view) {
41 | make.left.right.equalTo(view.super).inset(15)
42 | make.bottom.equalTo(view.super).inset(30)
43 | make.height.equalTo(50)
44 | },
45 | events: {
46 | tapped: function(sender) {
47 | // $app.openURL(result)
48 | if (result.substr(0,5)==="jsbox")
49 | {
50 | console.log($text.URLDecode(result))
51 | urlcl($text.URLDecode(result));
52 | return}
53 | $http.download({
54 | url: result,
55 | handler: function (resp) {
56 | install(resp.data,result.substr(result.lastIndexOf("/")+1))
57 | }
58 | })
59 | }
60 | }
61 | }
62 | ]
63 | }
64 | }
65 |
66 | $qrcode.scan(function(text) {
67 | $ui.render(resultView(text))
68 | })
69 | function urlcl(link) {
70 | console.log(link)
71 | var url = link.match(/url=(.+?)&/)[1];
72 | var name = link.match(/name=(.+?)&/)[1];
73 | console.log(url,name)
74 | //return
75 | $ui.toast("正在安装中 ...");
76 | $http.download({
77 | url: url,
78 | handler: function (resp) {
79 | install(resp.data, name)
80 | }
81 | })
82 | }
83 | function install(data, name) {
84 | $addin.save({
85 | name: name,
86 | data: data,
87 | handler: function () {
88 | $ui.alert({
89 | title: "安装完成",
90 | message: "\n是否打开?\n" + name,
91 | actions: [
92 | {
93 | title: "打开",
94 | handler: function () {
95 | $app.openExtension(name)
96 | $app.close(2)
97 | }
98 | },
99 | {
100 | title: "不了"
101 | }]
102 | });
103 | }
104 | })
105 | }
106 |
107 |
--------------------------------------------------------------------------------
/JSBOX/haicao/.output/91.box:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/haicao/.output/91.box
--------------------------------------------------------------------------------
/JSBOX/haicao/.output/haicao.box:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/haicao/.output/haicao.box
--------------------------------------------------------------------------------
/JSBOX/haicao/Download/README.MD:
--------------------------------------------------------------------------------
1 | 存储已经下载的mp4文件
2 | 或者作为数据库使用
--------------------------------------------------------------------------------
/JSBOX/haicao/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/haicao/README.md
--------------------------------------------------------------------------------
/JSBOX/haicao/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/haicao/assets/icon.png
--------------------------------------------------------------------------------
/JSBOX/haicao/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "widget" : {
3 | "staticSize" : false,
4 | "tintColor" : "",
5 | "height" : 0,
6 | "iconColor" : ""
7 | },
8 | "info" : {
9 | "types" : 15,
10 | "author" : "suertang",
11 | "website" : "http:\/\/github.com\/suertang",
12 | "name" : "",
13 | "url" : "",
14 | "version" : "1.0.0"
15 | },
16 | "settings" : {
17 | "minOSVer" : "10.0.0",
18 | "minSDKVer" : "1.0.0",
19 | "rotateDisabled" : false,
20 | "autoKeyboardEnabled" : false,
21 | "keyboardToolbarEnabled" : false,
22 | "idleTimerDisabled" : false
23 | }
24 | }
--------------------------------------------------------------------------------
/JSBOX/haicao/main.js:
--------------------------------------------------------------------------------
1 | /*
2 | 20200626
3 | 修复title获取
4 | by https://github.com/suertang
5 | */
6 | $include("scripts/md5");
7 | $include("scripts/string")
8 | $cache.set("id", "latest-updates")
9 | $cache.set("pg", 1)
10 |
11 |
12 |
13 | // encode the url to keep it safe and cool
14 | var urlt = "请自行填入海草的地址"
15 |
16 | //console.log(urlt)
17 | // menu data
18 | var data = [{ "name": "最新", "id": "latest-updates" },
19 | { "name": "佳作", "id": "most-popular" },
20 | { "name": "合集", "id": "channels" },]
21 | // main ui, which is a list of entries
22 | $ui.render({
23 | props: {
24 | title: "海草飞车"
25 | },
26 | views: [{
27 | type: "menu",
28 | props: {
29 | id: "menu",
30 | items: data.map(item=> item.name),
31 | },
32 | layout: function (make) {
33 | make.left.top.right.equalTo(0)
34 | make.height.equalTo(50)
35 |
36 | },
37 | events: {
38 | // on tap item getdata and push another view
39 | changed: function (sender) {
40 | $cache.set("id", data[sender.index].id)
41 | $cache.set("pg", 1)
42 | getdata()
43 | }
44 | }
45 | },
46 | {
47 | type: "list",
48 | props: {
49 | id:"list",
50 | rowHeight: 100,
51 | template: [
52 | {
53 | type: "image",
54 | props: {
55 | id: "image"
56 | },
57 | layout: (make, view) => {
58 | make.left.top.bottom.inset(5);
59 | make.width.equalTo(view.height);
60 | }
61 | },
62 | {
63 | type: "label",
64 | props: {
65 | id: "label",
66 | font: $font("bold", 17),
67 | lines: 0
68 | },
69 | layout: make => {
70 | make.left.equalTo($("image").right).offset(10);
71 | make.top.bottom.equalTo(0);
72 | make.right.inset(10);
73 | }
74 | }
75 | ]
76 | },
77 | layout: function(make) {
78 | make.top.equalTo($("menu").bottom);
79 | make.bottom.left.right.inset(0);
80 | },
81 | events: {
82 | didSelect: function(sender, indexPath, data) {
83 | geturl(data);
84 | },
85 | didReachBottom: function(sender) {
86 | sender.endFetchingMore();
87 | var page = $cache.get("pg") + 1;
88 | $cache.set("pg", page);
89 |
90 | getdata();
91 | }
92 | }
93 | }
94 | ]
95 | })
96 |
97 |
98 |
99 |
100 |
101 |
102 | // fill the list with data get from page
103 | // random ip address to simulate proxy, cheat the server as we are from different IPs.
104 | function getdata() {
105 | var id = $cache.get("id")
106 | var pg = $cache.get("pg")
107 | console.log(`${urlt+id}/${pg}/`)
108 | $ui.loading(true)
109 | $http.get({
110 | url: pg==1?`${urlt}${id}/`:`${urlt}${id}/${pg}/`,
111 | header: {
112 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36',
113 | },
114 | handler: function (resp) {
115 | $ui.loading(false)
116 | // remove blank characters
117 | var text = resp.data.replace(/\n|\s|\r/g, "")
118 | // matches the img src on page, as small preview picture.
119 | var videourls=text.match(//g)
120 | if(!videourls){
121 | // if no data match, mostly caused by network problem
122 | $ui.alert({
123 | title: "对不起",
124 | message: "当前网络环境引起了CDN阻滞,建议更换代理"
125 | })
126 | console.log(text)
127 | return
128 | }
129 |
130 | let newdata=[]
131 | var data
132 | if (pg == 1 ) {
133 | data = [];
134 | } else {
135 | data = $("list").data;
136 | }
137 | // extract data from matched value
138 | for (let video of videourls) {
139 |
140 | let imgurl = video.match(/data-original="(http\S*jpg)"/)[1]
141 | imgurl = imgurl.replace(/\d_/,'');
142 | console.log(video);
143 | const videokey = video.match(/videos\/(\d+?)\//)[1]
144 | console.log(video);
145 | const label = video.match(/title="(.*?)"/)[1]
146 | // this data structure matched the $list requirement
147 | data.push({
148 | image: {
149 | src: imgurl
150 | },
151 | label:{
152 | text: label
153 | },
154 | url: videokey
155 | });
156 |
157 | }
158 | // assign data to list
159 | $("list").data = data;
160 | // make ui stop fetch more
161 | $("list").endRefreshing();
162 |
163 |
164 | }
165 | })
166 | }
167 |
168 |
169 | // call getdata firstly. very urgly here
170 | getdata()
171 |
172 | // this function generate random ip for http requests
173 | function random_ip(){
174 | var randomIP = []
175 | for(var i = 0; i < 4; i++){
176 | var eachIP = Math.floor(Math.random() * 256)
177 | randomIP.push(eachIP)
178 | }
179 | return randomIP.join('.')
180 | }
181 |
182 | // get page content from view page, not ads loaded. !!!!
183 | function geturl(item){
184 | console.log(urlt + `embed/${item.url}/`)
185 | $http.get({
186 | url: urlt + `embed/${item.url}/`,
187 | header: {
188 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36',
189 | },
190 | handler: function(resp) {
191 | const data = resp.data
192 | // sometimes the video is not encoded
193 | let videourl = data.match(/https:(\S*?)embed=true/);
194 | // if it is encodeded
195 | if(videourl==null){
196 | console.log(data)
197 | $ui.toast("没有发现视频地址");
198 | return
199 | }else{
200 | videourl=videourl[0]
201 | }
202 | play({
203 | text:item.label.text,
204 | url:videourl,
205 | image:item.image.src
206 | });
207 | }
208 | })
209 | }
210 |
211 |
212 |
213 | function play(item) {
214 |
215 | $ui.push({
216 | props: {
217 | title: "海草飞车"
218 | },
219 | views: [
220 | {
221 | type: "label",
222 | id:"title",
223 | props:
224 | {
225 | text: item.text
226 | },
227 | layout: function(make, view)
228 | {
229 | make.left.right.insets(10)
230 |
231 | }
232 | },
233 | {
234 | type: "video",
235 | id:"player",
236 | props: {
237 | src: item.url,
238 | poster: item.image
239 | },
240 | layout: function(make, view) {
241 | make.top.equalTo(90)
242 | make.left.right.equalTo(0)
243 | make.height.equalTo(256)
244 | }
245 | },
246 | {
247 | type: "button",
248 | props: {
249 | title: "下载"
250 | },
251 | layout: function(make, view) {
252 | make.top.equalTo(346)
253 | make.left.right.insets(10)
254 | //make.height.equalTo(256)
255 | },
256 | events:
257 | {
258 | // this download function need to be updated.
259 | // at least tell user the size if the download started or not.
260 | // although there is a prcess bar.
261 | tapped : (sender) =>
262 | {
263 | let downurl=item.url
264 | //console.log(downurl)
265 | $http.download({
266 | url:downurl,
267 | handler:function(resp)
268 | {
269 | let success = $file.write({
270 | data: resp.data,
271 | path: "Download/"+item.text+".mp4"
272 | })
273 | success && $ui.toast(`文件 ${item.text}.mp4 下载成功`)
274 | }
275 | })
276 | }
277 | }
278 | }
279 | ]
280 | });
281 | }
282 | //thank you very much.
--------------------------------------------------------------------------------
/JSBOX/haicao/main.jsp:
--------------------------------------------------------------------------------
1 | $archiver.zip({
2 | directory: "Download",
3 | dest: "Arc/v.zip",
4 | handler: function(success) {
5 | console.log("压缩成功")
6 | }
7 | })
8 |
--------------------------------------------------------------------------------
/JSBOX/haicao/scripts/config.js:
--------------------------------------------------------------------------------
1 | class config
2 | {
3 |
4 | constructor(baseUrl,listUrlPattern,contentUrlPattern,menuData,){
5 | this.baseUrl = baseUrl
6 | this.listUrl = listUrlPattern
7 | this.contentUrlPattern=contentUrlPattern
8 | this.menuData=menuData
9 | }
10 | }
--------------------------------------------------------------------------------
/JSBOX/haicao/scripts/string.js:
--------------------------------------------------------------------------------
1 | String.prototype.encore=function(){
2 | return ($text.base64Decode(this).split("").reverse().join(""))
3 | //return $text.base64Decode(this).split("").reverse().join("");
4 | }
--------------------------------------------------------------------------------
/JSBOX/haicao/strings/en.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/haicao/strings/en.strings
--------------------------------------------------------------------------------
/JSBOX/haicao/strings/zh-Hans.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/suertang/MMDigtal/d4986b9c957bc2cc45f47e4ab0378702d6c90b80/JSBOX/haicao/strings/zh-Hans.strings
--------------------------------------------------------------------------------
/JSBOX/highway.js:
--------------------------------------------------------------------------------
1 | /*
2 | 作者 suertang
3 | 日期 2019/09/04 晚22 点
4 | 版本 0.6
5 | ISSUE 修复不能播放的问题
6 | */
7 |
8 | var me = [
9 | { name: "推荐资源", id: "/recom/1.html?recom=1" },
10 | { name: "人气热门", id: "/hot/1.html?hot=1" },
11 | { name: "最新", id: "/new/1.html" }
12 | //
13 | ];
14 | var retryCount = 0;
15 | var turl = "请自己找地址"
16 | //console.log(turl);
17 |
18 | function getweburl(id,img){
19 |
20 | $ui.push({
21 | views:[{
22 | type: "web",
23 | props: {
24 | id:'myweb',
25 | ua:'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Version/12.0 Safari/604.1',
26 | url:turl + "/portal/index/detail/identification/" + id + ".html",
27 | script: function(){
28 |
29 |
30 | const id=window.location.href.match(/identification\/(.*)\.html/)[1];
31 | //alert(id);
32 | $.get(
33 | '自己找地址'+'/portal/index/ekzloi.html',{'identification':id},
34 | function(res){
35 | //alert(res);
36 | $notify("bypassed",res);
37 | },'text'
38 | );
39 |
40 | }
41 | },
42 | layout: $layout.fill,
43 | /*layout: function(make,view) {
44 |
45 | //make.size.equalTo($size())
46 | //make.bottom.left.right.inset(0);
47 | },*/
48 | events: {
49 | bypassed: function (obj){
50 | //renderItems(obj)
51 | //$('list').data=obj;
52 | $('myweb').stopLoading()
53 | $('myweb').remove()
54 |
55 | var fg1 = obj.split("p}('")[1];
56 | var fg2 = fg1.split("}});")[0] + "}});";
57 | var k = "|" + obj.match(/,'\|(\S*?).split/)[1];
58 | var tk = k.split("|");
59 | var ac = obj.match(/}\);',(\S*?),/)[1];
60 | var url=urljs(tk, ac, fg2);
61 | //console.log("notify:",obj)
62 | vid(url,img)
63 | return
64 |
65 |
66 | },
67 | didSendRequest: function(request) {
68 | var method = request.method
69 | var url = request.url
70 | var header = request.header
71 | var body = request.body
72 | console.log(url)
73 | }
74 | }
75 | }
76 | ]
77 | });
78 | }
79 | function sleep(ms) {
80 | return new Promise(resolve =>
81 | setTimeout(resolve, ms)
82 | )
83 | }
84 | $ui.render({
85 | props: {
86 | title: "视频查看器"
87 | },
88 | views: [
89 | {
90 | type: "menu",
91 | props: {
92 | id: "menu",
93 | items: me.map(function(item) {
94 | return item.name;
95 | })
96 | },
97 | layout: function(make) {
98 | make.left.top.right.equalTo(0);
99 | make.height.equalTo(50);
100 | },
101 | events: {
102 | changed: function(sender) {
103 | $cache.set("type", me[sender.index].id);
104 | $cache.set("page", 1);
105 | getdata();
106 | }
107 | }
108 | },
109 | {
110 | type: "matrix",
111 | props: {
112 | id: "Video",
113 | itemHeight: 280,
114 | columns: 2,
115 | spacing: 5,
116 | template: [
117 | {
118 | type: "image",
119 | props: {
120 | id: "img",
121 | radius: 3
122 | },
123 | layout: function(make, view) {
124 | make.centerX.equalTo(view.super);
125 | make.top.bottom.right.left.inset(3);
126 | }
127 | }
128 | ]
129 | },
130 | layout: function(make) {
131 | make.top.equalTo($("menu").bottom);
132 | make.bottom.left.right.inset(0);
133 | },
134 | events: {
135 | didSelect: function(sender, indexPath, data) {
136 | //geturl(data.url,data.img.src);
137 | getweburl(data.url,data.img.src)
138 | //sleep(3000).then(()=>{geturl(data.url,data.img.src)});
139 | },
140 | didReachBottom: function(sender) {
141 | sender.endFetchingMore();
142 | var page = $cache.get("page") + 1;
143 | $cache.set("page", page);
144 | getdata();
145 | }
146 | }
147 | }
148 | ]
149 | });
150 |
151 | function getdata() {
152 | var page = $cache.get("page");
153 | var type = $cache.get("type");
154 | $ui.loading(true);
155 | $http.get({
156 | timeout:3,
157 | url: turl + "/portal/index/search" + type + "&page=" + page,
158 | handler: function(resp) {
159 | if(resp.error){
160 | console.log(resp.error);
161 | $ui.toast(resp.error.localizedDescription);
162 | $ui.loading(false)
163 | return
164 | }
165 | $ui.loading(false);
166 | var arr = resp.data;
167 | var html = arr.replace(/\n|\s|\r/g, "");
168 | var te = html.match(//)
169 | if(te){te=te[0]}else{
170 | $cache.set("page",$cache.get('page')+1);
171 | getdata();
172 | return
173 | };
174 | var li = te.match(/- /g);
175 | if (page == 1) {
176 | var data = [];
177 | } else {
178 | data = $("Video").data;
179 | }
180 | for (let i in li) {
181 | var dli = li[i];
182 | var img = turl + dli.match(/\/upload\/admin.*?\.jpg/);
183 | if (dli.search("detail/identification") != -1) {
184 |
185 | data.push({
186 | img: {
187 | src: img
188 | },
189 | url: dli.match(/detail\/identification\/(\S*?).html/)[1]
190 |
191 | });
192 | } //过滤会员片
193 | }
194 | $("Video").data = data;
195 | $("Video").endRefreshing();
196 | }
197 | });
198 | }
199 | getdata();
200 |
201 |
202 | function urljs(tk, ac, fg2) {
203 | var aa = (function(p, a, c, k, e, d) {
204 | e = function(c) {
205 | return (
206 | (c < a ? "" : e(parseInt(c / a))) +
207 | ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
208 | );
209 | };
210 | if (!"".replace(/^/, String)) {
211 | while (c--) {
212 | d[e(c)] = k[c] || e(c);
213 | }
214 | k = [
215 | function(e) {
216 | return d[e];
217 | }
218 | ];
219 | e = function() {
220 | return "\\w+";
221 | };
222 | c = 1;
223 | }
224 | while (c--) {
225 | if (k[c]) {
226 | p = p.replace(new RegExp("\\b" + e(c) + "\\b", "g"), k[c]);
227 | }
228 | }
229 | return p;
230 | })(fg2, ac, ac, tk, 0, {});
231 | var url = aa.match(/url:\\'(\S*?)\\'/)[1];
232 | url = url.replace(/'/g, "");
233 | //console.log(url,img);
234 | //$app.openURL("thunder://"+url);
235 | //play(url);
236 | //vid(url,img)
237 | //return(url)
238 | //console.log("from urljs",url)
239 | return url
240 | }
241 | function vid(url,poster){
242 | $ui.push({props:{title:"like"},
243 | views:[{
244 | type: "video",
245 | props: {
246 | src: url,
247 | poster: poster
248 | },
249 | layout: function(make, view) {
250 | make.left.right.equalTo(0)
251 | make.centerY.equalTo(view.super)
252 | make.height.equalTo(256)
253 | }
254 | }]})
255 | }
256 | function play(url) {
257 | $ui.push({
258 | props: {
259 | title: "狩都高速 tzj"
260 | },
261 | views: [
262 | {
263 | type: "web",
264 | props: {
265 | id: "bof",
266 | url: url
267 | },
268 | layout: $layout.fill
269 | }
270 | ]
271 | });
272 | }
273 |
274 |
--------------------------------------------------------------------------------
/JSBOX/n1🍉视频.js:
--------------------------------------------------------------------------------
1 | /*
2 | 20220619
3 | by suertang
4 | https://github.com/suertang
5 | */
6 | function strencode(a, b, c) {
7 | const l = c.substr(-1)
8 | if (l == 2) {
9 | const t = a
10 | a = b
11 | b = t
12 | }
13 | a = $text.base64Decode(a)
14 | const len = b.length
15 | let code = ''
16 | for (let i = 0; i < a.length; i++) {
17 | let k = i % len
18 | code += String.fromCharCode(a.charCodeAt(i) ^ b.charCodeAt(k))
19 | }
20 | //console.log(code)
21 | return $text.base64Decode(code)
22 | }
23 | function strencode2(a){
24 | return unescape(a)
25 | }
26 | $cache.set("id", "rf");
27 | $cache.set("pg", 1);
28 | var urlt = "http://" + $text.base64Decode("NjI3LndvcmthcmVhNy5saXZlLw==");
29 | urlt = $text.base64Decode("aHR0cHM6Ly9mMDUyOS53b25kZXJmdWxkYXkyMi5saXZlLw==")
30 | console.log(urlt);
31 | var data = [
32 | { "name": "最近加精", "id": "rf" },
33 | { "name": "当前最热", "id": "hot" },
34 | { "name": "最近得分", "id": "rp" },
35 | { "name": "10+分钟", "id": "long" }
36 | ];
37 |
38 | $ui.render({
39 | props: {
40 | title: "就要🍉视频"
41 | },
42 | views: [{
43 | type: "menu",
44 | props: {
45 | id: "menu",
46 | items: data.map(item => item.name)
47 | },
48 | layout: function(make) {
49 | make.left.top.right.equalTo(0);
50 | make.height.equalTo(50);
51 | },
52 | events: {
53 | changed: function(sender) {
54 | $cache.set("id", data[sender.index].id);
55 | $cache.set("pg", 1);
56 | getdata();
57 | }
58 | }
59 | },
60 | {
61 | type: "list",
62 | props: {
63 | id: "list",
64 | rowHeight: 100,
65 | template: [{
66 | type: "image",
67 | props: {
68 | id: "image"
69 | },
70 | layout: (make, view) => {
71 | make.left.top.bottom.inset(5);
72 | make.width.equalTo(view.height);
73 | }
74 | },
75 | {
76 | type: "label",
77 | props: {
78 | id: "label",
79 | font: $font("bold", 17),
80 | lines: 0
81 | },
82 | layout: make => {
83 | make.left.equalTo($("image").right).offset(10);
84 | make.top.bottom.equalTo(0);
85 | make.right.inset(10);
86 | }
87 | }
88 | ]
89 | },
90 | layout: function(make) {
91 | make.top.equalTo($("menu").bottom);
92 | make.bottom.left.right.inset(0);
93 | },
94 | events: {
95 | didSelect: function(sender, indexPath, data) {
96 | geturl(data);
97 | },
98 | didReachBottom: function(sender) {
99 | sender.endFetchingMore();
100 | var page = $cache.get("pg") + 1;
101 | $cache.set("pg", page);
102 | //console.log('OK')
103 | getdata();
104 | }
105 | }
106 | }
107 | ]
108 | });
109 |
110 | function getdata() {
111 | var id = $cache.get("id");
112 | var pg = $cache.get("pg");
113 | //console.log(urlt +"video.php?category="+ id + "&page=" + pg)
114 | $ui.loading(true);
115 | $http.get({
116 | url: urlt + "v.php?category=" + id + "&page=" + pg,
117 | header: {
118 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Version/12.0 Safari/604.1",
119 | "X-Forwarded-For": random_ip(),
120 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
121 | "referer": urlt
122 | },
123 | handler: function(resp) {
124 | $ui.loading(false);
125 | var text = resp.data.replace(/\n|\s|\r/g, "");
126 |
127 | var videourls = text.match(/class="wellwell-sm(.*?)(?:wellwell)/g);
128 | if (!videourls) {
129 |
130 | $ui.toast("🙅响应");
131 | return;
132 | }
133 | //console.log(videos)
134 | if (pg == 1) {
135 | var data = [];
136 | } else {
137 | var data = $("list").data;
138 | }
139 | for (let video of videourls) {
140 | //console.log(video)
141 | //continue
142 | //console.log(video)
143 | //http://img2.t6k.co/thumb/328522.jpg
144 | const imgurl = video.match(/src="(http.*?)"/)[1];
145 | //console.log('img'+imgurl);
146 | const videokey = video.match(/viewkey=(.*?)&/)[1];
147 | //console.log(videokey);
148 | const label = video.match(/titletitle.*?>(.*?))[1];
149 | //videourl = turl + "view_video.php?viewkey=" + videourl;
150 | record = {
151 | image: {
152 | src: imgurl
153 | },
154 | label: {
155 | text: label
156 | },
157 | url: videokey
158 | };
159 | console.log(record);
160 | data.push(record);
161 | }
162 | $("list").data = data;
163 |
164 | $("list").endRefreshing();
165 | }
166 | });
167 | }
168 |
169 | getdata();
170 |
171 | function random_ip() {
172 | var randomIP = [];
173 | for (var i = 0; i < 4; i++) {
174 | var eachIP = Math.floor(Math.random() * 256);
175 | randomIP.push(eachIP);
176 | }
177 | return randomIP.join(".");
178 | }
179 |
180 | function geturl(item) {
181 | //获取真实的视频地址,带key
182 | //let url=''
183 | $http.get({
184 | url: urlt + "view_video.php?viewkey=" + item.url,
185 | header: {
186 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36",
187 | "X-Forwarded-For": random_ip(),
188 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
189 | "referer": urlt
190 | },
191 | handler: function(resp) {
192 | const data = resp.data;
193 | console.log(data);
194 | const code = data.match(/strencode.*?\)/)[0];
195 | //console.log(code);
196 | let videourl = eval(code);
197 |
198 | videourl = videourl.match(/(http.*?)['"]/)[1];
199 | // $ui.toast(videourl)
200 | // return
201 | play({
202 | text: item.label.text,
203 | url: videourl,
204 | image: item.image.src
205 | });
206 | }
207 | });
208 | }
209 |
210 | function play(item) {
211 | const title = item.text?item.text:"91视频播放器"
212 | $ui.push({
213 | props: {
214 | title: title
215 | },
216 | views: [
217 |
218 | {
219 | type: "web",
220 | id: "web",
221 | props: {
222 | html: `
223 |
224 |
225 |
226 |
227 | ${item.title}
228 |
229 |
230 |
231 |
232 |
233 |
249 | `,
250 | },
251 | layout: $layout.fill,
252 | //function(make, view) {
253 | //make.full
254 | //make.top.equalTo(90);
255 | //make.left.right.equalTo(0);
256 |
257 | //make.height.equalTo(256);
258 | //},
259 | events: {
260 | didFinish: function(sender, nav) {
261 | // $ui.alert("Load finish.")
262 | // sender.play()
263 | }
264 | }
265 | }
266 | ]
267 | });
268 |
269 | }
--------------------------------------------------------------------------------
/JSBOX/麻豆.js:
--------------------------------------------------------------------------------
1 | const encoded = "6aaW6aG1LOm6u+ixhuinhumikSw5MeWItueJh+WOgizlpKnnvo7kvKDlqpIs6Jyc5qGD5Lyg5aqSLOeah+WutuWNjuS6uizmmJ/nqbrkvKDlqpIs57K+5Lic5b2x5LiaLOS5kOaSreS8oOWqkizmiJDkurrlpLTmnaEs5LmM6bim5Lyg5aqSLOWFlOWtkOWFiOeUnyzmnY/lkKfljp/liJss546p5YG25aeQ5aeQLG1pbmnkvKDlqpIs5aSn6LGh5Lyg5aqSLOW8gOW/g+msvOS8oOWqkizokJ3ojonnpL4sUHN5Y2hvUG9ybizns5blv4NWbG9n"
2 | const menu = $text.base64Decode(encoded).split(",")
3 |
4 | var header = {
5 | "User-Agent":
6 | "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1"
7 | };
8 |
9 | let id = 1
10 | let page = 1
11 | const base_url = "https://" + $text.base64Decode("d3d3Ljc1a3AuY29t")
12 | const js_name = $text.base64Decode("6bq76LGG6KeG6aKR")
13 | $ui.render({
14 | props: {
15 | title: js_name
16 | },
17 | views: [
18 | {
19 | type: "menu",
20 | props: {
21 | id: "meun",
22 | items: menu.slice(1)
23 | },
24 | layout: function (make) {
25 | make.left.top.right.equalTo(0);
26 | make.height.equalTo(50);
27 | },
28 | events: {
29 | changed: function (sender) {
30 | id = sender.index;
31 | page = 1
32 | $("list").data=[]
33 | enter();
34 | }
35 | }
36 | },
37 | {
38 | type: "list",
39 | layout: function (make) {
40 | make.right.left.bottom.inset(0);
41 | make.top.equalTo($("meun").bottom);
42 | },
43 | events: {
44 | didSelect: function (sender, indexPath, data) {
45 | const id = data.split("\n");
46 | sub(id[1], id[0]);
47 | },
48 | didReachBottom: function (sender) {
49 | sender.endFetchingMore();
50 | page = page + 1
51 | enter();
52 | }
53 | }
54 | }
55 | ]
56 | });
57 |
58 | function enter(){
59 | const page_string = page > 1 ? "/page/" + page : ""
60 | const url = `${base_url}/index.php/vod/type/id/${id}${page_string}.html`
61 | $http.get({
62 | url: url,
63 | timeout: 5,
64 | header: header,
65 | handler: function (resp) {
66 | $ui.loading(false);
67 | var text = resp.data
68 |
69 | //console.log(text)
70 | let data = [];
71 | $xml.parse({
72 | string: text,
73 | mode: "html"
74 | }).enumerate({
75 | selector:"div.video-item a",
76 | handler: function(e){
77 | data.push(e.string.replace(/\s/g,"") + "\n" +e.attributes.href)
78 | }
79 | })
80 | // console.log(data)
81 | $("list").data = $("list").data.concat(data);
82 | $("list").endFetchingMore();
83 | if($("list").data.length < 20){
84 | page++;
85 | enter();
86 | }
87 | }
88 | });
89 | }
90 | enter()
91 |
92 | function sub(path, title){
93 | // 构造url
94 | const url = `${base_url}${path}`;
95 | // console.log(url)
96 | // request, 提取m3u8
97 | $http.get({
98 | url: url,
99 | timeout: 5,
100 | header: header,
101 | handler: function (resp) {
102 | $ui.loading(false);
103 | var text = resp.data
104 | // console.log(text)
105 | let videoUrlGroups = text.match(/"url":\s*?"(.*?m3u8)"/)
106 | if( !videoUrlGroups) {
107 | $ui.toast('Cannot find url')
108 | return
109 | }
110 | const video = JSON.parse("{" + videoUrlGroups[0] +"}").url
111 | console.log(video)
112 | $ui.push({
113 | props: {
114 | title: title
115 | },
116 | views: [{
117 | type: "web",
118 | props: {
119 | url: video,
120 | },
121 | layout: $layout.fill
122 | }]
123 | })
124 | }
125 | });
126 | }
--------------------------------------------------------------------------------
/PureJs/Clear dead Weibos.js:
--------------------------------------------------------------------------------
1 | //批量清空已经失效的微博
2 | //作者:suertang 日期:2019年8月13号
3 | //版本:1
4 | //如果脚本失效,请耐心等待或者issue,谢谢
5 | /*
6 | 1. 打开微博主页登录,找到自己的微博页面
7 | 2. 打开浏览器console(F12)
8 | 4. 粘贴代码并回车
9 | */
10 | function sleep (time) {
11 | return new Promise((resolve) => setTimeout(resolve, time));
12 | }
13 |
14 | var WBCONT = 2
15 | for(let i =1;i<400;i++){
16 | setTimeout(() => {
17 |
18 | const contentdiv = document.querySelector("#Pl_Official_MyProfileFeed__20 > div > div:nth-child(" + WBCONT + ") > div.WB_feed_detail.clearfix > div.WB_detail")
19 | if(contentdiv.textContent.indexOf('删除') == -1){
20 | WBCONT++;
21 | }
22 | else{
23 | document.querySelector("#Pl_Official_MyProfileFeed__20 > div > div:nth-child("+ WBCONT +") > div.WB_feed_detail.clearfix > div.WB_screen.W_fr > div > div.layer_menu_list > ul > li:nth-child(1) > a").click()
24 |
25 | if(i % 20 ==0){
26 | let nextpage = document.querySelector("#Pl_Official_MyProfileFeed__20 > div > div:nth-child(47) > div > a.page.next.S_txt1.S_line1")
27 | if(nextpage){
28 | nextpage.click()
29 | }
30 | }
31 | sleep(800).then(() => {document.querySelector("p.btn > a.W_btn_a > span").click()})
32 | }
33 | },1500*i)
34 | }
35 |
36 | /*
37 | 吐槽微博
38 | 不知道怎么关注了很多垃圾微博账号,取消确实让人头疼。脚本取消又被认为操作过分频繁,这微博还颇有垃圾公司的风范。注销又嫌麻烦,还是删除吧。
39 | */
40 |
--------------------------------------------------------------------------------
/README.MD:
--------------------------------------------------------------------------------
1 |
2 | # 项目说明
3 |
4 | # 前言
5 |
6 | ````
7 | 我只是觉得怎么着也得像个开发者的样子写个markdown的readme.md 见笑了。
8 | 这只是一些脚本的集合,如果你觉得侵犯了你的权益,请联系我删除。
9 | 此脚本的运行结果可能令部分人感觉不适,如果引起您的不适,请及时删除并离开。
10 | 此脚本的源代码是本人原创,发布于 github 上。
11 | 开发次脚本的目的是检验自我的开发能力,请勿将脚本用于非法用途。
12 | 谢谢使用
13 | ````
14 |
15 |
16 |
17 |
18 | Enjoy!
19 |
--------------------------------------------------------------------------------
/UserScripts/FuckReadMore_CSDN.user.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name FuckReadMoreOnCSDN
3 | // @namespace http://tampermonkey.net/
4 | // @version 0.1
5 | // @description try to take over the world!
6 | // @author suertang
7 | // @match https://blog.csdn.net/*
8 | // @grant none
9 | // ==/UserScript==
10 |
11 | (function() {
12 | 'use strict';
13 | // 去你的点击查看更多
14 | // Your code here...
15 | // Fuck you read more button
16 | const a = document.querySelector('a.btn-readmore');
17 | a.click();
18 | })();
19 |
--------------------------------------------------------------------------------
/UserScripts/RemoveAdsOn1024.user.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name RemoveAdsOn1024
3 | // @namespace http://tampermonkey.net/
4 | // @version 0.1
5 | // @description try to take over the world!
6 | // @author suertang
7 | // @match *htm_data*
8 | // @grant none
9 | // ==/UserScript==
10 |
11 | (function() {
12 | 'use strict';
13 |
14 | // Your code here...
15 |
16 | const src = document.body.textContent.match(/img\[(.*?)\]/)[1];
17 | document.querySelectorAll('img[' + src +']').forEach(i=>{i.src=i.getAttribute(src).replace(/^http:/,'https:')});
18 | document.querySelectorAll('div.tpc_content.do_not_catch a').forEach(i=>{i.href=i.href.replace(/https?:\/\/www.viidii.info\/\?(\S*?)&z/,"$1").replace(/______/g,".")})
19 | })();
20 |
--------------------------------------------------------------------------------
/UserScripts/aiyoweia.user.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name aiyoweiaJumper
3 | // @namespace http://woodytang.com/
4 | // @version 0.1
5 | // @description Skip aiyoweia search engine
6 | // @author suertang
7 | // @match *://www.aiyoweia.com/*.shtml
8 | // @updateURL https://github.com/suertang/MMDigtal/raw/master/aiyoweia.user.js
9 | // @downloadURL https://github.com/suertang/MMDigtal/raw/master/aiyoweia.user.js
10 | // @grant none
11 | // ==/UserScript==
12 |
13 | (function() {
14 | 'use strict';
15 |
16 | // Your code here...
17 | window.location = atob(document.querySelector('a[rel]').href.match(/(aHR.*?)$/)[1])
18 | })();
19 |
--------------------------------------------------------------------------------
/UserScripts/thunder.js:
--------------------------------------------------------------------------------
1 |
2 | var obj = JSON.parse($response.body);
3 |
4 | var nor = {
5 | "status" : "STATUS_OK",
6 | "message" : "正常资源",
7 | "title" : ""
8 | };
9 | // console.log(body.files)
10 | // obj.files.map((x) => x.audit = Object.create(nor))
11 |
12 | for(var item of obj.files){
13 | item.audit = Object.create(nor);
14 | }
15 |
16 | // body = JSON.stringify(obj);
17 |
18 | $done({body: JSON.stringify(obj)});
19 |
--------------------------------------------------------------------------------
/UserScripts/unlimitxiaoke.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name 小可去转无限搜
3 | // @namespace http://tampermonkey.net/
4 | // @version 0.2
5 | // @description try to take over the world!
6 | // @author suertang
7 | // @match *://www.xiaokesoso.com/*
8 | // @match *://www.quzhuanpan.com/download/*
9 | // @grant none
10 | // ==/UserScript==
11 |
12 | (function() {
13 | 'use strict';
14 | // code here
15 | const ele = document.querySelector('button[data-downloadurl]');
16 | if(ele){
17 | const jumpUrl = "http://norefer.mimixiaoke.com/api/jump?target=" + ele.dataset.downloadurl;
18 | window.location.href = jumpUrl;
19 | }
20 | })();
21 |
--------------------------------------------------------------------------------
/UserScripts/zhuzhupan.user.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name zhuzhupan
3 | // @namespace http://tampermonkey.net/
4 | // @version 0.2
5 | // @description try to take over the world!
6 | // @author You
7 | // @match http://www.zhuzhupan.com/search*
8 | // @updateURL https://github.com/suertang/MMDigtal/raw/master/zhuzhupan.user.js
9 | // @downloadURL https://github.com/suertang/MMDigtal/raw/master/zhuzhupan.user.js
10 | // @grant none
11 | // ==/UserScript==
12 |
13 | (function() {
14 | 'use strict';
15 |
16 | // Your code here...
17 | const query=window.location.href.match(/query=(\S*?)&/)[1];
18 | //console.log(s==1)
19 | if(query && document.querySelector("a[onclick^='showPay']")){
20 | console.log('jump');
21 | window.location.href='http://www.zhuzhupan.com/paysuccess?id='+query +'||_||&_t='+Date.parse(new Date())
22 | }
23 | })();
24 |
--------------------------------------------------------------------------------
/WPF/.gitignore:
--------------------------------------------------------------------------------
1 | # Visual Studio
2 |
3 | # User-specific files
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # User-specific files (MonoDevelop/Xamarin Studio)
10 | *.userprefs
11 |
12 | # Build results
13 | [Dd]ebug/
14 | [Dd]ebugPublic/
15 | [Rr]elease/
16 | [Rr]eleases/
17 | [Xx]64/
18 | [Xx]86/
19 | [Bb]uild/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 |
24 | # Visual Studio 2015 cache/options directory
25 | .vs/
26 | # Uncomment if you have tasks that create the project's static files in wwwroot
27 | #wwwroot/
28 |
29 | # MSTest test Results
30 | [Tt]est[Rr]esult*/
31 | [Bb]uild[Ll]og.*
32 |
33 | # NUNIT
34 | *.VisualState.xml
35 | TestResult.xml
36 |
37 | # Build Results of an ATL Project
38 | [Dd]ebugPS/
39 | [Rr]eleasePS/
40 | dlldata.c
41 |
42 | # DNX
43 | project.lock.json
44 | artifacts/
45 |
46 | *_i.c
47 | *_p.c
48 | *_i.h
49 | *.ilk
50 | *.meta
51 | *.obj
52 | *.pch
53 | *.pdb
54 | *.pgc
55 | *.pgd
56 | *.rsp
57 | *.sbr
58 | *.tlb
59 | *.tli
60 | *.tlh
61 | *.tmp
62 | *.tmp_proj
63 | *.log
64 | *.vspscc
65 | *.vssscc
66 | .builds
67 | *.pidb
68 | *.svclog
69 | *.scc
70 |
71 | # Chutzpah Test files
72 | _Chutzpah*
73 |
74 | # Visual C++ cache files
75 | ipch/
76 | *.aps
77 | *.ncb
78 | *.opendb
79 | *.opensdf
80 | *.sdf
81 | *.cachefile
82 | *.VC.db
83 | *.VC.VC.opendb
84 |
85 | # Visual Studio profiler
86 | *.psess
87 | *.vsp
88 | *.vspx
89 | *.sap
90 |
91 | # TFS 2012 Local Workspace
92 | $tf/
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 | *.DotSettings.user
101 |
102 | # JustCode is a .NET coding add-in
103 | .JustCode
104 |
105 | # TeamCity is a build add-in
106 | _TeamCity*
107 |
108 | # DotCover is a Code Coverage Tool
109 | *.dotCover
110 |
111 | # NCrunch
112 | _NCrunch_*
113 | .*crunch*.local.xml
114 | nCrunchTemp_*
115 |
116 | # MightyMoose
117 | *.mm.*
118 | AutoTest.Net/
119 |
120 | # Web workbench (sass)
121 | .sass-cache/
122 |
123 | # Installshield output folder
124 | [Ee]xpress/
125 |
126 | # DocProject is a documentation generator add-in
127 | DocProject/buildhelp/
128 | DocProject/Help/*.HxT
129 | DocProject/Help/*.HxC
130 | DocProject/Help/*.hhc
131 | DocProject/Help/*.hhk
132 | DocProject/Help/*.hhp
133 | DocProject/Help/Html2
134 | DocProject/Help/html
135 |
136 | # Click-Once directory
137 | publish/
138 |
139 | # Publish Web Output
140 | *.[Pp]ublish.xml
141 | *.azurePubxml
142 | *.publishproj
143 | *.pubxml
144 | PublishProfiles/
145 | PublishScripts/
146 |
147 | # NuGet Packages
148 | *.nupkg
149 | # The packages folder can be ignored because of Package Restore
150 | **/packages/*
151 | # except build/, which is used as an MSBuild target.
152 | !**/packages/build/
153 | # Uncomment if necessary however generally it will be regenerated when needed
154 | #!**/packages/repositories.config
155 | # NuGet v3's project.json files produces more ignoreable files
156 | *.nuget.props
157 | *.nuget.targets
158 |
159 | # Microsoft Azure Build Output
160 | csx/
161 | *.build.csdef
162 |
163 | # Microsoft Azure Emulator
164 | ecf/
165 | rcf/
166 |
167 | # Windows Store app package directory
168 | AppPackages/
169 | BundleArtifacts/
170 | Package.StoreAssociation.xml
171 | _pkginfo.txt
172 |
173 | # Visual Studio cache files
174 | # files ending in .cache can be ignored
175 | *.[Cc]ache
176 | # but keep track of directories ending in .cache
177 | !*.[Cc]ache/
178 |
179 | # Others
180 | ClientBin/
181 | [Ss]tyle[Cc]op.*
182 | ~$*
183 | *~
184 | *.dbmdl
185 | *.dbproj.schemaview
186 | *.pfx
187 | *.publishsettings
188 | orleans.codegen.cs
189 |
190 | # RIA/Silverlight projects
191 | Generated_Code/
192 |
193 | # Backup & report files from converting an old project file
194 | # to a newer Visual Studio version. Backup files are not needed,
195 | # because we have git ;-)
196 | _UpgradeReport_Files/
197 | Backup*/
198 | UpgradeLog*.XML
199 | UpgradeLog*.htm
200 |
201 | # SQL Server files
202 | *.mdf
203 | *.ldf
204 |
205 | # Business Intelligence projects
206 | *.rdl.data
207 | *.bim.layout
208 | *.bim_*.settings
209 |
210 | # Microsoft Fakes
211 | FakesAssemblies/
212 |
213 | # GhostDoc plugin setting file
214 | *.GhostDoc.xml
215 |
216 | # Node.js Tools for Visual Studio
217 | .ntvs_analysis.dat
218 |
219 | # Visual Studio 6 build log
220 | *.plg
221 |
222 | # Visual Studio 6 workspace options file
223 | *.opt
224 |
225 | # Visual Studio LightSwitch build output
226 | **/*.HTMLClient/GeneratedArtifacts
227 | **/*.DesktopClient/GeneratedArtifacts
228 | **/*.DesktopClient/ModelManifest.xml
229 | **/*.Server/GeneratedArtifacts
230 | **/*.Server/ModelManifest.xml
231 | _Pvt_Extensions
232 |
233 | # LightSwitch generated files
234 | GeneratedArtifacts/
235 | ModelManifest.xml
236 |
237 | # Paket dependency manager
238 | .paket/paket.exe
239 | paket-files/
240 |
241 | # FAKE - F# Make
242 | .fake/
243 |
244 | .DS_Store
--------------------------------------------------------------------------------
/WPF/TicTacToe/WpfApp2.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.902
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApp2", "WpfApp2\WpfApp2.csproj", "{880F9CE0-43DE-4598-B194-EA5E63C6C396}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {880F9CE0-43DE-4598-B194-EA5E63C6C396}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {880F9CE0-43DE-4598-B194-EA5E63C6C396}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {880F9CE0-43DE-4598-B194-EA5E63C6C396}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {880F9CE0-43DE-4598-B194-EA5E63C6C396}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {A2166AE2-C907-4B62-B5F3-B712FC401D15}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/WPF/TicTacToe/WpfApp2/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WPF/TicTacToe/WpfApp2/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/WPF/TicTacToe/WpfApp2/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace WpfApp2
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/WPF/TicTacToe/WpfApp2/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/WPF/TicTacToe/WpfApp2/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace WpfApp2
17 | {
18 | ///
19 | /// Interaction logic for MainWindow.xaml
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | // Who is going to be next
24 | private Boolean MyTurn = false;
25 | private int filled = 0;
26 | public MainWindow()
27 | {
28 | InitializeComponent();
29 | MyTurn = false;
30 | }
31 | private void MainWindow_Loaded(object sender, RoutedEventArgs e) {
32 | Bind_Click();
33 | }
34 | public static IEnumerable FindVisualChildren(DependencyObject depObj) where T : DependencyObject
35 | {
36 | if (depObj != null)
37 | {
38 | for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)
39 |
40 | {
41 |
42 | DependencyObject child = VisualTreeHelper.GetChild(depObj, i);
43 |
44 | if (child != null && child is T)
45 |
46 | {
47 |
48 | yield return (T)child;
49 |
50 | }
51 |
52 |
53 |
54 | foreach (T childOfChild in FindVisualChildren(child))
55 | {
56 | yield return childOfChild;
57 | }
58 | }
59 | }
60 | }
61 | private String GetContentByGrid(int x, int y)
62 | {
63 | foreach (Button bt in FindVisualChildren
|