Welcome Guest ( Log In | Register )

291 Pages V « < 47 48 49 50 51 > »   
Reply to this topicStart new topic
> HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd)

 
post Dec 24 2013, 09:12
Post #961
Nerzzzzz



Time Wasting Specialist
****
Group: Members
Posts: 337
Joined: 18-April 12
Level 406 (Godslayer)


QUOTE(holy_demon @ Dec 24 2013, 14:56) *
Maybe you're referring to this. There's an issue where spamming them too much (e.g holding the buttons) will cause a normal attack. I reckon it has something to do with how JS handle listeners, but couldn't find a way around it.

Yeah, that. I don't think it's possible to find a way around that. I think it's because userscripts usually runs after the page has completely loaded and holding down a button will cause some actions to be sent before the spellspam script has loaded.

It's not a big issue though. Nobody holds buttons down in high difficulties because that's suicide. (IMG:[invalid] style_emoticons/default/tongue.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 24 2013, 09:26
Post #962
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


QUOTE(Nerzzzzz @ Dec 24 2013, 18:12) *

It's not a big issue though. Nobody holds buttons down in high difficulties because that's suicide. (IMG:[invalid] style_emoticons/default/tongue.gif)


Well I do (IMG:[invalid] style_emoticons/default/tongue.gif) but I use HVStat to stop me when I'm low
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 24 2013, 09:35
Post #963
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


QUOTE(Nerzzzzz @ Dec 24 2013, 18:12) *

Yeah, that. I don't think it's possible to find a way around that. I think it's because userscripts usually runs after the page has completely loaded and holding down a button will cause some actions to be sent before the spellspam script has loaded.

Well that can be overcome with
CODE
@run-at


[wiki.greasespot.net] http://wiki.greasespot.net/Metadata_Block#.40run-at

I'm trying it out now (IMG:[invalid] style_emoticons/default/tongue.gif)

EDIT: YAY IT WORKS. Will release SpellSpam 2.1 after more testing.

This post has been edited by holy_demon: Dec 24 2013, 10:02
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 24 2013, 10:39
Post #964
Ichy



~ Loli Trainer ~
***********
Group: Catgirl Camarilla
Posts: 13,061
Joined: 19-February 09
Level 500 (Dovahkiin)


QUOTE(holy_demon @ Dec 24 2013, 08:56) *


There you go, it's pretty simple. Use it at your own risk (IMG:[invalid] style_emoticons/default/tongue.gif)
Attached File  SpellSpam2.0withMouseMelee.user.zip ( 1.21k ) Number of downloads: 59


Thats pretty cool.

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

 
post Dec 24 2013, 10:39
Post #965
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


Spell Spam 2.1

This release comes with 2 flavors, original and MouseMage (ie. play your mage like MouseMelee)
DO NOT use both.

Original
Attached File  SpellSpam2.1.user.zip ( 1.36k ) Number of downloads: 67


MouseMage
Attached File  SpellSpam2.1withMouseMelee.user.zip ( 1.39k ) Number of downloads: 72


Mages can now play just like melee. When you press the number key (0, 1, 2...), you will cast a spell (by default "Weaken") on the respective target instead of attacking it. If the spell can't be used (on cooldown, no mana, or doesn't exist), you will attack like normal.

How to use:
- Unzip the file, open it in a text editor
- Replace "Weaken" in the indicated line with the full name of the spell (capital and all) you want to use,
- Install the script
- Enter a battle
- Press 1/2/3/4/5/6/7/8/9/0 or click an arbitrary monster
- Enjoy your feeling of superiority over us melee
- (Optional) Donate me mage gears

If you want to cast other targetting spells or do normal attack, hold Ctr, or Alt, or Shift while clicking/hotkeying to select your target.

Change log:
- script runs after the HTML part of the page finishes loading, but before other non-HTML elements (such as javascript, image, etc...) -> increased spammability
- fix the issue with spamming keyboard numbers. Now feel free to hold your num key without ever releasing and commit suicide.
- I haven't tested if this will trigger before or after HVStat alarm though, since it uses similar pre-loading mechanism as HVStat alarms. PM me or post in this thread if you have any issue


