Welcome Guest ( Log In | Register )

291 Pages V « < 94 95 96 97 > »   
Reply to this topicStart new topic
> HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd)

 
post Jan 16 2015, 14:16
Post #1896
showoff



Veteran Poster
********
Group: Gold Star Club
Posts: 3,778
Joined: 31-December 14
Level 500 (Ponyslayer)


QUOTE(Dan31 @ Jan 16 2015, 11:19) *

Either
CODE
Bind(111, Alt, Cast("Slow"));
Bind(106, Alt, Cast("Imperil"));
Bind(109, Alt, Cast("Blind"));

or
CODE
var KEY_SLASH = 111, KEY_STAR = 106, KEY_PLUS = 109;
Bind(KEY_SLASH, Alt, Cast("Slow"));
Bind(KEY_STAR, Alt, Cast("Imperil"));
Bind(KEY_PLUS, Alt, Cast("Blind"));


it works now!
thank you very much!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 16 2015, 19:17
Post #1897
showoff



Veteran Poster
********
Group: Gold Star Club
Posts: 3,778
Joined: 31-December 14
Level 500 (Ponyslayer)


new question, is the damage logging still working?
i tried n worked ytd but i dont know why it didnt work today...
QUOTE
// ==UserScript==
// @name HV Cooldown
// @namespace hentaiverse.org
// @description Show Cooldown of Spell/Skills on the Quickbar
// @include http://hentaiverse.org/*
// @version 1.1.2
// @author holy_demon
// ==/UserScript==


