 |
 |
 |
The Official Hentaiverse Chat, Post your random thoughts or theorycrafts about HV |
|
Mar 29 2013, 03:17
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08

|
Counter only works with Shields.
|
|
|
Mar 29 2013, 03:33
|
skillchip
Group: Catgirl Camarilla
Posts: 5,754
Joined: 31-December 06

|
Blocking still works
|
|
|
Mar 29 2013, 07:50
|
varst
Group: Gold Star Club
Posts: 11,561
Joined: 30-March 10

|
I'm quite sure he removed the 'block with shield only' part in the patch notes. So yes, you can block with whatever you get.
This post has been edited by varst: Mar 29 2013, 07:51
|
|
|
|
 |
|
Mar 29 2013, 13:37
|
lolzerznijmniewdupe
Group: Members
Posts: 278
Joined: 9-July 08

|
I posted this in a wrong thread (Why is a script in an equipment thread? :S) so I will ask here instead: QUOTE((Cheater) Tiap @ Feb 26 2012, 09:43)  Yes, that should work in most cases (it could fail depending on how certain browsers handle events). This should be partially easier to edit, though it can't differentiate between "normal" plus and numpad plus and things like that:
hotkey4.user.zip ( 586bytes )
Number of downloads: 580Okay... This script is "easier to modify" but I press "h" and nothing happens. I use Chrome with Tampermonkey. The script is installed and enabled. How can I use it to activate iris strike and then backstab without the use of my mouse? I am using custom local fonts.
|
|
|
|
 |
|
Mar 29 2013, 14:27
|
blue penguin
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12

|
As for QUOTE(lolzerznijmniewdupe @ Mar 29 2013, 11:37)  "easier to modify"
the part CODE '#togpane_skill tr:nth-child(3) ~ tr > td > div:not([style])'
is the 3rd skill. nth-child(1) is Flee, nth-child(2) is Scan and nth-child(3) is whatever your next skill is. Whilst the key used and modifiers at the top are obvious: CODE var modifiers = { alt: false, ctrl: false, shift: false }; var key = 'h';
Although, the script is throwing erros at my gecko/spidermonkey engine (firefox). Open a web console and dump the script from there istead of tampermonkey, there's something dodgy with the (target.click || target.onclick)(); part, see what errors pops out.
|
|
|
|
 |
|
Mar 29 2013, 14:40
|
lolzerznijmniewdupe
Group: Members
Posts: 278
Joined: 9-July 08

|
I have no idea how to open a web console instead of tampermonkey so I won't do that. Thank you for the pointer, though. If I want to have two hotkeys for two skills, I need to create two versions of this one with nth-child(3) and one with nth-child(4), is that right?
|
|
|
|
 |
|
Mar 29 2013, 17:15
|
blue penguin
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12

|
Yeah in this case you would need 3 versions, one for each skill. But you can just copy and paste the entire script 3 times inside one file and change in each part the key variable and nth-child(n). I found two reasons why the script might not work: Firstly the CODE (toggle.click||toggle.onclick)(); (target.click||target.onclick)();
Do not execute the short circuit inside the brackets before the function call (because of some buggy and random javascript reason (IMG:[ invalid] style_emoticons/default/dry.gif) ). Secondly the line CODE String.fromCharCode(e.keyCode).toLowerCase() != key.toLowerCase()
is removed from many javascript engines, but the replacement for e.keyCode is not implemented yet! And [ bugzilla.mozilla.org] spidermonkey will not tell me what's wrong because they themselves seem not to know. Hopefully on Chrome the second issue is not present. Try the script below, where the first issue is removed (Tiap's code is oversimplified to avoid it). If this does not work we would need to run a proper javascript debugger, and that's beyond my skills.
hotkey5_bp.user.zip ( 579bytes )
Number of downloads: 37EDIT: IMPORTANT NOTE: Please test it using Flee and Scan first (nth-child(1) and nth-child(2) respectively), the script prevents you from selecting a skill if you do not have enough overcharge to use it. (forgot to tell it earlier, sorry). This post has been edited by blue penguin: Mar 29 2013, 19:05
|
|
|
|
 |
|
Mar 30 2013, 12:02
|
lolzerznijmniewdupe
Group: Members
Posts: 278
Joined: 9-July 08