EDIT: wrong file for original flavor (both downloads are MouseMage). Correct files have been re-uploaded now. Sorry for any death that I have caused xD

This post has been edited by holy_demon: Dec 24 2013, 13:08
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 25 2013, 16:55
Post #966
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


Inline Equipment Changer 1.0

Attached File  InlineEquipChanger1.0.user.zip ( 1.27k ) Number of downloads: 47


How to use:
- Unzip the file, install it as userscript
- go to any HV site (outside of battle)
- Look to the left, under your Stamina
- Wait until the line "Equipped Set... " becomes italic
- Click on it and select another equipment set you want to equip

During battle, you can still see the Equipped Set line, but it will never become italic/clickable

Attached Image

Note: Equipment Comparison/HVStat currently don't recognise this equipment chage (only HV does). Maybe they will if I use IFRAME instead of AJAX...
Note2: Yes, I coded this during Christmas. Forever Alone (IMG:[invalid] style_emoticons/default/cry.gif)

This post has been edited by holy_demon: Dec 25 2013, 17:14
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 25 2013, 22:18
Post #967
sickentide



sexromancer
*******
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
Level 500 (Ponyslayer)


the script to select the strongest available skill has been around forever and the same effect can be achieved by quickly hitting the cast keys in order, so i assume it's ok to have something similar for mages that also economises on keybinds

CODE
// HV Keybinds 2.5.0 add-on, remove original Cast function
var it, damage = document.getElementById('2501') ? 'Arcane Focus' : 'Heartseeker';

// first you get the spell info to display properly with this stupid hack
function Cast(name) {
    return function() {
        if ( document.getElementsByClassName('btii')[0].innerHTML != name &&
             (spell = document.querySelector('.bts > div[onclick][onmouseover*="'+name+'"]')) ) {
            var div = document.createElement('div');
            div.setAttribute('onclick', spell.getAttribute('onmouseover'));
            div.click();
            spell.click();
            it = false;
            return true; }
        return false; }}
function Cancel() {
    if ( !/(Attack|Battle Time)/.test(document.getElementsByClassName('btii')[0].innerHTML) &&
         (attack = document.getElementById('ckey_attack')) ) {
        var div = document.createElement('div');
        div.setAttribute('onclick', attack.getAttribute('onmouseover'));
        div.click();
        attack.click();
        it = false; }}

// then you initiate your carousel of agony
function Cycle(spells) {
    return function() {
        var start = (spells.indexOf(document.getElementsByClassName('btii')[0].innerHTML)+1)%spells.length, n = start;
        do { if ( Cast(spells[n])() ) return; n = (n+1)%spells.length; } while ( n != start ) }}
function CycleIt(spells) {
    return function() {
        var start = (spells.indexOf(document.getElementsByClassName('btii')[0].innerHTML)+1)%spells.length, n = start;
        do {
            if ( spell = document.querySelector('.bts > div[onclick][onmouseover*="'+spells[n]+'"]') ) {
                var div = document.createElement('div');
                div.setAttribute('onclick', spell.getAttribute('onmouseover'));
                div.click();
                it = spell.getAttribute('onclick');
                return; }
            n = (n+1)%spells.length; }
        while ( n != start ) }}
function CastIt() {
    if ( it ) {
        var div = document.createElement('div');
        div.setAttribute('onclick', it);
        div.click(); }}

// pick and choose your wild magicks at the touch of a button
Bind(KEY_B, Cancel);
Bind(KEY_Y, Cycle(['Silence', 'Imperil', 'Slow']));
Bind(KEY_T, Cycle(['Ragnarok', 'Disintegrate', 'Corruption']));
Bind(KEY_V, CastIt);
Bind(KEY_H, CycleIt(['Cure', 'Full-Cure']));
Bind(KEY_C, CycleIt(['Spirit Shield', 'Protection', 'Shadow Veil', 'Regen', damage, 'Absorb']));
Bind(KEY_X, CycleIt(['Absorb', damage, 'Regen', 'Shadow Veil', 'Protection', 'Spirit Shield']));

