 |
 |
 |
[Script] Monsterbation 1.4.1.2, A comprehensive hovering script for HentaiVerse and ISK. Including CrunkJuice 1.3.0, an out-of-battle script |
|
Feb 21 2021, 22:17
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10

|
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
HentaiverseMonsterbation.1.4.1.0.user.js.txt ( 159.87k )
Number of downloads: 398
|
|
|
|
 |
|
Feb 22 2021, 10:16
|
uareader
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14

|
Thanks for the feature to see previous round result. Right now it has a weird bug for me: 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.
|
|
|
Feb 22 2021, 11:14
|
Nezu
Group: Catgirl Camarilla
Posts: 3,946
Joined: 29-January 12

|
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)
|
|
|
Feb 22 2021, 12:12
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10

|
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
HentaiverseMonsterbation.1.4.1.1.user.js.txt ( 159.83k )
Number of downloads: 34348
|
|
|
|
 |
|
Feb 24 2021, 18:04
|
uareader
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14

|
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.
|
|
|
Mar 12 2021, 07:38
|
jonLeeTim
Newcomer
  Group: Members
Posts: 78
Joined: 1-April 20

|
Could I stop auto case when channeling state?
|
|
|
Mar 12 2021, 14:36
|
Nezu
Group: Catgirl Camarilla
Posts: 3,946
Joined: 29-January 12

|
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
|
|
|
Mar 12 2021, 21:44
|
uareader
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14

|
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)?
|
|
|
Mar 12 2021, 23:33
|
Nezu
Group: Catgirl Camarilla
Posts: 3,946
Joined: 29-January 12

|
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.
|
|
|
|
 |
|
Mar 14 2021, 06:36
|
OnceForAll
Group: Catgirl Camarilla
Posts: 1,638
Joined: 3-January 21

|
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 LimitingBattle 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."
|
|
|
|
 |
|
Mar 14 2021, 10:35
|
uareader
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14

|
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.
|
|
|
|
 |
|
Mar 14 2021, 16:36
|
Nezu
Group: Catgirl Camarilla
Posts: 3,946
Joined: 29-January 12

|
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
|
|
|
|
 |
|
Mar 14 2021, 19:47
|
OnceForAll
Group: Catgirl Camarilla
Posts: 1,638
Joined: 3-January 21

|
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.
|
|
|
|
 |
|
Mar 18 2021, 13:51
|
save4869
Group: Gold Star Club
Posts: 260
Joined: 5-January 12

|
QUOTE(sickentide @ Feb 22 2021, 18:12)  hmmm... this should fix that, hopefully without introducing any new weirdness
HentaiverseMonsterbation.1.4.1.1.user.js.txt ( 159.83k )
Number of downloads: 34348Here on my Firefox 86.0 it can't advanced to next round with popup skipped. 14.0.0 works fine.
|
|
|
Mar 21 2021, 14:11
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10

|
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?
|
|
|
|
 |
|
Apr 1 2021, 20:49
|
uareader
Group: Catgirl Camarilla
Posts: 5,594
Joined: 1-September 14

|
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.
|
|
|
|
 |
|
Apr 2 2021, 08:52
|
mewsf
Group: Gold Star Club
Posts: 593
Joined: 24-June 14

|
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
|
|
|
Apr 3 2021, 00:20
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10

|
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(); }
|
|
|
|
 |
|
Apr 20 2021, 19:30
|
OnceForAll
Group: Catgirl Camarilla
Posts: 1,638
Joined: 3-January 21

|
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
|
|
|
|
 |
|
Apr 22 2021, 22:08
|
sickentide
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10

|
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
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
 |
 |
 |
|