|
Thank you for trying. It doesn't work. This should trigger "Flee" when I press h but it doesn't do anything. I have the script enabled. CODE // ==UserScript== // @name HV - Skill Hotkey // @namespace HVSH // @match http://hentaiverse.org/* // ==/UserScript==
var modifiers = { alt: false, ctrl: false, shift: false };
var key = 'h';
// -----
if (document.getElementById('togpane_log')) { document.addEventListener('keyup',function(e) { if ((modifiers.alt && !e.altKey) || (modifiers.ctrl && !e.ctrlKey) || (modifiers.shift && !e.shiftKey) || String.fromCharCode(e.keyCode).toLowerCase() != key.toLowerCase()) return; var target = document.querySelector('#togpane_skill tr:nth-child(1) ~ tr > td > div:not([style])'), pane = document.getElementById('togpane_skill'), toggle = document.getElementById('ckey_skills'); if (!target) return; while (pane.style.cssText.length) (toggle.click||toggle.onclick)(); (target.click||target.onclick)(); },false); } However, after more searching I found a working skill script. https://forums.e-hentai.org/index.php?showt...=65647&st=0It works for magic and skills as well. Here is my version which casts iris strike on X, backstab on Z, and frenzied blows on shift+X. CODE // ==UserScript== // @name HV Keybinds // @namespace HVKEYBIND // @version 2.4.1 // @description Adds customized keybinding to HV // @match http://hentaiverse.org/* // @include http://hentaiverse.org/* // ==/UserScript==
var bindings = new Array(); var KEY_A = 65, KEY_B = 66, KEY_C = 67, KEY_D = 68, KEY_E = 69, KEY_F = 70, KEY_G = 71, KEY_H = 72, KEY_I = 73, KEY_J = 74, KEY_K = 75, KEY_L = 76, KEY_M = 77; var KEY_N = 78, KEY_O = 79, KEY_P = 80, KEY_Q = 81, KEY_R = 82, KEY_S = 83, KEY_T = 84, KEY_U = 85, KEY_V = 86, KEY_W = 87, KEY_X = 88, KEY_Y = 89, KEY_Z = 90; var KEY_1 = 49, KEY_2 = 50, KEY_3 = 51, KEY_4 = 52, KEY_5 = 53, KEY_6 = 54, KEY_7 = 55, KEY_8 = 56, KEY_9 = 57, KEY_0 = 48; var KEY_SPACE = 32, KEY_ENTER = 13, KEY_PAGEUP = 33, KEY_PAGEDOWN = 34, KEY_END = 35, KEY_HOME = 36, KEY_UP = 37, KEY_UP = 38, KEY_RIGHT = 39, KEY_DOWN = 40; var KEY_F1 = 112, KEY_F2 = 113, KEY_F3 = 114, KEY_F4 = 115, KEY_F5 = 116, KEY_F6 = 117, KEY_F7 = 118, KEY_F8 = 119, KEY_F9 = 120, KEY_F10 = 121, KEY_F11 = 122, KEY_F12 = 123; var KEY_COMMA = 188, KEY_PERIOD = 190, KEY_SLASH = 191, KEY_FORWARDSLASH = 191, KEY_GRAVE = 192, KEY_TILDE = 192, KEY_LBRACKET = 219, KEY_BACKSLASH = 220; var KEY_SEMI = 186, KEY_RBRACKET = 221, KEY_APOSTROPHE = 222; var KEY_N1 = 97, KEY_N2 = 98, KEY_N3 = 99;
var NextRound = function() {} //dummy function
//For keycodes: http://www.javascripter.net/faq/keycodes.htm // or: http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes // or: Use above codes for most keys.
// Just add this for as many bindings as you want: // Bind(KeyCode, Modifier, Action); // KeyCode = From links above // Modifier = This is OPTIONAL. Valid mods are NoMod, Shift, Ctrl, Alt, CtrlShift, AltShift, CtrlAlt, CtrlAltShift // Action = Valid actions: // Cast("Spell Name") // Spell Name or Item Name, except for potions. // UseNext(ItemType) // (Currently) Valid ItemTypes are HealthPotion, ManaPotion, SpiritPotion. These will be used in the order they appear in your item list. // Nothing // Use this to unbind a default key // Target1 - Target10 // Targets the specified monster. // PowerupGem // Uses the powerup gem. // NextRound // Enters next round. Using this overrides both Space and Enter for next round. If you still want to use one of those, add it manually. // // Examples: // Bind(KEY_M, Shift, UseNext(ManaPotion)); -- Shift + M = Use next mana potion // Bind(KEY_LBRACKET, Cast("WRATH OF THOR")); -- Case insensitive. Key [ = cast Wrath of Thor // Bind(KEY_A, Nothing); -- You can unbind a default key // Bind(KEY_I, Cast("Infusion of Storms"); -- I uses Infusion of Storms
Bind(KEY_X, Cast("Iris Strike")); // M = Magic Missile Bind(KEY_Z, Cast("Backstab")); Bind(KEY_X, Shift, Cast("Frenzied Blows"));
// Don't edit anything below. Unless you want to.
if (document.getElementById('togpane_log')) { var overriddenKeyDown = document.onkeydown; document.onkeydown = function(e) { var didKeybind = false; var roundEndHasOverride = false; var roundEnded = (document.querySelector("#mainpane form > div.btt > div.btcp > div.btcd > img") || document.getElementById("ckey_continue")); if (!roundEnded) { for (i = 0; i < bindings.length; i++) { var bind = bindings[i]; if (e.keyCode == bind.keyCode && bind.modifier(e)) { bind.action(); didKeybind = true; return true; } } } else { for (i = 0; i < bindings.length; i++) { var bind = bindings[i]; if (bind.action === NextRound) { roundEndHasOverride = true; if (e.keyCode == bind.keyCode && bind.modifier(e)) { roundEnded.onclick(); e.preventDefault(); return false; } } } } if (roundEndHasOverride) { e.preventDefault(); return false; } if (!didKeybind) { return overriddenKeyDown(e); } else { e.preventDefault(); return false; } } }
function Bind(key, mod, command) { if (!command) { command = mod; mod = NoMod; } if (!command) return; addKeybind(key, mod, command); }
function addKeybind(key, mod, command) { bindings.push(new Keybind(key,mod,command)); } function Cast(name) { name = name.toLowerCase(); var spell = findSpell(name); if (!spell) { spell = findItem(name); if (spell) { return castSelfSpell(spell); } else { return null; } } if (isSelfSpell(name)) return castSelfSpell(spell); else return castSpell(spell); } function findSpell(name) { var spells = getSpells("togpane_magict"); for (i = 0; i < spells.length; i++) { var spell = spells[i]; if (name == getSpellName(spell)) return new Spell(displayTactical, spell); } spells = getSpells("togpane_magico"); for (i = 0; i < spells.length; i++) { var spell = spells[i]; if (name == getSpellName(spell)) return new Spell(displayOffensive, spell); } spells = getSpells("togpane_skill"); for (i = 0; i < spells.length; i++) { var spell = spells[i]; if (name == getSpellName(spell)) return new Spell(displaySkills, spell); } return null; } function findItem(name) { var items = getItemList(); for (i = 0; i < items.length; i++) { var item = items[i]; var image = itemImage(name); if (item.src.search(image) > 0) return new Spell(displayItems, item); } return null; } function getSpells(pane) { return document.querySelectorAll("#" + pane + " tr:nth-child(1) ~ tr > td > div:Not([style])"); } function getSpellName(spell) { return spell.querySelector("div.fd10").textContent.toLowerCase(); } function Spell(display, spell) { this.display = display; this.cast = function () { spell.onmouseover(); spell.onclick(); }; } function castSpell(spell) { return function () { spell.display(); spell.cast(); }; } function castSelfSpell(spell) { return function () { spell.display(); spell.cast(); spell.cast(); }; } function UseNext(item) { item = item(); if (!item.isItem) return null; return useItem(item.getter); } function useItem(getItemFunc) { return function () { var item = getItemFunc(); if (item) { displayItems(); item.onclick(); item.onclick(); }}; } function imageIs(image, itemType) { if (!(itemType && itemType.images)) return false; var ret = false; for (var i = 0; i < itemType.images.length && !ret; i++) { var test = itemType.images[i]; if (image.search(test) > 0) ret = true; } return ret; } function getItemList() { return document.querySelectorAll("#togpane_item tr:nth-child(1) ~ tr > td > div:not([style]) > div > img"); } function getNextMana() { return getNextItem(ManaPotion()); } function getNextHealth() { return getNextItem(HealthPotion()); } function getNextSpirit() { return getNextItem(SpiritPotion()); } function getNextItem(itemType) { if (!itemType) return null; var items = getItemList(); var next = null; for (var i = 0; (i < items.length) && (next == null); i++) { var item = items[i]; if (imageIs(item.src, itemType)) { next = item; } } return next; }
function ManaPotion() { return new ManaPotionItem(); } function HealthPotion() { return new HealthPotionItem(); } function SpiritPotion() { return new SpiritPotionItem(); }
function Item(x) { x.isItem = true } function ManaPotionItem() { Item(this); this.type = "Mana"; this.images = ["11212.png", "11213.png", "11214.png", "11215.png", "11216.png"]; this.getter = getNextMana; } function SpiritPotionItem() { Item(this); this.type = "Spirit"; this.images = ["11312.png", "11313.png", "11314.png", "11315.png", "11316.png"]; this.getter = getNextSpirit; } function HealthPotionItem() { Item(this); this.type = "Health"; this.images = ["11112.png", "11113.png", "11114.png", "11115.png", "11116.png"]; this.getter = getNextHealth; }
function isSelfSpell(name) { var selfSpells = ["Protection", "Spirit Shield", "Arcane Focus", "Haste", "Absorb", "Heartseeker", "Shadow Veil", "Spark of Life", "Cure", "Cure II", "Cure III", "Regen", "Regen II", "Flame Spikes", "Frost Spikes", "Lightning Spikes", "Storm Spikes", "Flee"] var ret = false; for (var i = 0; (i < selfSpells.length) && !ret; i++) { var test = selfSpells[i].toLowerCase(); if (test == name) ret = true; } return ret; }
function itemImage(name) { switch (name.toLowerCase()) { case "scroll of swiftness": return "13101.png"; case "scroll of shadows": return "13211.png"; case "scroll of the gods": return "13299.png"; case "scroll of life": return "13221.png"; case "scroll of shielding": return "13111.png"; case "scroll of warding": return "13121.png"; case "scroll of the avatar": return "13199.png"; case "scroll of absorption": return "13201.png"; case "infusion of divinity": return "12501.png"; case "infusion of storms": return "12401.png"; case "infusion of flames": return "12101.png"; case "infusion of frost": return "12201.png"; case "infusion of lightning": return "12301.png"; case "infusion of darkness": return "12601.png"; case "infusion of gaia": return "12999.png"; case "last elixir": return "11501.png"; case "mana elixir": return "11299.png"; case "health elixir": return "11199.png"; case "spirit elixir": return "11399.png"; case "bubble gum": case "bubble-gum": return "19131.png"; case "flower vase": return "19111.png"; case "soul stone": return "19101.png"; } return null; }
function Keybind(key, mod, action) { this.keyCode = key; this.modifier = mod; this.action = action; }
function displayPane(pane, toggle) { var pane = document.getElementById(pane); var toggle = document.getElementById(toggle); while (pane.style.cssText.length) toggle.onclick(); } function displayTactical() { displayPane('togpane_magict','ckey_magic'); } // battle.toggle_magict_pane); } function displayOffensive() { displayPane('togpane_magico','ckey_magic'); } // battle.toggle_magico_pane); } function displaySkills() { displayPane('togpane_skill','ckey_skills'); } // battle.toggle_skill_pane); } function displayItems() { displayPane('togpane_item','ckey_items'); } // battle.toggle_item_pane); }
function NoMod(e) { return !e.shiftKey && !e.altKey && !e.ctrlKey; } function CtrlAltShift(e) { return e.shiftKey && e.altKey && e.ctrlKey; } function CtrlShift(e) { return !e.altKey && e.shiftKey && e.ctrlKey; } function AltShift(e) { return !e.ctrlKey && e.altKey && e.shiftKey; } function CtrlAlt(e) { return !e.shiftKey && e.ctrlKey && e.altKey; } function Ctrl(e) { return e.ctrlKey && !e.shiftKey && !e.altKey; } function Shift(e) { return e.shiftKey && !e.ctrlKey && !e.altKey; } function Alt(e) { return e.altKey && !e.shiftKey && !e.ctrlKey; }
function Nothing() {} //for unbinding default keys
function TargetMonster(num) { var monster = document.getElementById("mkey_"+num); if (monster) { monster.onclick(); } }
function Target1() { TargetMonster(1) } function Target2() { TargetMonster(2) } function Target3() { TargetMonster(3) } function Target4() { TargetMonster(4) } function Target5() { TargetMonster(5) } function Target6() { TargetMonster(6) } function Target7() { TargetMonster(7) } function Target8() { TargetMonster(8) } function Target9() { TargetMonster(9) } function Target10() { TargetMonster(0) }
function PowerupGem() { var pgem = document.getElementById("ikey_p"); if (pgem) { displayItems(); pgem.onclick(); pgem.onclick(); } }
|
|
|
|
 |
