#[HOTKEY][EXT]HOME
//--------------------------------
//---將遊戲改成試窗模式
//---利用判斷某點顏色的***抓色工具抓點跟顏色
//---******(每一台電腦裡色彩都不一定相同一定要重抓)****
//---HP()是判斷休息的迴圈
//---Find()尋找怪物迴圈
//---AT()攻擊加回血的迴圈
//---按鍵設置[1.普攻][2.技能][3.技能][4.技能][8.技能][0.技能]
//---喝水鍵 [5.大瓶無延遲][6.中瓶延遲藥水] 當然是視自己需要
//---至於AP過是SP就要自己設置了
Dim Time=1 //先定義以後用的到
Dim WinID
//=================================================================================進程
//=======================按下HOME執行=============================================
function Main
SetInputMode(3) //驅動模式,很多遊戲會阻擋SP的部份功能,可以套用此函數
while true //循環開始
HP()
Find()
At()
wend //返回while開始循環
end function
//=================================================================================程序迴圈
//============================= 休息 ============================================
function HP()//休息+喝水
//取窗口原點坐標
GetActiveWindowXY(WinX0, WinY0)
print("血量檢查點,不足休息回血")
if not CheckColor(WinX0+196, WinY0+707, Color(243, 49, 76), 10) then
Wait(100)
KeyDown("x")
Wait(500)
KeyUp("x")
do
//循環
Wait(500)
loop until CheckColor(WinX0+250, WinY0+708, Color(118, 9, 29), 10)
end if
end Function
//==============================================================================搜尋怪物
Function Find()
FindWindow("未來啟示錄",WinID)
ActiveWindow(WinID)
Wait(100)
GetActiveWindowXY(WinX0, WinY0)
if not CheckColor(WinX0+589, WinY0+30, Color(118, 19, 38), 10) then
do
Print("尋找目標")
keyPress("tab")
Wait(100)
Keypress("a")//必免讀取顏色錯誤
Wait(300)
loop Until CheckColor(WinX0+589, WinY0+30, Color(118, 19, 38), 10)
end if
end Function
//==================================================================================
Function At() //攻擊開始
GetActiveWindowXY(WinX0, WinY0)
do
Print("AT")
Keypress("1")//普攻
Wait(500)
KeyPress("2")//技能
Wait(500)
Keypress("3")//技能
Wait(500)
KeyPress("4")//技能
Wait(500)
Keypress("8")//技能
Wait(500)
KeyPress("0")//技能
Wait(500)
Keypress("q")//必免卡點及顏色誤判
Wait(300)
if not CheckColor(WinX0+161, WinY0+705, Color(209, 81, 84), 10) then
//-----無延遲血瓶檢查點------------------------------------------------------
//if not CheckColor(WinX0+157, WinY0+706, Color(234, 88, 92), 10) then
Print("檢查人物血量.如果不足就補血")
KeyPress("5")
Wait(600)
end if
//-----如果血量足夠跳離------------------------------------------------------
if not CheckColor(WinX0+176, WinY0+705, Color(228, 93, 94), 10) then
//------延遲血瓶檢查點-------------------------------------------------------
keypress("6")
Wait(600)
end if
//------如果血量足夠跳離-----------------------------------------------------
keyPress("f") //不管怪有沒有死都檢
Wait(500)
//Loop until CheckColor(WinX0+450, WinY0+28, Color(111, 77, 41), 10)
loop until CheckColor(WinX0+451, WinY0+30, Color(24, 26, 29), 10)
//除錯檢查
print("第一次攻擊結束,檢查怪物血量")
print("怪物死亡")
Keypress("f")
wait(500)
Keypress("f")
Wait(500)
Keypress("9")//輔助技能直接放可以防止跑迴圈過久
Wait(1000)
keypress("esc")
end function
那是別人發佛心要分享的,結果給你拿來賣,
真糟糕阿 |