QUOTE(sickentide @ Apr 29 2020, 07:03)

ah, i see, this is because i didn't design Impulse with it being used as a hover action in mind. try taking the Hover function around line 1389 and replacing it with this:
CODE
function Hover() {
if ( hovering ) return;
hovering = true;
if ( override ) {
override(); }
else if ( shiftHeld && cfg.hoverShiftAction ) {
cfg.hoverShiftAction(); }
else if ( ctrlHeld && cfg.hoverCtrlAction ) {
cfg.hoverCtrlAction(); }
else if ( altHeld && cfg.hoverAltAction ) {
cfg.hoverAltAction(); }
else {
cfg.hoverAction(); }
if ( impulse ) {
impulse();
done = true;
impulse = false; }
monsters[target].click(); }
now you can initiate your rotation with this hoverShiftAction:
CODE
Strongest([Cast('Ragnarok'), Cast('Disintegrate'), Cast('Corruption'), Impulse(Cast('Imperil'))])
setting:
CODE
// @match https://*.hentaiverse.org/*
turnDividers: true, // add horizontal row between turns
hoverCtrlAction: "Strongest([Cast('Wrath of Thor'), Cast('Chained Lightning'), Cast('Shockblast'), Impulse(Cast('Imperil'))])", // alternate hover action when holding ctrl
much better (IMG:[
invalid]
style_emoticons/default/laugh.gif)
but if with always holding "ctrl" go in a new round,
at a new round, hover the monster, will not hit Imperil as intended,
it will become Wrath of Thor/Chained Lightning/Shockblast( as the cool down),
need to release "ctrl", and holding again, and hover, then it hits imp.
if I am right, the reason maybe about here:
CODE
function Hover() {
if ( hovering ) return;
hovering = true;
if ( override ) {
override(); }
else if ( shiftHeld && cfg.hoverShiftAction ) {
cfg.hoverShiftAction(); }
else if ( ctrlHeld && cfg.hoverCtrlAction ) {
cfg.hoverCtrlAction(); }
else if ( altHeld && cfg.hoverAltAction ) {
cfg.hoverAltAction(); }
else {
cfg.hoverAction(); }
if ( impulse ) {
impulse();
done = true;
impulse = false; }
monsters[target].click(); }
in the old round, after this,
done == true
impulse == false
due to with always holding "ctrl" go in a new round,
have no a new keydown,
these code do NOT work
CODE
function handleKeys(e) {
if ( release ) {
done = false;
release = false; }
saveKeyDown();
shiftHeld = e.shiftKey;
ctrlHeld = e.ctrlKey;
altHeld = e.altKey;
var bind;
for ( var i = 0; i < bindings.length; i++ ) {
bind = bindings[i];
if ( e.keyCode == bind.keyCode && bind.modifier(e) ) {
bind.action();
return; }}
loadKeyDown(); }
"done" still be "true"
when player hover at the new round,
CODE
function Hover() {
if ( hovering ) return;
hovering = true;
if ( override ) {
override(); }
else if ( shiftHeld && cfg.hoverShiftAction ) {
cfg.hoverShiftAction(); }
else if ( ctrlHeld && cfg.hoverCtrlAction ) {
cfg.hoverCtrlAction(); }
else if ( altHeld && cfg.hoverAltAction ) {
cfg.hoverAltAction(); }
else {
cfg.hoverAction(); }
if ( impulse ) {
impulse();
done = true;
impulse = false; }
monsters[target].click(); }
CODE
hoverCtrlAction: "Strongest([Cast('Wrath of Thor'), Cast('Chained Lightning'), Cast('Shockblast'), Impulse(Cast('Imperil'))])"
CODE
function Strongest(actions) { return function() { var n = actions.length; while ( n-- > 0 ) actions[n](); };}
CODE
function Impulse(action) {
return function() {
if ( done ) return;
impulse = action;
if ( interruptHover || interruptAlert || !monsters[target] || !monsters[target].hasAttribute('onclick') ) {
action(); done = true; impulse = false; }};}
Strongest() return cast the Wrath of Thor/Chained Lightning/Shockblast( as the cool down ),
and due to "done == true",
impulse != action
actually, impulse == false
then come back here:
CODE
function Hover() {
if ( hovering ) return;
hovering = true;
if ( override ) {
override(); }
else if ( shiftHeld && cfg.hoverShiftAction ) {
cfg.hoverShiftAction(); }
else if ( ctrlHeld && cfg.hoverCtrlAction ) {
cfg.hoverCtrlAction(); }
else if ( altHeld && cfg.hoverAltAction ) {
cfg.hoverAltAction(); }
else {
cfg.hoverAction(); }
if ( impulse ) {
impulse();
done = true;
impulse = false; }
monsters[target].click(); }
due to "impulse == false", this part does not work,
CODE
if ( impulse ) {
impulse();
done = true;
impulse = false; }
finally,
"monsters[target].click();" work with Strongest() return cast (Wrath of Thor/Chained Lightning/Shockblast).
***************************************************************************************************
***************************************************************************************************
Change the way to talk about that:Plan A,QUOTE
QUOTE(3534 @ Apr 28 2020, 17:33)

[a] when I enter GF, mouse is outside the hover area, nothing happend
[b.] push "shift" and holding it
[c] mouse go in the hover area, with still holding "shift"
[e] first turn, imp hit. (mouse still in the hover area, with still holding "shift")
[f] action stop (mouse still in the hover area, with still holding "shift")
[g] mouse go out of the hover area (still holding "shift")
[h] mouse go in the hover area, with still holding "shift"
[i] second turn, imp hit. (mouse still in the hover area, with still holding "shift")
[j] action stop (mouse still in the hover area, with still holding "shift")
[k] mouse go out of the hover area (still holding "shift")
[l] mouse go in the hover area, with still holding "shift"
[m] third turn, imp hit. (mouse still in the hover area, with still holding "shift")
[n] action stop (mouse still in the hover area, with still holding "shift")
[o] mouse go out of the hover area (still holding "shift")
...
[p] mouse go out of the hover area, release "shift"
maybe a little look like use "onmouseenter" instead of "onmouseover"...?
addEventListener('mouseenter', function)
addEventListener('mouseover', function)
and if "interruptAlert" is "true", such as spark or low hp,
though mouse still in the hover area, with still holding "shift", will NOT hit imp this usage is it allowed?( I am still not sure how to do this job in code, but first of all, it is legal or not...? (IMG:[
invalid]
style_emoticons/default/unsure.gif) )
-
Plan B,setting:
CODE
clickRight: "Cast('Imperil')"
and edit the code here:
from
CODE
function HandleClick(i) {
return function(e) {
var action;
if ( (i || i === 0) && e.which == 1 ) action = cfg.clickLeft;
else if ( e.which == 2 ) action = cfg.clickMiddle;
else if ( e.which == 3 ) action = cfg.clickRight;
if ( action ) {
e.preventDefault();
if ( release ) {
done = false;
release = false; }
action();
if ( i || i === 0 ) {
monsters[i].click(); }}};}
to
CODE
forbidden code
use right click to imp,
when in spark or low hp, will not hit, only cast (be ready),
if still want to hit the imp at monster, just push left click or number key.
maybe slower and worse than "hoverImperil", but much easier to finish the code.
and this, is it allowed? (IMG:[
invalid]
style_emoticons/default/unsure.gif)
This post has been edited by 3534: Apr 30 2020, 03:12