Twitch 自動領取掉寶 / Auto Receive Drops

Twitch 自動領取 (掉寶/Drops) , 窗口標籤顯示進度 , 直播結束時還沒領完 , 會自動尋找任意掉寶直播 , 並開啟後繼續掛機 , 代碼自訂義設置

ของเมื่อวันที่ 14-11-2024 ดู เวอร์ชันล่าสุด

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey to install this script.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

ผู้เขียน
Canaan HS
คะแนน
0 0 0
เวอร์ชัน
0.0.15
สร้างเมื่อ
08-09-2023
อัปเดตเมื่อ
14-11-2024
Size
24.9 กิโลไบต์
สัญญาอนุญาต
MIT
ปรับใช้กับ

自動領取 Twitch 的 Drops


當 Twitch 修改頁面元素, 有可能造成功能失效, 就需要重新配置 (有問題可反饋)

大致說明

  • 使用方式

開啟觀看掉寶的直播, 同時開啟 https://www.twitch.tv/drops/inventory 頁面, 並確保 Tampermonkey 中載入了此腳本, 即可放置於後台等待自動領取


  • 自動重啟直播說明

當代碼配置選項 RestartLive 是 True 時會啟用該功能 , 當 inventory 頁面 "存在掉寶進度" 時 , 每次刷新都會進行紀錄 , 如果進度始終沒有變化 , 且沒變化的時間 大於等於 JudgmentInterval 的配置時間 , 將會判斷為直播中斷 , 進而重啟直播

  • 盡量不要設置語言篩選可能導致找不到

  • 會根據找到的頻道的 Tags , 是否與 FindTag 設置的文字匹配 , 只要有匹配到就會開啟第一個匹配的直播

  • 重啟直播如果是第二次之後運行的 , 他會自動關閉前一次運行的窗口 , 始終只保持一個直播窗口 (如果是使用者自行開啟的, 將不會被自動關閉)


  • EndAutoClose 說明

  • 當被紀錄的掉寶進度完成後, 會自動關閉窗口

  • 沒有被紀錄的掉寶進度, 無論怎麼刷新都不會觸發關閉


  • ClearExpiration 說明

這是針對活動時間已經過期的掉寶對象進行清除, 但因為該功能需要判斷時間戳, 針對不同語言時間戳的格式又不同 目前只有支援特定幾種語言, 不在支援內的就不會有效果

支援語言 (實驗性) : en-US , en-GB , es-ES , fr-FR , pt-PT , pt-BR , ru-RU , de-DE , it-IT , tr-TR , es-MX , ja-JP , ko-KR , zh-TW , zh-CN


可自定配置參數

⚠️ 個人使用上有問題, 請先嘗試自定配置參數, 這只是一個很簡單的腳本, 沒有針對不同環境適應變化的功能

RestartLive : 使用自動重啟直播 [預設: True]
EndAutoClose : 所有掉寶活動完成後自動關閉窗口 [預設: True]
TryStayActive : "嘗試" 讓窗口始終處於活躍狀態, 不會被自動停止 [預設: True]
RestartLiveMute : 重啟直播後靜音 (不一定有效 or 比較慢運作) [預設: True]
RestartLowQuality : 重啟直播自動條到最低畫質 [預設: False]

UpdateDisplay : 顯示檢查掉寶的間隔倒數, 在網頁標籤 [預設: True]
ClearExpiration : 清除過期活動的掉寶進度 [預設: True]
ProgressDisplay : 在網頁標籤顯示掉寶進度 [預設: True]

UpdateInterval : 檢查掉寶的間隔, 每經過該配置的時間, 會自動重整頁面 [預設: 90 秒]
JudgmentInterval : 重啟直播參數, 經過多常時間後, 進度無變化時觸發重啟 [預設: 5 分]

DropsButton : 當 Twitch 改變網頁格式, 找不到領取按鈕時, 就修改這邊
FindTag : 重啟直播需要的, 會找尋含有設置文字的 Tag 標籤, 並開啟直播 (查找直播的頁面不要指定語言, 有可能找不到)

版本更新資訊

version      0.0.15-Beta3

1. 修改 主函數 載入框架與邏輯
2. 調整 TryStayActive 部份邏輯
3. 修改 EndAutoClose 觸發邏輯
4. 修改 UpdateDisplay 為只負責顯示, 刷新不由他觸發 (避免後台限制導致 時間不準確)
5. 修改 RestartLive 和 ProgressDisplay 觸發對象邏輯 (原: 掉寶進度中最高對象) => (改: 動態切換當前進行中任務)

已知問題:

1.目前插件的 GM_notification 有些問題, 依賴該 API 的功能實現, 可能無法正常運行