Welcome Guest ( Log In | Register )

291 Pages V « < 93 94 95 96 > »   
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 3 2015, 15:41
Post #1867
Dan31



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


QUOTE(djackallstar @ Dec 21 2014, 02:56) *

The script can now display a timer for a lottery thread as well.
[github.com] Download Link unchanged.

I feel like the site providing the timer is kinda slow nowadays. Maybe reduce the default refresh interval to 300s? Or even better, maybe adjust the refresh interval for individual counters based on the time remaining? (ie refresh counters with a few minutes remaining more often than those with several hours remaining)

Actually, do you need to hit the countdown server at all? Just read the durations and put a javascript timer.

This post has been edited by Dan31: Jan 3 2015, 15:48
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 3 2015, 16:13
Post #1868
djackallstar



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


QUOTE(Dan31 @ Jan 3 2015, 21:41) *

Actually, do you need to hit the countdown server at all? Just read the durations and put a javascript timer.

Hmm I don't know how to get the remaining time from the src attribute of the countdown timer image.
For example:
CODE
http://e-hentai-countdown.darknessfall.com/EH-Cdwn.png?auctionname=Remaining Time&month=12&day=31&year=2100&offset=3&hour=09&minute=00&expire=Expired&template=default-transparent

If I can figure out how much time remains from this url, then as you say, no need to visit the countdown server at all.
But the problem is that I don't know how, or more precisely, can't be bothered to calculate it by myself, because time & timezone is too complex to deal with by myself:

But you are right, visiting the countdown server so frequently isn't a good thing, as it increases the server load.
Maybe I should try to find a JS lib to deal with the time & timezone problem.

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

 
post Jan 3 2015, 16:48
Post #1869
Dan31



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


QUOTE(djackallstar @ Jan 3 2015, 15:13) *

Hmm I don't know how to get the remaining time from the src attribute of the countdown timer image.
For example:
CODE
http://e-hentai-countdown.darknessfall.com/EH-Cdwn.png?auctionname=Remaining Time&month=12&day=31&year=2100&offset=3&hour=09&minute=00&expire=Expired&template=default-transparent

If I can figure out how much time remains from this url, then as you say, no need to visit the countdown server at all.
But the problem is that I don't know how, or more precisely, can't be bothered to calculate it by myself, because time & timezone is too complex to deal with by myself:

But you are right, visiting the countdown server so frequently isn't a good thing, as it increases the server load.
Maybe I should try to find a JS lib to deal with the time & timezone problem.

Convert the time in the url into a javascript [www.w3schools.com] Date object, and construct a timer around this. It's not trivial, but not too hard either.
CODE
var now = new Date(); //current time
var expiration_date = new Date(year, month, day, hours, minutes, seconds, milliseconds); //replace the values by what you parsed from the url
var time_remaining = expiration_date - now;
//then parse time_remaining with getFullYear(), getMonth(), etc. and print it (Maybe there is a simpler method, with a function doing the correct formatting?)
//and then you have to use setInterval() to update time_remaining, putting a interval value equals to 1 unit of the rightmost bit should be enough
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 4 2015, 07:36
Post #1870
oohmrparis



We are ping-pong player
*****
Group: Gold Star Club
Posts: 523
Joined: 18-June 13
Level 500 (Ponyslayer)


QUOTE(register1997 @ Jan 3 2015, 12:08) *

possible to also add SP and MP alert?

if you use HoverPlay or SpellSpam, don't need that function.

This post has been edited by oohmrparis: Jan 4 2015, 07:36
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 6 2015, 21:01
Post #1871
ctxl



バカ
****
Group: Members
Posts: 425
Joined: 20-May 12
Level 455 (Godslayer)


QUOTE(djackallstar @ Jan 3 2015, 06:13) *
If I can figure out how much time remains from this url

in coffeescript:
[gist.github.com] https://gist.github.com/ctxl/3be06e2bf0980e6ca518

