<英雄年代>的少血瞬移【源码】
这游戏挂机经常会被偷袭的,我做了个少血瞬移的脚本,但有的朋友采用宽屏等造成不能使用,现在我把窗口坐标转换成全屏坐标,然后判断颜色,终于做了个比较通用的脚本,游戏画面拉动都没关系了.下面就是脚本内容,有些数组这里用不到,但因为我做别的辅助脚本方便就全部一样取点的:[Common]
Description=通用少血瞬移
HotKeyStart=16441
HotKeyStop=16432
HotKeyPause=0
Enabled=1
RunOnce=1
[Script]
var h=111
var x=-1
var y=-1
var i=1
var c=0
var r=2
VAR color=0
var t_time=0
array t_color 8
array t_x 8
array t_y 8
array t_aj 8
//1.红药;2.8上放瞬移或大红,可以自动吃;
//F1圣洁,F2消弱,F3魔镜,F4圣盾(铁甲/狂暴)
define timer T1 25000 ontimer
Main:
//Timer Pause T1
Timer Stop T1
set h=GetForeGroundWindow()
//do ShowMsg(h)
do ClientToScreen(GetForeGroundWindow(),80,50,t_x[0],t_y[0])
set t_aj[0]=27
do ClientToScreen(GetForeGroundWindow(),181,50,t_x[1],t_y[1])
set t_aj[1]=49
do ClientToScreen(GetForeGroundWindow(),181,49,t_x[2],t_y[2])
set t_aj[2]=56
do ClientToScreen(GetForeGroundWindow(),732,131,t_x[3],t_y[3])
set t_aj[3]=56
do ClientToScreen(GetForeGroundWindow(),405,338,t_x[4],t_y[4])
set t_aj[4]=116
do ClientToScreen(GetForeGroundWindow(),405,338,t_x[5],t_y[5])
set t_aj[5]=118
do ClientToScreen(GetForeGroundWindow(),71,30,t_x[7],t_y[7])
set t_aj[7]=118
Read Color t_x[0] t_y[0] t_color[0]
Read Color t_x[1] t_y[1] t_color[1]
Read Color t_x[2] t_y[2] t_color[2]
set t_color[3]=$000000FF
Read Color t_x[4] t_y[4] t_color[4]
Read Color t_x[7] t_y[7] t_color[7]
While i=1
Get ColorPosEx t_color[0] t_x[0] t_y[0] 2 x y
IF x>0
Get ColorPosEx t_color[2] t_x[2] t_y[2] 2 x y
IF x<0
Delay 100
Key Press t_aj[2] 1
EndIF
Delay 200
EndIf
Delay 300
// Get ColorPosEx t_color[3] t_x[3] t_y[3] 10 x y
// IF x<0
// Timer Start T1
// Delay 500
// Else
// Timer Stop T1
// EndIF
// Delay 500
EndWhile
EndMain
//此为定时器子程序
onTimer:
Get ColorPosEx t_color[3] t_x[3] t_y[3] 10 x y
IF x<0
Key Press t_aj[3] 1
EndIF
Delay 300
EndSub 额 我看不懂啊(葱头:06) (葱头:10) (葱头:01) (葱头:01) (葱头:01) (葱头:01) (葱头:01) 回帖是种美德(葱头:38)
页:
[1]