TC官方合作论坛
标题: 【有源码】诛仙前传区域挂机脚本 [打印本页]
作者: ↘夢想飛舞√ 时间: 2011-10-15 11:35
标题: 【有源码】诛仙前传区域挂机脚本
脚本简介:
功能:区域挂机打怪,自动回血回蓝。
原理:内存动态获取人物坐标,动态获取人物血量,和蓝量。
使用说明:
1.
启动脚本前请先开启游戏,将人物移动动你所有挂机的区域。
2.
切换到脚本的基本设置页面。设置人物的基本技能。技能的设置为数字键1,2,3,4,5。
3.
设置人物血量和蓝量的最低下限,(当人物的血或者蓝少于总血量的百分之多少的时候自动回血回蓝)人物加血的键设置为数字键8,人物加蓝的键设置为数字键9.
注:版本比较旧 有的代码需要自己改动下
主要界面如下:
[attach]927[/attach]
[attach]928[/attach]
源代码如下:
namespace elementclient
int point,rr,gett,header,point_p,readp2,readp1,r
string gethp,getmp
function bool get_interphase()
int getID1,getID2,getID3,getID4,getID5,getID6
getID1=combo.getcursel("ComboBox0")
keyboard.keypress(49,9)
if(getID1==0)
keyboard.keypress(49,1)
endif
if(getID1==1)
keyboard.keypress(50,1)
endif
if(getID1==2)
keyboard.keypress(51,1)
endif
if(getID1==3)
keyboard.keypress(52,1)
endif
if(getID1==4)
keyboard.keypress(53,1)
endif
if(getID1==5)
keyboard.keypress(54,1)
endif
getID2=combo.getcursel("ComboBox1")
if(getID2==0)
keyboard.keypress(49,1)
endif
if(getID2==1)
keyboard.keypress(50,1)
endif
if(getID2==2)
keyboard.keypress(51,1)
endif
if(getID2==3)
keyboard.keypress(52,1)
endif
if(getID2==4)
keyboard.keypress(53,1)
endif
if(getID2==5)
keyboard.keypress(54,1)
endif
getID3=combo.getcursel("ComboBox2")
if(getID3==0)
keyboard.keypress(49,1)
endif
if(getID3==1)
keyboard.keypress(50,1)
endif
if(getID3==2)
keyboard.keypress(51,1)
endif
if(getID3==3)
keyboard.keypress(52,1)
endif
if(getID3==4)
keyboard.keypress(53,1)
endif
if(getID3==5)
keyboard.keypress(54,1)
endif
getID4=combo.getcursel("ComboBox3")
if(getID4==0)
keyboard.keypress(49,1)
endif
if(getID4==1)
keyboard.keypress(50,1)
endif
if(getID4==2)
keyboard.keypress(51,1)
endif
if(getID4==3)
keyboard.keypress(52,1)
endif
if(getID4==4)
keyboard.keypress(53,1)
endif
if(getID4==5)
keyboard.keypress(54,1)
endif
getID5=combo.getcursel("ComboBox4")
if(getID5==0)
keyboard.keypress(49,1)
endif
if(getID5==1)
keyboard.keypress(50,1)
endif
if(getID5==2)
keyboard.keypress(51,1)
endif
if(getID5==3)
keyboard.keypress(52,1)
endif
if(getID5==4)
keyboard.keypress(53,1)
endif
if(getID5==5)
keyboard.keypress(54,1)
endif
return true
endfunction
function bool point_unit(int ProcessNumber1,int r1)
int read,x,y,dx,dy
double readx,ready
//ProcessNumber=process.getprocessid("诛仙前传")
if(ProcessNumber1==0)
help.messagebox("openprocess false!!!")
return false
endif
if(point==0)
read=process.read4byte(ProcessNumber1,#00c1543c)
read=process.read4byte(ProcessNumber1,read+#1c)
read=process.read4byte(ProcessNumber1,read+#28)
readx=process.readfloat(ProcessNumber1,read+#3c)
ready=process.readfloat(ProcessNumber1,read+#44)
dx=convert.doubletoint(readx)
dy=convert.doubletoint(ready)
point=1
endif
while(true)
read=process.read4byte(ProcessNumber1,#00c1543c)
read=process.read4byte(ProcessNumber1,read+#1c)
read=process.read4byte(ProcessNumber1,read+#28)
readx=process.readfloat(ProcessNumber1,read+#3c)
ready=process.readfloat(ProcessNumber1,read+#44)
x=convert.doubletoint(readx)
y=convert.doubletoint(ready)
if(x>r+dx)
keyboard.keypress(65,1)
endif
if(x<r+dx)
keyboard.keypress(68,1)
endif
if(y>r+dy)
keyboard.keypress(87,1)
endif
if(y<r+dy)
keyboard.keypress(83,1)
endif
endwhile
return true
endfunction
function bool getattribute(int ProcessNumber)
int MP,HP,readmp,readhp,readpp,readp
if(point_p==0)
readpp=process.read4byte(ProcessNumber,#00c1543c)
readpp=process.read4byte(ProcessNumber,readpp+#1c)
readp2=process.read4byte(ProcessNumber,readpp+#28)
readp1=process.read4byte(ProcessNumber,readpp+#27c)
point_p=1
endif
readp=process.read4byte(ProcessNumber,#00c1543c)
readp=process.read4byte(ProcessNumber,readp+#1c)
readmp=process.read4byte(ProcessNumber,readp+#28)
readhp=process.read4byte(ProcessNumber,readp+#27c)
//help.messagebox(convert.inttostr(read)) gethp,getmp
HP=convert.strtoint(gethp)
MP=convert.strtoint(getmp)
while(readhp<readp2*MP*0.01)
keyboard.keypress(56,10)
endwhile
while(readmp<readp1*HP*0.01)
keyboard.keypress(57,10)
endwhile
return true
endfunction
function bool main_tt()
int name,ProcessNumber,read
name=window.findwindow("诛仙前传")
gethp=edit.gettext("edit0")
getmp=edit.gettext("edit1")
if(name==0)
help.messagebox("not find windows!!!")
return false
endif
window.setwindowtop(name)
help.sleep(50)
ProcessNumber=process.getprocessid("诛仙前传")
if(ProcessNumber==0)
help.messagebox("openprocess false!!!")
return false
endif
while(true)
point_p=0
point=0
elementclient.getattribute(ProcessNumber)
elementclient.point_unit(ProcessNumber,r)
elementclient.get_interphase()
endwhile
return true
endfunction
//
function bool start_click()
return true
endfunction
return true
endfunction
function bool button1_click()
return true
endfunction
return true
endfunction
//启动
function bool button5_点击()
header=thread.beginthread("elementclient.main_tt")
return true
endfunction
//停止
function bool button6_点击()
thread.closethread(header)
return true
endfunction
function bool slider0_releasedcapture()
gett=slide.getpos("slider0")
slide.setpos("slider0",gett)
gett=slide.getpos("slider0")
r=gett
statictext.settext("Static6",convert.inttostr(gett))
return true
endfunction
function bool exit_点击()
thread.closethread(header)
return true
endfunction
endnamespace
有神马问题,请跟帖!!!
作者: zxyc2000 时间: 2011-10-15 13:10
顶顶顶。怎能不顶:smoke
get_interphase() //跟据界面设置攻击怪物
point_unit(int ProcessNumber1,int r1) //查看人物坐标,不能超出距离原始坐标r1的范围
getattribute(int ProcessNumber) //查看人物血蓝,及时恢复
话说整个代码中只看到一个help.sleep(50),这速度要飞了吧。
作者: tanwei522 时间: 2011-10-15 13:56
全英文 压力山三啊·!
作者: jxw1003 时间: 2011-10-15 13:59
小白,看不太懂
作者: gaoyang 时间: 2011-10-15 14:31
:L求中文
作者: q8905298 时间: 2011-10-15 14:51
回复 1楼↘夢想飛舞√的帖子
asdsad
作者: asd49528536 时间: 2011-10-15 15:50
作为一个小白 我是真的不懂?没中文 我初中没毕业的
作者: xufuyin 时间: 2011-10-15 16:28
顶顶顶顶顶顶顶顶顶顶
作者: xinxue090 时间: 2011-10-16 01:42
... KAN BU JIAN
作者: gpqzm5218 时间: 2011-10-24 12:13
英文 ...........
作者: rcte005 时间: 2011-11-10 22:13
LZ试了能用么,我试了,开启后无法自动打怪,若设定范围只会自动按SDSDSDSD这两键,根本就不打怪的
作者: rcte005 时间: 2011-11-10 22:33
回复 1楼↘夢想飛舞√的帖子
LZ试了能用么,我试了,开启后无法自动打怪,若设定范围只会自动按SDSDSDSD这两键,根本就不打怪的
作者: zzvasd 时间: 2011-11-13 18:02
多谢兄弟啊,试试先
作者: 数据线 时间: 2011-11-14 00:07
说句实在话,有很多东西是可以重复使用的,你为啥写了一遍又一遍呢?
简单的例子,这个:
ProcessNumber=process.getprocessid("诛仙前传")
if(ProcessNumber==0)
help.messagebox("openprocess false!!!")
return false
endif
貌似有很多用到的地方吧,可以写成一个方法或者函数,在其他地方调用!
仅个人看法,
请教一个问题,喊话如何提交?
int lHandle = process.getprocessid("诛仙前传")
window.sendkeypress(lHandle,13) //发送Enter见,聚焦输入框 ---这里没效果,求指导
这样的,貌似不起作用,如何解决?
作者: 15928740674 时间: 2011-11-16 10:46
LZ 顶了
作者: yy1360539180 时间: 2011-11-16 13:01
我肿马下不动啊:@
作者: joan525626 时间: 2011-11-16 16:05
我也是怎么下不动啊?
作者: wenzhong 时间: 2011-11-18 15:54
回复 1楼↘夢想飛舞√的帖子
支持啊,谢谢了
作者: zhangyuheng 时间: 2011-11-19 21:21
144545478
作者: dhy7777 时间: 2011-11-21 18:10
DDDDDDDDDD
作者: star刹那 时间: 2011-11-21 18:37
来吧
作者: qinglinsong250 时间: 2011-11-28 16:09
aaaaaaaaaaaaaaa
作者: lyf1314 时间: 2011-11-28 18:08
给力啊,飞舞哥,求找基址和偏移量的教程
作者: 13607837320 时间: 2011-11-29 00:01
看不懂
作者: sheng124280 时间: 2011-11-30 11:35
看看哪 能用不
作者: c122251762 时间: 2011-12-1 20:53
assssssss
作者: djx505223305 时间: 2011-12-2 08:05
我顶啊
作者: zhangyuheng 时间: 2011-12-2 09:07
晕晕的
作者: zhangyuheng 时间: 2011-12-2 09:26
我怎么还是小白
作者: jxyytgs 时间: 2011-12-2 09:56
adsweq
作者: kuangcanmvp 时间: 2011-12-4 18:04
我下不了
作者: guo1367687 时间: 2011-12-5 19:02
好贴~!顶了~谢谢
作者: guo1367687 时间: 2011-12-5 19:03
为什么我没有下载项呢?如何下载呢?
作者: djsh 时间: 2011-12-6 21:58
:~为什么我不能下载
作者: djsh 时间: 2011-12-6 22:04
:hh:试试 正在学习中
作者: djsh 时间: 2011-12-6 22:05
:L新手表示亚历山大
作者: djsh 时间: 2011-12-6 22:16
:Q不能用
作者: gdlulu 时间: 2011-12-7 00:01
中文就行,为何非要整成鸡肠字呢?天呐......求中文!!!
作者: 王佳浩 时间: 2011-12-9 11:49
撒的撒
作者: xwj360250 时间: 2011-12-9 13:56
版主直接发我邮箱吧·· 我真下载不了·
415634605@QQ.com
作者: djsh 时间: 2011-12-9 22:14
:-|这东西不能用
作者: v11ks 时间: 2011-12-11 17:08
额 几乎没什么延时 霸气。
作者: yuyianran 时间: 2011-12-12 08:17
怎么什么都看不了,我还学习个啥,连个新手指引都木有
作者: 求学小童 时间: 2011-12-14 01:45
全英文,看不懂难啊
作者: zhcorzzy 时间: 2011-12-14 15:24
顶一下
作者: agrxiao 时间: 2011-12-18 12:22
是脚本嘛?
作者: wxygcf 时间: 2011-12-18 14:38
LZ,这个脚本不能用得。 我开启之后来回动 不打怪的。。。。我设置问题?
作者: 6684689131 时间: 2011-12-20 09:45
456:~
作者: 智盛辅助软件 时间: 2011-12-20 15:13
不错 顶起,,,
作者: xj2007 时间: 2011-12-22 16:57
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
作者: sky918 时间: 2011-12-22 21:12
haokankan
作者: sky918 时间: 2011-12-22 21:14
好 看看
作者: sky918 时间: 2011-12-22 21:26
怎么附件下载不了啊 看不到附件
作者: sky918 时间: 2011-12-23 12:27
顶楼主 :D
作者: quan5211314 时间: 2011-12-23 19:54
怎么下不了
作者: wojiaopzn 时间: 2011-12-25 04:03
怎么下载的?
作者: a344289257 时间: 2011-12-25 17:33
fsdffffffffffffffffffffffffff
作者: dangurous16 时间: 2011-12-26 19:27
嗯..............
作者: super4200245 时间: 2011-12-27 08:38
求 老师
作者: zhangsanfengdia 时间: 2011-12-28 15:07
hahahahahahhaaha
作者: 989091112 时间: 2011-12-28 22:27
KAN KAN .....
作者: 1220645486 时间: 2011-12-31 01:14
:~:-o需要回复?
作者: gj523523 时间: 2011-12-31 04:01
大神
作者: basfd1 时间: 2012-1-1 09:11
111111111
作者: 菜B 时间: 2012-1-1 10:17
这,英语的。。。。。
作者: qazqaz1 时间: 2012-1-1 10:42
tretretretret
作者: xiao7788 时间: 2012-1-1 17:07
支持下先,谢谢楼主 ,我看不到 我邮箱吧·· 我真下载不了
·
418834982@qq.com
作者: 185356636 时间: 2012-1-1 20:26
55555求教
作者: 185356636 时间: 2012-1-1 20:26
5555求教
作者: 309313935 时间: 2012-1-2 01:03
英文看不懂啊
作者: 309313935 时间: 2012-1-2 01:06
英文 ...........
作者: zxcvbnm2012 时间: 2012-1-2 13:37
好用不?
作者: zxcvbnm2012 时间: 2012-1-2 21:15
怎么用啊
作者: egmsky 时间: 2012-1-3 00:14
看看
作者: workyj 时间: 2012-1-3 13:07
dddddddddddddddddddddddddddddddd
作者: baiyshi 时间: 2012-1-3 14:16
回复是不是就可以看了
作者: lyw881725 时间: 2012-1-3 22:28
顶顶
作者: z5284828 时间: 2012-1-4 07:25
:|-):~w:@
作者: z5284828 时间: 2012-1-4 07:25
aaaaaaaa
作者: z5284828 时间: 2012-1-4 07:29
ssssssssssssssssssssssss
作者: 4496099 时间: 2012-1-4 12:26
顶下
作者: zhao87631549 时间: 2012-1-4 21:06
545646546545646545646465456
作者: ghj475368128 时间: 2012-1-4 23:34
我都看了几天了,把你的代码复制去,还是做不出那个啊
作者: huajigao 时间: 2012-1-6 15:32
看看
作者: yongqian001 时间: 2012-1-6 21:07
看不到-------------------
作者: gaojihua 时间: 2012-1-7 13:19
爱上飞凤飞飞
作者: 139694127 时间: 2012-1-8 11:39
:smoke收到 邮件 顶一个
作者: 602547479 时间: 2012-1-8 16:27
怎么用的 啊 不会啊
作者: kl22334 时间: 2012-1-8 22:33
怎么下的啊?楼主!
作者: wencheng1314888 时间: 2012-1-9 16:29
诛仙前传区域挂机脚本
作者: djxlremix 时间: 2012-1-9 20:17
看看先,什么好东西
作者: 48826350 时间: 2012-1-9 21:47
看不懂!英文!!
作者: wencheng1314888 时间: 2012-1-9 23:01
怎么看不到
作者: 48826350 时间: 2012-1-10 12:45
下载!学习中!
作者: mdifkds 时间: 2012-1-10 13:19
看看
作者: 發UP峰 时间: 2012-1-11 00:57
怎么用??
作者: 99377889 时间: 2012-1-12 00:06
:D 英文 ...........
作者: 99377889 时间: 2012-1-12 00:07
啥子东西啊,我回复了还下不了啊
作者: mzxn1314 时间: 2012-1-12 02:04
:D:-o
作者: piaoliloveling 时间: 2012-1-12 11:10
顶顶顶。怎能不顶
欢迎光临 TC官方合作论坛 (http://bbs.52tc.co/) |
Powered by Discuz! X3.1 |