or the compiled version, if you're into that sort of thing:
[pastebin.com] http://pastebin.com/frU6khgu*

or if you don't understand either:
- regex match url parameters
- stuff them into an object for easy access
- create a new utc date object
- apply the timezone offset
- subtract the current time from the utc date object to get the remaining time

*copy, paste, and run this in your browser console to see it in action
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 10 2015, 23:14
Post #1872
showoff



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


May i ask why i lost all the data n setting(like used the master reset) of the script after installing HV STAT (5.6.5.1)?
Using chrome 39.0.2171.95 m
thanks!

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

 
post Jan 11 2015, 10:52
Post #1873
LazyShd



Need moar VNs
******
Group: Gold Star Club
Posts: 768
Joined: 5-May 13
Level 475 (Godslayer)


QUOTE(oohmrparis @ Mar 14 2014, 13:03) *

I've modified HVSTAT slim
Function is
・HP, Spark, Channeling Alert Alert more than once modified
Adjust key event handling not to overrun when an alert is shown
・Nopopup, effectDurations, skillHotkey, Roundcounter
・Draw a line at the end of the turn
・The display on the left panel of the current equipment number

for chrome
Attached File  hvmma_mod_for_chrome.user.zip ( 2.51k ) Number of downloads: 1636

for firefox
Attached File  hvmma_mod_for_firefox___adjustKey.zip ( 2.81k ) Number of downloads: 1283


HP Alert not working, "HPpercentage : 40," in the script, but nothing happens when hp goes below 40%. Everything else works fine. Using chrome.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 11 2015, 11:41
Post #1874
oohmrparis



We are ping-pong player
*****
Group: Gold Star Club
Posts: 523
Joined: 18-June 13
Level 500 (Ponyslayer)


QUOTE(LazyShd @ Jan 11 2015, 10:52) *

HP Alert not working, "HPpercentage : 40," in the script, but nothing happens when hp goes below 40%. Everything else works fine. Using chrome.

HP Alert are working in my environment.
Are you become "HPalert : true" ?
or use MouseMelee?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 11 2015, 14:58
Post #1875
coreguy



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


A script for logging damages and crits counts caused by mobs. Then the stats will be displayed at the upper right corner of boxes, like:

