v0.17.5 - jpx bridge: verify M keybind lands + log mob count
Adds a probe after dispatching the synthetic M keydown: compares jpx's active state before/after 700ms and logs ✅ registered or ❌ keybind miss. This distinguishes 'M not reaching jpx' from 'jpx not chaining'.
This commit is contained in:
parent
4d29215e71
commit
5012d5f74f
5 changed files with 39 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.17.4
|
// @version 0.17.5
|
||||||
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
|
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.17.4';
|
const VERSION = '0.17.5';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle strategy advisory
|
// — Battle strategy advisory
|
||||||
|
|
@ -1606,7 +1606,17 @@ function jpxTriggerAuto() {
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
cancelable: true,
|
cancelable: true,
|
||||||
});
|
});
|
||||||
|
// Give jpx a moment to process, then verify via its own state event.
|
||||||
|
// If it didn't toggle, the keybind didn't reach jpx.
|
||||||
|
const before = jpxLastActive;
|
||||||
document.dispatchEvent(evt);
|
document.dispatchEvent(evt);
|
||||||
|
setTimeout(() => {
|
||||||
|
if (jpxLastActive !== before) {
|
||||||
|
console.log(`%c[HV] ✅ M registered (active: ${before} → ${jpxLastActive})`, 'color:#0f0');
|
||||||
|
} else {
|
||||||
|
console.log(`%c[HV] ❌ M ignored by jpx (still active: ${jpxLastActive}) — keybind miss`, 'color:#f44');
|
||||||
|
}
|
||||||
|
}, 700);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('[HV] jpxTriggerAuto failed:', e.message);
|
console.warn('[HV] jpxTriggerAuto failed:', e.message);
|
||||||
|
|
@ -1667,7 +1677,7 @@ function jpxChainOnState(detail) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
jpxChainWaiting = false;
|
jpxChainWaiting = false;
|
||||||
setTimeout(jpxTriggerAuto, 200);
|
setTimeout(jpxTriggerAuto, 200);
|
||||||
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''}`, 'color:#0f0');
|
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''} (${jpxMonstersPresent()} mobs)`, 'color:#0f0');
|
||||||
} else if (waited > 8000 || jpxBattleOver()) {
|
} else if (waited > 8000 || jpxBattleOver()) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
jpxChainWaiting = false;
|
jpxChainWaiting = false;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.17.4
|
// @version 0.17.5
|
||||||
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
|
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.17.4';
|
const VERSION = '0.17.5';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle strategy advisory
|
// — Battle strategy advisory
|
||||||
|
|
@ -1606,7 +1606,17 @@ function jpxTriggerAuto() {
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
cancelable: true,
|
cancelable: true,
|
||||||
});
|
});
|
||||||
|
// Give jpx a moment to process, then verify via its own state event.
|
||||||
|
// If it didn't toggle, the keybind didn't reach jpx.
|
||||||
|
const before = jpxLastActive;
|
||||||
document.dispatchEvent(evt);
|
document.dispatchEvent(evt);
|
||||||
|
setTimeout(() => {
|
||||||
|
if (jpxLastActive !== before) {
|
||||||
|
console.log(`%c[HV] ✅ M registered (active: ${before} → ${jpxLastActive})`, 'color:#0f0');
|
||||||
|
} else {
|
||||||
|
console.log(`%c[HV] ❌ M ignored by jpx (still active: ${jpxLastActive}) — keybind miss`, 'color:#f44');
|
||||||
|
}
|
||||||
|
}, 700);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('[HV] jpxTriggerAuto failed:', e.message);
|
console.warn('[HV] jpxTriggerAuto failed:', e.message);
|
||||||
|
|
@ -1667,7 +1677,7 @@ function jpxChainOnState(detail) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
jpxChainWaiting = false;
|
jpxChainWaiting = false;
|
||||||
setTimeout(jpxTriggerAuto, 200);
|
setTimeout(jpxTriggerAuto, 200);
|
||||||
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''}`, 'color:#0f0');
|
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''} (${jpxMonstersPresent()} mobs)`, 'color:#0f0');
|
||||||
} else if (waited > 8000 || jpxBattleOver()) {
|
} else if (waited > 8000 || jpxBattleOver()) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
jpxChainWaiting = false;
|
jpxChainWaiting = false;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.17.4';
|
const VERSION = '0.17.5';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle strategy advisory
|
// — Battle strategy advisory
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.17.4
|
// @version 0.17.5
|
||||||
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
|
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,17 @@ function jpxTriggerAuto() {
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
cancelable: true,
|
cancelable: true,
|
||||||
});
|
});
|
||||||
|
// Give jpx a moment to process, then verify via its own state event.
|
||||||
|
// If it didn't toggle, the keybind didn't reach jpx.
|
||||||
|
const before = jpxLastActive;
|
||||||
document.dispatchEvent(evt);
|
document.dispatchEvent(evt);
|
||||||
|
setTimeout(() => {
|
||||||
|
if (jpxLastActive !== before) {
|
||||||
|
console.log(`%c[HV] ✅ M registered (active: ${before} → ${jpxLastActive})`, 'color:#0f0');
|
||||||
|
} else {
|
||||||
|
console.log(`%c[HV] ❌ M ignored by jpx (still active: ${jpxLastActive}) — keybind miss`, 'color:#f44');
|
||||||
|
}
|
||||||
|
}, 700);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('[HV] jpxTriggerAuto failed:', e.message);
|
console.warn('[HV] jpxTriggerAuto failed:', e.message);
|
||||||
|
|
@ -120,7 +130,7 @@ function jpxChainOnState(detail) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
jpxChainWaiting = false;
|
jpxChainWaiting = false;
|
||||||
setTimeout(jpxTriggerAuto, 200);
|
setTimeout(jpxTriggerAuto, 200);
|
||||||
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''}`, 'color:#0f0');
|
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''} (${jpxMonstersPresent()} mobs)`, 'color:#0f0');
|
||||||
} else if (waited > 8000 || jpxBattleOver()) {
|
} else if (waited > 8000 || jpxBattleOver()) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
jpxChainWaiting = false;
|
jpxChainWaiting = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue