UserVar jinyan=1260000 "当前级别升级需要经验"
UserVar t=10 "隔多少分钟得到结果"
UserVar fb=DropList{"1360×768分辨率1088×612窗口":3|"1440×900分辨率1280×720窗口":0|"1440×900分辨率1088×612窗口":2|"1024×768分辨率800×600窗口":1}=0 "选择屏幕和游戏窗口的分辨率类型//主程序部分"
//传说中的分割线=======================================================================================
Rem 程序开始
Call MessageBox("老大,我要开始了,单击确定继续程序,"&t&" 分钟后知道结果!")
Call 判断分辨率类型()
Call 鉴别阶段()
//第一次鉴别是找到开始的经验
If q=0 Then
Call MessageBox("请确认游戏运行正常,经验条没有被遮挡,分辨率正确!!!")
Goto 程序结束
End if
kaishi=p
Call 延时阶段()
//第二次鉴别是找到设定时间结束时经验,两次使用的是一个子程序,可以节省代码,呵呵。个人认为用子程序是好习惯。!@ !
Call 鉴别阶段()
jieshu=p
Call 赋值阶段()
If zengliang=0 Then
Call 没有长经验()
Goto 程序结束
End if
If w>1 Then
Call 总时间大于两个小时()
End if
If w=1 Then
Call 总时间一个小时()
End if
If w=0 Then
Call 总时间不到一个小时()
End if
If jy>10000 Then
jy=Fix(jy/10000)
Call MessageBox("你的本级升级所需的剩余经验呢约为 "&jy&" W余点!继续努力!")
Else
If jy>1000 Then
jy=Fix(jy/1000)
Call MessageBox("你的本级升级所需的剩余经验只有 "&jy&" 千余点!加油加油!")
Else
Call MessageBox("你的本级升级所需的剩余经验约为 "&jy&" 点!很快就升级了!")
End if
End if
If g>0 Then
Call 剩余时间大于一个小时()
End if
If g=0 Then
Call 剩余时间不到一个小时()
End if
Call MessageBox("本级升级效率是每分钟 "&i&" 点经验!")
//下面的代码是来估计完成时间的,把系统的时间和得到时间相加,并且判断是否大于24点的(因为挂机的一般都是晚上,^_^)
shi=Hour(Now)+g
fen=Minute(Now)+k
half=0
If fen>60 Then
jinshi=Fix(fen/60)
fen=fen-60*jinshi
shi=shi+jinshi
End if
If shi>23 Then
shi=shi-24
End if
If shi>12 Then
shi=shi-12
half=1
End if
If half=0 Then
Call MessageBox("预计本次升级结束时间为 "&shi&":"&fen&" "&" Am!")
Else
Call MessageBox("预计本次升级结束时间为 "&shi&":"&fen&" "&" Pm!")
End if
Call MessageBox("OK,我的工作是结束了哦,你还要继续呢!!!拜拜!!")
Rem 程序结束
//传说中的分割线========================================================================================
以下是程序的子程序部分
//子程序的分割线----------------------------------------------------------------------------------------------------------------------------------------------------------
Sub 判断分辨率类型()
//我的电脑是1440*900的宽屏分辨率,点是自己抓得,如果各位大侠测试的时候没有找到游戏,可以自己改点(本来想用找颜色的,可是用这个比较方便)
If fb=0 Then
leng=970
//leng是经验条的长度,抓点以后自己算得
f=744
//f是经验条绿色部分的纵坐标,可以稍微偏差一点
zuimodian=1204
//zuimodian是经验条最末点x坐标
End if
If fb=1 Then
leng=791
f=618
zuimodian=907
End if
If fb=3 Then
leng=970
f=623
zuimodian=1164
End if
If fb=2 Then
leng=970
f=689
zuimodian=1204