|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Jan 21 2014, 17:01
|
Lement
Group: Members
Posts: 2,977
Joined: 28-February 12
|
Mousemelee has been used for months and has hundred of downloads, plus the code₁ has been seen₂ by Tenboro₃. I'm sure people would notice if it got them banned.
Of course, by then they're banned though. In any case, if you are not sure, PM the guy. The rules are determined so you don't have to ask everything, the final decision is still up to him. So rules-lawyer to make stuff that sodomizes the server and at the very least, your script will be taken down.
As for clicking the monster after the first click, have you looked into a numpad or mousemelee?
₁ Version 1.3 one, not most recent rewrite. ₂ Maybe. ₃ When taking it down due violation with css.
This post has been edited by Lement: Jan 21 2014, 17:02
|
|
|
|
|
|
Jan 21 2014, 17:03
|
gc00018
Group: Catgirl Camarilla
Posts: 3,735
Joined: 26-August 11
|
QUOTE(varst @ Jan 21 2014, 14:51)
You should ask him if ScanAll script is okay.
I agree with it. Just ask Tenb! Let the ponys decide it. (IMG:[ invalid] style_emoticons/default/rolleyes.gif)
|
|
|
Jan 21 2014, 18:29
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10
|
Disable\Enable button is pretty handy for mousemelee btw (IMG:[ invalid] style_emoticons/default/happy.gif) Improved it more after sending :3
|
|
|
Jan 21 2014, 18:31
|
Amaduyu Mitsumi
Group: Gold Star Club
Posts: 1,609
Joined: 2-October 11
|
Is a script that disables all flashing of player's/monsters' status effects possible?
|
|
|
Jan 21 2014, 20:45
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(Kagoromo @ Jan 22 2014, 03:31) Is a script that disables all flashing of player's/monsters' status effects possible?
It's possible, just have to change get all the elements with id "effect_expire", change them into something else. Or you could just put this at the end of any battle script CODE new function() { var nl = document.querySelectorAll("*[id*='effect_expire']"); for (i = 0; i < nl.length; i++) { nl[i].id = nl[i].id.replace(/expire/,"expire_null"); //stop flashing nl[i].style.opacity=1 //restore opacity } }();
This post has been edited by holy_demon: Jan 21 2014, 20:53
|
|
|
|
|
|
Jan 21 2014, 22:33
|
Dan31
Group: Members
Posts: 4,399
Joined: 26-March 12
|
QUOTE(Kagoromo @ Jan 21 2014, 17:31) Is a script that disables all flashing of player's/monsters' status effects possible?
It's not only possible, it's done! No Blinking for Firefox: Disable buff/debuff blinking when they are about to end.
hvnb.user.zip ( 686bytes )
Number of downloads: 107 That was my first time fiddling with @run-at document-start, it was kinda interesting. Edit: dubbed it "for Firefox". This post has been edited by Dan31: Jan 22 2014, 17:42
|
|
|
|
|
|
Jan 22 2014, 01:56
|
skillchip
Group: Catgirl Camarilla
Posts: 5,753
Joined: 31-December 06
|
QUOTE(varst @ Jan 21 2014, 13:40) Quoting Tenboro's words: Theoretically scanning multiple monsters would go into the 'automates multiple actions' category. Something like 'cast cure when you have less than 50% HP' would violate the 'takes in-game actions based on parsing the state of the game'.
However, it should be okay if -> you bind the scan to a key so you don't need to click that multiple times -> notify you when you have less than 50% HP (notify =/= take action)
Scan mousemelee!
|
|
|
|
|
|
Jan 22 2014, 02:30
|
Amaduyu Mitsumi
Group: Gold Star Club
Posts: 1,609
Joined: 2-October 11
|
QUOTE(holy_demon @ Jan 22 2014, 01:45)
I appended your code to the MouseMelee script and it works. thanks. (IMG:[ invalid] style_emoticons/default/happy.gif) QUOTE(Dan31 @ Jan 22 2014, 03:33)
Doesn't seem to work for me. Do I have to edit the script before using? I do like the idea of having a seperate script for this function...
|
|
|
Jan 22 2014, 05:11
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(skillchip @ Jan 22 2014, 10:56) Scan mousemelee!
Scan is in a skill list. SpellSpam already supports it, just put scan on hover. It's not intelligent though, and it will keep scanning the same monster to eternity you mouse over, instead of moving to every monster on the list. :/ This post has been edited by holy_demon: Jan 22 2014, 05:14
|
|
|
|
|
|
Jan 22 2014, 05:19
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(Kagoromo @ Jan 22 2014, 11:30) I appended your code to the MouseMelee script and it works. thanks. (IMG:[ invalid] style_emoticons/default/happy.gif) Doesn't seem to work for me. Do I have to edit the script before using? I do like the idea of having a seperate script for this function... DIY: Beginner's guide to making your first (HV) user script. Step 1: Put this in the beginning of your script (Edit Script, Script Description, Script Version, and Script author to your liking) QUOTE // ==UserScript== // @name Script name // @namespace hentaiverse.org // @description Script description // @include http://hentaiverse.org/*// @version Script version // @author Script author // ==/UserScript== Step 2: Put in the content of the script (This should be the code I gave you) Step 3: Save the script in a name like this: "Script name_Script version.user.js". The ".user.js" part is mandatory Step 4: Run the script. Congrats, you've made your first userscript This post has been edited by holy_demon: Jan 22 2014, 05:57
|
|
|
|
|
|
Jan 22 2014, 05:27
|
Lement
Group: Members
Posts: 2,977
Joined: 28-February 12
|
Step 5: Use either chromium-based browser or Scriptish/GreaseMonkey/ViolentMonkey extension to actually have the script in your browser.
|
|
|
Jan 22 2014, 05:56
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(Lement @ Jan 22 2014, 14:27) Step 5: Use either chromium-based browser or Scriptish/GreaseMonkey/ViolentMonkey extension to actually have the script in your browser.
Blergh, I'm assuming that anyone who's viewing this thread at least knows how to use userscript This post has been edited by holy_demon: Jan 22 2014, 05:57
|
|
|
|
|
|
Jan 22 2014, 13:50
|
Dan31
Group: Members
Posts: 4,399
Joined: 26-March 12
|
QUOTE(Kagoromo @ Jan 22 2014, 01:30) Doesn't seem to work for me. Do I have to edit the script before using? I do like the idea of having a seperate script for this function...
The script is kinda simple, it runs before any script from the page executes and it overrides a function used in battles. The new function is exactly the same but with one less line, namely the one responsible for the blinking. If you can't make it work, it probably means that your browser don't support @run-at document-start. What browser/extension are you using? It may also be because another script is messing with it. Try running it first before any script? I can see it happening the way I wrote the script (ie inserting the overriding function in an existing <script> block instead of creating a new one), so I will edit it accordingly later. My bad. This post has been edited by Dan31: Jan 22 2014, 13:57
|
|
|
|
|
|
Jan 22 2014, 14:05
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(Dan31 @ Jan 22 2014, 22:50) The script is kinda simple, it runs before any script from the page executes and it overrides a function used in battles. The new function is exactly the same but with one less line, namely the one responsible for the blinking. If you can't make it work, it probably means that your browser don't support @run-at document-start. What browser/extension are you using?
It may also be because another script is messing with it. Try running it first before any script? I can see it happening the way I wrote the script (ie inserting the overriding function in an existing <script> block instead of creating a new one), so I will edit it accordingly later. My bad.
IIRC, he used opera, possibly with Violent Monkey, which doesn't support @run-at This post has been edited by holy_demon: Jan 22 2014, 14:05
|
|
|
|
|
|
Jan 22 2014, 14:19
|
Dan31
Group: Members
Posts: 4,399
Joined: 26-March 12
|
QUOTE(holy_demon @ Jan 22 2014, 13:05) IIRC, he used opera, possibly with Violent Monkey, which doesn't support @run-at
Oh, that explains it. I still need to modify my scripts, just in case. I didn't really take other scripts into account when I wrote them, and there are indeed cases where they may behave weirdly if the html is edited before they run. And that's bad programming from my side.
|
|
|
Jan 22 2014, 14:41
|
Amaduyu Mitsumi
Group: Gold Star Club
Posts: 1,609
Joined: 2-October 11
|
I'm using Iron. I do have a bunch of other scripts installed though, so it's probable that one may have clashed with the No Blinking script. (IMG:[ invalid] style_emoticons/default/smile.gif)
|
|
|
|
|
|
Jan 22 2014, 15:30
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
|
QUOTE(Dan31 @ Jan 22 2014, 23:19) Oh, that explains it.
I still need to modify my scripts, just in case. I didn't really take other scripts into account when I wrote them, and there are indeed cases where they may behave weirdly if the html is edited before they run. And that's bad programming from my side.
There's more than one reason it doesn't work. I just debugged it. It doesn't work on Chrome either. Turns out that beforescriptexecute event isn't implemented in Chrome. And since both Opera and Chrome use Webkit engine, that's probably the case for Opera as well. But frankly, script injecting just to change a small graphic effect is kinda overkill to me.
|
|
|
|
|
|
Jan 22 2014, 15:56
|
masamunemaniac
Group: Gold Star Club
Posts: 441
Joined: 10-July 08
|
HVstat adds the numpad period as a shortcut key for scanning. It takes a couple of seconds to key in ".1.2.3.4.5.6.7.8.9.0" to scan everything when the game's relatively lag-free.
All I'm bothered about is the monster type (e.g. Giant, Fairy, Elemental), and as that can't be changed, it doesn't bother me if my monster list is out of date.
|
|
|
|
|
|
Jan 22 2014, 18:10
|
Dan31
Group: Members
Posts: 4,399
Joined: 26-March 12
|
QUOTE(holy_demon @ Jan 22 2014, 14:30) There's more than one reason it doesn't work. I just debugged it. It doesn't work on Chrome either. Turns out that beforescriptexecute event isn't implemented in Chrome. And since both Opera and Chrome use Webkit engine, that's probably the case for Opera as well.
But frankly, script injecting just to change a small graphic effect is kinda overkill to me.
Thanks for the report. Well, I kinda thought it would be better if the function wasn't called at all. Anyway, I rewrote the script to run at the default time: No Blinking (alt): Disable buff/debuff blinking when they are about to end.
hvnba.user.zip ( 396bytes )
Number of downloads: 130All it does is clearing the last "interval" by the use of a small trick. Usually, you can only use clearInterval() if you got the id returned by setInterval(), but the thing is, those ids are incremental, which means that if we create a new interval and get the id, we know the one we want to delete (id-1) and can delete both. ...Of course, that means that the script can fail if other scripts uses setInterval() in battle and it is executed after them. So, be aware of that. If you know a better way to do it, please let me know. QUOTE(masamunemaniac @ Jan 22 2014, 14:56) All I'm bothered about is the monster type (e.g. Giant, Fairy, Elemental), and as that can't be changed, it doesn't bother me if my monster list is out of date.
I wish we could see the monster type without the need of scanning. I guess our HV avatar is blind. This post has been edited by Dan31: Jan 22 2014, 18:13
|
|
|
|
|
|
Jan 22 2014, 18:35
|
Amaduyu Mitsumi
Group: Gold Star Club
Posts: 1,609
Joined: 2-October 11
|
What monsters? All I ever see is potato. (IMG:[ invalid] style_emoticons/default/duck.gif) @Dan31 Your script now works on my Iron, in the sense that the blinking has stopped. The status effect icons are stuck at 0.5 opacity though, as I can see in the browser's "Inspect element". CODE nl[i].style.opacity=1 //restore opacity Something like this is needed I think. (Excerpt from holy_demon's script)
|
|
|
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|