Welcome Guest ( Log In | Register )

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

 
post Aug 22 2016, 05:17
Post #3207
DamienCash



Former Delinquent, 1H Cold Arcanist!
***
Group: Gold Star Club
Posts: 241
Joined: 14-October 13
Level 385 (Godslayer)


QUOTE(hansvar92 @ Aug 21 2016, 18:51) *

Superlatanium's HV Counter plus save 1.2.1 does not have 'start' function (IMG:[invalid] style_emoticons/default/heh.gif)

use this [attachmentid=90678]

CODE
window.addEventListener('DOMContentLoaded', function() {
  if (document.getElementById('togpane_log')) {
    track();
    var mo = new MutationObserver(track);
    mo.observe(document.getElementById("monsterpane"), {childList: true});
  }
  else reset();
});

...in hindsight, I should have noticed that. But it does gloriously work now. Thank you very much.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 24 2016, 02:35
Post #3208
DamienCash



Former Delinquent, 1H Cold Arcanist!
***
Group: Gold Star Club
Posts: 241
Joined: 14-October 13
Level 385 (Godslayer)


The Item Manager 1.5.0's Auto-Shriner is certainly very helpful, but I find it [i.share.pho.to] somewhat difficult to parse through the results. I figure I might be able to insert a break or a newline character in the code, but I am not sure where. May I ask for some assistance again?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 24 2016, 05:29
Post #3209
sigo8



Clover Sprite
********
Group: Gold Star Club
Posts: 3,648
Joined: 9-November 11
Level 500 (Ponyslayer)


QUOTE(DamienCash @ Aug 23 2016, 18:35) *

The Item Manager 1.5.0's Auto-Shriner is certainly very helpful, but I find it [i.share.pho.to] somewhat difficult to parse through the results. I figure I might be able to insert a break or a newline character in the code, but I am not sure where. May I ask for some assistance again?

I looked though the code and they're already are newline but the browser is just collapsing them.
You just need to use some CSS to prevent that. Add this line around line 78, after a similar line.
CODE
      addCSSRule("td .fd2 { white-space: pre-line; }");

It mostly works, but there's a lots of extra newlines, and there could be other complications I haven't found.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2016, 00:05
Post #3210
Sapo84



Deus lo vult
********
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
Level 500 (Ponyslayer)


Ok, worked a bit on Reloader's in the past weeks.

I decided that just adding comments and touching here and there wasn't enough so I went full refactor mode and ended up with [github.com] https://github.com/Sapo84/Reloader/blob/Ver...eloader.user.js (still very much in beta).
I'm really pretty unsure about the naming used (Domain sounds super-dumb in a script) but at least I could remove the anonymous functions and the comments block.

Posted here just to get some feedback on it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2016, 10:07
Post #3211
ahmadindra20



Casual Poster
***
Group: Gold Star Club
Posts: 175
Joined: 4-January 13
Level 356 (Godslayer)


QUOTE(atashiyuki @ Jul 15 2016, 06:03) *

Wrote a script to prevent random encounter link from disapppearing after clicking it

After your click , the text got changed so that you'll never forget whether you have triggered the random encounter or whether you have press "refresh"

there is an option , you can choose to fight in alt.hentaiverse.org

CODE

// ==UserScript==
// @name        AlwaysShowRE
// @namespace   HVASRE
// @author      atashiyuki
// @description Show Random Enconter link after clicking
// @version     1
// @match       http://e-hentai.org
// @grant       none
// ==/UserScript==

//fight in alt.hentaiverse.org
var alt=false;

if(document.getElementById('eventpane')!=null){
  var content=document.getElementById('eventpane').children[1].children[0].onclick.toString().split("document.getElementById('eventpane').style.display='none';");
  var formar=content[0].split("{")[1].split("hentaiverse.");
  if(alt){
    document.getElementById('eventpane').children[1].children[0].onclick=Function("document.getElementById('eventpane').children[1].children[0].textContent='Clicked, Retry?';"+formar[0]+"alt.hentaiverse."+formar[1]+content[1].split("}")[0]);
  }
  else {
    document.getElementById('eventpane').children[1].children[0].onclick=Function("document.getElementById('eventpane').children[1].children[0].textContent='Clicked, Retry?';"+content[0].split("{")[1]+content[1].split("}")[0]);
  }
}