|
Mar 30 2013, 19:11
|
Lement
Group: Members
Posts: 2,977
Joined: 28-February 12

|
Friendly reminder: Keybinds script is excellent starter, but I'd recommend that you prune it once you are more well-versed(at the cost of stability) since it's many searches and general vast structure isn't particularly fast. Well, still faster than not using them.
|
|
|
Mar 30 2013, 23:22
|
Ichy
Group: Catgirl Camarilla
Posts: 13,061
Joined: 19-February 09

|
I want to buy a million Corruption Crystals. Any one has them for cheaper than HTTP? (IMG:[ invalid] style_emoticons/default/tongue.gif)
|
|
|
|
 |
|
Mar 31 2013, 03:45
|
blue penguin
Group: Gold Star Club
Posts: 10,046
Joined: 24-March 12

|
QUOTE(lolzerznijmniewdupe @ Mar 30 2013, 10:02)  This should trigger "Flee" when I press h but it doesn't do anything. I have the script enabled.
I believe that, by mstake, you copied and changed the wrong script (the original Tiap's script instead of the copy I've posted), to target "Flee" it would look like: CODE // ==UserScript== // @name HV - Skill Hotkey // @namespace HVSH // @match http://hentaiverse.org/* // @grant none // ==/UserScript==
var key = 'h'; if (document.getElementById('togpane_log')) { document.addEventListener('keyup', function(e) { if (String.fromCharCode(e.keyCode).toLowerCase() != key.toLowerCase()) return; var query = '#togpane_skill tr:nth-child(1) ~ tr > td > div:not([style])'; var target = document.querySelector(query); var pane = document.getElementById('togpane_skill'); var toggle = document.getElementById('ckey_skills'); if (!target) return; while (pane.style.cssText.length) toggle.onclick(); target.onclick(); }, false); }
(It is just a little different) Nevertheless, rkinasz's script is a hundred times better and more extensible than my poorly skilled javascript code above, especially if you wanna learn a little javascript whilst extending HV. I just made a copy for myself to play with it when I get some time.
|
|
|
|
 |
