|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Sep 24 2017, 23:23
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
|
small thing: feed pills to all monsters regardless of morale [attachmentid=109084] this is already done by other scripts, but the boner is that i added an option to feed pills only to monsters that have reached a set minimum level, so you can feed and upgrade your monsters with maximum laziness
|
|
|
Sep 25 2017, 06:09
|
Maharid
Group: Catgirl Camarilla
Posts: 2,369
Joined: 27-April 10
|
@morineko: Ah, that's why it is so hard to save some pages with Smart Search.
Anyway, not really working, the problem is still present, only somtime it save and sometime not.
|
|
|
|
|
|
Sep 25 2017, 16:19
|
Aardwark
Group: Members
Posts: 223
Joined: 11-May 14
|
Resetted my Google Chrome by accident (IMG:[ invalid] style_emoticons/default/sad.gif) Anyone has the Random Encounter Notification? Edit, found hc br's code. CODE // ==UserScript== // @name Countdown Timer for the Random Encounter Event on E-Hentai // @description Adds a countdown timer for the Random Encounter event on E-Hentai.org and its subdomains. // @grant none // @include https://e-hentai.org/* // @include https://*.e-hentai.org/* // ==/UserScript==
var wnd = window; var doc = wnd.document; var loc = location; var href = loc.href;
if(!doc.querySelector('*[name="ipb_login_submit"]') && /(\.e-hentai\.org\/)|(^e-hentai.org\/)/.test(loc.hostname+'/') && !/\/palette\.html?\b/.test(href) && !doc.getElementById('countdown_timer')) { var set_cookie = function(k, v, t) { var expires = '; expires=Fri, 31 Dec 9999 23:59:59 GMT'; if(t) { var d = new Date(); d.setTime(d.getTime() + (t * 24 * 60 * 60 * 1000)); expires = '; expires=' + d.toGMTString(); } doc.cookie = k + '=' + escape(v) + expires + '; domain=.' + /[^\.]+\.[^\.]+$/.exec(loc.hostname)[0] + '; path=/'; //doc.cookie = k + '=' + escape(v) + expires + '; path=/'; }; var get_cookie = function(k) { var n = k + '='; var ca = doc.cookie.split(';'); for(var i=0; i<ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(n) == 0) { return unescape(c.substring(n.length, c.length)); } } return undefined; };
if(!get_cookie('event')) { console.log('The "event" cookie does not exist or is invalid.'); throw 'exit'; } if(!get_cookie('re_cnt')) { set_cookie('re_cnt', 0); } if(!get_cookie('re_lst')) { set_cookie('re_lst', '[]'); }
var timer_box = doc.createElement('DIV'); timer_box.id = 'countdown_timer'; timer_box.onclick = function() { if(/\bReady\b/i.test(this.textContent)) { wnd.open('https://e-hentai.org/news.php', href=='https://e-hentai.org/news.php'?'_self':'_blank'); } };
var toggle_re_lst = function() { //alert(get_cookie('re_lst')); var re_lst_box = doc.getElementById('re_lst_box'); if(re_lst_box) { re_lst_box.parentNode.removeChild(re_lst_box); return; } re_lst_box = doc.createElement('DIV'); re_lst_box.id = 're_lst_box'; re_lst_box.style.cssText = 'top:30px; right:0px; position:fixed; z-index:2147483647; background:rgba(0,255,0,1); color:#ff0000;'; setTimeout(function() { re_lst_box.style.cssText = 'top:30px; right:0px; position:fixed; z-index:2147483647; background:rgba(0,255,0,0.2); color:#ff0000;'; }, 3000); re_lst_box.innerHTML = '[ List of Today ]<BR>'; re_lst_box.onmouseover = function () { this.style.cssText = 'top:30px; right:0px; position:fixed; z-index:2147483647; background:rgba(0,255,0,1); color:#ff0000;'; }; re_lst_box.onmouseout = function () { this.style.cssText = 'top:30px; right:0px; position:fixed; z-index:2147483647; background:rgba(0,255,0,0.2); color:#ff0000;'; }; var decode_hv_b64 = function(i, e) { var a = doc.createElement('A'); a.href = 'https://hentaiverse.org/?s=Battle&ss=ba&encounter=' + e; a.target = '_blank'; a.textContent = (i+1) + '. '; a.style.cssText = 'color:#ff0000'; var d = atob(e); var m = /([^-]+?)-([^-]+?)-([^-]+)/.exec(d); if(m == null) { return a; } var uid = m[1]; var epoch = m[2]; var hash = m[3]; var da = new Date(); da.setTime(parseInt(epoch)*1000); da = da.toLocaleTimeString(); a.textContent += da; return a; }; var re_lst = JSON.parse(get_cookie('re_lst')); if(re_lst) { for(var i=0, len=re_lst.length; i<len; i++) { var a = decode_hv_b64(i, re_lst[i]); if(i != 0) { re_lst_box.appendChild(doc.createElement('BR')); } re_lst_box.appendChild(a); } doc.body.appendChild(re_lst_box); } }; addEventListener('keydown', function(evt) { if((evt.target.tagName!='INPUT') && (evt.target.tagName!='TEXTAREA') && (evt.keyCode == 76)) { toggle_re_lst(); } }, false); if(href == 'https://e-hentai.org/news.php') { toggle_re_lst(); }
var newshead = doc.getElementById('newshead') if(newshead && /\/e-hentai\./.test(href)) { timer_box.style.color = '#ff0000' newshead.appendChild(timer_box) } else { timer_box.style.cssText = 'line-height:30px; top:0px; right:0px;font-size:16px; position:fixed; z-index:2147483647; background:rgba(0,255,0,0.2); color:#ff0000;' doc.body.appendChild(timer_box) }
var update_timer = function() { if(href == 'https://e-hentai.org/news.php') { var da = new Date(); if((da.getUTCHours()==0) && (da.getUTCMinutes()==0) && (da.getUTCSeconds()<=10)) { if(!/^Your IP.*banned/i.test(doc.body.textContent)) { setTimeout(function() {loc.reload();}, 10000); } } } var now = Math.floor(new Date().getTime()/1000); var diff = parseInt(get_cookie('event')) + 1815 - now; if(isNaN(diff)) { setTimeout(function() {loc.reload();}, 60000); return; }; if(diff <= 0) { timer_box.textContent = 'Ready! re_cnt=' + get_cookie('re_cnt'); if(href == 'https://e-hentai.org/news.php') { if(/^Your IP.*banned/i.test(doc.body.textContent)) {} else if(/The site is currently in Read Only\/Failover Mode/i.test(doc.documentElement.innerHTML)) { setTimeout(function() {loc.reload();}, 60000); } else { loc.reload(); } return; } } else { var mm = Math.floor(diff / 60) + ''; mm = (mm.length >= 2 ? mm : '0' + mm); var ss = Math.floor(diff % 60) + ''; ss = (ss.length >= 2 ? ss : '0' + ss); timer_box.textContent = mm + ':' + ss + ', re_cnt=' + get_cookie('re_cnt'); if( (mm == '00') || ((mm == '01') && (ss == '00')) ) { try { if(doc.getElementById('eventpane').getElementsByTagName('div')[1].getElementsByTagName('a')[0].textContent != 'HentaiVerse') { if(!doc.getElementById('re_snd')) { var audio = new Audio('http://www.freesound.org/data/previews/234/234524_4019029-lq.mp3'); audio.id = 're_snd'; audio.volume = 1; audio.loop = true; audio.play(); doc.body.appendChild(audio); } if(/40|20|10/.test(ss)) { alert('Random Encounter'); } } else { if(doc.getElementById('re_snd')) { doc.getElementById('re_snd').parentNode.removeChild(doc.getElementById('re_snd')); } } } catch(e) {} } } setTimeout(update_timer, 1000); }; update_timer();
var eventpane = doc.getElementById('eventpane'); if(eventpane != null) { var re_evt = eventpane.querySelector('a[onclick*="https://hentaiverse.org/"]'); //var re_evt = eventpane.getElementsByTagName('div')[1].getElementsByTagName('a')[0]; if(re_evt) { var hv_lnk = ''; if((/^https:\/\//.test(re_evt.href)) && (!/#/.test(re_evt.href))) { hv_lnk = re_evt.href; } else { hv_lnk = /.*window\.open\(['"]?([^'"]+)['"]?/.exec(re_evt.onclick.toString().split('\n').join('')); if(hv_lnk) { hv_lnk = hv_lnk[1]; } } if(hv_lnk) { hv_b64 = hv_lnk.replace(/.+?&encounter=([^&]*).*/, '$1'); // the base64 encoded part var re_lst = JSON.parse(get_cookie('re_lst')); if((!re_lst) || (re_lst.length == 0)) { re_lst = []; } if(re_lst.indexOf(hv_b64) == -1) { re_lst.push(hv_b64); } re_lst = JSON.stringify(re_lst, null, ' '); set_cookie('re_lst', re_lst); if(doc.getElementById('re_lst_box')) { toggle_re_lst(); toggle_re_lst(); } } else { console.log('Error: There is a random encounter event but the HentaiVerse link cannot be found.'); throw 'exit'; } re_evt.addEventListener('click', function() { if(re_evt.text != 'HentaiVerse') { set_cookie('re_cnt', parseInt(get_cookie('re_cnt'))+1); re_evt.text = 'HentaiVerse'; if(doc.getElementById('re_lst_box')) { toggle_re_lst(); toggle_re_lst(); } } eventpane.style.display = 'block'; }, false); } else if(/\bdawn\b/i.test(eventpane.textContent)) { set_cookie('re_cnt', 0); set_cookie('re_lst', '[]'); if(doc.getElementById('re_lst_box')) { toggle_re_lst(); toggle_re_lst(); } } } } This post has been edited by Aardwark: Sep 25 2017, 16:25
|
|
|
|
|
|
Sep 25 2017, 16:30
|
Aardwark
Group: Members
Posts: 223
Joined: 11-May 14
|
Any way to mass salvage?
|
|
|
Sep 25 2017, 16:37
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13
|
QUOTE Anyone has the Random Encounter Notification? If you want to see timer for next RE in the HentaiVerse game itself - then you can use HVtoolBox script QUOTE Any way to mass salvage? Again, HVtoolBox to the rescue Link in my signature =) Instruction in the first posts are little outdated - I will update them today/tomorrow - when will have enough time. If you need any help - ask in HVtoolBox thread - I will help with what I can
|
|
|
Sep 25 2017, 16:41
|
Aardwark
Group: Members
Posts: 223
Joined: 11-May 14
|
Also, s there any list of IDs for Quickbar Extend in Monsterbate?
|
|
|
|
|
|
Sep 25 2017, 17:11
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13
|
QUOTE Also, s there any list of IDs for Quickbar Extend in Monsterbate? IDs for spells? They try those CODE Debuffs: 211: Drain - 221: Slow - 231: Blind 212: Weaken - 222: Sleep - 232: Silence 213: Imperil - 223: Confuse - 233: MagNet
Buffs: 411: Protection - 421: Absorb - 431: Heartseeker 412: Haste - 422: SparkofLife - 432: ArcaneFocus 413: ShadowVeil - 423: SpiritShield -
Curatives: 311: Cure 312: Regen 313: Full-Cure
Offensive: :Fire: :Ice: :Elec: 111: Fiery Blast - 121: Freeze - 131: Shockblast 112: Inferno - 122: Blizzard - 132: Chained Lightning 113: Flames of Loki - 123: Fimbulvetr - 133: Wrath of Thor
:Wind: :Holy: :Dark: 141: Gale - 151: Smite - 161: Corruption 142: Downburst - 152: Banishment - 162: Disintegrate 143: Storms of Njord - 153: Paradise Lost - 163: Ragnarok
|
|
|
|
|
|
Sep 25 2017, 17:36
|
Aardwark
Group: Members
Posts: 223
Joined: 11-May 14
|
QUOTE(f4tal @ Sep 25 2017, 17:11) IDs for spells? They try those CODE Debuffs: 211: Drain - 221: Slow - 231: Blind 212: Weaken - 222: Sleep - 232: Silence 213: Imperil - 223: Confuse - 233: MagNet
Buffs: 411: Protection - 421: Absorb - 431: Heartseeker 412: Haste - 422: SparkofLife - 432: ArcaneFocus 413: ShadowVeil - 423: SpiritShield -
Curatives: 311: Cure 312: Regen 313: Full-Cure
Offensive: :Fire: :Ice: :Elec: 111: Fiery Blast - 121: Freeze - 131: Shockblast 112: Inferno - 122: Blizzard - 132: Chained Lightning 113: Flames of Loki - 123: Fimbulvetr - 133: Wrath of Thor
:Wind: :Holy: :Dark: 141: Gale - 151: Smite - 161: Corruption 142: Downburst - 152: Banishment - 162: Disintegrate 143: Storms of Njord - 153: Paradise Lost - 163: Ragnarok Thanks but this doesn't work for Tampermonkey on Chrome for whatever reason. There doesn't seem to be any error in code either. I am talking about HVToolBox.
|
|
|
|
|
|
Sep 25 2017, 17:44
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13
|
QUOTE I am talking about HVToolBox. Version of Chrome browser? Are you using regular hentaiverse (https://hentaiverse.org) or alt hentaiverse (http://alt.hentaiverse.org/)? What version of HVtoolBox? 1.0.3? Are you using any other scripts? Can you disable them? Are you using custom font? You should use it. Did HVtoolBox's box appeared on the left side of the screen or nothing at all?
|
|
|
Sep 25 2017, 17:44
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
|
QUOTE(Aardwark @ Sep 25 2017, 18:36) Thanks but this doesn't work for Tampermonkey on Chrome for whatever reason. There doesn't seem to be any error in code either.
did you put the IDs in quotes?
|
|
|
|
|
|
Sep 25 2017, 17:58
|
Aardwark
Group: Members
Posts: 223
Joined: 11-May 14
|
QUOTE(f4tal @ Sep 25 2017, 17:44) Version of Chrome browser? Are you using regular hentaiverse (https://hentaiverse.org) or alt hentaiverse (http://alt.hentaiverse.org/)? What version of HVtoolBox? 1.0.3? Are you using any other scripts? Can you disable them? Are you using custom font? You should use it. Did HVtoolBox's box appeared on the left side of the screen or nothing at all?
Chrome latest version, hentaiverse normal, 1.0.3. Scripts: Monsterbate and Random Encounter, both working HVToolbox doesn't appear at all. Which settings should I use in custom font? There aren't any errors in code when I checked. QUOTE(sickentide @ Sep 25 2017, 17:44) did you put the IDs in quotes?
Fatal put the IDs in Code, I quoted them.
|
|
|
|
|
|
Sep 25 2017, 18:07
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
|
QUOTE(Aardwark @ Sep 25 2017, 18:58) Fatal put the IDs in Code, I quoted them.
sorry, i thought you were having trouble with the quickbar extender, so i meant to ask if you put something like this in your settings: CODE '161','162','163' rather than this, which doesn't work: CODE 161,162,163
|
|
|
Sep 25 2017, 18:13
|
Epion
Group: Gold Star Club
Posts: 3,350
Joined: 20-February 08
|
2 questions about the monsterbation script. One: If i open the skillbook during a fight, at the spells page i can't scroll all the way down. Game bugs sometimes with IA and the skillbook can be needed. Two: line 109 / stopOnBuffsExpiring = false, // buff expiring in 1 turn or less Is there any way to make this "buff expiring in 0 turns". In short not when there is still 1 turn left to the buff but when it reaches 0.
|
|
|
|
|
|
Sep 25 2017, 18:21
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13
|
QUOTE Chrome latest version, hentaiverse normal, 1.0.3. Scripts: Monsterbate and Random Encounter, both working HVToolbox doesn't appear at all. Are you sure you have activated HVtoolBox in TamperMonkey settings? Could you disable other scripts and give a try? Also, press combination ctrl+shift+I and follow this picture: ...do you have "HVtoolBox" here? QUOTE Which settings should I use in custom font? There aren't any errors in code when I checked. Any settings would go - try arial, 10, normal, normal, -2 for example.
|
|
|
|
|
|
Sep 25 2017, 18:28
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
|
QUOTE(Epion @ Sep 25 2017, 19:13) If i open the skillbook during a fight, at the spells page i can't scroll all the way down.
replace line 374: CODE '.minfo tr:nth-child(3) > td:nth-child(3) { color: lightcyan; }' + with this: CODE '.minfo tr:nth-child(3) > td:nth-child(3) { color: lightcyan; } #table_magic .fc2 { font-size: 7pt; }' + QUOTE(Epion @ Sep 25 2017, 19:13) Is there any way to make this "buff expiring in 0 turns". In short not when there is still 1 turn left to the buff but when it reaches 0.
change line 520: CODE if ( duration[3] < 2 && alertBuffs.test(effects[n].src) ) to this: CODE if ( duration[3] < 1 && alertBuffs.test(effects[n].src) )
|
|
|
Sep 25 2017, 18:44
|
Epion
Group: Gold Star Club
Posts: 3,350
Joined: 20-February 08
|
Thank you.
|
|
|
|
|
|
Sep 26 2017, 11:03
|
Aardwark
Group: Members
Posts: 223
Joined: 11-May 14
|
QUOTE(f4tal @ Sep 25 2017, 18:21) Are you sure you have activated HVtoolBox in TamperMonkey settings? Could you disable other scripts and give a try? Also, press combination ctrl+shift+I and follow this picture: ...do you have "HVtoolBox" here? Any settings would go - try arial, 10, normal, normal, -2 for example. My Inspection in Chrome is different for some reason, but I found this: CODE Syntax error @ "HVtoolBox 1.0.3"! VM173:62 ########################## JSHINT output: script: (W087) Forgotten 'debugger' statement on line: 352 at character: 9 script: (W041) Use '===' to compare with '' on line: 353 at character: 73 script: (W061) eval can be harmful on line: 1625 at character: 34 script: (W030) Expected an assignment or function call and instead saw an expression on line: 2852 at character: 1 script: (E058) Missing semicolon on line: 2852 at character: 3 script: (E041) Unrecoverable syntax error. (100% scanned) on line: 2852 at character: 1 ##########################
SyntaxError: Unexpected token : at eval (<anonymous>) at <anonymous>:2:479 at Object.c [as F_c] (<anonymous>:2:324) at Object.E_u (<anonymous>:3:143) at q (eval at exec_fn (:2:27), <anonymous>:63:97) at ha (eval at exec_fn (:2:27), <anonymous>:61:367) at Object.create (eval at exec_fn (:2:27), <anonymous>:70:259) at f (eval at exec_fn (:2:27), <anonymous>:15:237) (anonymous) @ VM173:62 VM173:62 Uncaught SyntaxError: Unexpected token : at eval (<anonymous>) at <anonymous>:2:479 at Object.c [as F_c] (<anonymous>:2:324) at Object.E_u (<anonymous>:3:143) at q (eval at exec_fn (:2:27), <anonymous>:63:97) at ha (eval at exec_fn (:2:27), <anonymous>:61:367) at Object.create (eval at exec_fn (:2:27), <anonymous>:70:259) at f (eval at exec_fn (:2:27), <anonymous>:15:237)
|
|
|
|
|
|
Sep 26 2017, 11:36
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13
|
QUOTE script: (E058) Missing semicolon on line: 2852 at character: 3 script: (E041) Unrecoverable syntax error. (100% scanned) on line: 2852 at character: 1 ...why...? Could you try this version? https://forums.e-hentai.org/index.php?showtopic=209731
|
|
|
Sep 26 2017, 11:56
|
Scremaz
Group: Gold Star Club
Posts: 24,304
Joined: 18-January 07
|
syntax? Aardwark, just to be sure... you didn't mess with the code, right?
and how did you import the script?
|
|
|
Sep 26 2017, 12:12
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13
|
I have an idea that Aardwark uses some sort of extension for browser like proxy and may accidentally copy its information in the code. For example, I am using friGate proxy for Chrome. If I would open the proxy settings and will press ctrl+a at the page with script code - I will select everything on the screen AND some friGate text. Then, if I would paste that data in TamperMoney - I will paste data from friGate extension also, right at the end. That sounds suspiciously like this... (IMG:[ invalid] style_emoticons/default/wink.gif) This post has been edited by f4tal: Sep 26 2017, 12:15
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|