nice script, could someone add line of script so that we can play random encounter battle in a new tab instead a new window of our browser? (IMG:[invalid] style_emoticons/default/rolleyes.gif)
as reference here is the script made by superlatanium to play RE in same window (but unfortunately I would like to play battle in alt.hentaiverse)
https://forums.e-hentai.org/index.php?s=&am...t&p=4252859

This post has been edited by ahmadindra20: Aug 25 2016, 10:24
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2016, 11:12
Post #3212
ahmadindra20



Casual Poster
***
Group: Gold Star Club
Posts: 175
Joined: 4-January 13
Level 356 (Godslayer)


QUOTE(Sapo84 @ Aug 25 2016, 00:05) *

Ok, worked a bit on Reloader's in the past weeks.

I decided that just adding comments and touching here and there wasn't enough so I went full refactor mode and ended up with [github.com] https://github.com/Sapo84/Reloader/blob/Ver...eloader.user.js (still very much in beta).
I'm really pretty unsure about the naming used (Domain sounds super-dumb in a script) but at least I could remove the anonymous functions and the comments block.

Posted here just to get some feedback on it.

I have tested it, and the result is very good, its very convenient to have right click function to cure/full cure and hover on gems to use them, nice (IMG:[invalid] style_emoticons/default/biggrin.gif) . Is it possible to include left click funtion to use OFC? anyway well done pal (IMG:[invalid] style_emoticons/default/smile.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2016, 11:53
Post #3213
Sapo84



Deus lo vult
********
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
Level 500 (Ponyslayer)


QUOTE(ahmadindra20 @ Aug 25 2016, 11:12) *

I have tested it, and the result is very good, its very convenient to have right click function to cure/full cure and hover on gems to use them, nice (IMG:[invalid] style_emoticons/default/biggrin.gif) . Is it possible to include left click funtion to use OFC? anyway well done pal (IMG:[invalid] style_emoticons/default/smile.gif)

I don't think it's a good idea to add functions on left click, I'm sure it will create problems.
I will probably add middle click function for those kind of actions (I also noticed after committing that I introduced a bug on right click function, it should work even during auto-attack, i placed Temp.rightClick = false in the wrong place, it should have been in the submit function).
It's also planned to:
- add the lists of spells and hardcode if they are support or not (so more flexibility)
- hack potion support at least in heal rotation
- highlight why the hover is stopped (I think hoverplay adds a color border) so you can immediately see if you're out of hp, mp or sp

I'm trying to balance adding too much complexity (there's already crackling cast that does a good job if you really want complex configurations) with having at least a usable script for every combat style.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2016, 13:01
Post #3214
ahmadindra20



Casual Poster
***
Group: Gold Star Club
Posts: 175
Joined: 4-January 13
Level 356 (Godslayer)


yeah I know, the more simple the reloader is the more better it become, personally I dont use crackling cast for some reason, somehow thanks to crackling cast script, u manage to add spell rotation function in reloader, thats why I am really grateful pal (IMG:[invalid] style_emoticons/default/smile.gif)

And thats why I think the only left function is OFC, so it would be nice if it can be integrated on left click/middle click (but I prefer left click, its more easy and also my mouse middle click is broken hahaha... (IMG:[invalid] style_emoticons/default/laugh.gif) )

btw I have already ask Dan31 to add function to cast OFC on left click when we click outside monster pane and to cast imperil on right click when we click in monster pane, but he has not answering my request yet because he rarely log in
(when we talk via PM, he says he is rarely log in in this site anymore and when he is online, he only log in to feed his monsters (IMG:[invalid] style_emoticons/default/smile.gif) )

(sorry for bad grammar (IMG:[invalid] style_emoticons/default/biggrin.gif) )
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2016, 15:55
Post #3215
Superlatanium



Dreaming of optimizing the system
**********
Group: Gold Star Club
Posts: 7,631
Joined: 27-November 13
Level 500 (Godslayer)


QUOTE(ahmadindra20 @ Aug 25 2016, 08:07) *
nice script, could someone add line of script so that we can play random encounter battle in a new tab instead a new window of our browser? (IMG:[invalid] style_emoticons/default/rolleyes.gif)
as reference here is the script made by superlatanium to play RE in same window (but unfortunately I would like to play battle in alt.hentaiverse)
https://forums.e-hentai.org/index.php?s=&am...t&p=4252859
For alt., add this line:
CODE
href = href.replace('hentaiverse', 'alt.hentaiverse');
right below the "var href = ..." line.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2016, 18:44
Post #3216
ahmadindra20