if (document.getElementById("battleform")) {



var HVCooldown = function() {

var Spell = function(name, cooldown, ready, ref) {
this.name = name;
this.cooldown = cooldown;
this.ready = ready;
this.ref = ref;
};
var getSpells = function() {
var spellInfo = {};
var quickbar_spells = document.querySelectorAll(".btqs");
for (var i = 0; i < quickbar_spells.length; i++) {
var ref = quickbar_spells[i];
var desc = ref.getAttribute("onmouseover");
var info = /\(\'([\w -]*?)\',.*\, (\d*?)\)/.exec(desc);
var opacity = ref.firstElementChild.style.opacity;
if (info && info.length === 3) {
spellInfo[info[1]] = new Spell(info[1], Number(info[2]), !Boolean(opacity), ref);
}

}
return spellInfo;
};

var updateCooldowns = function(old_cooldowns, spellInfo) {
var cur_cooldowns = {};
var log = document.getElementById("togpane_log").textContent;

for (var name in spellInfo) {
if (spellInfo[name].cooldown > 0) { //only examine spell with cooldowns
if (spellInfo[name].ready) {//all ready spells has current cooldown set to -1
cur_cooldowns[name] = -1;
} else if (old_cooldowns[name] > 0 && !document.getElementById("#ckey_continue")) { // if spell was on cooldown previously, reduce it by 1
cur_cooldowns[name] = old_cooldowns[name] - 1;
} else if (old_cooldowns[name] === -1) { //spell was ready last turn
if (RegExp("You (use|cast) " + name + "\\.").exec(log)) { //check if it was casted in battle -> set to max cd
cur_cooldowns[name] = spellInfo[name].cooldown;
} else { // wasn't casted, still ready but unavailable for different reasons
cur_cooldowns[name] = 0;
}
} else { // otherwise assuming no cooldown
cur_cooldowns[name] = 0;
}
}
}

return cur_cooldowns;
};

var drawCooldowns = function(cur_cooldowns, spellInfo) {
var cooldown_style = document.documentElement.appendChild(document.createElement("style"));
cooldown_style.textContent = ".cooldown_indicator {position: relative; display: inline-block; text-align: center; top: 30px; z-index: 100; margin:auto; background: #EFEEDC; border: 1px solid #5C0D11; font-weight: bold; min-width: 12px; padding: 0 1px;}";

for (var name in cur_cooldowns) {
var cooldown = spellInfo[name].ref.appendChild(document.createElement("div"));
cooldown.classList.add("cooldown_indicator");
if (cur_cooldowns[name] === -1) {
cooldown.textContent = "ready";
} else {
cooldown.textContent = cur_cooldowns[name];
}
}
};

this.run = function() {
var spellInfo = getSpells();
var spellCooldown = JSON.parse(sessionStorage.HV_cooldowns || "{}");
spellCooldown = updateCooldowns(spellCooldown, spellInfo);
sessionStorage.HV_cooldowns = JSON.stringify(spellCooldown);
drawCooldowns(spellCooldown, spellInfo);
};
};

(new HVCooldown()).run();
}
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 18 2015, 09:51
Post #1898
register1997



Active Poster
*******
Group: Members
Posts: 1,452
Joined: 24-November 10
Level 430 (Godslayer)


QUOTE(coreguy @ Jan 15 2015, 10:30) *

easy, if you are using HVSTAT slim, just add the following to the script:

CODE

var regenstatus = storage.getItem("regen") || "off";

if($(".bte img[src*=regen]") && regenstatus == "off") {
    storage.setItem("regen", "on");
}

if(!$(".bte img[src*=regen]") && regenstatus == "on") {
    alert("regen depleted");
    storage.setItem("regen", "off");
}


if not (you want a new script), then it is
CODE

var regenstatus = sessionStorage.getItem("regen") || "off";

if(document.querySelector(".bte img[src*=regen]") && regenstatus == "off") {
    sessionStorage.setItem("regen", "on");
}

if(!document.querySelector(".bte img[src*=regen]") && regenstatus == "on") {
    alert("regen depleted");
    sessionStorage.setItem("regen", "off");
}



How can I code similar SP and MP alert in HVstat slim? HVstat works, but it slows down much, seems HVstat keeps collecting drops data even I switch off setting.

This post has been edited by register1997: Jan 18 2015, 09:55
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 18 2015, 12:05
Post #1899
coreguy



Casual Poster
***
Group: Members
Posts: 119
Joined: 15-May 12
Level 355 (Godslayer)


QUOTE(register1997 @ Jan 18 2015, 08:51) *

How can I code similar SP and MP alert in HVstat slim? HVstat works, but it slows down much, seems HVstat keeps collecting drops data even I switch off setting.


first, add these to the setting object (var setting = {}). Customize the percentage numbers as you want.

CODE

    MPalert: true,
    MPpercentage: 50,
    SPalert: true,
    SPpercentage: 50,


then insert the following after the "HP alert' part
CODE

    // SP and MP alert
    if(settings.MPalert){
        var gaugeMP = d.getElementsByClassName('cwb2')[1].width;
        if(gaugeMP <= settings.MPpercentage * 1.2 && !storage.MPlimit){
            adjustKey('Magic is low!');
            storage.setItem('MPlimit', 'true');
        }else if(gaugeMP > settings.MPpercentage * 1.2 && storage.MPlimit){
            storage.removeItem('MPlimit');
        }
    }

    if(settings.SPalert){
        var gaugeSP = d.getElementsByClassName('cwb2')[2].width;
        if(gaugeSP <= settings.SPpercentage * 1.2 && !storage.SPlimit){
            adjustKey('Spirit is low!');
            storage.setItem('SPlimit', 'true');
        }else if(gaugeSP > settings.SPpercentage * 1.2 && storage.SPlimit){
            storage.removeItem('SPlimit');
        }
    }


This post has been edited by coreguy: Jan 18 2015, 12:09
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 18 2015, 12:41
Post #1900
Dan31



Chilling around
********
Group: Members
Posts: 4,399
Joined: 26-March 12
Level 491 (Godslayer)


QUOTE(register1997 @ Jan 18 2015, 09:51) *

How can I code similar SP and MP alert in HVstat slim? HVstat works, but it slows down much, seems HVstat keeps collecting drops data even I switch off setting.

The mousemelee in my sig stops on low HP/MP/SP if you want to use it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 18 2015, 13:05
Post #1901
register1997



Active Poster
*******
Group: Members
Posts: 1,452
Joined: 24-November 10
Level 430 (Godslayer)


QUOTE(coreguy @ Jan 18 2015, 12:05) *

first, add these to the setting object (var setting = {}). Customize the percentage numbers as you want.

CODE

    MPalert: true,
    MPpercentage: 50,
    SPalert: true,
    SPpercentage: 50,


then insert the following after the "HP alert' part
CODE

    // SP and MP alert
    if(settings.MPalert){
        var gaugeMP = d.getElementsByClassName('cwb2')[1].width;
        if(gaugeMP <= settings.MPpercentage * 1.2 && !storage.MPlimit){
            adjustKey('Magic is low!');
            storage.setItem('MPlimit', 'true');
        }else if(gaugeMP > settings.MPpercentage * 1.2 && storage.MPlimit){
            storage.removeItem('MPlimit');
        }
    }

    if(settings.SPalert){
        var gaugeSP = d.getElementsByClassName('cwb2')[2].width;
        if(gaugeSP <= settings.SPpercentage * 1.2 && !storage.SPlimit){
            adjustKey('Spirit is low!');
            storage.setItem('SPlimit', 'true');
        }else if(gaugeSP > settings.SPpercentage * 1.2 && storage.SPlimit){
            storage.removeItem('SPlimit');
        }
    }



Thank a lot!

Thanks Dan31 too, but I just need a very simple script which can remind me before the points go too low. I afraid other feature will slow my grind down.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 18 2015, 13:58
Post #1902
Dan31



Chilling around
********
Group: Members
Posts: 4,399
Joined: 26-March 12
Level 491 (Godslayer)


QUOTE(register1997 @ Jan 18 2015, 12:05) *

Thank a lot!

Thanks Dan31 too, but I just need a very simple script which can remind me before the points go too low. I afraid other feature will slow my grind down.

If you don't use a "hover to attack" script yet, I can assure you that it will boost your play speed.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 22 2015, 17:48
Post #1903
nanimoshiranai



Casual Poster
***
Group: Members
Posts: 208
Joined: 13-April 12
Level 348 (Godslayer)


I'm not sure about the scripts rules so I'm going to ask before doing something stupid and getting banned.

If I use a script that makes a hotkey to re-cast the buff that currently has 0 duration left. Would it be legal?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 23 2015, 03:27
Post #1904
djackallstar



ดีjackallstar
**********
Group: Gold Star Club
Posts: 8,221
Joined: 23-July 14
Level 500 (Godslayer)


QUOTE(nanimoshiranai @ Jan 22 2015, 23:48) *

I'm not sure about the scripts rules so I'm going to ask before doing something stupid and getting banned.

If I use a script that makes a hotkey to re-cast the buff that currently has 0 duration left. Would it be legal?

http://ehwiki.org/wiki/script#Forbidden_Actions
You may send a PM to varst for confirmation.

This post has been edited by djackallstar: Jan 23 2015, 03:27
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 26 2015, 20:30
Post #1905
tetron



Certified Retard!
*********
Group: Gold Star Club
Posts: 5,583
Joined: 30-July 14
Level 488 (Godslayer)


Stack Counter Script:

I didn't find an official script which shows Stack Levels (except HV-Stat). So I made one based on oohmrparis's code:

Attached File  Stack_Counter.user.zip ( 1.81k ) Number of downloads: 148

Feature:
- Display stack levels of Overwhelming Strike, Ether Tap, Penetrated Armor, and Bleeding Wound.

This post has been edited by tetron: Jan 26 2015, 20:32
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 26 2015, 21:14
Post #1906
Cleavs



A certain pervert. OT expert. Just dancing around in the game.
***********
Group: Gold Star Club
Posts: 24,317
Joined: 18-January 07
Level 500 (Ponyslayer)


QUOTE(tetron @ Jan 26 2015, 19:30) *

Stack Counter Script:

I didn't find an official script which shows Stack Levels (except HV-Stat). So I made one based on oohmrparis's code:

Attached File  Stack_Counter.user.zip ( 1.81k ) Number of downloads: 148

Feature:
- Display stack levels of Overwhelming Strike, Ether Tap, Penetrated Armor, and Bleeding Wound.

first download, yay!

[edit] would you be able to implement also the counter for spells cooldown in the same script, without the need to download HVStat full? (IMG:[invalid] style_emoticons/default/tongue.gif)

This post has been edited by Scremaz: Jan 26 2015, 21:33
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 26 2015, 21:53
Post #1907
hentai_fusion



Nyo
************
Group: Gold Star Club
Posts: 33,644
Joined: 14-August 09
Level 500 (Ponyslayer)


a standalone spell cooldown script already exist.

https://forums.e-hentai.org/index.php?showt...p;#entry3577989
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 26 2015, 22:17
Post #1908
tetron



Certified Retard!
*********
Group: Gold Star Club
Posts: 5,583
Joined: 30-July 14
Level 488 (Godslayer)


QUOTE(Scremaz @ Jan 27 2015, 00:44) *
would you be able to implement also the counter for spells cooldown in the same script, without the need to download HVStat full? (IMG:[invalid] style_emoticons/default/tongue.gif)

QUOTE(hentai_fusion @ Jan 27 2015, 01:23) *
a standalone spell cooldown script already exist.

https://forums.e-hentai.org/index.php?showt...p;#entry3577989

Yep. That's what I use. And it's not only for Spells, but for Skills too (Including OFC and FRD).

This post has been edited by tetron: Jan 26 2015, 22:21
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 26 2015, 22:25
Post #1909
Cleavs



A certain pervert. OT expert. Just dancing around in the game.
***********
Group: Gold Star Club
Posts: 24,317
Joined: 18-January 07
Level 500 (Ponyslayer)


QUOTE(hentai_fusion @ Jan 26 2015, 20:53) *

a standalone spell cooldown script already exist.

https://forums.e-hentai.org/index.php?showt...p;#entry3577989

didn't know it, thanks. also, dumb question: at the moment i have 8 scripts installed, 5 for inside battle and 3 for outside. would it change something if i edit the code of some of them to be on the same file or would it be the same thing?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 27 2015, 14:46
Post #1910
hentai_fusion



Nyo
************
Group: Gold Star Club
Posts: 33,644
Joined: 14-August 09
Level 500 (Ponyslayer)


depends on how the scripts are coded.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 27 2015, 17:51
Post #1911
tetron



Certified Retard!
*********
Group: Gold Star Club
Posts: 5,583
Joined: 30-July 14
Level 488 (Godslayer)


QUOTE(Scremaz @ Jan 27 2015, 01:55) *

dumb question: at the moment i have 8 scripts installed, 5 for inside battle and 3 for outside. would it change something if i edit the code of some of them to be on the same file or would it be the same thing?

Joining too many codes in one userscript may sometimes (very slightly) make you slower. However, if your intention is to merge light-weight scripts like HV-Cooldown or Stack Counter with a mid-weight script like HV-Stat Slim, then there will be no performance penalty. Merging more codes with HV-Stat is a different story however (IMG:[invalid] style_emoticons/default/laugh.gif) .
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 27 2015, 19:44
Post #1912
Cleavs



A certain pervert. OT expert. Just dancing around in the game.
***********
Group: Gold Star Club
Posts: 24,317
Joined: 18-January 07
Level 500 (Ponyslayer)


let's see if i have the will to do it then. thanks to both for now
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 28 2015, 14:09
Post #1913
hentai_fusion



Nyo
************
Group: Gold Star Club
Posts: 33,644
Joined: 14-August 09
Level 500 (Ponyslayer)


my advice... don't fix what isn't broken, you will regret it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 28 2015, 14:45
Post #1914
Cleavs



A certain pervert. OT expert. Just dancing around in the game.
***********
Group: Gold Star Club
Posts: 24,317
Joined: 18-January 07
Level 500 (Ponyslayer)


QUOTE(hentai_fusion @ Jan 28 2015, 13:09) *

my advice... don't fix what isn't broken, you will regret it.

yup. it's one of the few things i understood from using a pc for some years (IMG:[invalid] style_emoticons/default/biggrin.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 29 2015, 18:40
Post #1915
PowerOfTwo32



Newcomer
*
Group: Members
Posts: 46
Joined: 14-October 11
Level 316 (Godslayer)


It is very likely those 8 scripts will parse/query the same part of the game for data and such. combining them would be more involved if you wanted it optimized at least.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


291 Pages V « < 94 95 96 97 > » 
Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 21st September 2025 - 10:57