天堂M+按鍵精靈 妖精腳本

模擬器  夜神6.0
180124
1. 新增09:30收信時間
2. 修正關閉teamviewer視窗錯誤
180123
1.模擬器左上角可以不用在對的很準了(應為有人反映手抖做不到)
2.更新鼠標起始位置, 避免啟動拖拉視窗
180122
1.優化偷襲瞬移功能
2.修正沒箭不會按回卷異常
180121-2
1.新增高治/橙水 (放置"F2"位址)
2.新增定時收信(12:30 / 18:30 / 21:30 3個時段)
3.所有功能啟用/關閉可自設
180121 新增被偷襲"截圖" (在桌面需自行新增"截圖"資料夾") 
180120
1.新增斷線重連
2.新增使用TeamViewer 遠端連線, 斷線可自動關閉視窗(電腦螢幕需設1600*900才有作用)
180119 加快迴圈速度
//-------------------------------------------------------------------------------------------------------------------

設定1280*720解析度 (注意模擬器大小不可任意拖動, 否則就破功無效)






畫面必須需移到左上角, 上方左方須留一格 (注意藍色細線一定要留)










快捷鍵擺放位址



快捷鍵設定   依序F1~~F8




按鍵精靈 9.51

新建檔案後 並選擇"原始檔案"




將下列程式複製貼上 存檔即可

//--------功能設定----------------------------------------------
//回卷--------------------------------------------------------------
GoHome = 1   //低血量自動回卷, 並停止程式_ 啟用=1 / 關閉=0
hph = 40     //hp < 40% 回卷
//高治/橙水--------------------------------------------------------------
OWater = 1   //低血量自動 高治 / 橙水_ 啟用=1 / 關閉=0
hph2 = 60    //hp < 60% 高治 / 橙水 (放 "F2")
//魂體轉換--------------------------------------------------------------
HpSwapMp = 1 //魂體轉換開關_ 啟用=1 / 關閉=0
hp = 85      //hp > 85%以上魂體
mph = 58     //mp < 58%以下魂體
//沒怪瞬移--------------------------------------------------------------
FlyMove = 1  //沒怪瞬移開關_ 啟用=1 / 關閉=0
FlyS = 6     //沒怪瞬移時間"6"約7~12秒 (可設1~無限, 自行斟酌)
//攻擊魔法--------------------------------------------------------------
Magic3 = 1   //自動放魔法(三重矢)_ 啟用=1 / 關閉=0
mp = 60      //mp > 60% 放技能
//被偷襲---------------------------------------------------------------------------
KillFiy = 1  //被偷襲自動瞬移_ 啟用=1 / 關閉=0
PicCapture = 1 //被偷襲自動截圖開關(桌面須建立資料夾, 檔名"截圖")_ 啟用=1 / 關閉=0
//其他功能-----------------------------------------------------------------------------------
Arrow = 1    //沒箭自動回卷_ 啟用=1 / 關閉=0
Poison = 1   //自動喝解讀藥水_ 啟用=1 / 關閉=0
RWater = 0   //沒紅水自動回卷, 並停止程式_ 啟用=1 / 關閉=0
teamv = 1    //自動關閉teamviewer視窗(螢幕解析度1600*900才有作用)_ 啟用=1 / 關閉=0
Aoffline = 1 //斷線自連開關_ 啟用=1 / 關閉=0
SMail = 1    //自動定時收信開關_ 啟用=1 / 關閉=0 (收信時間 09:30 /12:30 / 18:30 21:30 )
//------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------
FindColor 0,0,638,330,"201B1C",WinX,WinY
WinX = WinX - 1
WinY = WinY - 1

hp_C1 = 1
hp_C2 = 1
k = 0

hp = hp * 1.9 + 84 + WinX
hph = hph * 1.9 + 84 + WinX
hph2 = hph2 * 1.9 + 84 + WinX
mp = mp * 2 + 77 + WinX
mph = mph * 2 + 77 + WinX

MoveTo 645 + WinX, 411 + WinX
LeftClick 1
Delay 100

//HP 判斷
FindColorEx 92 + WinX, 53 + WinY, 277 + WinX, 62 + WinY, "000AFF", 2, 0.3, hpX, hpY
If hpX > hph then hp_C1 = 0
FindColorEx 92 + WinX, 53 + WinY, 277 + WinX, 62 + WinY, "004B00", 2, 0.3, hpX, hpY
If hpX > hph Then hp_C2 = 0

Do While hp_C1 = 0 OR hp_C2 = 0
// 被攻擊瞬移
If KillFiy = 1 then
FindColorEx 1198 + WinX,571 + WinY,1209 + WinX,581 + WinY,"94A0FF",0,0.7,intX,intY
If intX > 0 And intY > 0 Then
If PicCapture = 1 Then Call PicSave
   Do While intX > 0 And intY > 0
      keyPress "F8", 1
      Delay 200
      FindColorEx 1198 + WinX,571 + WinY,1209 + WinX,581 + WinY,"94A0FF",0,0.7,intX,intY
   Loop
End If
End if
// 沒怪 瞬移
If FlyMove = 1 then
FindColorEx 1081 + WinX,532 + WinY,1086 + WinX,537 + WinY,"B4B4B5",0,0.7,intAX,intAY
FindColorEx 1174 + WinX,377 + WinY,1222 + WinX,410 + WinY,"72A3FF",0,0.5,intX,intY
If intX < 0 And intAX > 0 Then
       If k=0 then
             KeyPress "F8", 1
       end if   
   Delay 1000
   k=k+1
else k=0 
End If
If k = FlyS Then k = 0
End If

//解毒術
If Poison = 1 then
FindColorEx 92 + WinX, 53 + WinY, 276 + WinX, 62 + WinY, "004B00", 0, 0.5, mpX, mpY
If mpX > 0 Then
         KeyPress "F1", 1
         Delay 2000
End If
End if
hp_C1 = 0
hp_C2 = 0

//HP < 40% 回卷
If GoHome = 1 then
FindColorEx 92 + WinX, 53 + WinY, 277 + WinX, 62 + WinY, "000AFF", 2, 0.3, hpX, hpY
If hpX>0 and hpX < hph then hp_C1 = 1
FindColorEx 92 + WinX, 53 + WinY, 277 + WinX, 62 + WinY, "004B00", 2, 0.3, hpX, hpY
If hpX>0 and hpX < hph Then hp_C2 = 1
If hp_C1 = 1 or hp_C2 = 1 Then Exit Do
End If


hp_C1 = 0
hp_C2 = 0
//HP < 60% 高治 / 橙水
If OWater = 1 then
   FindColorEx 92 + WinX, 53 + WinY, 277 + WinX, 62 + WinY, "000AFF", 2, 0.3, hpX, hpY
   If hpX>0 and hpX < hph2 then hp_C1 = 1
   FindColorEx 92 + WinX, 53 + WinY, 277 + WinX, 62 + WinY, "004B00", 2, 0.3, hpX, hpY
   If hpX>0 and hpX < hph2 Then hp_C2 = 1
   If hp_C1 = 1 or hp_C2 = 1 Then
        KeyPress "F2", 1
        Delay 1000
   End if
End If

// 沒箭_回卷
If Arrow = 1 then
FindColorEx 1103 + WinX,639 + WinY,1111 + WinX,649 + WinY,"393939", 0,0.9, intX,intY
If intX> 0 And intY> 0 Then
    exit do
End If
End if
// 沒水_回卷
if RWater = 1 then
FindColorEx 959 + WinX, 672 + WinY, 961 + WinX, 674 + WinY, "303073", 0,0.5, inthpX, inthpY
If inthpX> 0 And inthpY> 0 Then
    exit do
End If
End if
i = 0

//hp>85%  mp<58% 魂體轉換
If HpSwapMp = 1 then
FindColorEx 92 + WinX, 53 + WinY, 277 + WinX, 62 + WinY, "000AFF", 2, 0.3, hpX, hpY
If hpX > hp  Then
     FindColorEx 77 + WinX, 71 + WinY, 277 + WinX, 76 + WinY, "FFFF00", 0, 0.1, mpX, mpY
     If mpX < mph   
                 KeyPress "F3", 1
                 Delay 3000
                 i = i + 1
     End If
End If
End If

// MP>60% 放魔法(三重矢)
If Magic3 = 1 then
FindColorEx 1081 + WinX,532 + WinY,1086 + WinX,537 + WinY,"B4B4B5",0,0.7,intAX,intAY
FindColorEx 77 + WinX, 71 + WinY, 277 + WinX, 76 + WinY, "FFFF00", 0, 0.1, mpX, mpY
If mpX > mp  and intAX < 0 Then
     KeyPress "F4", 1
     Delay 2000
     i = i + 1
End If
End if

If i = 0 Then
Delay 200
End If

//關閉teamviewer視窗
If teamv = 1 then
IfColor 582, 405, "EE8E20", 0 Then
    MoveTo 985, 484
    LeftClick 1
End If
End If

If Aoffline = 1 then Call offline
if SMail = 1 then call Mail 
loop
    KeyPress "F6", 1
    EndScript
   
   
Sub offline

FindColor 701 + WinX, 617 + WinY, 720 + WinX, 634 + WinY, "4C301E", intX, intY //連線失敗確認
If intX > 0 And intY > 0 Then
FindColorEx 22 + WinX, 41 + WinY, 42 + WinX, 67 + WinY, "76350B", 0, 0.8, LvX, LvY //等級輔助色塊

do
If intX > 0 And LvX > 0 Then
        MoveTo 705 + WinX, 623 + WinY
        LeftClick 1
        Delay 30000
End If
FindColor 701 + WinX, 617 + WinY, 720 + WinX, 634 + WinY, "4C301E", intX, intY
FindColorEx 22 + WinX, 41 + WinY, 42 + WinX, 67 + WinY, "76350B", 0, 0.8, LvX, LvY
Loop Until intX < 0 And LvX < 0

do while LvX < 0 And LvY < 0

FindColor 1239 + WinX, 702 + WinY, 1268 + WinX, 732 + WinY, "4EB9FC", intX, intY //廣告XX
       if intX > 0 And intY > 0 then
                MoveTo 1250 + WinX, 715 + WinY
                LeftClick 1
                Delay 300
       end if
       
FindColorEx 655 + WinX,552 + WinY,705 + WinX,581 + WinY,"A5BFD3",0,0.8,intX,intY //輕觸畫面
           if intX > 0 And intY > 0 then
                MoveTo 670 + WinX, 570 + WinY
                LeftClick 1
                Delay 300
           end if           


FindColorEx 1156 + WinX,684 + WinY,1177 + WinX,704 + WinY,"4D311E",0,0.8,intX,intY //人物進入
         if intX > 0 And intY > 0 then
                MoveTo 1165 + WinX, 695 + WinY
                LeftClick 1
         End If

FindColorEx 22 + WinX, 41 + WinY, 42 + WinX, 67 + WinY, "76350B", 0, 0.8, LvX, LvY

loop

Delay 2000
MoveTo 970 + WinX, 540 + WinY
LeftClick 1

End If

End Sub

Sub PicSave
Set Obj = createobject("WScript.Shell")
FileName = Obj.SpecialFolders("desktop")
t = Plugin.Sys.GetDateTime()
t=Left(t, 4) & mid(t,6,2) & mid(t,9,2) & "_" & mid(t,12,2) & mid(t,15,2) & mid(t,18,2)
Call Plugin.Pic.PrintScreen(0, 0,1280 , 720, FileName & "\截圖\" & t & ".jpg")
Delay 1000
End Sub

Sub Mail
t = Plugin.Sys.GetDateTime()
t = mid(t, 12, 5)
Atime = "09:30"
Btime = "12:30"
Ctime = "18:30"
Dtime = "21:30"
If Atime = t or Btime = t or Ctime = t or Dtime = t Then
FindColor 1254 + WinX,56 + WinY,1260 + WinX,62 + WinY,"2A2AFF",intX,intY //系統
If intX > 0 And intY > 0 Then
     MoveTo 1238 + WinX, 74 + WinY
     LeftClick 1
     Delay 800

FindColor 1026 + WinX,338 + WinY,1032 + WinX,344 + WinY,"2A2AFF",intX,intY //信箱
If intX > 0 And intY > 0 Then
     MoveTo 1010 + WinX, 357 + WinY
     LeftClick 1
     Delay 800
End If

FindColor 1123 + WinX,673 + WinY,1156 + WinX,699 + WinY,"4D311E",intX,intY //領取
If intX > 0 And intY > 0 Then
     MoveTo 1070 + WinX, 683 + WinY
     LeftClick 1
     Delay 800
End If

FindColor 1123 + WinX,673 + WinY,1156 + WinX,699 + WinY,"4D311E",intX,intY //關閉
If intX < 0 And intY < 0 Then
     MoveTo 1238 + WinX, 75 + WinY
     LeftClick 1
     Delay 800
     LeftClick 1
     Delay 800
End If
End If
End If
End Sub



不是夜神模擬器好像不能用, 圖塊顏色會錯誤, 不信可以試試, 也許能用










留言

  1. 求救!!
    沒水回捲後不會自動停止程式

    回覆刪除
  2. 請問,按鍵精靈是哪一種,去哪下載呢?謝謝

    回覆刪除
  3. 雖然很久遠了 我記得模擬器 剛開啟時他是置放於螢幕的中央 其實不用去拉他 這樣也可以寫按鍵適用於前台

    回覆刪除
  4. 大大您好,沒怪瞬移不能用...。
    自己嘗試去修改數值...但還是沒有任何反應...
    秒數也設定 1~6秒 都沒有任何反應...。
    請問要怎麼改..謝謝。
    然後跑馬燈的位置都會出現使用不正確。
    瞬間移動 魔法 還是卷軸 都用過 放F8
    不過都沒有反應。

    謝謝您的分享,也想寫不過怎麼寫都寫不出來。

    回覆刪除

張貼留言

這個網誌中的熱門文章

智慧QC檢驗表單

DHT22 濕度校正