Welcome Guest ( Log In | Register )

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

 
post Sep 8 2014, 19:28
Post #1636
lolzerznijmniewdupe



Casual Poster
****
Group: Members
Posts: 278
Joined: 9-July 08
Level 223 (Godslayer)


QUOTE(holy_demon @ Sep 8 2014, 18:31) *

JS is relatively easy language to learn if you're already experienced in programming. It took me about 4 days to teach myself JS and write SpellSpam, using HV KeyBind as a sort of template. So yeah, use this project as an occasion to learn JS (IMG:[invalid] style_emoticons/default/sleep.gif)

Monsters are all in their own mkey_X divs and I don't need any persistent data. It's enough to only parse what's on the current pageload.
I don't know how to program, only basic "poweruser" things about linux, source code, etc. I can fiddle with stuff through mimicking, but JS is too complex.
Anyway, thank you for the answers. I'll look for JS help.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 8 2014, 21:53
Post #1637
Razor320



Casual Poster
***
Group: Members
Posts: 220
Joined: 17-October 13
Level 361 (Godslayer)


CODE

//Constructs special object which contain results of log parsing.
var damageTable = {};
{
   var monHitReg = /(.+)\s+(?:uses?|hits?|crits?)\s+?you\s+?for\s+?(\d+)\s+?([^\s]+)/;
   var table = document.querySelector("#togpane_log table");
   if (table != null){
      for (var i = 0; i<table.rows.length; i++){
         var row = table.rows[i];
         var out = monHitReg.exec(row.cells[2].textContent);
         if (out != null){
            out[2] = parseInt(out[2]);
            if (out[1] in damageTable){
               damageTable[out[1]][0] += out[2];
               if (damageTable[out[1]][1] != out[3]) damageTable[out[1]][1] += "," + out[3];
            } else {
              damageTable[out[1]] = [out[2], out[3]];
            }
         }
      }
   }
}

//Example - transform parsed data to simple html code
var out = "<table><tr><th>Monster</th><th>Damage</th><th>Damage type(s)</th></tr>";
for (var k in damageTable){
   out += "<tr><td><b>" + k + "</b></td><td>" +
          damageTable[k][0] + "</td><td>" +
          damageTable[k][1] + "</td></tr>";
}
out += "</table>";

//Example output - use generated html to display small rectangle with
//information at top right corner of window
var block = document.createElement("div");
block.style = "background-color:white;padding:9px;font-size:9pt;font-face:sans-serif;color:black;" +
   "position:fixed;top:0;right:0;z-index:1000";
block.innerHTML = out;
document.body.appendChild(block);


lolzerznijmniewdupe,
above is example code, showing one way of how to make what you have requested. While it could be used as is (just create new userscript that runs on "http://hentaiverse.org/?s=Battle*" and past this code into it), i will recommend to rewrite output in form you like.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 8 2014, 22:18
Post #1638
lolzerznijmniewdupe



Casual Poster
****
Group: Members
Posts: 278
Joined: 9-July 08
Level 223 (Godslayer)


QUOTE(Razor320 @ Sep 8 2014, 21:53) *

CODE

//Constructs special object which contain results of log parsing.
var damageTable = {};
{
   var monHitReg = /(.+)\s+(?:uses?|hits?|crits?)\s+?you\s+?for\s+?(\d+)\s+?([^\s]+)/;
   var table = document.querySelector("#togpane_log table");
   if (table != null){
      for (var i = 0; i<table.rows.length; i++){
         var row = table.rows[i];
         var out = monHitReg.exec(row.cells[2].textContent);
         if (out != null){
            out[2] = parseInt(out[2]);
            if (out[1] in damageTable){
               damageTable[out[1]][0] += out[2];
               if (damageTable[out[1]][1] != out[3]) damageTable[out[1]][1] += "," + out[3];
            } else {
              damageTable[out[1]] = [out[2], out[3]];
            }
         }
      }
   }
}

