游戏不错,但是比较氪金,想少花点钱,自己用大漠插件写了个后台读图色,后台按键的脚本,自己用了好久了,代码有点粗糙,想抛转引玉。
1、打开电脑端游戏,保持窗口原始大小,不要拖放。
2、游戏设置-画面设置-界面改成2D。
3、双击脚本如果弹出一个窗口显示1,代表绑定窗口成功。如果弹出窗口显示0,代表绑定窗口失败,脚本不执行。填写好数值,勾选好选项后,点击OK,脚本立即开始执行
4、点击’~’键暂停脚本,点击重载重新载入脚本。
5、脚本运行时,游戏窗口可以被其它东西遮挡,也可以拖到屏幕外,但是不能最小化。
6、脚本会自动征兵,而且只会在兵满的情况下出攻占或扫荡。
7、直接从主城出发扫荡不考虑士气的,如果从主城或分城出发先行军再扫荡,会等士气满;如果是停留状态直接去扫荡也会等士气满。
贴上主程序的脚本,完整脚本和附件下载链接如下:
http://q3070106.ys168.com/ 群主提醒才发现有个编辑的小字,希望用过的大佬提点改进建议,后续想少用读图色,用文字识别来提高稳定性。
fight2(x0,y0) {
X1:=ComVar()
Y1:=ComVar()
loop {
if(onlytake=1&&Check_eara(x0,y0)=1){
MsgBox, 攻占结束
return
}
while(Check_State()<0){
full_bin2()
sleep,m*3
}
full_bin2()
out_home()
检查士气()
if(rest=1&&Check_State()=0){ ;待命并且先行军
判断坐标(x0,y0)
sleep,s*3
while(dm.FindPic(array9[1],array9[2],array9[3],array9[4],"行军.bmp","000000",0.8,0,x,y)<0) {
;判断坐标(x0,y0)
M_C(640,360,3)
sleep,s*3
}
while(dm.FindPic(array9[1],array9[2],array9[3],array9[4],"行军.bmp","000000",0.8,0,X1.ref,Y1.ref)>=0) {
M_C(X1[]+10,Y1[]+5,1)
sleep,s*2
}
if(dm.FindColor(temp_x+33,691,temp_x+62,707,"191919-000000",1.0,0,x,y)>0) {
out_home()
back_home()
sleep,m*3
break
}
while(dm.FindPic(1089,73,1136,119,"关闭.bmp","000000",0.8,0,x,y)<0) {
M_C(1150,190,3)
sleep,s
M_C(temp_x,630,1)
sleep,s
}
while(dm.FindPic(1089,73,1136,119,"关闭.bmp","000000",0.8,0,x,y)>=0) {
M_C(1015,495,1)
sleep,s
}
while(dm.FindPic(862,200,905,244,"关闭.bmp","000000",0.8,0,x,y)>=0) {
M_C(538,476,1)
sleep,s
}
while(Check_State()!=1){
sleep,s*5
}
}
out_home()
检查士气()
;if(Check_State()=1) {
/*
判断坐标(x0,y0)
sleep,s*3
M_C(640,360,3)
sleep,s
M_C(array10[1],array10[2],3)
sleep,s*2
while(dm.FindColor(1243,446,1261,465,"dcdcdc-000000",0.9,0,x,y)<=0&&dm.FindMultiColor(1036,366,1090,398,"5da1a1",tingliu,0.8,0,x,y)>0) {
sleep,m*2
M_C(array10[1],array10[2],3)
sleep,s*2
if(dm.FindMultiColor(array11[1],dm_y1,array11[3],dm_y2,"5da1a1",tingliu,0.8,0,x,y)<=0){
break
}
sleep,s*5
判断坐标(x0,y0)
sleep,s*3
M_C(640,360,3)
sleep,s*5
}
*/
;}
x:=Check_State()
if(x!=1&&x!=0){
break
}
判断坐标(x0,y0)
sleep,s*3
while(dm.FindPic(array9[1],array9[2],array9[3],array9[4],"扫荡.bmp|攻占.bmp","000000",0.8,0,x,y)<0) {
;判断坐标(x0,y0)
M_C(640,360,3)
sleep,s*2
}
while(dm.FindPic(array9[1],array9[2],array9[3],array9[4],"扫荡.bmp|攻占.bmp","000000",0.8,0,X1.ref,Y1.ref)>=0) {
dm.MoveTo(X1[]+10,Y1[]+5)
dm.LeftClick
sleep,s*7
}
while(dm.FindPic(array9[1],array9[2],array9[3],array9[4],"扫荡.bmp|攻占.bmp","000000",0.8,0,X1.ref,Y1.ref)>=0) {
dm.MoveTo(X1[]+10,Y1[]+5)
dm.LeftClick
sleep,s*7
}
if(rest=0&&dm.FindColor(temp_x+33,691,temp_x+62,707,"191919-000000",1.0,0,x,y)>0){
out_home()
back_home()
sleep,m*3
break
}
while(rest=1&&dm.FindColor(640+33,691,640+62,707,"191919-000000",1.0,0,x,y)>0) {
}
while(dm.FindPic(1089,73,1136,119,"关闭.bmp","000000",0.8,0,x,y)<0) {
if(x=1){
dm.MoveTo(640,630)
dm.LeftClick
sleep,s
} else {
M_C(1150,190,3)
sleep,s
dm.MoveTo(temp_x,630)
dm.LeftClick
sleep,s
}
}
while(dm.FindPic(1089,73,1136,119,"关闭.bmp","000000",0.8,0,x,y)>=0) {
dm.MoveTo(1015,495)
dm.LeftClick
sleep,s
}
while(dm.FindPic(862,200,905,244,"关闭.bmp","000000",0.8,0,x,y)>=0) {
dm.MoveTo(538,476)
dm.LeftClick
sleep,s
}
M_C(array3[1],array3[2],3)
sleep,s
M_C(array10[1],array10[2],3)
sleep,s*2
while(dm.FindMultiColor(array11[1],dm_y1,array11[3],dm_y2,"386b49",daiming,0.8,0,x,y)<=0&&dm.FindMultiColor(array11[1],dm_y1,array11[3],dm_y2,"5da1a1",tingliu,0.8,0,x,y)<=0) {
dm.MoveTo(array10[1],array10[2])
dm.LeftClick
sleep,s*2
}
}
fight2(x0,y0)
}
http://q3070106.ys168.com/ 因为大漠插件会报错,请自行下载大漠插件注册后运行脚本
可以修改自己的发文的
忘了上传附件链接了。。下午上传
?
建议打包做一个下载链接。
怎么弄?上面那个链接不行吗?
你好,请问大漠用的是什么版本的
大漠插件7.1904最新破解版
老哥打开提示这个是什么情况 小白忘指教
大漠插件没有注册
您好,这是什么代码呢
AHK调用的大漠插件实现的