// destroy them all!
Bind(KEY_N, Cycle(['FUS RO DAH', 'Merciful Blow', 'Vital Strike', 'Shield Bash',
                   'Frenzied Blows', 'Shatter Strike', 'Rending Blow', 'Backstab',
                   'Great Cleave', 'Iris Strike', 'Skyward Sword', 'Concussive Strike']));


This post has been edited by geilst: Dec 26 2013, 02:15
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 26 2013, 08:21
Post #968
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


Inline Equipment Changer 1.1

Attached File  InlineEquipChanger1.1.user.zip ( 1.55k ) Number of downloads: 51


How to use:
- Unzip the file, install it as userscript
- go to any HV site (outside of battle)
- Look to the left, below your Stamina or below "Upgrades and Enchantments" (if equipment pop up)
- Wait until the line "Equipped Set... " becomes italic
- Click on it and select another equipment set you want to equip

During battle, you can still see the Equipped Set line, but it will never become italic/clickable. If you don't like it to show during battle (for faster loading, though my script doesn't do much during battle anyway) just delete the DisplayEquip(); line at the end;

Attached ImageAttached Image

Attached Image

Change log:
- Now you can your equipment in the equipment pop-up window.
- use IFRAME so the equipment change will be register by Equipment Comparison script.
- replace <INPUT><OPTION> with <DIV> so you can select the same equipment set

This post has been edited by holy_demon: Dec 26 2013, 08:39
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 26 2013, 16:54
Post #969
sickentide



sexromancer
*******
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
Level 500 (Ponyslayer)


here's a thing people may find useful. i suppose you could integrate it with mousemelee if you pass a fitting event based on modifier keys

CODE
// add to any live battle script except keybinds
var middleClickSpellId = 161; // Corruption
if ( middleClickSpellId ) {
    var monsters = document.getElementsByClassName('btm1'), n = monsters.length;
    while ( n-- > 0 )
        if ( action = monsters[n].getAttribute('onclick') )
            monsters[n].setAttribute('onclick', 'if (event.which==2) document.getElementById('
                + middleClickSpellId + ').click(); ' + action.toString()); }


This post has been edited by geilst: Dec 27 2013, 04:09
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 26 2013, 19:17
Post #970
Lement



Lalalala la~ la la~!
********
Group: Members
Posts: 2,977
Joined: 28-February 12
Level 326 (Godslayer)


Don't worry about that, I already have made new version of mousemelee which doesn't depend on injecting into monsters, which I will release shortly.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 26 2013, 20:03
Post #971
sickentide



sexromancer
*******
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
Level 500 (Ponyslayer)


that's what i had in mind, you could use the code i posted (which modifies the monsters in a very fast and efficient manner) and, without further modifications to the monsters, pass a custom event to the selected monster when mousemelee detects event.altKey so as to choose between spell and attack. you could also check for !event.ctrlKey to disable mousemelee by holding ctrl

CODE
var ev = new Event('click');
ev.which = event.altKey ? 2 : 1;
if ( !event.ctrlKey )
    document.getElementById('mkey_' + n).dispatchEvent(ev);


by the way, whenever someone wants to check if no modifier keys are held, please be kind to mac users and include event.metaKey

function NoMod(e) { return !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey; }

This post has been edited by geilst: Dec 26 2013, 20:22
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 26 2013, 23:03
Post #972
Lement



Lalalala la~ la la~!
********
Group: Members
Posts: 2,977
Joined: 28-February 12
Level 326 (Godslayer)


Small amount of lines doesn't necessarily mean efficient(typical example: querySelector). In any case, the point is to not cause conflicts with other scripts, with side dish of reducing CPU usage and speeding up actions. Oh and the new version doesn't use any event handling anyway.

I wanted to embed this into forum, but alas, since I last checked the forum prevents inline javascript links. Oh well, bugs found, look three posts below↓

This post has been edited by Lement: Dec 27 2013, 18:04
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 27 2013, 04:07
Post #973
sickentide



sexromancer
*******
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
Level 500 (Ponyslayer)


i had a different method that took about the same in chrome but it was faster when i tested it in firefox so i'm replacing it
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 27 2013, 05:09
Post #974
skillchip



Mathematical Trashcat
*********
Group: Catgirl Camarilla
Posts: 5,753
Joined: 31-December 06
Level 492 (Godslayer)