//Example - transform parsed data to simple html code
var out = "<table><tr><th>Monster</th><th>Damage</th><th>Damage type(s)</th></tr>";
for (var k in damageTable){
   out += "<tr><td><b>" + k + "</b></td><td>" +
          damageTable[k][0] + "</td><td>" +
          damageTable[k][1] + "</td></tr>";
}
out += "</table>";

//Example output - use generated html to display small rectangle with
//information at top right corner of window
var block = document.createElement("div");
block.style = "background-color:white;padding:9px;font-size:9pt;font-face:sans-serif;color:black;" +
   "position:fixed;top:0;right:0;z-index:1000";
block.innerHTML = out;
document.body.appendChild(block);


lolzerznijmniewdupe,
above is example code, showing one way of how to make what you have requested. While it could be used as is (just create new userscript that runs on "http://hentaiverse.org/?s=Battle*" and past this code into it), i will recommend to rewrite output in form you like.

Thank you very much (IMG:[invalid] style_emoticons/default/ohmy.gif)
Now I only need to find some HTML guides instead of full JS. Thank you.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 9 2014, 10:05
Post #1639
axionmaximum



Casual Poster
****
Group: Members
Posts: 353
Joined: 16-April 10
Level 409 (Godslayer)


Here is my little suggestion.
Can you add a feature stop attacking when channeling?
QUOTE(Owyn @ Aug 23 2014, 13:26) *

MouseMelee Lightning++ / HoverPlay 1.8

Attached File  HoverPlay.user.js.zip ( 2.63k ) Number of downloads: 1070


- Hover over monsters to (spell)-attack them (uses first available spell from the Spell_List if list is not empty - no rotation\spellcycle) (number-keys spellspam too)(when you have a spell or debuff charged\hovered - it would normal attack then)

- before attacking checks for hp, mp, sp and if it's too low - shows icons for fixing that (heals, pots etc) instead of attacking

- for spirit stance - shows icon (of protection scroll) if it's 250%

- for gems - includes gem script (works as previously + hoverable) - so you should remove\turn off separate show gem script if you have it

- for buffs - moves expiring buffs to "gem-bar" & makes those click-hoverable to rebuff + stops attacking if enabled in options. (You must have those buffs in your Quickbar for rebuff to work)

- shift hotkey - disables hover-attacking (alert bars and rebuff icons would still be shown)

- Space \ RightClick hotkey - consumes first item from left at the "gem-bar" (e.g. heal, spirit stance, potion, rebuff)

- MiddleClick hotkey - a spell \ skill hotkey (can be either any Spell or any Skill in the list, not just offensive\deprecating)

- Spell to cast in new round - a spell \ skill that would be cast once (one cast of one spell\skill at the new round) (can be either any Spell or any Skill in the list, not just offensive\deprecating)

