TC官方合作论坛
标题:
发一个 枚举窗口 绑定天龙的例子
[打印本页]
作者:
xj_51love
时间:
2012-5-22 15:57
标题:
发一个 枚举窗口 绑定天龙的例子
刚接触TC 就拿天龙了做个实验
根据角色 自动绑定游戏窗口 无限多开
里面用到了大漠
#import "dm.dmsoft" dm
#include"答题.t"
#include"通用功能.t"
#include"打怪.t"
namespace 天龙挂机
int[] 窗口句柄
int 人物句柄,线程
string 人物名字
function bool init()
tab.active("tab0",0)
天龙挂机.枚举窗口句柄()
return true
endfunction
function bool 枚举窗口句柄()//遍历窗口 返回数组 读取人物名字
string[] rstr
string enums=system.enum("TianLongBaBu WndClass",1)
if(str.split(enums,"|",rstr)) //找到多个窗口
int c1,m=0
array.size(rstr,c1)
窗口句柄=int[c1]
while(m < c1)
窗口句柄=convert.strtoint(rstr[m]
,
0)
m=m+ 1
endwhile
combo.deleteall("人物名字")
int n=0
while(n< c1)
combo.addtext("人物名字",dm.ReadString(窗口句柄[n],"[[[[00847520]+70]+1BC]+4]+34",0,20))
n=n+ 1
endwhile
else //////////////////一个窗口
if(enums!="")
窗口句柄=int[1]
窗口句柄[0]=convert.strtoint(enums,0)
combo.deleteall("人物名字")
combo.addtext("人物名字",dm.ReadString(窗口句柄[0],"[[[[00847520]+70]+1BC]+4]+34",0,20))
endif
endif
return true
endfunction
function int 人物句柄()
人物名字=combo.gettextbycur("人物名字",combo.getcursel("人物名字"))
int n=0
while(true)
if(人物名字==dm.ReadString(窗口句柄[n],"[[[[00847520]+70]+1BC]+4]+34",0,20))
return 窗口句柄[n]
break
endif
n=n+1
endwhile
endfunction
function int 返回人物句柄()//传递人物句柄
if(人物句柄>0)
return 人物句柄
endif
endfunction
function bool 初始设置()
if(combo.getcursel("人物名字")==-1)
help.messagebox("还没有选择人物")
return false
endif
//string 路径=辅助.获取资源路径("rc:")
dm.SetPath("d:\\tmp")
dm.SetDict(0,"dm_soft.txt")
人物句柄=天龙挂机.人物句柄()
if(dm.BindWindow(人物句柄,"dx","dx","dx",0)==0)
help.messagebox("绑定游戏失败!!!")
return false
endif
dm.LockInput(0)
help.sleep(500)
//statictext.settext("版本",dm.Ver())
help.settray(人物名字,false)
return true
endfunction
function bool 开始挂机()
control.enable("start",false)
control.enable("stop",true)
通用功能.初始变量()
天龙挂机.初始设置()
打怪.初始()
打怪.循环打怪()
control.enable("stop",true)
return true
endfunction
function bool start_click()
if(天龙挂机.初始设置()==false)
return false
endif
线程=thread.beginthread("天龙挂机.开始挂机","")
return true
endfunction
function bool stop_click()
if(线程>0)
打怪.关闭打怪()
thread.closethread(人物句柄)
endif
if(dm.UnBindWindow()==1)
control.enable("stop",false)
control.enable("start",true)
endif
return true
endfunction
function bool exit_click()
if(线程>0)
打怪.关闭打怪()
thread.closethread(人物句柄)
endif
if(dm.UnBindWindow()==1)
help.exit()
endif
return true
endfunction
function bool destroy()
return true
endfunction
endnamespace
怎么这个编辑器 代码里有 i 后 会自动变成斜体
作者:
tyuyan
时间:
2012-5-22 16:54
来看看 , , 学习下。
作者:
板桥
时间:
2012-5-22 20:05
提示:
作者被禁止或删除 内容自动屏蔽
作者:
8168333
时间:
2012-5-23 06:35
英文的,还要翻译中文的,讨厌英文
作者:
zdy77233647
时间:
2012-5-23 09:37
请问下天龙的问题 如何自动捡物和答题 最好多线程也介绍下 对这些很不懂 .....
作者:
xj_51love
时间:
2012-5-23 11:32
回复
5楼
zdy77233647
的帖子
如何自动捡物和答题 基本上有2种办法
1. 读内存判断 这个比较效率
2.通过软件、插件等 判断 游戏图色
比如说 掉包裹 后鼠标移动过去 会有特征码出现
答题呢 屏幕上会有提示答题的文字出现 能识别出 就可判断答题
作者:
jq4561057
时间:
2012-6-4 12:16
看看 学习下
作者:
wfdwsy
时间:
2012-8-12 01:05
闹了半天是内纯脚本
作者:
tyl1077
时间:
2012-8-18 23:20
学习一下!
作者:
潇湘^秋雨
时间:
2012-8-19 01:30
..............
作者:
潇湘^秋雨
时间:
2012-8-19 01:34
............
作者:
wudongdonghehe
时间:
2012-10-21 14:49
看的头有点晕,怎么都是英文的,来电汉文的不行吗?
欢迎光临 TC官方合作论坛 (http://bbs.52tc.co/)
Powered by Discuz! X3.1