QUOTE(Lement @ Dec 26 2013, 21:03) *

Small amount of lines doesn't necessarily mean efficient(typical example: querySelector). In any case, the point is to not cause conflicts with other scripts, with side dish of reducing CPU usage and speeding up actions. Oh and the new version doesn't use any event handling anyway.

I wanted to embed this into forum, but alas, since I last checked the forum prevents inline javascript links. Oh well, look out for bugs both in compiled code and in the compiler in this new version:
[attachmentid=34077]

Brief synopsis of differences:

Main code:
  • Instead of modifying code around monsters, it now checks the arrows next to monsters to see if it is hovering over them. As such, if you play HV with javascript turned off/native JS blocked, it will not work. Also, if you move monsters(with css) notably up-down, it may also behave oddly or fail(resizing browser window is fine).
  • For leaving the monster, you have to hover your mouse somewhere else after it attacks but before next page loads. (this uses sessionStorage, so if your browser is too old for that look out).
  • The check for hover is done every 100ms, so if you have old computer/browser it may incur significant CPU(No more than old, mind you).
Added features:
  • You can now add minimum HP, MP, and SP values below which the mousemelee will not work. This is shown by a colored border around monsterpane. (Yes, I know green doesn't really fit SP but that way they're easily added together.)
  • You can have hoverable quickbar, spirit and gem. In case of quickbar, only hovers if you don't have the buff.
  • Option to not keep attacking from last position as default if you finish the round/battle series


Cant seem to get the mouseover on spells to work properly. Does your old CCS interfere with this?

Does not work on 10th target

This post has been edited by skillchip: Dec 27 2013, 05:41
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 27 2013, 17:31
Post #975
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


NoImage 1.0

Attached File  NoImage.user.zip ( 581bytes ) Number of downloads: 60


I wrote a quick script to hide all image and the battle log so the browser won't have to render them. Firefox sees a huge speed improvement, but Chrome is rather small though you can sort of feel a slight improvement.

Hold Z so you can see images and the battle log again. Release Z to unsee them xD

The riddlemaster picture won't be disabled, for your ease of mind. (IMG:[invalid] style_emoticons/default/biggrin.gif)

Feedback is welcome, especially on older machine. Disabling HVStat and other UI modification scripts are recommended if you want optimal speed

This post has been edited by holy_demon: Dec 27 2013, 17:32
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 27 2013, 18:03
Post #976
Lement



Lalalala la~ la la~!
********
Group: Members
Posts: 2,977
Joined: 28-February 12
Level 326 (Godslayer)


Look out for bugs both in compiled code and in the compiler in this new version:
[attachmentid=34114]; See for version that works in firefox too(quick fix)

Brief synopsis of differences:

Usage:
  • Open the html in your favorite browser. There are already some pre-set values, you can change them. HP, MP, SP should be between 0 and 1 for how full you want them for trigger.
  • Click on "Compile Mousemelee" button. A link "Your personal airship" should appear. Right-click→save as it as something.user.js file.
Main code:
  • Instead of modifying code around monsters, it now checks the arrows next to monsters to see if it is hovering over them. As such, if you play HV with javascript turned off/native JS blocked, it will not work. Also, if you move monsters(with css) notably up-down, it may also behave oddly or fail(resizing browser window is fine).
  • For leaving the monster, you have to hover your mouse somewhere else after it attacks but before next page loads. (this uses sessionStorage, so if your browser is too old for that look out).
  • The check for hover is done every 100ms, so if you have old computer/browser it may incur significant CPU(No more than old, mind you).
Added features:
  • You can now add minimum HP, MP, and SP values below which the mousemelee will not work. This is shown by a colored border around monsterpane. (Yes, I know green doesn't really fit SP but that way they're easily added together.)
  • You can have hoverable quickbar, spirit and gem. In case of quickbar, only hovers if you don't have the buff.
  • Option to not keep attacking from last position as default if you finish the round/battle series
@skillchip: Whoops. I always forget about that 10th guy. Here's the fix:


As long as said old CSS doesn't move the monsters up/down/resize significantly....no. The one in my sig shouldn't affect it.

Couldn't reproduce the mouseover with spells bug. Details?