- options - by default options are set for holy-mage-play, you must edit options at the top of the script before installing it to better suit your needs (if you aren't a holy mage)! :
= choose spells to spam (or make var Spell_list = []; to not spam any spells and just normal-attack)
= you can only use offensive & deprecating spells for Spell_List (ones affecting enemy)

Recommended settings for melee players (not mages):
CODE
//// settings:
var Spell_list = [];
var Spell_list_on_new_round = [];
var Spell_middle_click = ['Imperil'];
// thresholds for stop
var HP_T = 0.40;
var MP_T = 0.11;
var SP_T = 0.1;
var stop_on_rebuffs = true;


new in this release:
- Check if potion is already in effect before showing its icon
- Some little performance optimizations
- Now heal & full-heal spells don't need to be in quickcast bar when low on hp
Previous ver changelog: see in old post - https://forums.e-hentai.org/index.php?showt...p;#entry3419843


This post has been edited by axionmaximum: Sep 9 2014, 10:13
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 10 2014, 04:22
Post #1640
seyrenwindstorm



Casual Poster
***
Group: Members
Posts: 103
Joined: 23-January 12
Level 190 (Destined)


QUOTE(Owyn @ Aug 23 2014, 18:26) *

MouseMelee Lightning++ / HoverPlay 1.8


i'm having some problem with HoverPlay script
the hoverplay never had any problem until now, but suddenly it just stops working every time the page loads and i need to hover to the quickbar to make the hoverplay active again or else it would just stop working at all.
the buff, potion and all the side icon gone.

how to fix this issue?

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

 
post Sep 10 2014, 10:34
Post #1641
holy_demon



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


SpellSpam 3.5.2
[attachmentid=50228]

Change log from 3.5.0:
- a bit faster hover (from 3.5.1)
- buff condition (including Channeling)
- With click and numkey, if condition fails, don't resume default behaviors (normal attack)
- various bug fix, shift works properly now
Bind different Attack/Skill/Spell to numkey, clicks, and hover. Support Rotation/Multicast. Eg: Cast Cure, Full-Cure, Heroic Health Potion, Spark of Life with right click, or Merciful Blow, Vital Strike, Shield Bash, Attack with hover (mousemelee-like). Press X to open customization tooltip. Hold Ctr/Alt/or Shift to temporarily disable the script without having to open the tooltip

Features:
- left/right/middle click, hotkey, or hover over a monster to cast a spell (targetting, non-targetting, special skill, or normal attack)
- left/right/middle click on the battle log to cast non-targetting spell.
- Press X Press any alphabet key to view a status box, and activate click, numkey, hover to your liking
- Type your spell/skill name next to an interaction to choose which spell/skill to spam (case sensitive, you only need to type the beginning part of the spell name eg. "Weak" would still cast Weaken, but "weak" or "eaken" wouldn't work
- You can type "Attack" (or "Att" if you're lazy) to use normal attack - yes you can play MouseMelee with this xD
- Rotation: use comma, or semicolon to separate spells in the same roation. Spell should be ordered by their priority. Notice: dot is no longer supported as separator so it can be used in decimal number for conditionals
Example:
CODE
Cure; Full-Cure; Heroic Health Potion; Spark of Life

Cast cure first. If cure on cooldown, cast Full-Cure. If Full-Cure on cooldown, use Heroic Health. If no moe Heroic health, cast Spark.

CODE
Merciful Blow; Vital Strike; Shield Bash; Attack

Cast Merciful Blow (T3) first. If it's not yet available, cast Vital Strike(T2). If not available, cast Shield Bash(T1). If no skill is available, attack normally.

- Conditionals you can specify a condition for the rotation to work. Currently only supported character info:
$HP: health (0 - 100)
$MP: mana (0 - 100)
$SP: spirit (0 - 100)
$OC: overcharge (0 - 250)
$SS: Spirit Stance (true/false)
$buffName: return the current duration of the spell. buffName is case-sensitive and must exclude all space character, eg: "Channeling"->Channeling, "Spark of Life"->$SparkofLife, "Spirit Shield" -> "$SpiritShield. Caution: some spells will have different buff name, eg: Haste -> $Hastened. The duration will be +1 of the value given by HV, for ease of Boolean operation. eg. if your spell is blinking and about to expire, its duration will be 1. IA spells duration is 1 as well

Example:
CODE
$HP>20;$SP>10;$OC>=210;$SS;Orbital Friendship Cannon

Cast OFC if Health > 20%, Spirit > 10%, Overcharge >= 210 and Spirit Stance is activated

CODE
$HP>50;$MP>10;!$SS;Silence;Imperil

Cast Silence;Imperil rotation if Health > 50%, Mana > 10%, and Spirit Stance not activated

CODE
$HP<40;$MP>20;Cure;Full-Cure;Defend

Cast Cure;Full-Cure;Defend rotation if Health < 40% and Mana > 20%

CODE
$Hastened;$Protection;$ShadowVeil;$SpiritShield;$SparkofLife;Shield Bash;Spirit Shield

Cast Shield Bash;Spirit Shield if you still have Hastened, Protection Shadow Veil, Spirit Shield, Spark of Life buff

CODE
!$Channeling; Attack

Attack if you have no Channeling

CODE
$Channeling===1; Heartseeker;

Cast Heartseeker if your Channeling buff will expire in 1 turn (it's blinking)
- Spell Profile you can now change spell profile with hotkey. Press shift + alpha key (A, B, C... Z) to assign your current spell profile to an alpha key, Press the alpha key to load its assigned spell profile. To delete, assign the key to an unchecked profile (all boxes are unticked). The status box now shows the list of all assigned profile.

Note: this assignment won't overwrite any of HV hotkey, eg: if you press S, you will load the profile associated with S, AND use Spirit Stance

- Ctr, Alt disables the script temporarily. Shift now only disables hover mode.

Special Thanks to: cruelsion (for Hath), Veince and Colman (bug report)

This post has been edited by holy_demon: Sep 10 2014, 13:38
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 10 2014, 11:26
Post #1642
Dan31



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


Doesn't SpellSpam break the "No parsing of live data to decide on actions" rule? Or does this rule only apply to monster data? We already joked about this a while ago, but it's looking more and more like a "Make your own bot" kit.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 10 2014, 11:27
Post #1643
Owyn



Casual Fapper
*****
Group: Members
Posts: 692
Joined: 12-May 10
Level 354 (Godslayer)


QUOTE(seyrenwindstorm @ Sep 10 2014, 06:22) *

i'm having some problem with HoverPlay script
the hoverplay never had any problem until now, but suddenly it just stops working every time the page loads and i need to hover to the quickbar to make the hoverplay active again or else it would just stop working at all.
the buff, potion and all the side icon gone.

how to fix this issue?

thank you.

saw your pm first, answered there.

QUOTE(axionmaximum @ Sep 9 2014, 12:05) *

Here is my little suggestion.
Can you add a feature stop attacking when channeling?

not sure if I should - I heard there are already other scripts to do exactly this + hoverplay was made to speed things up, not give some tactical advantage... maybe if others agree.

+what color should 'the line border' be when the script is stopped by channeling?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 10 2014, 11:51
Post #1644
holy_demon



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


QUOTE(Dan31 @ Sep 10 2014, 19:26) *

Doesn't SpellSpam break the "No parsing of live data to decide on actions" rule? Or does this rule only apply to monster data? We already joked about this a while ago, but it's looking more and more like a "Make your own bot" kit.


Well I could add an alert("Stop") line to the code, but then people will just as easily remove it. =_= And parsing character stats has been done for a long time with MouseMelee.

This post has been edited by holy_demon: Sep 10 2014, 11:53
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 10 2014, 15:05
Post #1645
screwit



Newcomer
*
Group: Recruits
Posts: 10
Joined: 27-July 11
Level 312 (Dovahkiin)


Parsing of monster data is done in HVSTAT, to display Monster HP and scaling bars, I did love that, not hammering the critters blindly. Shame it is so slow.

Higher levels Hentaiverse is a effing slugfest anyway, doubt anyone is willing to do that to him/herself without some automation helper or another.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 11 2014, 12:41
Post #1646
axire



Casual Poster
***
Group: Members
Posts: 156
Joined: 9-August 14
Level 322 (Godslayer)


QUOTE(axionmaximum @ Sep 9 2014, 04:05) *

Here is my little suggestion.
Can you add a feature stop attacking when channeling?


STAT Slim will do this. You may have to edit it a bit to trim out some redundant features.

QUOTE(Owyn @ Sep 10 2014, 05:27) *

saw your pm first, answered there.
not sure if I should - I heard there are already other scripts to do exactly this + hoverplay was made to speed things up, not give some tactical advantage... maybe if others agree.

+what color should 'the line border' be when the script is stopped by channeling?


Can you repeat the answer here? I seem to be having a similar problem. I just switched from Firefox/Greasemonkey to Iron/Tampermonkey and I have to violently wave my cursor around to trigger hoverplay, my no-image script also seems to flicker when the page reloads. I'm wondering if this is something that can be fixed or if I should just go back to Firefox.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 07:22
Post #1647
Colman



Where is the loli?
*********
Group: Gold Star Club
Posts: 7,333
Joined: 15-November 10
Level 500 (Ponyslayer)


May I ask something very fundamental for scripting here? I sometimes confuse with the codes. (IMG:[invalid] style_emoticons/default/heh.gif)

BTW, I am just a beginner of browser script.

This post has been edited by Colman: Sep 12 2014, 07:22
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 07:37
Post #1648
holy_demon



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


QUOTE(Colman @ Sep 12 2014, 15:22) *

May I ask something very fundamental for scripting here? I sometimes confuse with the codes. (IMG:[invalid] style_emoticons/default/heh.gif)

BTW, I am just a beginner of browser script.


Just ask =_=
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 07:53
Post #1649
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


how would one do a console command where:

while ( console displays any error ){ reload webpage }
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:08
Post #1650
holy_demon



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


QUOTE(LOL50015 @ Sep 12 2014, 15:53) *

how would one do a console command where:

while ( console displays any error ){ reload webpage }

userscripts don't have access to read/listen to the console/debugger object. You have to make it into an extension and explicitly give it access in manifest.json(on Chrome). No idea about Firefox

You will want to read these documentations if you still want to do it

[developer.chrome.com] https://developer.chrome.com/extensions/api_index
[developer.chrome.com] https://developer.chrome.com/devtools/docs/debugger-protocol

This post has been edited by holy_demon: Sep 12 2014, 08:25
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:17
Post #1651
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


QUOTE(holy_demon @ Sep 12 2014, 14:08) *

userscripts don't have access to read/listen to the console/debugger object. You have to make it into an extension and explicitly give it access in manifest.json(on Chrome). No idea about Firefox


I meant inspect element > console tab

where you can type in stuff and it executes it like a userscript.

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

 
post Sep 12 2014, 08:30
Post #1652
Dan31



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


QUOTE(LOL50015 @ Sep 12 2014, 07:53) *

how would one do a console command where:

while ( console displays any error ){ reload webpage }

Wouldn't this be an infinite loop at the slightest error? It's not like errors magically fix themselves.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:31
Post #1653
holy_demon



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


QUOTE(LOL50015 @ Sep 12 2014, 16:17) *

I meant inspect element > console tab

where you can type in stuff and it executes it like a userscript.


Yep, impossible with userscript. The context of userscript is only within the page. That windows outside the scope of userscript, you will need a context of an extension.

Or you can overwrite the console.log method and record the logs yourself, though I think you have to do it by html injection.

[stackoverflow.com] http://stackoverflow.com/questions/1984607...e-in-javascript

All advanced techniques (IMG:[invalid] style_emoticons/default/heh.gif)

This post has been edited by holy_demon: Sep 12 2014, 08:31
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:38
Post #1654
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


Okay, find I'll explain my situation:

I'm trying to get this site, [simplyotaku.com] http://simplyotaku.com/ to display me pictures but the pictures won't show because they have a access denied error, but after enough reloads it shows me the pictures, so I reckon the ports are just congested. So I though of asking you guys for a console command so that it can reload until all the images finally show.

I know to reload is location.reload();
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:47
Post #1655
holy_demon



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


QUOTE(LOL50015 @ Sep 12 2014, 16:38) *

Okay, find I'll explain my situation:

I'm trying to get this site, [simplyotaku.com] http://simplyotaku.com/ to display me pictures but the pictures won't show because they have a access denied error, but after enough reloads it shows me the pictures, so I reckon the ports are just congested. So I though of asking you guys for a console command so that it can reload until all the images finally show.

I know to reload is location.reload();


put this in an userscript. It won't loop in the console.

if (!document.querySelector("<put the selector of pictures/container here>") {
location.href="";
}

note 1: you might want a to setTimeout to not hog your bandwidth
note 2" location.reload is retardedly slow

This post has been edited by holy_demon: Sep 12 2014, 08:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


291 Pages V « < 81 82 83 84 > » 
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: 22nd September 2025 - 18:55