| 
  
脚本简介:
               功能:区域挂机打怪,自动回血回蓝。               原理:内存动态获取人物坐标,动态获取人物血量,和蓝量。 使用说明:   1. 
启动脚本前请先开启游戏,将人物移动动你所有挂机的区域。 2. 
切换到脚本的基本设置页面。设置人物的基本技能。技能的设置为数字键1,2,3,4,5。 3. 
设置人物血量和蓝量的最低下限,(当人物的血或者蓝少于总血量的百分之多少的时候自动回血回蓝)人物加血的键设置为数字键8,人物加蓝的键设置为数字键9.  
注:版本比较旧  有的代码需要自己改动下 
   主要界面如下:    
 
  
 
源代码如下:  
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  
 
有神马问题,请跟帖!!!  
 
 
 
 |