|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Jun 25 2017, 02:36
|
Tamao Serizawa
Group: Gold Star Club
Posts: 119
Joined: 15-February 12
|
QUOTE(Sapo84 @ Jun 25 2017, 00:50) // ==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]; //var defaultAction =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');
Question. 1) Is it possible to add middleclick like hoverplay used to? 2) Does the max spell can be used would be 3? can I used 4 instead? e.g. var defaultAction = [232,221,213,212];
|
|
|
|
|
|
Jun 25 2017, 02:37
|
dairyman20111889
Group: Members
Posts: 430
Joined: 27-April 09
|
So I'm catching up with the new scripts that have appeared in here since the patch and I'm glad that the 258 Imperil & hover maging is workable!
As far as I can tell, there's no script to display monster HP, and no script that allows the scroll wheel to cast spells like CracklingCast used to; is that true? Just making sure I didn't miss anything.
|
|
|
|
|
|
Jun 25 2017, 02:39
|
SidZBear
Group: Gold Star Club
Posts: 560
Joined: 31-May 16
|
Ugh, this patch has made want to try write my own scripts... But I haven't written a line of code in over a decade >.<
Also, looking through source codes leads me to believe that HP calculations ARE done server side, and no numbers relating to it come back to the user. Best we could do would be something taking a snapshot of your HP every time you visit character page (or on a regular basis, whatever), and approximates it based on the pixel count of the green bar. Also, it looks like a function to do a pixel count of said green bar will be required, and the width doesn't seem to be broadcast back in the page source unlike the red/blue bars. Wouldn't be perfect, but should be able to get within +/- .2%
also regretting deleting all my .84 scripts, now I can't rip them apart and re-purpose them *sadpanda*
|
|
|
|
|
|
Jun 25 2017, 02:46
|
Scremaz
Group: Gold Star Club
Posts: 24,304
Joined: 18-January 07
|
QUOTE(SidZBear @ Jun 25 2017, 02:39) also regretting deleting all my .84 scripts, now I can't rip them apart and re-purpose them *sadpanda*
what do you need exactly? btw: here comes the thread to discuss about a whole hovering script: https://forums.e-hentai.org/index.php?showtopic=207054This post has been edited by Scremaz: Jun 25 2017, 02:47
|
|
|
|
|
|
Jun 25 2017, 02:46
|
Juggernaut Santa
Group: Gold Star Club
Posts: 11,129
Joined: 26-April 12
|
QUOTE(SidZBear @ Jun 25 2017, 02:39) Best we could do would be something taking a snapshot of your HP every time you visit character page (or on a regular basis, whatever), and approximates it based on the pixel count of the green bar. Also, it looks like a function to do a pixel count of said green bar will be required, and the width doesn't seem to be broadcast back in the page source unlike the red/blue bars. Wouldn't be perfect, but should be able to get within +/- .2%
Dude, that's what I said few posts above (IMG:[ invalid] style_emoticons/default/laugh.gif) QUOTE(End Of All Hope @ Jun 25 2017, 01:36) A script that checks your hp when you visit the character page and then calculates, in battle, current pixel of the hp bar/max pixel of the hp bar * last checked hp, rounded down, giving you your approximate health? Not sure if possible, but probably yes.
^ xD
|
|
|
|
|
|
Jun 25 2017, 02:48
|
SidZBear
Group: Gold Star Club
Posts: 560
Joined: 31-May 16
|
QUOTE(End Of All Hope @ Jun 24 2017, 17:46) Dude, that's what I said few posts above (IMG:[ invalid] style_emoticons/default/laugh.gif) For some reason my brain interpreted it as a suggestion based on assumtions, which I was trying to confirm. mah bad >.< QUOTE(Scremaz @ Jun 24 2017, 17:46) what do you need exactly?
Not to go get them again, lest my wife kill me in the morning for never going to bed.
|
|
|
|
|
|
Jun 25 2017, 02:51
|
Muddybug
Group: Gold Star Club
Posts: 463
Joined: 28-March 17
|
QUOTE(qberg @ Jun 24 2017, 12:31) I'm feeling stupid, but how one is supposed to use it? I tred to put the script into a notepad, save it as .js and drag&drop into Greasemonkey the way Reloader worked previously, but this time Greasemonkey says the script is damaged or something. What am I doing wrong?
Add these two lines below // @namespace .. CODE // @version 0.2 // @description Anything you want here.
|
|
|
|
|
|
Jun 25 2017, 03:28
|
Sapo84
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
|
QUOTE(Tamao Serizawa @ Jun 25 2017, 02:36) Question. 1) Is it possible to add middleclick like hoverplay used to? 2) Does the max spell can be used would be 3? can I used 4 instead? e.g. var defaultAction = [232,221,213,212];
1) sure, anyone can probably mod it with relative ease 2) how many do you want Anyway, added dmyers59's code, RED bars when minXX is triggered, effect duration and left aligned hp bar. Also commented the options. I may borrow some other coders' work for fixing Chrome but that's it, I don't think I would work on it anymore. CODE // ==UserScript== // @name MouseMagelee 0.85 // @namespace hentaiverse.org // @version 0.1 // @description Something something hoverplay // @match *://*.hentaiverse.org/* // @run-at document-end // @grant none // ==/UserScript==
// ***THANKS*** // sickentide (HV No Popup) // sigo8 (Reloader Shim) // dmyers59 (@version and #description
// SETTINGS var hideLog = true; // hide battle log var defaultAction = [153,152,151]; //0 for melee, array of spell id for mage (check Crackling Cast for the list of spells id) var minHP = 0.35; // lower than fullHP X this value hover stops var minMP = 0.2; // lower than fullMP X this value hover stops var minSP = 0.3; // lower than fullSP X this value hover stops var rightClick = [311,313]; // spell to cast on right click var iconGem = true; // show gem above Focus button var showDuration = true; // show the duration of the applied effects var leftHp = true; //align HP bar left
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 applyDuration() { var targets = document.querySelectorAll('img[onmouseover^="battle.set_infopane_effect"]'), i = targets.length; while (i--) { var duration = targets[i].getAttribute('onmouseover').match(/, ([-\d]+)\)/); if (!duration || duration < 0) duration = '-'; else duration = duration[1]; var div = targets[i].parentNode.insertBefore(document.createElement('div'), targets[i].nextSibling); div.appendChild(document.createElement('div')).innerHTML = duration; div.className = 'duration'; }}
function showGem() { var gem = document.getElementById('ikey_p'); var gem_icon = document.getElementById('gem_icon'); if (gem && !gem_icon) { var icon; switch (document.querySelector('#ikey_p > div > div').innerHTML.match(/([^\s]+) Gem/)[1]) { case 'Mystic': icon = 'channeling.png'; break; case 'Health': icon = 'healthpot.png'; break; case 'Mana': icon = 'manapot.png'; break; case 'Spirit': icon = 'spiritpot.png'; break; }
gem_icon = document.getElementById('pane_effects').appendChild(document.createElement('img')); gem_icon.src = '/y/e/' + icon; gem_icon.style.cssText = 'float: right;margin-right: 565px;';
var useGem = function() { window.battle.lock_action(gem, 1, 'items', 'ikey_p'); window.battle.set_friendly_skill('999'); window.battle.touch_and_go(); gem.remove(); gem_icon.remove(); };
gem_icon.onclick = useGem; gem_icon.onmouseover = useGem; gem_icon.id = "gem_icon"; } else if (!gem && gem_icon) { gem_icon.remove(); } }
function reloadedEvent() { if(iconGem) showGem(); if(showDuration) applyDuration(); if(document.querySelector('#vbh img').width < 496*minHP) { document.getElementById('vbh').style.backgroundColor = 'red'; return; } if(document.querySelector('#vbm img').width < 207*minMP) { document.getElementById('vbm').style.backgroundColor = 'red'; return; } if(document.querySelector('#vbs img').width < 207*minSP) { document.getElementById('vbs').style.bbackgroundColor = 'red'; 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(); } } }
var log = document.querySelector('#textlog > tbody'); var paneCompletion = document.getElementById('pane_completion');
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});
var sheet = document.createElement('style'); sheet.innerHTML = '#btcp {display: none}.duration{width:30px;display:inline-block;text-align:center;position:relative;margin-left:-30px;top:-4px}.duration>div{background:white;border:1px solid black;padding:0 2px;display:inline-block;min-width:8px;font-weight:bold;height:13px}'; if(hideLog){ sheet.innerHTML += '#pane_log {display: none}'; } if(leftHp){ sheet.innerHTML += '#vbh>div{text-align:left !important}'; } document.head.appendChild(sheet);
window.addEventListener('contextmenu', function (e) { e.preventDefault(); runRightClickSpell(); }, false);
reloadedEvent(); } init();
|
|
|
|
|
|
Jun 25 2017, 03:36
|
atn
Group: Members
Posts: 119
Joined: 11-October 11
|
QUOTE(FabulousCupcake @ Jun 24 2017, 21: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 ¯\_(ツ)_/¯ I died many time because this script How to stop this script when HP<??
|
|
|
|
|
|
Jun 25 2017, 04:36
|
Fap.Fap
Group: Gold Star Club
Posts: 1,551
Joined: 19-October 11
|
QUOTE(atn @ Jun 25 2017, 03:36) I died many time because this script How to stop this script when HP<??
u are not dying because of a script, but because you are not strong enough to survive
|
|
|
Jun 25 2017, 04:53
|
atn
Group: Members
Posts: 119
Joined: 11-October 11
|
QUOTE(Fap.Fap @ Jun 25 2017, 09:36) u are not dying because of a script, but because you are not strong enough to survive
If scicpt stop when HP<0.3 or Spark of Life triggered, I cure and can't die
|
|
|
Jun 25 2017, 04:58
|
Fap.Fap
Group: Gold Star Club
Posts: 1,551
Joined: 19-October 11
|
QUOTE(atn @ Jun 25 2017, 04:53) If scicpt stop when HP<0.3 or Spark of Life triggered, I cure and can't die
Sapo posted such a script a while ago, but its still not the fault of the script you are using but you are too weak to play on that difficulty if you fall into such a dangerzone that often.
|
|
|
|
|
|
Jun 25 2017, 05:12
|
LogJammin
Group: Catgirl Camarilla
Posts: 597
Joined: 11-October 14
|
QUOTE(Sapo84 @ Jun 24 2017, 20:28) 1) sure, anyone can probably mod it with relative ease 2) how many do you want
Anyway, added dmyers59's code, RED bars when minXX is triggered, effect duration and left aligned hp bar. Also commented the options.
I may borrow some other coders' work for fixing Chrome but that's it, I don't think I would work on it anymore.
This script is fantastic, thanks! However something in this bit seems to conflict with sickentide's HV Clean UI 1.2.1I was able to fix it by commenting out the following part of your script. I dont know enough about JS/whatever else is going on here to fix it any other way. CODE var sheet = document.createElement('style'); sheet.innerHTML = '#btcp {display: none}.duration{width:30px;display:inline-block;text-align:center;position:relative;margin-left:-30px;top:-4px}.duration>div{background:white;border:1px solid black;padding:0 2px;display:inline-block;min-width:8px;font-weight:bold;height:13px}'; if(hideLog){ sheet.innerHTML += '#pane_log {display: none}'; } if(leftHp){ sheet.innerHTML += '#vbh>div{text-align:left !important}'; } document.head.appendChild(sheet);
|
|
|
|
|
|
Jun 25 2017, 05:14
|
atn
Group: Members
Posts: 119
Joined: 11-October 11
|
QUOTE(Fap.Fap @ Jun 25 2017, 09:58) Sapo posted such a script a while ago, but its still not the fault of the script you are using but you are too weak to play on that difficulty if you fall into such a dangerzone that often.
I don't say srcipt fault, I only want whoever extend srcipt stop when HP<0.3 or Spark of Life triggered
|
|
|
|
|
|
Jun 25 2017, 05:23
|
Fap.Fap
Group: Gold Star Club
Posts: 1,551
Joined: 19-October 11
|
QUOTE(LogJammin @ Jun 25 2017, 05:12) This script is fantastic, thanks! However something in this bit seems to conflict with sickentide's HV Clean UI 1.2.1I was able to fix it by commenting out the following part of your script. I dont know enough about JS/whatever else is going on here to fix it any other way. CODE var sheet = document.createElement('style'); sheet.innerHTML = '#btcp {display: none}.duration{width:30px;display:inline-block;text-align:center;position:relative;margin-left:-30px;top:-4px}.duration>div{background:white;border:1px solid black;padding:0 2px;display:inline-block;min-width:8px;font-weight:bold;height:13px}'; if(hideLog){ sheet.innerHTML += '#pane_log {display: none}'; } if(leftHp){ sheet.innerHTML += '#vbh>div{text-align:left !important}'; } document.head.appendChild(sheet);
I just deactivated HV Clean for now This post has been edited by Fap.Fap: Jun 25 2017, 05:23
|
|
|
|
|
|
Jun 25 2017, 06:19
|
Jack Tekila
Group: Members
Posts: 174
Joined: 17-November 09
|
QUOTE(boulay @ Jun 24 2017, 15:03) edit: @Jack try to reduce your font size, I tried an oversized one and it dit the same thing as yours...
Thanks! Just forgot that I use the HV on 110%. Changed to Calibri 10 and it worked.
|
|
|
|
|
|
Jun 25 2017, 08:19
|
hentai_fusion
Group: Gold Star Club
Posts: 33,488
Joined: 14-August 09
|
QUOTE(Sapo84 @ Jun 25 2017, 09:28) 1) sure, anyone can probably mod it with relative ease 2) how many do you want Anyway, added dmyers59's code, RED bars when minXX is triggered, effect duration and left aligned hp bar. Also commented the options. I may borrow some other coders' work for fixing Chrome but that's it, I don't think I would work on it anymore. CODE // ==UserScript== // @name MouseMagelee 0.85 // @namespace hentaiverse.org // @version 0.1 // @description Something something hoverplay // @match *://*.hentaiverse.org/* // @run-at document-end // @grant none // ==/UserScript==
// ***THANKS*** // sickentide (HV No Popup) // sigo8 (Reloader Shim) // dmyers59 (@version and #description
// SETTINGS var hideLog = true; // hide battle log var defaultAction = [153,152,151]; //0 for melee, array of spell id for mage (check Crackling Cast for the list of spells id) var minHP = 0.35; // lower than fullHP X this value hover stops var minMP = 0.2; // lower than fullMP X this value hover stops var minSP = 0.3; // lower than fullSP X this value hover stops var rightClick = [311,313]; // spell to cast on right click var iconGem = true; // show gem above Focus button var showDuration = true; // show the duration of the applied effects var leftHp = true; //align HP bar left 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 applyDuration() { var targets = document.querySelectorAll('img[onmouseover^="battle.set_infopane_effect"]'), i = targets.length; while (i--) { var duration = targets[i].getAttribute('onmouseover').match(/, ([-\d]+)\)/); if (!duration || duration < 0) duration = '-'; else duration = duration[1]; var div = targets[i].parentNode.insertBefore(document.createElement('div'), targets[i].nextSibling); div.appendChild(document.createElement('div')).innerHTML = duration; div.className = 'duration'; }}
function showGem() { var gem = document.getElementById('ikey_p'); var gem_icon = document.getElementById('gem_icon'); if (gem && !gem_icon) { var icon; switch (document.querySelector('#ikey_p > div > div').innerHTML.match(/([^\s]+) Gem/)[1]) { case 'Mystic': icon = 'channeling.png'; break; case 'Health': icon = 'healthpot.png'; break; case 'Mana': icon = 'manapot.png'; break; case 'Spirit': icon = 'spiritpot.png'; break; }
gem_icon = document.getElementById('pane_effects').appendChild(document.createElement('img')); gem_icon.src = '/y/e/' + icon; gem_icon.style.cssText = 'float: right;margin-right: 565px;';
var useGem = function() { window.battle.lock_action(gem, 1, 'items', 'ikey_p'); window.battle.set_friendly_skill('999'); window.battle.touch_and_go(); gem.remove(); gem_icon.remove(); };
gem_icon.onclick = useGem; gem_icon.onmouseover = useGem; gem_icon.id = "gem_icon"; } else if (!gem && gem_icon) { gem_icon.remove(); } }
function reloadedEvent() { if(iconGem) showGem(); if(showDuration) applyDuration(); if(document.querySelector('#vbh img').width < 496*minHP) { document.getElementById('vbh').style.backgroundColor = 'red'; return; } if(document.querySelector('#vbm img').width < 207*minMP) { document.getElementById('vbm').style.backgroundColor = 'red'; return; } if(document.querySelector('#vbs img').width < 207*minSP) { document.getElementById('vbs').style.bbackgroundColor = 'red'; 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(); } } }
var log = document.querySelector('#textlog > tbody'); var paneCompletion = document.getElementById('pane_completion');
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});
var sheet = document.createElement('style'); sheet.innerHTML = '#btcp {display: none}.duration{width:30px;display:inline-block;text-align:center;position:relative;margin-left:-30px;top:-4px}.duration>div{background:white;border:1px solid black;padding:0 2px;display:inline-block;min-width:8px;font-weight:bold;height:13px}'; if(hideLog){ sheet.innerHTML += '#pane_log {display: none}'; } if(leftHp){ sheet.innerHTML += '#vbh>div{text-align:left !important}'; } document.head.appendChild(sheet);
window.addEventListener('contextmenu', function (e) { e.preventDefault(); runRightClickSpell(); }, false);
reloadedEvent(); } init();
using chrome, seems like right click doesn't work.
|
|
|
|
|
|
Jun 25 2017, 08:20
|
SidZBear
Group: Gold Star Club
Posts: 560
Joined: 31-May 16
|
QUOTE(hentai_fusion @ Jun 24 2017, 23:19) using chrome, seems like right click doesn't work.
It's working fine for me, though im on vivaldi rather than chrome
|
|
|
Jun 25 2017, 08:42
|
pooaa
Group: Gold Star Club
Posts: 645
Joined: 20-July 14
|
QUOTE(boulay @ Jun 25 2017, 07:21) Numbered OC chips, v0.1 A temporary thing until somebody find a better alternative ^^
Numbered_OC_chips.css ( 1.96k )
Number of downloads: 165 [attachmentid=104690] (IMG:[ image.noelshack.com] http://image.noelshack.com/fichiers/2017/25/7/1498346420-overcharge-chips.png) i do see the numbers when i installed it, but after few plays i found this script doesn't work. i'm using mouse melee and hv clean ui, is there any conflict?
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|