|
Apr 2 2013, 02:53
|
fishinsea
Group: Members
Posts: 1,813
Joined: 20-November 10

|
damn, i think i got more slaughter and destruction bindings than every other type combined by now (IMG:[ invalid] style_emoticons/default/blink.gif)
|
|
|
Apr 2 2013, 03:55
|
skillchip
Group: Catgirl Camarilla
Posts: 5,754
Joined: 31-December 06

|
QUOTE(T_Starrk @ Apr 2 2013, 01:29)  I haven't gotten a slaughter binding from my monsters since 2012 (IMG:[ invalid] style_emoticons/default/cry.gif) 9 months to go!
|
|
|
Apr 2 2013, 04:30
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08

|
So how long would the next HV patch get delayed if [ lego.cuusoo.com] this got funded?
|
|
|
Apr 2 2013, 14:24
|
T_Starrk
Group: Members
Posts: 4,653
Joined: 20-March 12

|
QUOTE(Slobber @ Apr 1 2013, 18:01)  how many munsters do you have? (IMG:[ invalid] style_emoticons/default/ohmy.gif) 15, lol. Last time I got one was in December (IMG:[ invalid] style_emoticons/default/sad.gif) . Taking a look at my inventory it looks like I've gotten every other kind of binding this year. Damn I have a shitload of elemental resist and proficiency bindings (IMG:[ invalid] style_emoticons/default/cry.gif) . So yeah, I guess bad luck...
|
|
|
|
 |
|
Apr 3 2013, 04:37
|
ChosenUno
Group: Gold Star Club
Posts: 4,170
Joined: 23-February 10

|
QUOTE(T_Starrk @ Apr 2 2013, 19:24)  15, lol. Last time I got one was in December (IMG:[ invalid] style_emoticons/default/sad.gif) . Taking a look at my inventory it looks like I've gotten every other kind of binding this year. Damn I have a shitload of elemental resist and proficiency bindings (IMG:[ invalid] style_emoticons/default/cry.gif) . So yeah, I guess bad luck... And I get about 5 slaughters a week (IMG:[ invalid] style_emoticons/default/tongue.gif)
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
 |
 |
 |
|