Untitled
Guest 87 15th Apr, 2024
// ==UserScript==
// @name AUTOHEAL NOWY INTERFEJS
// @version 1.0
// @author PAPIG TO NIGGER
// @match https://tempest.margonem.pl/
// @grant none
// ==/UserScript==
(async (window, sleep) => {
const useItem = (item) => {
const {
id
} = item;
window._g(`moveitem&st=1&id=${id}`);
}
const autoHeal = async () => {
while (true) {
if (!Engine.allInit) {
await sleep(2000);
continue;
}
let hp = parseInt(document.querySelector('.hpp > .value').getInnerHTML());
const potions = Engine.items.fetchLocationItems("g")
.filter(item => item._cachedStats.hasOwnProperty("fullheal") || item._cachedStats.hasOwnProperty("leczy"));
if (hp < 70) {
if (potions != undefined) {
useItem(potions[0]);
}
}else break;
await sleep(150);
}
}
window.API.addCallbackToEvent("close_battle", autoHeal);
})(typeof unsafeWindow !== "undefined" ? unsafeWindow : window, (ms) => new Promise((resolve) => setTimeout(resolve, ms)))
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- C.H.1.L.Ds Vids-Pics Updated May 09
Markup | 10 | 6 hours ago
- Как повлияла пандемия на куринные крылышки
Dart | 15 | 12 hours ago
- Wanted to apprehend what your conception is on this point
Smarty | 14 | 14 hours ago
- Untitled
Markup | 126 | 19 hours ago
- Untitled
Markup | 24 | 19 hours ago
- Автосервис Ярославль
Bro | 116 | 19 hours ago
- Untitled
C# | 25 | 23 hours ago