DNF刷怪的按键精灵脚本,很久前写的,效果不好。。
来源:互联网 发布:数据库负载均衡 编辑:程序博客网 时间:2024/04/29 08:13
Rem begin
MoveTo 60, 60
LeftClick 1
dim begincolorPos,endcolorPos
begincolorPos = "DD9900"
endcolorPos = "0022FF"
Dim speed
speed = 15
Dim colorMen
colorMen = "9CADFF"
Dim colorNameBound(5)
colorNameBound(0) = "EDD568"//蓝色
colorNameBound(1) = "FF6BB3"//紫色
colorNameBound(2) = "EDD568"//蓝色
colorNameBound(3) = "FF6BB3"//紫色
colorNameBound(4) = "FFFFFF"//白色
Dim beginPosX, beginPosY,endposx,endposy
beginPosX = 616
beginPosY = 57
FindColor 0, 0, 640, 480, begincolorPos,beginPosX,beginPosY
FindColor 0, 0, 640, 480, endcolorPos, endposx, endposy
Dim i
i = 0
i = cint((616 - beginPosX + 10)/19)
If i = 4 Then
If beginPosY > 57 + 10 Then
i=5
End If
ElseIf i > 4 Then
i=i+1
End If
For 9 - i
If i = 4 Then
beginPosY = beginPosY + 19
ElseIf i = 7 Then
beginPosY = beginPosY + 19
ElseIf i<8
beginPosX = beginPosX - 19
End If
Call 刷怪(beginPosX, beginPosY)
Rem 刷怪结束
Call 捡取物品()
Delay 100
KeyPressH "Ctrl", 1
Delay 100
Call 捡取物品()
Delay 100
Rem 进入下关
If i = 4 Then
Call 移动到(220, 340)
Call 移动到(220, 460)
ElseIf i = 3 Then
Call 移动到(100, 300)
Call 移动到(0, 300)
ElseIf i = 5 Then
Call 移动到(100, 320)
Call 移动到(0, 320)
ElseIf i = 6 Then
Call 移动到(100, 300)
Call 移动到(0, 300)
ElseIf i < 8
Call 移动到(0, 300)
Else
Delay 2000
End If
Dim index
FindColor 0, 0, 640, 480, begincolorPos,beginPosX,beginPosY
index = cint((616 - beginPosX + 10)/19)
If index = 4 Then
If beginPosY > 57 + 10 Then
index=5
End If
ElseIf index > 4 Then
index=index+1
End If
If index = i Then
Goto 进入下关
End If
i = i + 1
Next
MoveTo 460, 90
LeftClick 15
Delay 2000
KeyPressH 39, 3//右
Delay 100
KeyPressH 38, 3//上
Delay 1000
MoveTo 318, 380
LeftClick 1
Delay 2000
Goto begin
Dim oldcolor, newcolor
Sub 刷怪( flagposX,flagposY )
oldcolor = GetPixelColor(flagposX, flagposY)
KeyPressH 37,1
Delay 200
Dim flag
flag = 1
While (flag)
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "A", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "S", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "D", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "F", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "G", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "H", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "T", 1
Call 捡取物品()
Delay 100
KeyPressH "Ctrl", 1
Delay 100
Call 捡取物品()
Delay 100
KeyPress "Q", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "W", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "E", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "R", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "T", 1
Call 刷怪结束判断(flagposX, flagposY)
KeyPress "Y", 1
Call 刷怪结束判断(flagposX, flagposY)
Call 捡取物品()
Delay 100
KeyPressH "Ctrl", 1
Delay 100
Call 捡取物品()
Delay 100
Wend
End Sub
Sub 刷怪结束判断(flagposX, flagposY)
For 8
newcolor = GetPixelColor(flagposX, flagposY)
If newcolor <> oldcolor Then
Goto 刷怪结束
End If
Dim c1
c1 = "10FFFF"
If newcolor > c1 Then
Goto 刷怪结束
End If
/*FindColor 0, 0, 640, 480, c1, endposx, endposy
If endposx > 0 Then
Goto 刷怪结束
End If
c1 = "FFF6A3"
FindColor 0, 0, 640, 480, c1, endposx, endposy
If endposx > 0 Then
Goto 刷怪结束
End If*/
Delay 100
Next
End Sub
Sub 捡取物品()
Dim wp
wp = 0
Dim flag
flag = 1
While (flag)
FindColor 0, 200, 640, 480,colorNameBound(wp), intX,intY
intY = intY +30 // 计算物品位子
If intX > 0 Then
Call 移动到(intX,intY)
KeyPress 88, 1
Delay 200
ElseIf wp<1
wp = wp + 1
Else
flag = 0
End If
Wend
End Sub
Sub 移动到(posX, posY)
Dim intX,intY
FindColor 0, 100, 640, 480, colorMen, intX, intY
intY = intY + 80 //计算脚的位置
If intX > 0 Then
Dim offsetX
offsetX = intX-posX
Dim offsetY
offsetY = intY - posY
If offsetY > 0 Then
KeyDownH 38,1
Delay offsetY * 100 / speed
KeyUpH 38,1
Else
KeyDownH 40, 1
Delay -offsetY * 100 / speed
KeyUpH 40, 1
End If
If offsetX > 0 Then
KeyDownH 37, 1
Delay offsetX * 100 / speed
KeyUpH 37, 1
Else
KeyDownH 39, 1
Delay -offsetX * 100 / speed
KeyUpH 39, 1
End If
End If
End Sub
Sub 攻击技能()
// KeyPress "X", 5
KeyPress 88, 1
Delay 100
KeyPress 88, 1
Delay 100
KeyPress 88, 1
Delay 100
KeyPress 88, 1
Delay 100
KeyPress 88, 1
Delay 100
End Sub
Sub 召唤技能()
KeyPress "Q", 1
Delay 1000
KeyPress "W", 1
Delay 1000
KeyPress "E", 1
Delay 1000
KeyPress "R", 1
Delay 1000
KeyPress "T", 1
Delay 1000
KeyPress "Y", 1
Delay 1000
KeyPress "A", 1
Delay 1000
KeyPress "S", 1
Delay 1000
KeyPress "D", 1
Delay 1000
KeyPress "F", 1
Delay 1000
KeyPress "G", 1
Delay 1000
KeyPress "H", 1
Delay 1000
KeyPress "T", 1
Delay 1000
End Sub
- DNF刷怪的按键精灵脚本,很久前写的,效果不好。。
- 很久前写的一份计划书
- 有大神写DNF外挂的吗
- Jquery写的脚本,第一次用Jquery写的,很多写的不好的,请见谅
- 很久之前写的日历
- 写脚本程序的前序工作
- 很久很久前初学Java时的笔记--String操作
- 很久很久前初学Java时的笔记--内部类
- 很久很久前初学Java时的笔记--日期+集合
- 很久前设计的webs管理器
- 很久前自己做的建模工具
- 很久没写blog,之前写的一坨不好东西见谅啊.这次给大家介绍quick-x的一些新特性quick-cocos2d-x
- resume模板,写的不好
- 很久很久的事
- 很久之前写的【成绩管理系统】的数据库
- 很久没写的原因 废话
- 翻到很久之前写的一个demo。
- 按键精灵脚本,快速解决体力劳动的利器呀!
- STM32 USB IAP 步骤
- 客户资源管理系统概述
- JavaScript学习笔记(三十六) Klass
- HDU-1394 Minimum Inversion Number(线段树)
- 黑马程序员之java环境变量配置方法
- DNF刷怪的按键精灵脚本,很久前写的,效果不好。。
- 不同编译单元内定义之non-local static 对象
- 视觉直观感受7种常用的排序算法
- WINCE下的USB驱动开发
- Flashback Data Archive 闪回归档测试
- 二三层交换原理 学习总结
- UVA 465 Overflow 高精度加法乘法(误!。其实应该说是浮点数的优势。。。)
- 虚函数与非虚函数在父类、子类之间的调用
- Node.js 入门