#[HOTKEY]F11
# 在此定義全局變量
#SetArgsOnCompile
dim fzjn1_T,fzjn2_T,fzjn3_T,red,blue,ye,red1,blue1,ye1
function main
fzjn1_T=GetConfigNumber("按鍵5的輔助技能")
fzjn2_T=GetConfigNumber("按鍵6的輔助技能")
fzjn3_T=GetConfigNumber("按鍵7的輔助技能")
SetInputMode(3)
SetTimer("fzjn1", fzjn1_T*1000, true)
SetTimer("fzjn2", fzjn1_T*1000, true)
SetTimer("fzjn3", fzjn1_T*1000, true)
do
fuhuo()
find()
hit()
drink()
loop
end function
//--------------------------------------------------------------------------------------------------------
function find()
GetActiveWindowXY(WinX0, WinY0)
do
keypress("TAB")
wait(300)
Wait(200)
print("開始尋找怪物")
loop until FindImageEx("HP.sel", Color(30, 30, 30), WinX0+408, WinY0+16, WinX0+458, WinY0+47, true, FoundX, FoundY)
//抓怪物的圖檔
if not CheckColor(WinX0+590, WinY0+31, Color(103, 30, 50), 10) then
end if
end function
//-------------------------------------------------------------------------------------------------------------
function hit()
//取窗口原點坐標
// dim aa,ab,ac,ad
GetActiveWindowXY(WinX0, WinY0)
// aa=GetConfigNumber("aa")
// ab=GetConfigNumber("ab")
// ac=GetConfigNumber("ac")
// ad=GetConfigNumber("ad")
do //循環
qiehuan()
fuhuo()
keypress("1")
wait(2500)
drink()
wait(100)
keypress("")
wait(100)//設定你的攻擊熱鍵的秒數 如果是重砲手 秒數要改2000~3000
drink()
wait(100)
keypress("1")
wait(3000)
drink()
wait(100)
keypress("")
wait(100)//設定你的攻擊熱鍵的秒數 如果是重砲手 秒數要改2000~3000
Wait(100)
loop while CheckColor(WinX0+447, WinY0+30, Color(102, 35, 48), 10)
SetTime=GetTime()
do
keypress("NumLock")
wait(550)
keypress("NumLock")
wait(50)
KeyPress("F")
Wait(500)
loop until GetTime()-SetTime > 2000 //在當前時間比StartTime大超過20000毫秒時?
print("撿道具")
end function
//-----------------------------------------------------------------------------------
function drink() //喝水函數
red=GetConfigNumber("HP量")
blue=GetConfigNumber("AP量")
ye=GetConfigNumber("SP量")
red1=GetConfigNumber("HP量坐下")
blue1=GetConfigNumber("AP量坐下")
ye1=GetConfigNumber("SP量坐下")
dim DigitImgs[10]
LoadImage("1.Sel", DigitImgs[1])
LoadImage("2.Sel", DigitImgs[2])
LoadImage("3.Sel", DigitImgs[3])
LoadImage("4.Sel", DigitImgs[4])
LoadImage("5.Sel", DigitImgs[5])
LoadImage("6.Sel", DigitImgs[6])
LoadImage("7.Sel", DigitImgs[7])
LoadImage("8.Sel", DigitImgs[8])
LoadImage("9.Sel", DigitImgs[9])
LoadImage("0.Sel", DigitImgs[10])
GetActiveWindowXY(WinX0, WinY0)
//在屏幕上讀數字
if not CheckColor(WinX0+185, WinY0+707, Color(247, 59, 79), 10) then
if CNum(rednumber)<=red then
keypress("-")
wait(300)
print("HP量"& red & "使用HP*1")
end if
end if
if not CheckColor(WinX0+165, WinY0+709, Color(209, 37, 77), 10) then
if CNum(rednumber)<=red then
keypress("9")
wait(300)
print("HP量"& red & "使用HP*1")
end if
end if
if not CheckColor(WinX0+141, WinY0+721, Color(157, 125, 34), 10) then
if CNum(bluenumber)<=blue then
keypress("=")
wait(300)
print("AP量"& blue & "使用ap*1")
end if
end if
if ReadNumberEx(DigitImgs, Color(30, 30, 30), WinX0+129, WinY0+667, WinX0+249, WinY0+677, true, yenumber) then
if CNum(rednumber)<=ye then
keypress("0")
wait(300)
print("SP量"& ye & "使用sp*1")
end if
end if
//-------------------------------------------------------------------------------------------------------
if ReadNumberEx(DigitImgs, Color(30, 30, 30), WinX0+129, WinY0+639, WinX0+191, WinY0+651, true, red1number) then
if CNum(red1number)<=red1 then
wait(300)
keypress("x")
wait(300)
print("HP量量坐下"& red1 & "HP量量坐下")
wait(300)
if CheckColor(WinX0+252, WinY0+707, Color(148, 25, 45), 10) then
wait(300)
KeyPress("x")
do
wait(300)
loop until CheckColor(WinX0+249, WinY0+647, Color(105, 16, 34), 10)
end if
end if
end if
if ReadNumberEx(DigitImgs, Color(30, 30, 30), WinX0+129, WinY0+654, WinX0+191, WinY0+665, true, blue1number) then
if CNum(blue1number)<=blue1 then
keypress("x")
wait(300)
print("AP量量坐下"& blue1 & "AP量量坐下")
wait(300)
if CheckColor(WinX0+249, WinY0+722, Color(117, 86, 15), 10) then
wait(300)
KeyPress("x")
do
wait(300)
loop until CheckColor(WinX0+249, WinY0+647, Color(105, 16, 34), 10)
end if
end if
end if
//------------------------------------------------------------------------------------------------------
GetActiveWindowXY(WinX0, WinY0)
if CheckColor(WinX0+252, WinY0+707, Color(148, 25, 45), 10) then
do
keypress("3")
wait(2100)
keypress("3")
wait(200)//設定你的攻擊熱鍵的秒數 如果是重砲手 秒數要改2000~300
keypress("4")
wait(3000)//設定你的攻擊熱鍵的秒數 如果是重砲手 秒數要改2000~3000
keypress("")
wait(200)//設定你的攻擊熱鍵的秒數 如果是重砲手 秒數要改2000~3000
loop while CheckColor(WinX0+447, WinY0+30, Color(102, 35, 48), 10)
end if
end function
//----------------------------------------------------------------------------------------------------------
function qiehuan()
//取窗口原點坐標
GetActiveWindowXY(WinX0, WinY0)
//如果找到圖像"無法攻擊.sel"
if FindImageEx("目標不在視野範圍內.sel", Color(30, 30, 30), WinX0+405, WinY0+131, WinX0+618, WinY0+148, true, FoundX, FoundY) then
//此時FoundX和FoundY的值分別為找到的圖像的左上角X,Y坐標
keypress("TAB")
wait(1000)
end if
end function
//---------------------------------------------------------------------------------------------------
function fuhuo()
//取窗口原點坐標
GetActiveWindowXY(WinX0, WinY0)
//如果找到圖像"復活.sel"
if FindImageEx("復活.sel", Color(30, 30, 30), WinX0+485, WinY0+78, WinX0+537, WinY0+98, true, FoundX, FoundY) then
//此時FoundX和FoundY的值分別為找到的圖像的左上角X,Y坐標
beep(800,60000)
end if
end function
//-----------------------------------------------------------------------------------------------------
function fzjn1()
keypress("5")
wait(1000)
end function
function fzjn2()
keypress("6")
wait(1000)
end function
function fzjn3()
keypress("7")
wait(1000)
end function
//----------------------------------------------------------------------------------------------------
這是我用的腳本
每次休息後都只會站起來不會選怪打
各位大大幫我看看是什麼原因可以嗎 |