|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Jun 24 2017, 14:21
|
Juggernaut Santa
Group: Gold Star Club
Posts: 11,129
Joined: 26-April 12
|
QUOTE(Sapo84 @ Jun 24 2017, 14:13) but you can probably copy the chrome mousefix from other scripts
Tried. Doesn't work.
|
|
|
|
|
|
Jun 24 2017, 14:31
|
FabulousCupcake
Group: Gold Star Club
Posts: 490
Joined: 15-April 14
|
CODE // ==UserScript== // @name HV | Relative HP Bar // @namespace http://fabulous.cupcake.jp.net // @version 0.1 // @description Visual feedback for monster hp compared to the other monsters' // @author FabulousCupcake // @match https://hentaiverse.org/?s=Battle&ss=* // @grant none // @run-at document-end // ==/UserScript==
(function() { 'use strict';
const logs = document.querySelectorAll("#textlog td"); let hpList = []; for (const log of logs) { const pattern = /Spawned Monster (\w): MID=(\d+) \((.+)\) LV=(\d+) HP=(\d+)/; const match = log.textContent.match(pattern); const hp = (match) ? match[5] : null; hpList.push(hp); } hpList = hpList.filter(Boolean); const maxHp = hpList.reduce((a,b) => Math.max(a,b)); for (let i=0; i<hpList.length; i++) { const ratio = hpList[i]/maxHp; const monster = document.querySelector(`#mkey_${i+1} .chbd`); monster.setAttribute("style", `transform: scaleX(${ratio});`); monster.style["transform-origin"] = 0; } })();
Go here for version 0.2 that actually works. This post has been edited by FabulousCupcake: Jun 24 2017, 16:25
|
|
|
|
|
|
Jun 24 2017, 15:10
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
|
QUOTE(Gambit126 @ Jun 24 2017, 10:58) To what version? I am on an outdated operating system, so my options are limited.
By the way, how is this different than the function used by the original Reloader which I was using with no problems on HV 0.84?
ideally, the latest possible. it will take me some more testing to help you any more with this, i'll let you know as soon as i figure something out QUOTE(worldendDominator2 @ Jun 24 2017, 10:56) Can you make stacked effects display as a number, instead of border? I think that would look better.
QUOTE(Fap.Fap @ Jun 24 2017, 13:57) how can I turn off the random background colours ?
i added settings to show stacks as numbers, limit alert backgrounds to the quickbar and keep player effects in their default location
HVCleanUI.1.2.1.user.js.zip ( 2.95k )
Number of downloads: 121This post has been edited by sickentide: Jun 24 2017, 15:14
|
|
|
|
|
|
Jun 24 2017, 15:24
|
Sapo84
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
|
QUOTE(End Of All Hope @ Jun 24 2017, 14:21) Tried. Doesn't work.
No idea then, and I'm no Chrome expert. (updated the script after stealing some ideas from HV No Popup, and added a quick setting from battle log hide, 99% my last (public) update on this)
|
|
|
Jun 24 2017, 15:30
|
Jack Tekila
Group: Members
Posts: 174
Joined: 17-November 09
|
QUOTE(Gambit126 @ Jun 24 2017, 05:58) To what version? I am on an outdated operating system, so my options are limited.
By the way, how is this different than the function used by the original Reloader which I was using with no problems on HV 0.84?
I'm using Firefox Portable 48.0.2 and everything is working fine.
|
|
|
|
|
|
Jun 24 2017, 15:42
|
Fap.Fap
Group: Gold Star Club
Posts: 1,551
Joined: 19-October 11
|
QUOTE(sickentide @ Jun 24 2017, 15:10) ideally, the latest possible. it will take me some more testing to help you any more with this, i'll let you know as soon as i figure something out i added settings to show stacks as numbers, limit alert backgrounds to the quickbar and keep player effects in their default location
HVCleanUI.1.2.1.user.js.zip ( 2.95k )
Number of downloads: 121how can i turn off the alerts ? its bad for the eyes ;o and the quickbar is back above the monsters, not the default location ( left side )
|
|
|
|
|
|
Jun 24 2017, 15:47
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
|
QUOTE(Fap.Fap @ Jun 24 2017, 15:42) how can i turn off the alerts ? its bad for the eyes ;o and the quickbar is back above the monsters, not the default location ( left side )
look for effectsAboveMonsters and alertBackground in the settings section at the top and change them both to false. if you absolutely cannot tolerate the alert colours even if they are limited to the quickbar, comment out this line near the bottom: CODE document.getElementById(settings.alertBackground ? 'csp' : 'quickbar').style.background = bg;
|
|
|
|
|
|
Jun 24 2017, 16:02
|
boulay
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11
|
One done (IMG:[ invalid] style_emoticons/default/faint.gif) HV Dark, v1.4 see below Changelog: Fixed > everything related to HV 0.85 added > grey hp bar when using Spark of Life added > alternative design for said bars, didn't like the new ones (IMG:[ invalid] style_emoticons/default/tongue.gif) added > a bit of code to fit sickentide's script (mainly duration readability) retired > bits of code related to pre-0.85 scripts, as they're all broken anyway retired > temporarily: HV Dark Lite NoScript, I need to rework it Do tell me if something isn't displaying properly, I'll work on it asap. probably going to fix deep sea next... This post has been edited by boulay: Jun 24 2017, 16:21
|
|
|
|
|
|
Jun 24 2017, 16:12
|
FabulousCupcake
Group: Gold Star Club
Posts: 490
Joined: 15-April 14
|
CODE // ==UserScript== // @name HV | Chain Attack // @namespace http://fabulous.cupcake.jp.net // @version 0.1 // @description Keep attacking as long as you keep hovering on the monster // @author FabulousCupcake // @match https://hentaiverse.org/?s=Battle&ss=ar&page=2 // @grant unsafeWindow // @run-at document-end // ==/UserScript==
function getMonsterUnderCursor(X, Y) { var el = document.elementFromPoint(X, Y); var result = false;
// Check `el` and iteratively its parents until we hit body or found monster while(!result) { if(el.nodeName.toLowerCase() === 'body') break; result = ( el.id.match('mkey') ? el : false ); el = el.parentElement; }
return result; }
(function() { 'use strict'; let X, Y; document.addEventListener("mousemove", (e) => { X = e.pageX; Y = e.pageY; }); function chain_commit(index) { const el = getMonsterUnderCursor(X, Y); if (!el) return; if (!el.onclick) return; const id = el.id.substr(-1); unsafeWindow.battle.commit_target(id); } const logs = document.querySelector("#textlog > tbody"); const config = { childList: true }; const observer = new MutationObserver( mutations => { chain_commit(); }); observer.observe(logs, config); })();
Whoever wants to modify or extend it (like, start attacking immediately when you hover, stop attacking Spark of Life triggered, or use spell instead of attack), feel free to do so ¯\_(ツ)_/¯
|
|
|
|
|
|
|
|
|
|
|
|
Jun 24 2017, 16:20
|
Sapo84
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
|
QUOTE(Sapo84 @ Jun 24 2017, 15:24) 99% my last (public) update on this
Yeah, sure. NOTE: Tested on Firefox 48.0.2 only Hoverplay + spell rotation + advance round + hide battle log + right click heal + disable hover on HP, MP and SP limit Since a imperil script already exists it should cover the basic mage functionality Everyone, feel free to take it and modify the hell out of it (probably if integrated with FabulousCupcake's code it should work ok with Chrome) CODE // ==UserScript== // @name MouseMagelee 0.85 // @namespace hentaiverse.org // @match *://*.hentaiverse.org/* // @run-at document-end // @grant none // ==/UserScript==
// ***THANKS*** // sickentide (HV No Popup) // sigo8 (Reloader Shim)
// SETTINGS var hideLog = true; var defaultAction = [153,152,151]; //0 for melee var minHP = 0.35; var minMP = 0.2; var minSP = 0.3; var rightClick = [311,313];
var log = document.querySelector('#textlog > tbody'); var paneCompletion = document.getElementById('pane_completion');
function canCast(id){ var el = document.getElementById(id); return !!el && el.hasAttribute('onclick'); } function setSpellAttack(id) { var caller = document.getElementById(id); window.battle.lock_action(caller, 1, 'magic', id); window.battle.set_hostile_skill(id); }
function castSupport(id) { var caller = document.getElementById(id); window.battle.lock_action(caller, 1, 'magic', id); window.battle.set_friendly_skill(id); window.battle.touch_and_go(); }
function runRightClickSpell() { for (var i = 0; i < rightClick.length; i++) { if (canCast(rightClick[i])) { castSupport(rightClick[i]); return; } } }
function reloadedEvent() { if(document.querySelector('#vbh img').width < 496*minHP) return; if(document.querySelector('#vbm img').width < 207*minMP) return; if(document.querySelector('#vbs img').width < 207*minSP) return;
if(defaultAction){ for (var i = 0; i < defaultAction.length; i++) { if (canCast(defaultAction[i])) { setSpellAttack(defaultAction[i]); break; } } }
mpane = document.getElementById('pane_monster'); var m = mpane.getElementsByClassName("btm1");
for (var j = 0; j < m.length; j++) { if (m[j].hasAttribute('onclick')) { m[j].setAttribute('onmouseover', m[j].getAttribute('onclick')); } } } function roundEndEvent() { var btcp = document.getElementById('btcp'); if (btcp){ if(document.querySelector('img[src$="finishbattle.png"]')){ var endSheet = document.createElement('style'); endSheet.innerHTML = '#btcp {display: block !important}'; document.head.appendChild(endSheet); } else{ btcp.click(); } } }
function init() { if(!log) { return; } var obs = new MutationObserver(reloadedEvent); obs.observe(log, {childList: true});
var obs2 = new MutationObserver(roundEndEvent); obs2.observe(paneCompletion, {childList: true}); //this will also skip the finish popup
var sheet = document.createElement('style'); sheet.innerHTML = '#btcp {display: none}'; if(hideLog){ sheet.innerHTML += '#pane_log {display: none}'; } document.head.appendChild(sheet);
window.addEventListener('contextmenu', function (e) { e.preventDefault(); runRightClickSpell(); }, false);
reloadedEvent(); } init(); This post has been edited by Sapo84: Jun 24 2017, 16:26
|
|
|
|
|
|
Jun 24 2017, 16:20
|
Null2Null
Group: Gold Star Club
Posts: 1,199
Joined: 8-May 11
|
QUOTE(FabulousCupcake @ Jun 24 2017, 22:12) CODE // ==UserScript== // @name HV | Chain Attack // @namespace http://fabulous.cupcake.jp.net // @version 0.1 // @description Keep attacking as long as you keep hovering on the monster // @author FabulousCupcake // @match https://hentaiverse.org/?s=Battle&ss=ar&page=2 // @grant unsafeWindow // @run-at document-end // ==/UserScript==
function getMonsterUnderCursor(X, Y) { var el = document.elementFromPoint(X, Y); var result = false;
// Check `el` and iteratively its parents until we hit body or found monster while(!result) { if(el.nodeName.toLowerCase() === 'body') break; result = ( el.id.match('mkey') ? el : false ); el = el.parentElement; }
return result; }
(function() { 'use strict'; let X, Y; document.addEventListener("mousemove", (e) => { X = e.pageX; Y = e.pageY; }); function chain_commit(index) { const el = getMonsterUnderCursor(X, Y); if (!el) return; if (!el.onclick) return; const id = el.id.substr(-1); unsafeWindow.battle.commit_target(id); } const logs = document.querySelector("#textlog > tbody"); const config = { childList: true }; const observer = new MutationObserver( mutations => { chain_commit(); }); observer.observe(logs, config); })();
Whoever wants to modify or extend it (like, start attacking immediately when you hover, stop attacking Spark of Life triggered, or use spell instead of attack), feel free to do so ¯\_(ツ)_/¯ wat a great job u did thx a lot it woooooooooooooooorks!
|
|
|
|
|
|
Jun 24 2017, 16:23
|
FabulousCupcake
Group: Gold Star Club
Posts: 490
Joined: 15-April 14
|
Actually working now with some aesthetic fixes (removed the strange vertical bar on the right side) CODE // ==UserScript== // @name HV | Relative HP Bar // @namespace http://fabulous.cupcake.jp.net // @version 0.2 // @description Visual feedback for monster hp compared to the other monsters' // @author FabulousCupcake // @match https://hentaiverse.org/?s=Battle&ss=* // @grant none // @run-at document-end // ==/UserScript==
let stylesheet = ""; stylesheet += ` .chbd > img:last-child { transform: scaleX(1.01); transform-origin: 0; } `;
function injectStylesheet(stylesheet) { var stylesheetEl = document.createElement('style'); stylesheetEl.innerHTML = stylesheet; document.body.appendChild(stylesheetEl); }
(function() { 'use strict';
const logs = document.querySelectorAll("#textlog td"); let hpList = []; for (let i=0; i<logs.length; i++) { const log = logs[i]; const pattern = /Spawned Monster (\w): MID=(\d+) \((.+)\) LV=(\d+) HP=(\d+)/; const match = log.textContent.match(pattern); const hp = (match) ? match[5] : null; hpList.push(hp); } hpList = hpList.filter(Boolean); const maxHp = hpList.reduce((a,b) => Math.max(a,b)); for (let i=0; i<hpList.length; i++) { const ratio = hpList[i]/maxHp; stylesheet += ` #mkey_${i+1} .chbd { transform-origin: 0; transform: scaleX(${ratio}); }`; } injectStylesheet(stylesheet); })();
|
|
|
|
|
|
Jun 24 2017, 16:23
|
boulay
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11
|
HV_Dark_1.4.css ( 731.7k )
Number of downloads: 262
HV_Dark_Lite_1.4.css ( 85.39k )
Number of downloads: 164
HV_Dark_NoStylish_Pack.zip ( 1k )
Number of downloads: 50 should be good now, also forgot some monster lab things (IMG:[ invalid] style_emoticons/default/cry.gif) blinking won't happen when loading through stylish, it only does when you go with the script... This post has been edited by boulay: Jun 24 2017, 19:41
|
|
|
|
|
|
Jun 24 2017, 16:32
|
Juggernaut Santa
Group: Gold Star Club
Posts: 11,129
Joined: 26-April 12
|
QUOTE(boulay @ Jun 24 2017, 16:23)
HV_Dark_1.4.css ( 731.7k )
Number of downloads: 262
HV_Dark_Lite_1.4.css ( 85.39k )
Number of downloads: 164
HV_Dark_NoStylish_Pack.zip ( 1k )
Number of downloads: 50 should be good now, also forgot some monter lab things (IMG:[ invalid] style_emoticons/default/cry.gif) blinking won't happen when loading through stylish, it only does when you go with the script... Ok, now it doesn't blink. Before it was blinking, with stylish. Good job (IMG:[ invalid] style_emoticons/default/tongue.gif) QUOTE(Sapo84 @ Jun 24 2017, 16:20) this will also skip the finish popup
Strangely, it does not. But since it's better like this, I appreciate that (IMG:[ invalid] style_emoticons/default/laugh.gif) This post has been edited by End Of All Hope: Jun 24 2017, 16:36
|
|
|
|
|
|
Jun 24 2017, 16:59
|
Noni
Group: Catgirl Camarilla
Posts: 12,948
Joined: 19-February 16
|
QUOTE(Sapo84 @ Jun 24 2017, 16:20) Yeah, sure. NOTE: Tested on Firefox 48.0.2 only Hoverplay + spell rotation + advance round + hide battle log + right click heal + disable hover on HP, MP and SP limit Since a imperil script already exists it should cover the basic mage functionality Everyone, feel free to take it and modify the hell out of it (probably if integrated with FabulousCupcake's code it should work ok with Chrome) CODE // ==UserScript== // @name MouseMagelee 0.85 // @namespace hentaiverse.org // @match *://*.hentaiverse.org/* // @run-at document-end // @grant none // ==/UserScript==
// ***THANKS*** // sickentide (HV No Popup) // sigo8 (Reloader Shim)
// SETTINGS var hideLog = true; var defaultAction = [153,152,151]; //0 for melee var minHP = 0.35; var minMP = 0.2; var minSP = 0.3; var rightClick = [311,313]; var log = document.querySelector('#textlog > tbody'); var paneCompletion = document.getElementById('pane_completion');
function canCast(id){ var el = document.getElementById(id); return !!el && el.hasAttribute('onclick'); } function setSpellAttack(id) { var caller = document.getElementById(id); window.battle.lock_action(caller, 1, 'magic', id); window.battle.set_hostile_skill(id); }
function castSupport(id) { var caller = document.getElementById(id); window.battle.lock_action(caller, 1, 'magic', id); window.battle.set_friendly_skill(id); window.battle.touch_and_go(); }
function runRightClickSpell() { for (var i = 0; i < rightClick.length; i++) { if (canCast(rightClick[i])) { castSupport(rightClick[i]); return; } } }
function reloadedEvent() { if(document.querySelector('#vbh img').width < 496*minHP) return; if(document.querySelector('#vbm img').width < 207*minMP) return; if(document.querySelector('#vbs img').width < 207*minSP) return;
if(defaultAction){ for (var i = 0; i < defaultAction.length; i++) { if (canCast(defaultAction[i])) { setSpellAttack(defaultAction[i]); break; } } }
mpane = document.getElementById('pane_monster'); var m = mpane.getElementsByClassName("btm1");
for (var j = 0; j < m.length; j++) { if (m[j].hasAttribute('onclick')) { m[j].setAttribute('onmouseover', m[j].getAttribute('onclick')); } } } function roundEndEvent() { var btcp = document.getElementById('btcp'); if (btcp){ if(document.querySelector('img[src$="finishbattle.png"]')){ var endSheet = document.createElement('style'); endSheet.innerHTML = '#btcp {display: block !important}'; document.head.appendChild(endSheet); } else{ btcp.click(); } } }
function init() { if(!log) { return; } var obs = new MutationObserver(reloadedEvent); obs.observe(log, {childList: true});
var obs2 = new MutationObserver(roundEndEvent); obs2.observe(paneCompletion, {childList: true}); //this will also skip the finish popup
var sheet = document.createElement('style'); sheet.innerHTML = '#btcp {display: none}'; if(hideLog){ sheet.innerHTML += '#pane_log {display: none}'; } document.head.appendChild(sheet);
window.addEventListener('contextmenu', function (e) { e.preventDefault(); runRightClickSpell(); }, false);
reloadedEvent(); } init(); Very very nice! HV is playable again! So, any advice on how to divide the bounty that I set? Or are we planning to do a crowdfunding? Everybody, please let me know your opinion! Edit: quick fix: Change in AltlessCasting: in settings: row = '5' pad = 'qb' and then you have the same way of imperil play of 2 5 8 back! This post has been edited by DJNoni: Jun 24 2017, 17:15
|
|
|
|
|
|
Jun 24 2017, 17:02
|
Juggernaut Santa
Group: Gold Star Club
Posts: 11,129
Joined: 26-April 12
|
QUOTE(DJNoni @ Jun 24 2017, 16:59) So, any advice on how to divide the bounty that I set? Or are we planning to do a crowdfunding? Everybody, please let me know your opinion!
Isn't it the same? A bounty crowfunding?
|
|
|
|
|
|
Jun 24 2017, 17:19
|
Jack Tekila
Group: Members
Posts: 174
Joined: 17-November 09
|
QUOTE(boulay @ Jun 24 2017, 11:23)
HV_Dark_1.4.css ( 731.7k )
Number of downloads: 262
HV_Dark_Lite_1.4.css ( 85.39k )
Number of downloads: 164
HV_Dark_NoStylish_Pack.zip ( 1k )
Number of downloads: 50 should be good now, also forgot some monter lab things (IMG:[ invalid] style_emoticons/default/cry.gif) blinking won't happen when loading through stylish, it only does when you go with the script... How to use it? Never used a HV Theme before and it looks different from the others scripts. Tried to copy/paste both Dark and Dark Lite on greasemonkey (Firefox 48.0.2), but it didn't work... What is the difference between them? What is this NoStylish?
|
|
|
|
|
|
Jun 24 2017, 17:26
|
Sapo84
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
|
QUOTE(End Of All Hope @ Jun 24 2017, 16:32) Strangely, it does not. But since it's better like this, I appreciate that (IMG:[ invalid] style_emoticons/default/laugh.gif) I copied HV No Popup code to exclude the last round skip but forgot to remove the comment. And I agree it's better like that (IMG:[ invalid] style_emoticons/default/heh.gif)
|
|
|
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|