(IMG:[i.imgur.com] http://i.imgur.com/baucYbT.png)

Damage/crits.
Sometimes you may want to know who hits you hardest :/

install:
[dl.dropboxusercontent.com] https://dl.dropboxusercontent.com/u/37695/H...Logging.user.js



Attached File  HV_DamageLogging.user.zip ( 1.15k ) Number of downloads: 55


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

 
post Jan 11 2015, 16:16
Post #1876
LazyShd



Need moar VNs
******
Group: Gold Star Club
Posts: 768
Joined: 5-May 13
Level 475 (Godslayer)


QUOTE(oohmrparis @ Jan 11 2015, 13:41) *

Are you become "HPalert : true" ?


Missed this, sorry for troubles and thanks for script.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 12 2015, 04:12
Post #1877
Shrouded



Newcomer
*
Group: Members
Posts: 22
Joined: 11-May 11
Level 116 (Ascended)


I don't know if this is the right place for this but this is just stupid of google. Disabling my extensions like it's their business to do so. Can someone please help me with this?

CODE
gyazo.com/5ed0adbd582490ce6bdc8b5f88be8f89
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 12 2015, 04:19
Post #1878
Dan31



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


QUOTE(Shrouded @ Jan 12 2015, 03:12) *

I don't know if this is the right place for this but this is just stupid of google. Disabling my extensions like it's their business to do so. Can someone please help me with this?

CODE
gyazo.com/5ed0adbd582490ce6bdc8b5f88be8f89


Install Tampermonkey.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 13 2015, 11:44
Post #1879
Shrouded



Newcomer
*
Group: Members
Posts: 22
Joined: 11-May 11
Level 116 (Ascended)


QUOTE(Dan31 @ Jan 12 2015, 10:19) *

Install Tampermonkey.

Gotcha, thank you!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 14 2015, 17:28
Post #1880
White Joker



Lolilover
****
Group: Gold Star Club
Posts: 360
Joined: 18-January 09
Level 388 (Godslayer)


Latest firefox update seems to make the HVStat script crash the browser for me. Is anyone else getting this problem? Also, screw firefox for no in-built version rollback. If I want to use an older version, risk or no, I should be able to.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 14 2015, 22:01
Post #1881
coreguy



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


QUOTE(White Joker @ Jan 14 2015, 18:28) *

Latest firefox update seems to make the HVStat script crash the browser for me. Is anyone else getting this problem? Also, screw firefox for no in-built version rollback. If I want to use an older version, risk or no, I should be able to.


you may go to filehippo for an older build.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 15 2015, 08:27
Post #1882
LazyShd



Need moar VNs
******
Group: Gold Star Club
Posts: 768
Joined: 5-May 13
Level 475 (Godslayer)


Hi everyone!
I wonder if there are some script that will like "HP alert" pop up some message and stop everything when you have no Regen buff on yourself? If I remember correctly HVSTAT has something like that, but it slows down farm speed too much.
If there is no such script, maybe someone could make it for Chrome please?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 15 2015, 08:57
Post #1883
showoff



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


QUOTE(LazyShd @ Jan 15 2015, 06:27) *

Hi everyone!
I wonder if there are some script that will like "HP alert" pop up some message and stop everything when you have no Regen buff on yourself? If I remember correctly HVSTAT has something like that, but it slows down farm speed too much.
If there is no such script, maybe someone could make it for Chrome please?

HVSTAT doesnt slow down mine one n work quite well (IMG:[invalid] style_emoticons/default/cool.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 15 2015, 10:30
Post #1884
coreguy



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


QUOTE(LazyShd @ Jan 15 2015, 07:27) *

Hi everyone!
I wonder if there are some script that will like "HP alert" pop up some message and stop everything when you have no Regen buff on yourself? If I remember correctly HVSTAT has something like that, but it slows down farm speed too much.
If there is no such script, maybe someone could make it for Chrome please?


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");
}
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 15 2015, 12:01
Post #1885
LazyShd



Need moar VNs
******
Group: Gold Star Club
Posts: 768
Joined: 5-May 13
Level 475 (Godslayer)


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

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

Thanks for your help, but I know practically nothing about extensions and scripting, so I failed.
I am using:
QUOTE(oohmrparis @ Mar 14 2014, 13:03) *

I've modified HVSTAT slim
Function is
・HP, Spark, Channeling Alert Alert more than once modified
Adjust key event handling not to overrun when an alert is shown
・Nopopup, effectDurations, skillHotkey, Roundcounter
・Draw a line at the end of the turn
・The display on the left panel of the current equipment number

for chrome
Attached File  hvmma_mod_for_chrome.user.zip ( 2.51k ) Number of downloads: 1636


So I tried to create new extension for chrome with your script.
Attached File  regen.user.zip ( 320bytes ) Number of downloads: 59

And of course just copy and paste your script won't work, but this is limit of my skills.
Maybe someone is kind enough to make this for me, so I just install the chrome extension and everything will work fine?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jan 15 2015, 12:03
Post #1886
showoff



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


QUOTE(LazyShd @ Jan 15 2015, 10:01) *

Thanks for your help, but I know practically nothing about extensions and scripting, so I failed.
I am using:

So I tried to create new extension for chrome with your script.
Attached File  regen.user.zip ( 320bytes ) Number of downloads: 59

And of course just copy and paste your script won't work, but this is limit of my skills.
Maybe someone is kind enough to make this for me, so I just install the chrome extension and everything will work fine?


I wonder u need to add those in the script but not create a new one?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


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

 


Lo-Fi Version Time is now: 14th July 2025 - 20:11