|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Dec 21 2013, 02:23
|
FiniteA
Group: Members
Posts: 2,419
Joined: 3-November 11
|
Update hvOneClick to 0.78
hvOneClick.user.js.zip ( 1.4k )
Number of downloads: 123This post has been edited by FiniteA: Dec 21 2013, 02:24
|
|
|
Dec 21 2013, 06:44
|
Amaduyu Mitsumi
Group: Gold Star Club
Posts: 1,609
Joined: 2-October 11
|
QUOTE(ctxl @ Dec 21 2013, 05:10) Change: if (document.location.href === 'https://e-hentai.org/') { to: if (document.location.href.indexOf('https://e-hentai.org/') != -1) {
Thanks. (IMG:[ invalid] style_emoticons/default/happy.gif) QUOTE(FiniteA @ Dec 21 2013, 07:23) Update hvOneClick to 0.78
Thanks! (IMG:[ invalid] style_emoticons/default/laugh.gif)
|
|
|
|
|
|
Dec 21 2013, 11:30
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
Spell Spam 1.0 I took a bit of code (the eventhandler precisely) from finiteA's Keybind to make this small script. Mages can play just like melee. When you press the number key (0, 1, 2...), you will cast a spell (by default "Weaken" on the respective target instead of attacking it. If the spell can't be used (on cooldown, no mana, or doesn't exist), you will attack like normal. Works on Firefox 25 and Chrome 31 How to use: Unzip the file, open it in a text editor, replace "Weaken" in the indicated line with the full name of the spell (capital and all) you want to use, install it, go into a battle, press 1/2/3/4/5/6/7/8/9/0, enjoy.
SpellSpam1.0.user.zip ( 959bytes )
Number of downloads: 61This post has been edited by holy_demon: Dec 21 2013, 11:46
|
|
|
|
|
|
Dec 21 2013, 21:24
|
Ichy
Group: Catgirl Camarilla
Posts: 13,061
Joined: 19-February 09
|
can I have a version to cast spell on left mouse click? (IMG:[ invalid] style_emoticons/default/tongue.gif)
|
|
|
|
|
|
Dec 21 2013, 23:05
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(Ichy @ Dec 22 2013, 06:24) can I have a version to cast spell on left mouse click? (IMG:[ invalid] style_emoticons/default/tongue.gif) Apparently I found a way so it could work with BOTH mouse and keyboard, and with less code (and hopefully faster too) The downside is that the code becomes completely unintelligible and it might be buggy (well it works for 10 turns for me on Chrome xD ). EDiT: already found the bug lol, I put it in the changelog's CAUTION
SpellSpam1.1.user.zip ( 898bytes )
Number of downloads: 54Spell Spam 1.1 Mages can now play just like melee. When you press the number key (0, 1, 2...), you will cast a spell (by default "Weaken" on the respective target instead of attacking it. If the spell can't be used (on cooldown, no mana, or doesn't exist), you will attack like normal. How to use: Unzip the file, open it in a text editor, replace "Weaken" in the indicated line with the full name of the spell (capital and all) you want to use, install it, go into a battle, press 1/2/3/4/5/6/7/8/9/0 or click an arbitrary monster, enjoy your feeling of superiority over us melee, donate me some mage gears T.T Changelog: -now works with mouse click (probably even mousemelee, theoretically, because I can't be bothered to test) - CAUTION: will temporarily disable all offensive and deprecating spells but the spell you choose to spam. Supportive and curative spells still work because you don't have to choose a target. If you don't like this inconvenience, use 1.0. -revamped everything from 1.0: now faster, lighter, and nerdier. -removed finiteA's credit because I'm not using any of his code in this version. This post has been edited by holy_demon: Dec 21 2013, 23:23
|
|
|
|
|
|
Dec 22 2013, 00:12
|
Lement
Group: Members
Posts: 2,977
Joined: 28-February 12
|
At least in fox, you can replace CODE monster.setAttribute('onclick', "document.querySelector('.bts\\\>div\\\[onmouseover \*=\"" + SPELL +"\"\\\]').click();" + oldonclick);
with CODE document.getElementById("mkey_1").setAttribute('onclick', "document.querySelector('.bts>div[onmouseover *=\"" + SPELL +"\"]').click();"+oldonclick);
As for "what the fuck" is going on...Some characters in javascript are special characters. \ allows you to treat the character as normal character. Hence the \s in the second bit of code. In the first bit of code, you get them past one pass, yes, but the second pass should make them disappear too. As for interactions with mousemelee, not sure. One code I have should mean work with no conflict, other could definitely cause a conflict, depending on which triggers first. Can't remember which one was 1.3, though in any case it can be reworked to become more efficient anyway, along with other wanted features. This post has been edited by Lement: Dec 22 2013, 00:19
|
|
|
|
|
|
Dec 22 2013, 11:14
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
SpellSpam2.0.user.zip ( 1.16k )
Number of downloads: 57Spell Spam 2.0 Mages can now play just like melee. When you press the number key (0, 1, 2...), you will cast a spell (by default "Weaken") on the respective target instead of attacking it. If the spell can't be used (on cooldown, no mana, or doesn't exist), you will attack like normal. How to use: - Unzip the file, open it in a text editor - Replace "Weaken" in the indicated line with the full name of the spell (capital and all) you want to use, - Install the script - Enter a battle - Press 1/2/3/4/5/6/7/8/9/0 or click an arbitrary monster - Enjoy your feeling of superiority over us melee - (Optional) Donate me some mage gears T.T If you want to cast other targetting spells or do normal attack, hold Ctr, or Alt, or Shift while clicking/hotkeying to select your target. Note: The script might not work with other hotkey/mouse script. I know it works with Keybinds and HVStat. Changelog: - Update from 1.0 since 1.1 is too buggy - Coded and tested while I'm wide awake - Work with both keyboard and mouse - Hold Ctr, or Alt, or Shift to temporarily disable the script In the future, I might work on the script so it can keep spamming the spell you casted before (like a more functional R) so you don't have to edit the js file. But for now, I'm done. On to next project. This post has been edited by holy_demon: Dec 22 2013, 11:25
|
|
|
|
|
|
Dec 22 2013, 20:00
|
yobi00
Group: Members
Posts: 700
Joined: 13-August 13
|
To whoever is still interested in the old Random Encounter Notification script. QUOTE(kuro009 @ Dec 17 2013, 03:10) Pardon me for the intrusion: HV Random Encounter Notification 1.3.3 for Firefox [updated for 0.78]:
hvren.user.zip ( 3.2k )
Number of downloads: 301- Now the gap is 30 minutes between two Random Encounters, instead of 1 hour. P.S. - I have NO credit in creating this script. I just adjusted it for the 0.78 patch. For me the following problems occurred with this script: Setting the system clock to 45 min before new dawn and then reseting the timer, I get about 15 min countdown instead of 30 min. Setting the system clock to 15 min before new dawn and then reseting the timer, I get about -15 min and it becomes "ready" on next page reload. The following script modifies the script from kuro009 to fix these problems. CODE // ==UserScript== // @name HV Random Encounter Notification // @namespace sigo8@e-hentai.org // @author sigo8, LangTuTaiHoa, GaryMcNabb // @version 1.3.3 // @match http://hentaiverse.org/* // @exclude http://hentaiverse.org/pages/showequip* // @run-at document-end // ==/UserScript==
var battleLog = document.getElementById("togpane_log"), rawDate, timeToDawn = {}, logRows, timerDiv, timerLink, resetLink, time, timerID, minute, second;
function updateTimeToDawn() { rawDate = new Date(); timeToDawn = { hour: rawDate.getUTCHours(), minute: rawDate.getUTCMinutes(), second: rawDate.getUTCSeconds() } } function timerUpdate() { if (--second < 0) { second = 59; if (--minute < 0) { timerLink.href = "http://e-hentai.org/"; timerLink.onclick = timerReset; timerLink.style.setProperty("color", "red"); timerLink.innerHTML = "Ready"; clearInterval(timerID); return; } } timerLink.innerHTML = minute + ":" + (second < 10 ? "0" : "") + second; } function timerReset() { updateTimeToDawn(); if (timeToDawn.hour === 23 && timeToDawn.minute > 29) { localStorage.lastRandomEncounter = Date.now() - (((timeToDawn.minute-30) * 60000) + (timeToDawn.second * 1000)); minute = 59 - timeToDawn.minute; second = 60 - timeToDawn.second; } else { localStorage.lastRandomEncounter = Date.now(); minute = 30; second = 0; } timerLink.innerHTML = minute + ":" + (second < 10 ? "0" : "") + second; timerLink.style.color = "#5C0C11"; if (timerID) clearInterval(timerID); timerID = setInterval(timerUpdate, 1000); } if (battleLog) { logRows = battleLog.firstElementChild.firstElementChild.children; if (logRows[0].firstElementChild.textContent === "0" && logRows[logRows.length-2].lastElementChild.textContent[13] === "r") { updateTimeToDawn(); localStorage.lastRandomEncounter = (timeToDawn.hour === 23 && timeToDawn.minute > 29 ? Date.now() - (((timeToDawn.minute-30) * 60000) + (timeToDawn.second * 1000)) : Date.now()); } } else { timerDiv = document.createElement("div"); timerLink = document.createElement("a"); resetLink = document.createElement("a"); if (!localStorage.lastRandomEncounter) timerReset(); time = localStorage.lastRandomEncounter - (Date.now() - 1800000); minute = second = 0;
timerDiv.style.cssText = "display:block; position: absolute; top:3px; left:950px;"; timerLink.style.cssText = "text-decoration:none; font-size:20px; font-weight:bold; color:#5C0C11;"; resetLink.style.cssText = "text-decoration:none; color:red; top:-3px; position:relative; left:3px;"; resetLink.innerHTML = "RESET"; resetLink.onclick = timerReset; resetLink.href = "#";
timerDiv.appendChild(timerLink); timerDiv.appendChild(resetLink); if (time < 0) { timerLink.href = "http://e-hentai.org/"; timerLink.onclick = timerReset; timerLink.style.color="red"; timerLink.innerHTML="Ready"; } else { time = Math.round(time / 1000); minute = Math.floor(time / 60); second = time - (minute * 60); timerLink.innerHTML = minute + ":" + (second < 10 ? "0" : "") + second; timerID = setInterval(timerUpdate, 1000); } document.body.appendChild(timerDiv); }
P.S. The script I posted in #936 is also not fully functional, but I can no longer edit it to fix it... Sorry for the noise. This post has been edited by yobi00: Dec 22 2013, 20:03
|
|
|
|
|
|
Dec 23 2013, 21:43
|
Nerzzzzz
Group: Members
Posts: 337
Joined: 18-April 12
|
Oh man Spellspam is making me super lazy. It's so good.
I can't hold my number keys to spam spells but whatever, I'm very happy with this script. Thanks a lot.
It feels bad that I'm a pretty shitty mage myself so I can't donate any decent mage gears.
|
|
|
Dec 23 2013, 22:37
|
Ichy
Group: Catgirl Camarilla
Posts: 13,061
Joined: 19-February 09
|
need to combine lements mouse melee with spellspam (IMG:[ invalid] style_emoticons/default/duck.gif)
|
|
|
|
|
|
Dec 24 2013, 07:54
|
Dameningen
Newcomer
Group: Members
Posts: 69
Joined: 8-August 10
|
HV - Disable Chrome Hotkeys on Keyboard Fnumber Keys
Disable_Chrome_Hotkeys_on_Keyboard_Fnumber_Keys.zip ( 707bytes )
Number of downloads: 47Hello all, I used HV Keybinds for a lot of time. But I found that if I make a hotkey for F1~F12, the hot key inside Chrome will make a mess! So I rewote the script from [ stackoverflow.com] HERE to solve this problem. By installing this script, the F1 to F12 will not work...probably. This script can be stand alone or combined with HV Keybinds(recommend) I am a noob in java script, if anything goes wrong...please just correct the code without asking me. Thanks for all. P.S. The other hot key also disabled(Orz)...Now debuging... This post has been edited by Dameningen: Dec 24 2013, 19:55
|
|
|
|
|
|
Dec 24 2013, 08:56
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(Nerzzzzz @ Dec 24 2013, 06:43) Oh man Spellspam is making me super lazy. It's so good.
I can't hold my number keys to spam spells but whatever, I'm very happy with this script. Thanks a lot.
It feels bad that I'm a pretty shitty mage myself so I can't donate any decent mage gears.
Hehe I'm glad that someone find it useful Though why can't you use number keys? Is it because it doesn't work or because you don't want to use them? Maybe you're referring to this. There's an issue where spamming them too much (e.g holding the buttons) will cause a normal attack. I reckon it has something to do with how JS handle listeners, but couldn't find a way around it. Well don't take that donation line too seriously, but any donation is totally cool with me (IMG:[ invalid] style_emoticons/default/smile.gif) QUOTE(Ichy @ Dec 24 2013, 07:37) need to combine lements mouse melee with spellspam (IMG:[ invalid] style_emoticons/default/duck.gif) There you go, it's pretty simple. Use it at your own risk (IMG:[ invalid] style_emoticons/default/tongue.gif)
SpellSpam2.0withMouseMelee.user.zip ( 1.21k )
Number of downloads: 60This post has been edited by holy_demon: Dec 24 2013, 09:01
|
|
|
|
|
|
Dec 24 2013, 09:12
|
Nerzzzzz
Group: Members
Posts: 337
Joined: 18-April 12
|
QUOTE(holy_demon @ Dec 24 2013, 14:56) Maybe you're referring to this. There's an issue where spamming them too much (e.g holding the buttons) will cause a normal attack. I reckon it has something to do with how JS handle listeners, but couldn't find a way around it.
Yeah, that. I don't think it's possible to find a way around that. I think it's because userscripts usually runs after the page has completely loaded and holding down a button will cause some actions to be sent before the spellspam script has loaded. It's not a big issue though. Nobody holds buttons down in high difficulties because that's suicide. (IMG:[ invalid] style_emoticons/default/tongue.gif)
|
|
|
|
|
|
|
|
|
Dec 24 2013, 09:35
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(Nerzzzzz @ Dec 24 2013, 18:12) Yeah, that. I don't think it's possible to find a way around that. I think it's because userscripts usually runs after the page has completely loaded and holding down a button will cause some actions to be sent before the spellspam script has loaded.
Well that can be overcome with CODE @run-at [ wiki.greasespot.net] http://wiki.greasespot.net/Metadata_Block#.40run-atI'm trying it out now (IMG:[ invalid] style_emoticons/default/tongue.gif) EDIT: YAY IT WORKS. Will release SpellSpam 2.1 after more testing. This post has been edited by holy_demon: Dec 24 2013, 10:02
|
|
|
|
|
|
|
|
|
Dec 24 2013, 10:39
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
Spell Spam 2.1 This release comes with 2 flavors, original and MouseMage (ie. play your mage like MouseMelee) DO NOT use both. Original
SpellSpam2.1.user.zip ( 1.36k )
Number of downloads: 68MouseMage
SpellSpam2.1withMouseMelee.user.zip ( 1.39k )
Number of downloads: 73Mages can now play just like melee. When you press the number key (0, 1, 2...), you will cast a spell (by default "Weaken") on the respective target instead of attacking it. If the spell can't be used (on cooldown, no mana, or doesn't exist), you will attack like normal. How to use: - Unzip the file, open it in a text editor - Replace "Weaken" in the indicated line with the full name of the spell (capital and all) you want to use, - Install the script - Enter a battle - Press 1/2/3/4/5/6/7/8/9/0 or click an arbitrary monster - Enjoy your feeling of superiority over us melee - (Optional) Donate me mage gears If you want to cast other targetting spells or do normal attack, hold Ctr, or Alt, or Shift while clicking/hotkeying to select your target. Change log: - script runs after the HTML part of the page finishes loading, but before other non-HTML elements (such as javascript, image, etc...) -> increased spammability - fix the issue with spamming keyboard numbers. Now feel free to hold your num key without ever releasing and commit suicide. - I haven't tested if this will trigger before or after HVStat alarm though, since it uses similar pre-loading mechanism as HVStat alarms. PM me or post in this thread if you have any issue
EDIT: wrong file for original flavor (both downloads are MouseMage). Correct files have been re-uploaded now. Sorry for any death that I have caused xD This post has been edited by holy_demon: Dec 24 2013, 13:08
|
|
|
|
|
|
Dec 25 2013, 16:55
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
Inline Equipment Changer 1.0
InlineEquipChanger1.0.user.zip ( 1.27k )
Number of downloads: 48How to use: - Unzip the file, install it as userscript - go to any HV site (outside of battle) - Look to the left, under your Stamina - Wait until the line "Equipped Set... " becomes italic - Click on it and select another equipment set you want to equip During battle, you can still see the Equipped Set line, but it will never become italic/clickable Note: Equipment Comparison/HVStat currently don't recognise this equipment chage (only HV does). Maybe they will if I use IFRAME instead of AJAX... Note2: Yes, I coded this during Christmas. Forever Alone (IMG:[ invalid] style_emoticons/default/cry.gif) This post has been edited by holy_demon: Dec 25 2013, 17:14
|
|
|
|
|
|
Dec 25 2013, 22:18
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
|
the script to select the strongest available skill has been around forever and the same effect can be achieved by quickly hitting the cast keys in order, so i assume it's ok to have something similar for mages that also economises on keybinds CODE // HV Keybinds 2.5.0 add-on, remove original Cast function var it, damage = document.getElementById('2501') ? 'Arcane Focus' : 'Heartseeker';
// first you get the spell info to display properly with this stupid hack function Cast(name) { return function() { if ( document.getElementsByClassName('btii')[0].innerHTML != name && (spell = document.querySelector('.bts > div[onclick][onmouseover*="'+name+'"]')) ) { var div = document.createElement('div'); div.setAttribute('onclick', spell.getAttribute('onmouseover')); div.click(); spell.click(); it = false; return true; } return false; }} function Cancel() { if ( !/(Attack|Battle Time)/.test(document.getElementsByClassName('btii')[0].innerHTML) && (attack = document.getElementById('ckey_attack')) ) { var div = document.createElement('div'); div.setAttribute('onclick', attack.getAttribute('onmouseover')); div.click(); attack.click(); it = false; }}
// then you initiate your carousel of agony function Cycle(spells) { return function() { var start = (spells.indexOf(document.getElementsByClassName('btii')[0].innerHTML)+1)%spells.length, n = start; do { if ( Cast(spells[n])() ) return; n = (n+1)%spells.length; } while ( n != start ) }} function CycleIt(spells) { return function() { var start = (spells.indexOf(document.getElementsByClassName('btii')[0].innerHTML)+1)%spells.length, n = start; do { if ( spell = document.querySelector('.bts > div[onclick][onmouseover*="'+spells[n]+'"]') ) { var div = document.createElement('div'); div.setAttribute('onclick', spell.getAttribute('onmouseover')); div.click(); it = spell.getAttribute('onclick'); return; } n = (n+1)%spells.length; } while ( n != start ) }} function CastIt() { if ( it ) { var div = document.createElement('div'); div.setAttribute('onclick', it); div.click(); }}
// pick and choose your wild magicks at the touch of a button Bind(KEY_B, Cancel); Bind(KEY_Y, Cycle(['Silence', 'Imperil', 'Slow'])); Bind(KEY_T, Cycle(['Ragnarok', 'Disintegrate', 'Corruption'])); Bind(KEY_V, CastIt); Bind(KEY_H, CycleIt(['Cure', 'Full-Cure'])); Bind(KEY_C, CycleIt(['Spirit Shield', 'Protection', 'Shadow Veil', 'Regen', damage, 'Absorb'])); Bind(KEY_X, CycleIt(['Absorb', damage, 'Regen', 'Shadow Veil', 'Protection', 'Spirit Shield']));
// destroy them all! Bind(KEY_N, Cycle(['FUS RO DAH', 'Merciful Blow', 'Vital Strike', 'Shield Bash', 'Frenzied Blows', 'Shatter Strike', 'Rending Blow', 'Backstab', 'Great Cleave', 'Iris Strike', 'Skyward Sword', 'Concussive Strike'])); This post has been edited by geilst: Dec 26 2013, 02:15
|
|
|
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|