|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Apr 24 2017, 04:55
|
karyl123
Group: Gold Star Club
Posts: 1,659
Joined: 9-January 11
|
QUOTE(Superlatanium @ Apr 24 2017, 03:38) fixed my problem. u da best.
|
|
|
|
|
|
Apr 26 2017, 06:50
|
Noeleo
Group: Members
Posts: 1,414
Joined: 16-January 15
|
QUOTE(Mewtty @ Jun 26 2013, 16:58) ~ Update for " NoPopup" ~ I noticed that the "NoPopup" script (the one that automatically dismisses the " You are victorious!" message) didn't exclude the final battle for Item World, meaning that once you finished your run through Item World, you would automatically be sent back to your "Weapon Selection" screen, without being given the chance to see the results/drops of that final battle. I made a quick fix for NoPopup so that the victory of the final Item World battle would also be excluded from being automatically dismissed. The classic version of NoPopup (which auto-dismisses every single Victory message) is also included, in the .zip archive below.
NoPopup_v1.6.zip ( 1.21k )
Number of downloads: 3382Can anyone post the working script where I can directly copy and paste into Tampermonkey? It didn't work when I tick the checkbox for "Allow in incognito". It suddenly disable by itself and cannot be enabled. And loading the js file into Tampermonkey didn't work either.
|
|
|
|
|
|
Apr 26 2017, 14:56
|
Kinights
Group: Gold Star Club
Posts: 988
Joined: 25-July 12
|
So, as far as I understand the history of CracklingCast, Spirit Stance can be used now because it still needs the player input to turn it on with a hover or mouse whell up or down.
So, can't this be applied for OFC or T3 spells as well?
Whenever OFC or a T3 spell is off cooldown, there could be a separate box to hover to use the attack, or to make it even more user friendly, the mouse wheel could be separated in two, so one box would use only mouse wheel up for the attacks, and the other would use mouse wheel down for the supportive spells for example, being fully customizable for the user to do as they please.
It could be quite useful for gems as well, as sometimes when I get a mana gem, I use it by mistake when my mana is comepletely full, so having it in the separated box would be helpfull to people who sometimes scroll up or down automatically before the brain can actually process the info that they got a gem they could save for later, making them regret having got so mechanically used to the action already.
It shouldn't be illegal, as it will still require player input, and won't have to detect anything like a new turn or number of monsters to activate.
This post has been edited by Kinights: Apr 26 2017, 15:37
|
|
|
|
|
|
Apr 26 2017, 15:23
|
Scremaz
Group: Gold Star Club
Posts: 24,304
Joined: 18-January 07
|
1. Spirit Shield can be IAed, so it's on a whole different level if compared with many other things 2. why should one bind something to wheel up/down, considering how often a miswheel may happen? (IMG:[ invalid] style_emoticons/default/huh.gif)
|
|
|
|
|
|
Apr 26 2017, 15:39
|
Kinights
Group: Gold Star Club
Posts: 988
Joined: 25-July 12
|
QUOTE(Scremaz @ Apr 26 2017, 10:23) 1. Spirit Shield can be IAed, so it's on a whole different level if compared with many other things 2. why should one bind something to wheel up/down, considering how often a miswheel may happen? (IMG:[ invalid] style_emoticons/default/huh.gif) 1. RIP, meant Spirit Stance. Fixed it now. -------------------- 2. Just a suggestion to make it more user friendly. If someone thinks that they will miswheel, they could just set the attacks/gems to be hover only. I only mouse wheel down when recasting my supportive spells, so I don't see any problem with wheeling up for attacks/gems when they become available. Take this as an example of what I mean: On this turn I could scroll up to use OFC, but I would prefer saving it for the next turn, but I would still scroll down to recast regen. +EditI'm not sure if this is possible, but if the attack box was set to lock hovering like with expiring supportive spells, and the player set T1~T3 melee attacks to the box when available, the player could then hover over a certain monster and use the shown skill on it with a scroll up. This would make it quite useful for SG arenas for people that use melee skills on them, being able to hover and do other stuff instead of paying full attention to HV. This post has been edited by Kinights: Apr 26 2017, 16:02
|
|
|
|
|
|
Apr 26 2017, 21:01
|
Beddhist
Newcomer
Group: Gold Star Club
Posts: 53
Joined: 21-December 13
|
So, I've been messing with scripts for a while, fixing a few errors in existing ones when they pop up. Where would people recommend I start if I wanted to make my own? I know javascript is the scripting language used, but is there anything else I should know, like jquery or any common errors when creating a new script?
|
|
|
|
|
|
Apr 26 2017, 22:39
|
Superlatanium
Group: Gold Star Club
Posts: 7,575
Joined: 27-November 13
|
QUOTE(Garbouw Deark @ Apr 26 2017, 19:01) So, I've been messing with scripts for a while, fixing a few errors in existing ones when they pop up. Where would people recommend I start if I wanted to make my own? I know javascript is the scripting language used, but is there anything else I should know, like jquery or any common errors when creating a new script? Just my preference, but I highly recommend using the built-in functions rather than large external libraries like jquery unless there's no other option. The number of errors encountered highly depends on the size of the script; it's easy to make ones only a few lines long without ever having to fix something, but large scripts with multiple interdependencies are very likely to cause headaches. It takes some practice.
|
|
|
|
|
|
Apr 27 2017, 17:05
|
SidZBear
Group: Gold Star Club
Posts: 560
Joined: 31-May 16
|
(IMG:[ i.imgur.com] http://i.imgur.com/kfzBwbM.png) Whenever I go to monster lab with the smart monster script, this is all I get. I can't seem to get it to update or do anything, and when I clicked to unlock monster slots, the entire thing quit working; I had to disable it to see anything on the monster screen. What exactly am I doing wrong?
|
|
|
|
|
|
Apr 27 2017, 17:15
|
Kinights
Group: Gold Star Club
Posts: 988
Joined: 25-July 12
|
QUOTE(SidZBear @ Apr 27 2017, 12:05) pic
Whenever I go to monster lab with the smart monster script, this is all I get. I can't seem to get it to update or do anything, and when I clicked to unlock monster slots, the entire thing quit working; I had to disable it to see anything on the monster screen. What exactly am I doing wrong?
Might be the browser, or maybe the custom font. If you haven't changed it yet, try going into Character --> Settings and change it to something else, as many scripts don't support, or get bugged when using HV's vannila font.
|
|
|
|
|
|
Apr 27 2017, 17:27
|
SidZBear
Group: Gold Star Club
Posts: 560
Joined: 31-May 16
|
QUOTE(Kinights @ Apr 27 2017, 08:15) Might be the browser, or maybe the custom font.
If you haven't changed it yet, try going into Character --> Settings and change it to something else, as many scripts don't support, or get bugged when using HV's vannila font.
Changing font fixed it! You are super helpful today!
|
|
|
|
|
|
Apr 28 2017, 11:51
|
Scremaz
Group: Gold Star Club
Posts: 24,304
Joined: 18-January 07
|
another spreadsheet. this time is to calculate trainings costs and should be quite self-explaining QUOTE
Training_Cost_Calculator_1.1.zip ( 125.65k )
Number of downloads: 163 updated to v0.86, with the most recent Assimilator extension. note that Assimilator lv15+ are an extrapolation but error should be quite low (somewhere in the ppm range). PS: if someone knows how to connect the red dots into a curve that has the same tendency of the blue one, please pm me. This post has been edited by Scremaz: Aug 20 2017, 15:31
|
|
|
|
|
|
Apr 28 2017, 18:03
|
chjj30
Group: Catgirl Camarilla
Posts: 10,858
Joined: 5-January 14
|
QUOTE(Scremaz @ Apr 28 2017, 17:51) another spreadsheet. this time is to calculate trainings costs and should be quite self-explaining PS: if someone knows how to connect the red dots into a curve that has the same tendency of the blue one, please pm me.
Well, with this, now I needn't the Picture of the Cost of Scavenger, Luck of the Draw , Quartermaster and Archaeologist. Well, only a litte Problem, maybe only in my Computer. In some sheets I can't see the exact total Cost directly, because the Column is to narrow th show it. I tried to change the Column to be broader but it's locked and man can't change it unless man konws the Password.
|
|
|
|
|
|
Apr 28 2017, 18:06
|
Scremaz
Group: Gold Star Club
Posts: 24,304
Joined: 18-January 07
|
QUOTE(chjj30 @ Apr 28 2017, 18:03) Well, with this, now I needn't the Picture of the Cost of Scavenger, Luck of the Draw , Quartermaster and Archaeologist. Well, only a litte Problem, maybe only in my Computer. In some sheets I can't see the exact total Cost directly, because the Column is to narrow th show it. I tried to change the Column to be broader but it's locked and man can't change it unless man konws the Password. ah, yes. i tried many cases but i guess some of them slipped. also, usually i lock them because i prefer for people not to mess with the math algorythm, so it cannot be helped. (IMG:[ invalid] style_emoticons/default/heh.gif) that's Manifest Destiny spreadsheet, right? [edit]: btw, it seems due to the particular font you're using, and that's the reason because i used those three cells rather than simply one. that error happens only when the number is very big, and in those cases you'd definitely want to start using millions, since in those cases that's the proper range. either way, i updated it, and took the chance to add the separator in the [k] cells as well. This post has been edited by Scremaz: Apr 28 2017, 18:31
|
|
|
|
|
|
Apr 28 2017, 18:40
|
chjj30
Group: Catgirl Camarilla
Posts: 10,858
Joined: 5-January 14
|
QUOTE(Scremaz @ Apr 29 2017, 00:06) ah, yes. i tried many cases but i guess some of them slipped. also, usually i lock them because i prefer for people not to mess with the math algorythm, so it cannot be helped. (IMG:[ invalid] style_emoticons/default/heh.gif) that's Manifest Destiny spreadsheet, right? [edit]: btw, it seems due to the particular font you're using, and that's the reason because i used those three cells rather than simply one. that error happens only when the number is very big, and in those cases you'd definitely want to start using millions, since in those cases that's the proper range. either way, i updated it, and took the chance to add the separator in the [k] cells as well. Right, only with great Number. Thanks for the Updating!
|
|
|
|
|
|
Apr 30 2017, 01:46
|
SidZBear
Group: Gold Star Club
Posts: 560
Joined: 31-May 16
|
QUOTE(Superlatanium @ Jan 11 2017, 15:57) It's a really crappy script that I never really intended to publish (it was originally part of a bigger script just for auctions) so the code/"interface" (lol) is very ugly and there might still be bugs. Try this one. It'll show the percentiles without needing to press the silly button. Many ranges have been updated due to new information. It also now takes into account forge level and IW potencies, and tries to estimate the base value of the stat. (there may be 0-10% error depending on the amount of forging/IW levels).
Percentile_Ranges_1.1.3.user.js.txt ( 14.33k )
Number of downloads: 932I cannot get this to run at all; when I try to drop it into a browser (even after renaming) it just comes up as plaintext on the webpage install of installing as an extension. Am I doing something wrong, or is there an alternate?
|
|
|
|
|
|
Apr 30 2017, 02:31
|
Superlatanium
Group: Gold Star Club
Posts: 7,575
Joined: 27-November 13
|
QUOTE(SidZBear @ Apr 29 2017, 23:46) I cannot get this to run at all; when I try to drop it into a browser (even after renaming) it just comes up as plaintext on the webpage install of installing as an extension. Am I doing something wrong, or is there an alternate? It's not an extension, it's a userscript. The text is the code; you have to copy it into Greasemonkey or Tampermonkey.
|
|
|
Apr 30 2017, 02:43
|
SidZBear
Group: Gold Star Club
Posts: 560
Joined: 31-May 16
|
QUOTE(Superlatanium @ Apr 29 2017, 17:31) It's not an extension, it's a userscript. The text is the code; you have to copy it into Greasemonkey or Tampermonkey.
Oh... I didn't use those before. I are dum >.< Thank you! it works '>.>
|
|
|
May 9 2017, 08:15
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
|
see below
This post has been edited by sickentide: Jun 18 2017, 22:49
|
|
|
|
|
|
May 9 2017, 19:07
|
Usagi =
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
|
CODE java script: ((function() {
if (document.getElementById("inventory_equip") === null) { console.log("Go to HV Inventory Page!"); return; }
var url = window.location.protocol + "//" + window.location.hostname + "/";
var names = document.querySelectorAll(".eqp .fd2 > div, .eqpp .fd2 > div"); var locks = document.querySelectorAll(".eqpp > div:first-child, .eqp > div:first-child"); var ids = document.querySelectorAll(".eqpp > .eqdp, .eqp > .eqdp");
var queue = 0; var skipped = 0; var looping = true; var id;
for (var i = 0; i < names.length; i++) { if (names[i].textContent.match(/Crude|Fair|Average|Superior|Exquisite/) !== null && locks[i].className.includes("iu")) { id = parseInt(ids[i].id); queue++;
if (names[i].textContent.match(/Phase|Cotton/)) { names[i].textContent = "Salvage - " + names[i].textContent;; process(id, "acloth"); continue; }
if (names[i].textContent.match(/Staff/)) { names[i].textContent = "Salvage - " + names[i].textContent; process(id, "staff"); continue; }
names[i].textContent = "Bazaar - " + names[i].textContent; process(id); } else { names[i].textContent = ""; skipped++; } }
looping = false; done(0);
function process(id, category) { var x = new XMLHttpRequest(); x.onload = function() { done(1); };
if (category === undefined) { x.open("POST", url + "?s=Bazaar&ss=es", true); x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); x.send("select_mode=item_pane&select_item=" + id + "&select_count=1"); } else { x.open("POST", url + "?s=Forge&ss=sa&filter=" + category, true); x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); x.send("select_item=" + id); } }
function done(n) { queue -= n;
if (!looping) { if (queue == 0) { alert("Done! Skipped " + skipped); } else { console.log(queue + " left"); } } }
})())
This is a bookmarklet that salvages or bazaars all equipments that is of exquisite quality or lower and not locked. If its a cloth or staff, it will salvage it, everything else goes to the bazaar. Obviously, this setup is meant for mages. To install, just create a normal bookmark and paste the code above into the URL field. Remember to remove the space between "java script" at the beginning. The forum automatically separates the word javascript if it's enclosed in the code tag. To use, navigate to your inventory page and click on the bookmark. Upon completion, you will see a popup saying so and the number of equipment skipped. This number should match the number of slots used at the bottom after you reload the inventory page. The names of any equipment skipped will also be hidden, while processed equipment will have the action taken to them shown next to their names. This lets you easily see what the script has done. I tested this on Chromium 55 and I think it works fine. As a precaution, you should lock any valuable equipment. If you rename your Peerless Charged Robe to something like "Crude Pizza" and leave it unlocked, it will treat it as trash and bazaar it. Edit: Welp, fixed a slight mistake that causes code to run when it shouldn't. This post has been edited by LOL50015: May 9 2017, 19:55
|
|
|
|
|
|
May 12 2017, 15:18
|
Usagi =
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
|
CODE java script: ((function() {
var tab = document.querySelector(".cfbs > .fd4 > div");
if (!tab || tab.textContent != "Equipped") { console.log("Go to Repair Page!"); return; }
var url = window.location.protocol + "//" + window.location.hostname; var processing = true; var queue = 0; var msg = "";
var mats_needed = document.querySelectorAll("#rightpane span"); var split;
var mat_name = []; var mat_need = []; var mat_have = []; var mat_id = [];
for (var i = 0; i < mats_needed.length; i++) { split = mats_needed[i].textContent.split("x ");
mat_name.push(split[1]); mat_need.push(split[0]); mat_have.push(0); }
if (mat_name.length === 0) { alert("No Repairs Needed!"); return; }
var x = new XMLHttpRequest(); x.open("GET", url + "/?s=Bazaar&ss=is&filter=ma", true); x.onreadystatechange = (function() { if (x.readyState == 4) { if (x.status == 200) { process(x.responseText); } else { alert("Error Retrieving Bazaar Page!") } } }); x.send(null);
function process(htmlStr) { var parser = new DOMParser(); var doc = parser.parseFromString(htmlStr, "text/html");
var left_items = doc.querySelectorAll("#leftpane .iop, #leftpane .io"); var quantities = doc.querySelectorAll("#leftpane .iip, #leftpane .ii"); var count = 0; var index;
for (var i = 0; i < left_items.length && count < mat_name.length; i++) { index = mat_name.indexOf(left_items[i].textContent.trim()); if (index > -1) { mat_have[index] = quantities[i].textContent; count++; } }
var right_items = doc.querySelectorAll("#rightpane .iop > div, #rightpane .io > div"); count = 0;
for (var k = 0; k < right_items.length && count < mat_name.length; k++) { index = mat_name.indexOf(right_items[k].textContent.trim()); if (index > -1) { mat_id[index] = parseInt(right_items[k].id); count++; } }
for (var j = 0; j < mat_name.length; j++) { msg += "You have " + mat_have[j] + " " + mat_name[j] + "\n"; msg += "You need " + mat_need[j] + " " + mat_name[j] + "\n";
if (mat_need[j] - mat_have[j] > 0) { queue++; buy(mat_name[j], mat_need[j] - mat_have[j], mat_id[j]); }
msg += "\n"; }
processing = false; done(0); }
function buy(name, qty, id) { msg += "Bought " + qty + " " + name + " (ID: " + id + ")\n";
var x = new XMLHttpRequest(); x.onload = function() { done(1); }; x.open("POST", url + "/?s=Bazaar&ss=is&filter=ma", true); x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); x.send("select_mode=shop_pane&select_item=" + id + "&select_count=" + qty); }
function done(n) { if(n === 0 && queue == -1){ return; }
queue -= n;
if (queue === 0 && !processing) { alert("Done!\n\n" + msg); queue = -1; document.getElementById('repairall').submit(); } }
})())
This is a bookmarklet that buys materials from the bazaar if you don't have enough materials for repair before proceeding to repair your equipped gear. To use, navigate to the equipped tab of your repair page and click on the bookmarklet. After a while, a dialog box will pop up to tell you what you have, what you need and what it had bought, closing it will refresh the page with your gear fully repaired. Ideally, you would want to salvage all your junk equipment first before using this script. It works with all kinds of gear and repair materials, even those introduced in the future. It does not check if you have enough credits. If you don't have enough credits, it will buy as much as it could before failing to repair due to insufficient materials. I tested this on Chromium 55 and it seems to be working fine.
|
|
|
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|