Welcome Guest ( Log In | Register )

45 Pages V « < 33 34 35 36 > »   
Reply to this topicStart new topic
> [Script] Monsterbation 1.4.1.2, A comprehensive hovering script for HentaiVerse and ISK. Including CrunkJuice 1.3.0, an out-of-battle script

 
post Feb 21 2021, 22:17
Post #667
sickentide



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


QUOTE(Chaisy @ Feb 3 2021, 22:13) *

I can change the entries between each comma, but if I ever have less than 17 items in that list, it goes back to the default for that item.

QUOTE(what_is_name @ Feb 7 2021, 15:46) *

seems it consider the items in array as missing setting item. add a Array filter may fix it.

that's what i figured, thanks for providing a fix before i got around to it. it seems bizarre that typeof(settings[setting]) == 'object' isn't enough to separate objects from arrays, but what do i know, as they say, javascript is garbage collected

QUOTE(uareader @ Feb 6 2021, 11:00) *

Feature request: would it be possible to have an option to, when using ajaxRound (or another thing that accelerate the round transition if it's not exactly what I think of), to have the last log entry from the previous round copied, then pasted in the log of the next round?

this seems practical and easy enough to add, since i have to store the current turn for processing anyway

QUOTE(Nezu @ Feb 14 2021, 10:46) *

Have you thought about encasing the settings parsing in a try/catch block, so settings can be fixed in battle without having to go through the script in LocalStorage (since syntax errors etc will break the whole thing currently)?

great idea!

QUOTE(OnceForAll @ Feb 15 2021, 08:22) *

Have you ever tried using GM_setValue / GM_removeValue / GM_getValue instead of using localStorage?

i don't think the data in question is sensitive enough to open this can of worms

here's an update with the new dingly-danglies Attached File  HentaiverseMonsterbation.1.4.1.0.user.js.txt ( 159.87k ) Number of downloads: 398
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 22 2021, 10:16
Post #668
uareader



Critter
*********
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14
Level 500 (Ponyslayer)


Thanks for the feature to see previous round result. Right now it has a weird bug for me:
Attached Image
But maybe it's an issue of cached data or something, and would disappear on a restart (that I want to avoid).

This doesn't happen if the feature is disabled, and only happen on the first turn where the old log is being copied, and cause an invisible version of buttons with a time to appear below the actual button, and in the case of powerup, it replicate it whole on a 2nd line.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 22 2021, 11:14
Post #669
Nezu



Rat
********
Group: Catgirl Camarilla
Posts: 3,946
Joined: 29-January 12
Level 500 (Ponyslayer)


QUOTE(sickentide @ Feb 21 2021, 20:17) *

great idea!
...
here's an update with the new dingly-danglies


Awesome work (IMG:[invalid] style_emoticons/default/smile.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 22 2021, 12:12
Post #670
sickentide



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


QUOTE(uareader @ Feb 22 2021, 09:16) *

This doesn't happen if the feature is disabled, and only happen on the first turn where the old log is being copied, and cause an invisible version of buttons with a time to appear below the actual button, and in the case of powerup, it replicate it whole on a 2nd line.

hmmm... this should fix that, hopefully without introducing any new weirdness Attached File  HentaiverseMonsterbation.1.4.1.1.user.js.txt ( 159.83k ) Number of downloads: 34348
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 24 2021, 18:04
Post #671
uareader



Critter
*********
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14
Level 500 (Ponyslayer)


I think it's working as it should now.
I've made a little change for cosmetics:
CODE
    if ( cfg.logPasteover && turn ) {
        if(cfg.turnDividers) {
            log.firstChild.innerHTML += '<hr>';
        }
        log.firstChild.innerHTML += '<tr><td class="tls"></td></tr>' + turn;
    }

And now I think it look and work as I was hoping.
Thank you again.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 12 2021, 07:38
Post #672
jonLeeTim



Newcomer
**
Group: Members
Posts: 78
Joined: 1-April 20
Level 420 (Godslayer)


Could I stop auto case when channeling state?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 12 2021, 14:36
Post #673
Nezu



Rat
********
Group: Catgirl Camarilla
Posts: 3,946
Joined: 29-January 12
Level 500 (Ponyslayer)


QUOTE(jonLeeTim @ Mar 12 2021, 05:38) *

Could I stop auto case when channeling state?


No, this is explicitly forbidden.

This post has been edited by Nezu: Mar 12 2021, 14:36
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 12 2021, 21:44
Post #674
uareader



Critter
*********
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14
Level 500 (Ponyslayer)


QUOTE(Nezu @ Mar 12 2021, 13:36) *
QUOTE(jonLeeTim @ Mar 12 2021, 06:38) *

Could I stop auto case when channeling state?

No, this is explicitly forbidden.
You're good (IMG:[invalid] style_emoticons/default/ohmy.gif)
I don't understand at all what he's talking about. What is "case" (if that's enough to understand it)?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 12 2021, 23:33
Post #675
Nezu



Rat
********
Group: Catgirl Camarilla
Posts: 3,946
Joined: 29-January 12
Level 500 (Ponyslayer)


QUOTE(uareader @ Mar 12 2021, 19:44) *

You're good (IMG:[invalid] style_emoticons/default/ohmy.gif)
I don't understand at all what he's talking about. What is "case" (if that's enough to understand it)?


I think a misspelling of 'cast', but it doesn't matter no matter what he meant: making any automatic decision in response to channelling is forbidden.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 14 2021, 06:36
Post #676
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,638
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(jonLeeTim @ Mar 12 2021, 13:38) *

Could I stop auto case when channeling state?


I believe the rules (both described in forum and wiki) are as clear as they can be:

QUOTE(lestion @ Nov 28 2020, 04:43) *

If you are writing a script, you need to be aware of these rules. These are hard rules and non-compliance risks getting your account banned.

If you are not sure about something or need a judgment call, PM me. If your problem is new and unique, I will forward it to Tenboro.

The same list of rules can be found here on the wiki.

Forbidden Actions
  • Any automation of gameplay beyond a single action.
  • Parsing the battle state, combat log or other live data to make decisions.
  • Automatic target selection.
  • Rearranging or removing elements on the page to cause monsters to be automatically targeted, or actions to be chosen.
  • Anything that allows a player to collect benefits from HV without their input. (Example: automatic monster feeding.)
Rate Limiting

Battle turns are invisibly hard-limited to 4 per second and locked at the account level, which cannot be evaded in any way.

Out of battle, rate limits are unspecified, but may be enforced automatically by the server resulting in a lockout (which prevents any further actions or page loads). Regularly triggering this limiter risks bans. Script writers should avoid using multiple connection threads for requests, or limit them to the same 4 per second maximum for the safety of users.


And here is what I understand:

* Hey! My HP is below 20%! Now use HP Potion! Forbidden! Violating "Parsing the battle state, combat log or other live data to make decisions."
* Hey! My HP is below 20%! Flash screen to notify me I have to use HP Potion or Cure! Allowed! Because you still have to use potion/cast Cure manually"
* Wow! My overcharge is over 250% and OFC has been cooldowned! Highlight the OFC in quickbar to notify me that I can use it! Allowed! Because you still have to use OFC manually"
* Look! I am using 1H play style, and there is a monster bleeding and has HP lower than 25%, use Merciful Blow so that I can kill it instantly when I hover on it! Forbidden! Violating "Parsing the battle state, combat log or other live data to make decisions."
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 14 2021, 10:35
Post #677
uareader



Critter
*********
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14
Level 500 (Ponyslayer)


QUOTE(Nezu @ Mar 12 2021, 22:33) *
I think a misspelling of 'cast', but it doesn't matter no matter what he meant: making any automatic decision in response to channelling is forbidden.
To me, it looked like he was trying to stop something that is already automatic (though with the lack of the word "hover" and the global syntax issue, I can't think of what it could be).
And maybe "automatic" may be the wrong word depending on what he was really asking in the first place.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 14 2021, 16:36
Post #678
Nezu



Rat
********
Group: Catgirl Camarilla
Posts: 3,946
Joined: 29-January 12
Level 500 (Ponyslayer)


QUOTE(OnceForAll @ Mar 14 2021, 04:36) *

* Hey! My HP is below 20%! Flash screen to notify me I have to use HP Potion or Cure! Allowed! Because you still have to use potion/cast Cure manually"
* Wow! My overcharge is over 250% and OFC has been cooldowned! Highlight the OFC in quickbar to notify me that I can use it! Allowed! Because you still have to use OFC manually"


Technically no - that's parsing live data to inform a decision (even though the decision is not automatic) - but Monsterbation has been allowed to do certain things that normally break the overall rules because exceptions have been made for some situations.

The reason I must make this distinction is because interpreting the rules imaginatively might allow you to make scripts that actually break the rules - so don't be misled by what Monsterbation can do. Assume that everything Monsterbation does breaks the rules, but we've made exceptions for those things. Anyone who wanted to make a script of their own to do things like that would only be allowed to do exactly what Monsterbation does.

This post has been edited by Nezu: Mar 14 2021, 16:38
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 14 2021, 19:47
Post #679
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,638
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(Nezu @ Mar 14 2021, 22:36) *

Technically no - that's parsing live data to inform a decision (even though the decision is not automatic) - but Monsterbation has been allowed to do certain things that normally break the overall rules because exceptions have been made for some situations.

The reason I must make this distinction is because interpreting the rules imaginatively might allow you to make scripts that actually break the rules - so don't be misled by what Monsterbation can do. Assume that everything Monsterbation does breaks the rules, but we've made exceptions for those things. Anyone who wanted to make a script of their own to do things like that would only be allowed to do exactly what Monsterbation does.


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

 
post Mar 18 2021, 13:51
Post #680
save4869



Casual Poster
****
Group: Gold Star Club
Posts: 260
Joined: 5-January 12
Level 466 (Dovahkiin)


QUOTE(sickentide @ Feb 22 2021, 18:12) *

hmmm... this should fix that, hopefully without introducing any new weirdness Attached File  HentaiverseMonsterbation.1.4.1.1.user.js.txt ( 159.83k ) Number of downloads: 34348


Here on my Firefox 86.0 it can't advanced to next round with popup skipped.
14.0.0 works fine.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 21 2021, 14:11
Post #681
sickentide



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


QUOTE(save4869 @ Mar 18 2021, 12:51) *

Here on my Firefox 86.0 it can't advanced to next round with popup skipped.
14.0.0 works fine.

does the console (Ctrl-Shift-K) show any errors?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 1 2021, 20:49
Post #682
uareader



Critter
*********
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14
Level 500 (Ponyslayer)


Going back to something I said before:

QUOTE(uareader @ Feb 24 2021, 18:04) *

I think it's working as it should now.
I've made a little change for cosmetics:
CODE
    if ( cfg.logPasteover && turn ) {
        if(cfg.turnDividers) {
            log.firstChild.innerHTML += '<hr>';
        }
        log.firstChild.innerHTML += '<tr><td class="tls"></td></tr>' + turn;
    }

And now I think it look and work as I was hoping.
Thank you again.
I changed it again to:
CODE
    if ( cfg.logPasteover && turn ) {
        if(cfg.turnDividers) {
            log.firstChild.innerHTML += '<tr><td class="tls"><hr></td></tr>' + turn;
        }
        else {
            log.firstChild.innerHTML += '<tr><td class="tls"></td></tr>' + turn;
        }
    }

What I was after at that time wasn't fixed by it, so maybe it gains nothing.

---

What fixed the issue I was on when doing this change, namely text being cut at the end of the log, was that piece of code I added after:
CODE
document.getElementById("pane_log").style.height = "400px";

I haven't tried to play without the script, so it may be unrelated to it, and whether it's related to the script or not, I think it may be tied to the same thing that make me modify the hentaiverse links to load them into 1260x730 instead of 1250x720.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 2 2021, 08:52
Post #683
mewsf



Regular Poster
*****
Group: Gold Star Club
Posts: 593
Joined: 24-June 14
Level 500 (Ponyslayer)


Can it stop wheel action on low health? Hovering is disabled on low health to prevent misoperation, so it's better if the same thing applies to wheel action, for mages like me who cast imperil with wheel.

edit: it's not allowed, so please ignore this.

This post has been edited by mewsf: Apr 2 2021, 11:52
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 3 2021, 00:20
Post #684
sickentide



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


QUOTE(uareader @ Apr 1 2021, 19:49) *

Going back to something I said before:

if it helps, this is how i take care of that in my development build:
CODE
    if ( cfg.logPasteover && turn ) {
        log.firstChild.innerHTML += '<tr><td class="tls"></td></tr>' + turn;
        FormatLog(); }
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 20 2021, 19:30
Post #685
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,638
Joined: 3-January 21
Level 500 (Ponyslayer)


When discussing in Unofficial HentaiVerse Discord, I have mentioned an idea: to port an existed open-source fps widget that is written in javascript (https://github.com/mrdoob/stats.js) and make it show real-time tps in such a chart:

(IMG:[cdn.discordapp.com] https://cdn.discordapp.com/attachments/609123079716601867/834105570809348156/unknown.png)

It appears that some players are interested in this idea, and the mod confirms such a feature will be legal. So I am here to provides a ported code and hopefully the feature could be included in the future version of Monsterbation.

CODE
// Stat Widget
class StatWidget {
  constructor() {
    this.actions = 0;
    this.container = document.createElement('div');
    // Fixed the widget to the right-top of the window
    this.container.style.cssText = 'position:fixed;top:0;right:0;cursor:pointer;opacity:0.8;z-index:10000';
    this.beginTime = (performance || Date).now();
    this.prevTime = this.beginTime;
    // title, foreground color, background color
    this.tpsPanel = StatsPanel('t/s', '#0ff', '#002');
    this.addPanel(this.tpsPanel);
  }

  begin() {
    this.beginTime = (performance || Date).now();
  }

  end() {
    this.actions++;

    const time = (performance || Date).now();
    // trigger a canvas update every 1000ms
    if (time >= this.prevTime + 1000) {
      // call update canvas
      // maxValue set to 4, which is known hard rate limit during the battle
      this.tpsPanel.update((this.actions * 1000) / (time - this.prevTime), 4);
      this.prevTime = time;
      this.actions = 0;
    }
    return time;
  }
  // Private method, add canvas to container
  addPanel(panel) {
    this.container.appendChild(panel.dom);
  }
}

// Canvas for Stat Widget
function StatsPanel(name, fg, bg) {
  let min = Infinity;
  let max = 0;
  const { round } = Math;
  const PR = round(window.devicePixelRatio || 1);

  const WIDTH = 80 * PR;
  const HEIGHT = 48 * PR;
  const TEXT_X = 3 * PR;
  const TEXT_Y = 2 * PR;
  const GRAPH_X = 3 * PR;
  const GRAPH_Y = 15 * PR;
  const GRAPH_WIDTH = 74 * PR;
  const GRAPH_HEIGHT = 30 * PR;

  const canvas = document.createElement('canvas');
  canvas.width = WIDTH;
  canvas.height = HEIGHT;
  canvas.style.cssText = 'width:100px;height:61.8px';

  const context = canvas.getContext('2d');

  if (context) {
    context.font = `bold ${9 * PR}px Helvetica,Arial,sans-serif`;
    context.textBaseline = 'top';

    context.fillStyle = bg;
    context.fillRect(0, 0, WIDTH, HEIGHT);

    context.fillStyle = fg;
    context.fillText(name, TEXT_X, TEXT_Y);
    context.fillRect(GRAPH_X, GRAPH_Y, GRAPH_WIDTH, GRAPH_HEIGHT);

    context.fillStyle = bg;
    context.globalAlpha = 0.9;
    context.fillRect(GRAPH_X, GRAPH_Y, GRAPH_WIDTH, GRAPH_HEIGHT);
  }

  return {
    dom: canvas,
    update(value, maxValue) {
      min = Math.min(min, value);
      max = Math.max(max, value);

      if (context) {
        context.fillStyle = bg;
        context.globalAlpha = 1;
        context.fillRect(0, 0, WIDTH, GRAPH_Y);
        context.fillStyle = fg;
        context.fillText(`${value.toFixed(2)} ${name}`, TEXT_X, TEXT_Y);
        context.drawImage(canvas, GRAPH_X + PR, GRAPH_Y, GRAPH_WIDTH - PR, GRAPH_HEIGHT, GRAPH_X, GRAPH_Y, GRAPH_WIDTH - PR, GRAPH_HEIGHT);

        context.fillRect(GRAPH_X + GRAPH_WIDTH - PR, GRAPH_Y, PR, GRAPH_HEIGHT);

        context.fillStyle = bg;
        context.globalAlpha = 0.9;
        context.fillRect(GRAPH_X + GRAPH_WIDTH - PR, GRAPH_Y, PR, (1 - (value / maxValue)) * GRAPH_HEIGHT);
      }
    }
  };
}



CODE
// Init the StatWidget. Call it once per page load
const tpsStats = new Stats();
document.body.appendChild(tpsStats.container);

// Call at the start of a turn
tpsStats.begin();

// Call at the end of a turn (or the start of next turn)
tpsStats.end();

// And the widget will be updated and rendered every second
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 22 2021, 22:08
Post #686
sickentide



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


QUOTE(OnceForAll @ Apr 20 2021, 18:30) *

When discussing in Unofficial HentaiVerse Discord, I have mentioned an idea: to port an existed open-source fps widget that is written in javascript (https://github.com/mrdoob/stats.js) and make it show real-time tps in such a chart:

(IMG:[cdn.discordapp.com] https://cdn.discordapp.com/attachments/609123079716601867/834105570809348156/unknown.png)

i like this idea. i have two weeks off to study for exams and i've been meaning to add some real-time statistics anyway, so i will look into this as soon as i am satisfied with my progress studying
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


45 Pages V « < 33 34 35 36 > » 
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: 31st August 2025 - 01:34