Casual Poster
***
Group: Gold Star Club
Posts: 175
Joined: 4-January 13
Level 356 (Godslayer)


thanks Superlatanium, u r so super (IMG:[invalid] style_emoticons/default/biggrin.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 25 2016, 22:09
Post #3217
Sapo84



Deus lo vult
********
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
Level 500 (Ponyslayer)


QUOTE(ahmadindra20 @ Aug 25 2016, 13:01) *

And thats why I think the only left function is OFC, so it would be nice if it can be integrated on left click/middle click (but I prefer left click, its more easy and also my mouse middle click is broken hahaha... (IMG:[invalid] style_emoticons/default/laugh.gif) )

The problem is that left click is used for all the normal operations of the page.
Maybe I can attach OFC on left click on battle log or something like that.
I will consider it as an added extra.

(you're still better off getting a working mouse (IMG:[invalid] style_emoticons/default/heh.gif))
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 26 2016, 03:29
Post #3218
ahmadindra20



Casual Poster
***
Group: Gold Star Club
Posts: 175
Joined: 4-January 13
Level 356 (Godslayer)


Attach OFC on left click on battle log or similiar like that is sounds like a great idea (IMG:[invalid] style_emoticons/default/smile.gif)
I cant wait to test it pal (IMG:[invalid] style_emoticons/default/biggrin.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 27 2016, 16:52
Post #3219
RoadShoe



Press any key to continue... Where's the any key?
********
Group: Catgirl Camarilla
Posts: 3,241
Joined: 9-August 15
Level 500 (Godslayer)


Is there a script that will count the number of tokens used on a monster's page and display it?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 29 2016, 14:18
Post #3220
RoadShoe



Press any key to continue... Where's the any key?
********
Group: Catgirl Camarilla
Posts: 3,241
Joined: 9-August 15
Level 500 (Godslayer)


QUOTE(redphil @ Aug 27 2016, 16:52) *

Is there a script that will count the number of tokens used on a monster's page and display it?


Well, that didn't go anywhere.

How about a bounty to develop a script that will show total tokens used on each monster page, and total tokens for all monster pages on the monster summary page?

2m credits or 320 Hath?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 29 2016, 15:51
Post #3221
DamienCash



Former Delinquent, 1H Cold Arcanist!
***
Group: Gold Star Club
Posts: 241
Joined: 14-October 13
Level 385 (Godslayer)


QUOTE(redphil @ Aug 29 2016, 08:18) *

Well, that didn't go anywhere.

How about a bounty to develop a script that will show total tokens used on each monster page, and total tokens for all monster pages on the monster summary page?

2m credits or 320 Hath?
Theoretically, each filled Chaos level is represented by the following HTML:
CODE
<div style="float:left; width:8px; height:15px; background:url(/y/monster/upg2.png) no-repeat"> </div>

A clumsy way of calculating Chaos Tokens would be to count the number of "upg2.png"s per table row and applying any necessary calculations. I am somewhat capable of scripting, but I am sure someone else can make a more efficient script more easily.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 29 2016, 16:35
Post #3222
DamienCash



Former Delinquent, 1H Cold Arcanist!
***
Group: Gold Star Club
Posts: 241
Joined: 14-October 13
Level 385 (Godslayer)


QUOTE(redphil @ Aug 29 2016, 08:18) *

Well, that didn't go anywhere.

How about a bounty to develop a script that will show total tokens used on each monster page, and total tokens for all monster pages on the monster summary page?

2m credits or 320 Hath?
CODE
var chaosRows = document.getElementById("chaos_pane").getElementsByTagName("tr");
var chaosTotal = 0;

for (var i = 0; i < chaosRows.length; i++) {
    var chaosCount = chaosRows[i].innerHTML.split(/upg2.png/).length - 1;
    var chaosIncrement = 0;

    while (chaosCount > 0) {
        chaosIncrement++
        chaosTotal += chaosIncrement;
        chaosCount--;
    }
}

var button = document.createElement("input");
button.id = "chaosText";
button.readOnly = true;
button.type = "text";
button.value = chaosTotal + " Chaos Tokens";
document.getElementById("feed_pane").appendChild(button);
Done, at least the first half.
EDIT: Unnecessary button is unnecessary.
EDIT 2: Still working on getting all the Chaos Token total of all monsters. First time working with localStorage and DOM manipulation, but I believe I am making headway.

This post has been edited by DamienCash: Aug 30 2016, 02:16
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 30 2016, 03:54
Post #3223
RoadShoe



Press any key to continue... Where's the any key?
********
Group: Catgirl Camarilla
Posts: 3,241
Joined: 9-August 15
Level 500 (Godslayer)


QUOTE(DamienCash @ Aug 29 2016, 16:35) *

CODE
var chaosRows = document.getElementById("chaos_pane").getElementsByTagName("tr");
var chaosTotal = 0;

for (var i = 0; i < chaosRows.length; i++) {
    var chaosCount = chaosRows[i].innerHTML.split(/upg2.png/).length - 1;
    var chaosIncrement = 0;

    while (chaosCount > 0) {
        chaosIncrement++
        chaosTotal += chaosIncrement;
        chaosCount--;
    }
}

var button = document.createElement("input");
button.id = "chaosText";
button.readOnly = true;
button.type = "text";
button.value = chaosTotal + " Chaos Tokens";
document.getElementById("feed_pane").appendChild(button);
Done, at least the first half.
EDIT: Unnecessary button is unnecessary.
EDIT 2: Still working on getting all the Chaos Token total of all monsters. First time working with localStorage and DOM manipulation, but I believe I am making headway.


Outstanding! Yes!!

Let me know up front if you're going to be wanting the Hath or credits. If Hath, I need to let it grow for 3 days or so. (IMG:[invalid] style_emoticons/default/smile.gif)

Edit: Of course I could just buy the Hath.. duh.. Sometimes I don't think. (IMG:[invalid] style_emoticons/default/rolleyes.gif)

Let me know, and great work so far!! (IMG:[invalid] style_emoticons/default/smile.gif)

This post has been edited by redphil: Aug 30 2016, 04:03
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 30 2016, 17:27
Post #3224
DamienCash



Former Delinquent, 1H Cold Arcanist!
***
Group: Gold Star Club
Posts: 241
Joined: 14-October 13
Level 385 (Godslayer)


HV Chaos Calculator 1.1
See here.

This post has been edited by DamienCash: Aug 30 2016, 19:23
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 30 2016, 18:06
Post #3225
Sapo84



Deus lo vult
********
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
Level 500 (Ponyslayer)


QUOTE(DamienCash @ Aug 30 2016, 17:27) *

HV Chaos Calculator 1.0
[attachmentid=91047]
Adds two textboxes to a monster's page to see just how many Chaos Tokens you fed to your favorite monsters. Powered by your browser's local storage.

Note: First-time users will need to visit each monster's page individually to run the calculator. From then on, the calculator will automatically update whenever you upgrade an existing monster.


Just took a look at the code.
Couple of suggestions:
  • Don't use toString() before local storage and split after reading, the correct way to store object is JSON.stringify(*yourObject*) before saving and JSON.parse(*theStringYouGetFromLocalstorage*) for getting the array. In this way you don't even need the parseInt part.
  • I would execute line 66 and 67 only if the chaosTotal is different than the previously stored one
  • Line 91 should be outside of the for inner for but inside of the if.
  • It's better to make the // @match more specific, I think it should run it only on monster lab, not everywhere (otherwise if you don't have reloader it could even slow down combat)


This post has been edited by Sapo84: Aug 30 2016, 18:06
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Aug 30 2016, 18:36
Post #3226
DamienCash



Former Delinquent, 1H Cold Arcanist!
***
Group: Gold Star Club
Posts: 241
Joined: 14-October 13
Level 385 (Godslayer)


QUOTE(Sapo84 @ Aug 30 2016, 12:06) *

Just took a look at the code.
Couple of suggestions:
  • Don't use toString() before local storage and split after reading, the correct way to store object is JSON.stringify(*yourObject*) before saving and JSON.parse(*theStringYouGetFromLocalstorage*) for getting the array. In this way you don't even need the parseInt part.
  • I would execute line 66 and 67 only if the chaosTotal is different than the previously stored one
  • Line 91 should be outside of the for inner for but inside of the if.
  • It's better to make the // @match more specific, I think it should run it only on monster lab, not everywhere (otherwise if you don't have reloader it could even slow down combat)
Righto, I will get on that within two Dawns. I figured I would need to make at least some performance changes. Thanks for the feedback.

EDIT: I surprisingly managed to not break anything, or at least it still works on my end. New build coming up soon.

This post has been edited by DamienCash: Aug 30 2016, 19:07
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


291 Pages V « < 160 161 162 163 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 28th July 2025 - 21:00