Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dimenv Counts
- DimEnv counts_min
- DimEnv StartTime
- DimEnv Custom
- Counts = ""
- Event Form1.Load
- Form1.Timer1.Enabled = 0
- Counts = ""
- Form1.Timer1.Interval = 1000
- END Event
- Event Form1.Button1.Click
- Form1.Timer1.Enabled = 0
- Form1.Timer1.Enabled = 1
- Form1.Logo.Picture = "Attachment:\Logo.bmp"
- END Event
- Event Form1.Timer1.TIMER
- Counts = Counts + 1000
- IF INT(counts) <= 60000 THEN
- Form1.Label5.Caption = "秒鐘"
- Form1.counts.Caption = counts / 1000
- ELSE
- Form1.Label5.Caption = "分鐘"
- Form1.counts.Caption = INT(counts / 60000)
- END IF
- Custom = Form1.InputBox1.Text
- Custom = INT(Custom)
- counts_min = INT(counts / 60000)
- END Event
- ///////////////////////事件區/////////////////////////////
- time_restart = Form1.OptionBox1.Value
- auto_restart = Form1.OptionBox2.Value
- hwnd = Plugin.WINDOW.Find(0, "Path of Exile")
- CALL Plugin.WINDOW.Move(hwnd, 0, 0)
- IF time_restart = 1 THEN
- CALL 重啟POE
- DO
- WHILE custom = counts_min
- //-----------------------------------------------------------------------------關閉EB
- EB_windows = Plugin.WINDOW.Search("Exiled Bot")
- EB = split(EB_windows, "|")
- EBEX = Plugin.WINDOW.FindEx(EB(0), 0, "DirectUIHWND", 0)
- CALL Plugin.Memory.TerminateProc(EBEX)
- CALL Plugin.Memory.TerminateProc(EB(0))
- //-----------------------------------------------------------------------------
- Delay 500
- //-----------------------------------------------------------------------------關閉POE
- POE = Plugin.WINDOW.Find(0, "Path of Exile")
- CALL Plugin.Memory.TerminateProc(POE)
- //-----------------------------------------------------------------------------
- Delay 15000
- CALL 重啟POE
- Counts = ""
- WEND
- Delay 30000
- LOOP
- ELSEIF auto_restart = 1 THEN
- DO
- CALL 判斷POE
- Delay 15000
- CALL 重啟POE
- LOOP
- END IF
- ///////////////////////副程式/////////////////////////////
- CALL Plugin.WINDOW.Top(Hwnd, 0)
- CALL Plugin.WINDOW.Top(Hwnd, 1)
- SUB 重啟POE
- Rem A
- TracePrint "重啟遊戲中..."
- //-----------------------------------------------------------------------------重啟POE
- hwnd = Plugin.WINDOW.Find(0, "Path of Exile")
- sWindow = Plugin.WINDOW.IsWindow(Hwnd)
- IF sWindow = 0 THEN
- hwnd2 = Plugin.WINDOW.Find("UIHOST", 0)
- CALL Plugin.WINDOW.Show(Hwnd2)
- CALL Plugin.Bkgnd.LeftClick(hwnd2, 308, 578)
- Delay 10000
- hwnd = Plugin.WINDOW.Find(0, "Path of Exile")
- CALL Plugin.WINDOW.Move(hwnd, 0, 0)
- END IF
- //-----------------------------------------------------------------------------
- //-----------------------------------------------------------------------------判斷進入POE
- FindPic 623, 592, 803, 627, "Attachment:\open2.bmp", 0.8, int2X, int2Y
- FindPic 512, 560, 569, 603, "Attachment:\shop.bmp", 0.8, gameX, gameY
- DO UNTIL int2X > 0 AND int2Y > 0
- TracePrint "Loading...中"
- hwnd = Plugin.WINDOW.Find(0, "Path of Exile")
- CALL Plugin.WINDOW.Top(hwnd, 0)
- sWindow = Plugin.WINDOW.IsWindow(Hwnd)
- IF sWindow = 0
- GOTO A
- END IF
- Delay 3000
- IF gameX > 0 THEN
- EXIT DO
- END IF
- FindPic 623, 592, 803, 627, "Attachment:\open2.bmp", 0.8, int2X, int2Y
- FindPic 512,560,569,603,"Attachment:\shop.bmp",0.8,gameX,gameY
- LOOP
- //-----------------------------------------------------------------------------
- CALL restart_EB
- hwnd = Plugin.WINDOW.Find(0, "Path of Exile")
- CALL Plugin.WINDOW.Top(hwnd, 1)
- Delay 3000
- CALL Plugin.WINDOW.Move(hwnd, 0, 0)
- END SUB
- SUB 判斷POE
- DO
- TracePrint "POE進行中..."
- //-----------------------------------------------------------------------------判斷POE崩潰OR不存在
- POEprogram_crash = Plugin.WINDOW.Find(0, "Path of Exile")
- POEprogram_crashEX = Plugin.WINDOW.FindEx(POEprogram_crash, 0, "DirectUIHWND", 0)
- POE_Window = Plugin.WINDOW.IsWindow(POEprogram_crashEX)
- POE_Window2 = Plugin.WINDOW.IsWindow(POEprogram_crash)
- IF POE_Window = 1 OR POE_Window2 = 0 THEN
- CALL 重啟POE
- END IF
- //-----------------------------------------------------------------------------
- //-----------------------------------------------------------------------------判斷EB崩潰OR不存在
- EB_Window2 = 1
- EB_Window = 0
- pre_EBprogram_crash = Plugin.WINDOW.Search("ExiledBot")
- EBprogram_crash = split(pre_EBprogram_crash, "|")
- EBprogram_crashEX = Plugin.WINDOW.FindEx(EBprogram_crash(0), 0, "DirectUIHWND", 0)
- EB_Window = Plugin.WINDOW.IsWindow(EBprogram_crashEX)
- EB_Window2 = Plugin.WINDOW.IsWindow(EBprogram_crash(0))
- TracePrint EB_Window2
- IF EB_Window = 1 OR EB_Window2 = 0 THEN
- CALL Plugin.Memory.TerminateProc(EBprogram_crashEX)
- Delay 3000
- CALL restart_EB
- END IF
- //-----------------------------------------------------------------------------
- //-----------------------------------------------------------------------------判斷斷線
- FindPic 623,592,803,627,"Attachment:\open.bmp",0.8,intX,intY
- IF intX > 0 AND intY > 0 THEN
- CALL Plugin.Memory.TerminateProc(POEprogram_crash)
- TracePrint "POE斷線..."
- EXIT DO
- END IF
- //-----------------------------------------------------------------------------
- Delay 30000
- LOOP
- END SUB
- SUB restart_EB
- TracePrint "重啟EB中..."
- sWindow3 = 0
- Delay 3000
- //-----------------------------------------------------------------------------啟動EB
- EB_windows = Plugin.WINDOW.Search("Exiled Bot")
- EB = split(EB_windows, "|")
- sWindow3 = Plugin.WINDOW.IsWindow(EB(0))
- TracePrint EB(0)
- TracePrint sWindow3
- IF sWindow3 = 0 THEN
- RunApp Form1.BrowseBox1.Path
- END IF
- //-----------------------------------------------------------------------------
- Delay 5000
- EB_windows = Plugin.WINDOW.Search("Exiled Bot")
- EB = split(EB_windows,"|")
- HwndEx = Plugin.WINDOW.FindEx(EB(0), 0, "Button", "Start bot")
- CALL Plugin.Bkgnd.Leftclick(HwndEx, 10, 10)
- Delay 3000
- hwnd = Plugin.WINDOW.Find(0, "Path of Exile")
- CALL Plugin.WINDOW.Move(hwnd, 0, 0)
- END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement