• 新浪微博:
  • 微信 :
按键精灵电脑版
立即下载

软件版本:2014.05
软件大小:21.6M
更新时间:07-04

按键精灵安卓版
立即下载

软件版本:3.3.0
软件大小:62.5M
更新时间:5-24

按键精灵iOS版
立即下载

软件版本:1.3.3
软件大小:29.2M
更新时间:06-14

按键精灵Mac版
立即下载

软件版本:1.1.0
软件大小:12.3M
更新时间:12-29

快捷导航

登录 后使用快捷导航
没有帐号? 注册

登录 注册
发新话题 回复该主题

[其他游戏] 奇迹挂机捡东西脚本 [复制链接]

1#

首先声明:本人属于菜鸟级别,纯手动自己编写,大神可给出简化思路. 玩奇迹多年,一直盯着屏幕看东西太累了,做个简单脚本让角色自己捡东西,定点刷怪(捡东西后回定点坐标),误捡物品自动扔出,脚本比较啰嗦,希望对新人能有帮助。
我是使用的大漠插件,识别奇迹里的坐标及掉物品名称,字库附后,游戏分辨率800*600
有兴趣的可以留言讨论。
字库文件要放到E:\damo2\


[hide]
Set dm = createobject("dm.dmsoft")

dm.setpath "E:\damo2"

dm.setdict 0, "mu3.txt"

hwnd = dm.getmousepointwindow()


dm_ret = dm.BindWindow(hwnd, "normal", "normal", "normal", 0)

Delay 200


s = dm.Ocr(19,3,41,17, "ffffff-000000", 1.0)


t = dm.Ocr(41,2,66,19, "ffffff-000000", 1.0)


x1 = s + 1

x2 = s - 1

y1 = t + 1

y2 = t - 1

yidong = 0

anjian = 50


Rem a

If yidong - 40 > 0 Then
    yidong = 0
    Goto w
End If



dm_ret = dm.findstr(0, 0, 2000, 2000, "雅|宝|石|祝|再|生|守|国|创", "ffcc19-000000", 1.0, intx, inty)
If intx > 0 Then
dm.RightUp
Delay 100
dm.moveto intx + yidong, inty + 30
Delay 100
dm_ret = dm.findstr(0, 0, 2000, 2000, "雅|宝|石|祝|再|生|守|国|创", "ffcc19-000000", 1.0, intx2, inty2)
daxiao = inty - inty2
    
    If daxiao = 0 Then
    
    yidong = yidong + 10
    
    dm.leftclick
    Delay 50
        Goto a
        Else
        Delay 150
        
        dm.leftdown
        Delay 80
        dm.leftup
        Delay 1800
        yidong = yidong + 10
        
        Goto a


End If

Else


    Goto b

End If
    
    Rem b

If yidong - 60 > 0 Then
    yidong = 0
    Goto w
End If



dm_ret = dm.findstr(0, 0, 2000, 500, "烂|的|智", "b2b2b2-000000", 1.0, intx, inty)
If intx > 0 Then
dm.RightUp
Delay 100
dm.moveto intx + yidong, inty + 30
Delay 100
dm_ret = dm.findstr(0, 0, 2000, 500, "烂|的|智", "b2b2b2-000000", "ffcc19-000000", 1.0, intx2, inty2)
daxiao = inty - inty2
    
    If daxiao = 0 Then
    
    yidong = yidong + 10
    
    dm.leftclick
    Delay 50
        Goto b
        Else
        Delay 150
        
        dm.leftdown
        Delay 80
        dm.leftup
        Delay 1800
        yidong = yidong + 10
        
        Goto a


End If

Else


    Goto c

End If

//套装




Rem c


If yidong - 100 > 0 Then
    yidong = 0
    Goto w
End If



dm_ret = dm.findstr(0, 0, 2000, 500, "帕|希|露|汉|斯|亚|特|阿|莱|的", "00ff00-000000", 1.0, intx, inty)
If intx > 0 Then
dm.RightUp
Delay 100
dm.moveto intx + yidong, inty + 30
Delay 100
dm_ret = dm.findstr(0, 0, 2000, 500, "帕|希|露|汉|斯|亚|特|阿|莱|的", "00ff00-000000", 1.0, intx2, inty2)
daxiao = inty - inty2
    
    If daxiao = 0 Then
    
    yidong = yidong + 10
    
    dm.leftclick
    Delay 50
        Goto c
        Else
        Delay 150
        
        dm.leftdown
        Delay 80
        dm.leftup
        Delay 1800
        
        yidong = yidong + 10
        Goto c


End If

Else


    Goto d

End If
    















//卓越

Rem d
If yidong - 60 > 0 Then
    yidong = 0
    Goto w
End If



dm_ret = dm.findstr(0, 0, 2000, 500, "手|腿|盔|靴|杖|剑|刀", "19ff7f-000000", 1.0, intx, inty)
If intx > 0 Then
dm.RightUp
Delay 100
dm.moveto intx + yidong, inty + 30
Delay 100
dm_ret = dm.findstr(0, 0, 2000, 500, "手|腿|盔|靴|杖|剑|刀", "19ff7f-000000", 1.0, intx2, inty2)
daxiao = inty - inty2
    
    If daxiao = 0 Then
    
    yidong = yidong + 10
    
    dm.leftclick
    Delay 50
        Goto d
        Else
        Delay 150
        
        dm.leftdown
        Delay 80
        dm.leftup
        Delay 1800
        
        yidong = yidong + 10
        Goto d