This post has been edited by Lement: Dec 28 2013, 11:03
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 27 2013, 21:27
Post #977
_yanbo_



Newcomer
**
Group: Members
Posts: 69
Joined: 2-November 13
Level 257 (Godslayer)


Not sure if I should post it here, but... the script for half-hourly encounter sometimes shows "ready" when it's not (and when I click reset it gives me negative countdown like -6:49) O_o
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 28 2013, 02:20
Post #978
skillchip



Mathematical Trashcat
*********
Group: Catgirl Camarilla
Posts: 5,753
Joined: 31-December 06
Level 492 (Godslayer)


QUOTE(Lement @ Dec 27 2013, 16:03) *

Couldn't reproduce the mouseover with spells bug. Details?


Well for one what numbers are we supposed to put here, whatever matches that spell slot?

I could get cure to work only with the default settings, and then randomly got spark to work but nothing else. New version fixes it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 28 2013, 02:22
Post #979
skillchip



Mathematical Trashcat
*********
Group: Catgirl Camarilla
Posts: 5,753
Joined: 31-December 06
Level 492 (Godslayer)


QUOTE(holy_demon @ Dec 27 2013, 15:31) *

NoImage 1.0

Attached File  NoImage.user.zip ( 581bytes ) Number of downloads: 60


I wrote a quick script to hide all image and the battle log so the browser won't have to render them. Firefox sees a huge speed improvement, but Chrome is rather small though you can sort of feel a slight improvement.

Hold Z so you can see images and the battle log again. Release Z to unsee them xD

The riddlemaster picture won't be disabled, for your ease of mind. (IMG:[invalid] style_emoticons/default/biggrin.gif)

Feedback is welcome, especially on older machine. Disabling HVStat and other UI modification scripts are recommended if you want optimal speed


Could you make one that doesn't hide the spells, arena buttons, and/or only works in battle.

Edit: well crap, meant to combine these two posts

This post has been edited by skillchip: Dec 28 2013, 02:23
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 28 2013, 06:35
Post #980
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


QUOTE(skillchip @ Dec 28 2013, 11:22) *

Could you make one that doesn't hide the spells, arena buttons, and/or only works in battle.

Edit: well crap, meant to combine these two posts


The usual check document.getElementById('togpane_log') won't work with this script, since this script run before document is fully loaded. Making it load after will still briefly render the images, then hide them, making them flash. Not only it would be annoying to look, it also makes things even slower (IMG:[invalid] style_emoticons/default/sleep.gif)

However, I can make it to show arena buttons, with this CSS rule:
CODE
img:not([src*=riddlemaster]):not([src*=arena]) {visibility: hidden; }


But by spells, do you mean the buff at the top, or the quickbar?

if you want to show the buff, use this CSS rule
CODE
*:not(.bte)>img:not([src*=riddlemaster]):not([src*=arena]) {visibility: hidden; }


to show quick bar
CODE
*:not(.btqs)>img:not([src*=riddlemaster]):not([src*=arena]) {visibility: hidden; }


to show both
CODE
*:not(.bte):not(.btqs)>img:not([src*=riddlemaster]):not([src*=arena]) {visibility: hidden; }


For convenience's sake I upload NoImage v1.1 that I'm currently using. It shows the buffs, but also blocks the spell description (".infopane")

NoImage 1.1

Attached File  NoImage1.1.user.zip ( 822bytes ) Number of downloads: 50


Changelog:
- use keydown instead of key press so DISABLE_KEY isn't case sensitive
- block info panel, show quickbar, buffs (inside battle), arena buttons (outside battle)
- comments on some other option

Description (copy-pasta)
I wrote a quick script to hide all image and the battle log so the browser won't have to render them. Firefox sees a huge speed improvement, but Chrome is rather small though you can sort of feel a slight improvement.

Hold Z so you can see images and the battle log again. Release Z to unsee them xD

The riddlemaster picture won't be disabled, for your ease of mind.

This post has been edited by holy_demon: Dec 28 2013, 06:56
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


291 Pages V « < 47 48 49 50 51 > » 
Reply to this topicStart new topic
2 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
1 Members: rottytops

 


Lo-Fi Version Time is now: 11th January 2025 - 04:59