End If

Else


    Goto e

End If
    


//冰霜武器

Rem e
If yidong - 60 > 0 Then
    yidong = 0
    Goto w
    
End If



dm_ret = dm.findstr(0, 0, 2000, 500, "致|命|双|子|魔|狱", "b266ff-000000", 1.0, intx, inty)
If intx > 0 Then
dm.RightUp
Delay 100
dm.moveto intx + yidong, inty + 30
Delay 100
dm_ret = dm.findstr(0, 0, 2000, 500, "致|命|双|子|魔|狱", "b266ff-000000", 1.0, intx2, inty2)
daxiao = inty - inty2
    
    If daxiao = 0 Then
    
    yidong = yidong + 10
    
    dm.leftclick
    Delay 50
        Goto e
        Else
        Delay 150
        
        dm.leftdown
        Delay 80
        dm.leftup
        Delay 1800
        yidong = yidong + 10
        Goto e


End If

Else


    Goto y

End If
    
    
Rem w

dm_ret = dm.findstr(2,450,140,473, "装备栏满了", "6496ff-000000", 1.0, intx, inty)
If intx > 0 Then

Delay 100
Call 扔装备
Goto z
Else


Goto a
End If        










Rem y
s = dm.Ocr(19,3,41,17, "ffffff-000000", 1.0)


t = dm.Ocr(41,2,66,19, "ffffff-000000", 1.0)

Delay 100

If s - x1 > 0 Then


    
    dm.MoveTo 285, 209
    Delay 50
     dm.Leftdown
     Delay 200
    
     dm.leftup
     Delay 50
     ElseIf s - x2 < 0 Then
    
    
    
    
     Delay 50
     dm.MoveTo 446, 288
     Delay 80
     dm.Leftdown
     Delay 200
    
     dm.leftup
     Delay 50
     End if
    
    If t - y1 > 0 Then
    
    dm.MoveTo 343,296
    Delay 50
     dm.Leftdown
     Delay 200
    
     dm.leftup
     Delay 50
     ElseIf t - y2 < 0 Then
    
     Delay 50
     dm.MoveTo 452, 208
     Delay 80
     dm.Leftdown
     Delay 200
    
     dm.leftup
     Delay 50
     dm.moveto 400,240
    
     End if
    
    



Rem z

dm.keyup 164
Delay 50



dm.rightdown


dm.keydown 164



    Goto a
    




Sub 扔装备
    

//打开背包
dm.keydown 86
Delay 200
dm.keyup 86
Delay 400
//扔东西
x = 595
y = 310

For 3
dm.moveto x, y
Delay 300


Call reng
x = x + 50
Delay 200
next
x = 595
y = 360
For 3
dm.moveto x, y
Delay 300


Call reng
x = x + 50
Delay 200
Next

x = 595
y = 410



For 3
dm.moveto x, y
Delay 300


Call reng
x = x + 50
Delay 200
next
//关闭背包
dm.keydown 86
Delay 200
dm.keyup 86
Delay 400
dm_ret = dm.findstr(603,20,684,47, "套装属性", "ffcc19-000000", 1.0, intx, inty)
If intx > 0 Then
Delay 300
dm.keydown 86
Delay 200
dm.keyup 86
Delay 400
Else
Goto y
end if

End Sub

Sub reng
    
Delay 100
LeftDown 1
LeftClick 1
LeftUp 1
Delay 300
dm.moveto 315, 359
Delay 200
LeftDown 1
LeftClick 1
LeftUp 1
Delay 100


End Sub
    
Sub 换闪电
Delay 100
    dm.KeyPress anjian
Delay 100
anjian = anjian + 1
If anjian - 52 = 0 Then
    anjian = 50
    
End If
End Sub


Sub 安宁挂机
    If t - 100 > 0 and t - 120 < 0 Then
    
    EndScript
    
    dm.keypress 27
    Delay 100
    dm.keypress 27
    Delay 100
End If

End Sub

Sub 读血加
    

color1 = dm.GetColor(227, 549)

color2 = dm.GetColor(229, 563)

color3 = dm.GetColor(229, 577)

If color3= "141414" Then
    Delay 50
    dm.KeyPress 81
    Delay 50
    dm.KeyPress 87
    Delay 50
    dm.KeyPress 69
    Delay 50
    dm.KeyPress 82
    Delay 50
    End If

    If color2 = "272727" Then
    Delay 50
    dm.KeyPress 81
    Delay 50
    dm.KeyPress 87
    Delay 50
    dm.KeyPress 69
    Delay 50
    
End If
If color1 = "303030" Then
Delay 50
    dm.KeyPress 81
    Delay 50
    End If
End Sub

dm_ret = dm.unbindwindow

[/hide]

mu3.zip (, 下载次数:299)

解压后放到E:\damo2文件夹中(2016/6/10 10:57:58 上传)

2#

写的不错呀。

3#

怎么使用呢?一脸懵逼

4#

回复 1楼nfss1112的帖子

谢谢大神

5#

楼主好人,正在找这奇迹的脚本,看看效果咋样。

6#

楼主,今天刚看到你的脚本,非常感谢,可是无法运行,能详细请教一下吗?能不能留个联系方式,我的QQ:283955205,谢谢。

7#

回复 1楼nfss1112的帖子

怎么下载字库?

8#

完全不会用。
是复制代码,就能直接用了吗?把你的附件在E盘间隔文件夹放在里面吗?

发新话题 回复该主题