 |
 |
 |
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Jan 30 2014, 19:40
|
Razor320
Group: Members
Posts: 220
Joined: 17-October 13

|
I have this idea for some time. How you think, if shop bot would be illegal? I mean, it is an automation, but not a gameplay automation, private trading between players don't seem to me like gameplay element.
Something like userJS script, that checks mail (forum mail or mogglemail) perodically for appropriate requests and serves them without player intervention. It also should be capable of maintaining actual list of items in form of post in forum thread.
|
|
|
|
 |
|
Jan 30 2014, 21:47
|
Lement
Group: Members
Posts: 2,977
Joined: 28-February 12

|
Theoretically quite possible, I've been thinking of running a free shop with a helper script - I certianly wouldn't do it without human oversight, only checking stuff periodically. There are though some troubles like a) multi-accounting due multiple IPs, (IMG:[ invalid] style_emoticons/default/cool.gif) most people won't be able to have a computer running and c) anybody who would care enough to configure it would go through the effort of just checking HV periodically and using in-built user interface instead and d) the latter also means no fear of sending off your collection gear, for example. As for legality, once you have something concrete, PM 10b as it is does not perform simple things. This post has been edited by Lement: Jan 30 2014, 21:48
|
|
|
|
 |
|
Jan 31 2014, 15:12
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
version 1.0
fastest_mouse_melee.user.js.zip ( 1.06k )
Number of downloads: 60version 1.1
fastest_mouse_melee.user.js.zip ( 1.02k )
Number of downloads: 60latest version https://forums.e-hentai.org/index.php?s=&am...t&p=3034527Introducing Mousemelee Lightning+! Like Lement's or Dan31's Mousemelee :3 - 'Shift' hotkey to disable the script till you turn it back on or restart the browser *or launch the game in another window\tab (you can see when it's turned off in the Title) - Show colored borders arounds monsters if low on hp\mp\sp (like in original MouseMelee) (works even when disabled) = Works only for Firefox (sorry, Chrome can't handle its awesomeness) Just was testing stuff and made this. It sets onhover attributes of monsters in the moment they appear and not later, did some measurments and this seem to show a bit better results than original mousmelle (might be better on faster computers) my timings in ms between monster hits: CODE this: 276,267,269,244,255,245,250,257,267,322,325,284,269,276,274,279,255,327,282,272,287,275,268,270
original: 285,270,266,286,239,281,261,266,265,271,295,258,260,282,265,250,280,272,268,250,272,287,267,282 This post has been edited by Owyn: Jan 31 2014, 21:59
|
|
|
|
 |
|
Jan 31 2014, 15:15
|
Lement
Group: Members
Posts: 2,977
Joined: 28-February 12

|
Hm. About timings, if you can get 250ms between monster hits(what did you use, btw?) you're doing 4 turns/second and are capped.
|
|
|
Jan 31 2014, 15:42
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
QUOTE you're doing 4 turns/second and are capped. what cap are you talking about? I used simple js ( now - lasttime )
|
|
|
Jan 31 2014, 16:09
|
Dan31
Group: Members
Posts: 4,399
Joined: 26-March 12

|
QUOTE(Owyn @ Jan 31 2014, 14:42)  what cap are you talking about?
I used simple js ( now - lasttime )
HV is throttled at 4 turns per second, server-side. Where is the link to that Mousemelee Lightning+ of yours, btw? This post has been edited by Dan31: Jan 31 2014, 16:12
|
|
|
Jan 31 2014, 16:17
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
QUOTE HV is throttled at 4 turns per second, server-side.
sad =\ Well, now at least I won't blame the speed of my computer for not doing HV faster QUOTE Where is the link attached it but forgot to embed xD thx for telling.
|
|
|
Jan 31 2014, 16:33
|
Dan31
Group: Members
Posts: 4,399
Joined: 26-March 12

|
I checked your script, it's basically mine with a key to enable/disable the script. Plus the fact it runs at document-start.
|
|
|
Jan 31 2014, 16:42
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
Dan31, well, three lines to check hp mp and sp are exactly yours, hovering is a method you used, warning coloring is original of Lement, hotkey and installing of your hovering override is mine (haven't seen those anywhere here) QUOTE fact it runs at document-start. that's the point of the new script.
|
|
|
Jan 31 2014, 16:52
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10

|
QUOTE(Dan31 @ Feb 1 2014, 01:33)  Plus the fact it runs at document-start.
He also used MutationObserver to add the mouseover event as soon as a monster element is added. So he doesn't have to wait for the entire DOM tree to load. Pretty cool trick
|
|
|
|
 |
|
Jan 31 2014, 17:42
|
Razor320
Group: Members
Posts: 220
Joined: 17-October 13

|
Owyn, note about `sessionStorage` - it is different for any browser window. So, when you open new window with HV, its sessionStorage is empty. This is Firefox behavior. (I write 'window' - tabs also counts as windows) Why you don't use `m[n].onmouseover = m[n].onclick`? Assigning reference is much faster than copying string. I doubt that MutationObserver is faster than standard method. At first, it is not guaranteed that it fires before DOM is completely built, it only provides ability to run custom code when DOM is changed and faster than MutationEvent. At last, checking every node with javascript? Or allowing DOM to select objects with optimized algorithm? What should be faster? And, finally, that doesn't matter (IMG:[ invalid] style_emoticons/default/smile.gif) Either way, execution time probably less than 5ms. This post has been edited by Razor320: Jan 31 2014, 17:46
|
|
|
|
 |
|
Jan 31 2014, 17:57
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
QUOTE So, when you open new window with HV, its sessionStorage is empty. This is Firefox behavior. (I write 'window' - tabs also counts as windows)
Forgot to write about that in the description, thx (IMG:[ invalid] style_emoticons/default/happy.gif) I made the hotkey just to stop mousemeleeing when monsters get too strong, so user shouldn't change windows when he's fighting monsters QUOTE Why you don't use `m[n].onmouseover = m[n].onclick`? Assigning reference is much faster than copying string. thought about that after I archived and uploaded the script, but was too lazy to test that it's working and update, +reference changing doesn't change the html of the element, so it would stay the same there which would be pretty weird (at least to me) anyway QUOTE Either way, execution time probably less than 5ms. I doubt it gonna be more than 1ms, but I'll fix it after few tests.
|
|
|
|
 |
|
Jan 31 2014, 19:44
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10

|
What do you guys think about this approach: we shave off the native js of the page (the file 077c.js, which is extrememly bloated since it handles both the battle and non-battle page's interaction). then use this form to submit our command instead of relying on the usual click() function CODE <form id="battleform" method="post" action=""> <input type="hidden" id="battleaction" name="battleaction" value="0"> <input type="hidden" id="battle_targetmode" name="battle_targetmode" value=""> <input type="hidden" id="battle_target" name="battle_target" value=""> <input type="hidden" id="battle_subattack" name="battle_subattack" value=""> </form> Do you think it will make page load faster?
|
|
|
|
 |
|
Jan 31 2014, 19:57
|
Lement
Group: Members
Posts: 2,977
Joined: 28-February 12

|
If you can block the native script in a way that isn't incredeibly bloaty(adblock is a definite no-no) it would be yes, but BUUUUUUUUUUUUGS.
@Razor320: having more code can certainly result in more than 5ms delay, but in any case yes it doesn't matter - throttled anyway.
This used to be so important topic before throttling....
|
|
|
Jan 31 2014, 19:59
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
holy_demon, you just want to create an unnoficial client to play HV, doubt Tenb gonna like it cuz there would be no place for hidden checks n tricks against botters then
|
|
|
|
 |
|
Jan 31 2014, 20:02
|
holy_demon
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10

|
QUOTE(Lement @ Feb 1 2014, 04:57)  If you can block the native script in a way that isn't incredeibly bloaty(adblock is a definite no-no) it would be yes, but BUUUUUUUUUUUUGS.
@Razor320: having more code can certainly result in more than 5ms delay, but in any case yes it doesn't matter - throttled anyway.
This used to be so important topic before throttling....
I'm thinking about either using document-start, or AJAX QUOTE(Owyn @ Feb 1 2014, 04:59)  holy_demon, you just want to create an unnoficial client to play HV, doubt Tenb gonna like it cuz there would be no place for hidden checks n tricks against botters then
Any botter who isn't just a script-kiddie probably must have done this ages ago... :/ This post has been edited by holy_demon: Jan 31 2014, 20:05
|
|
|
|
 |
|
Jan 31 2014, 20:13
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
QUOTE Any botter who isn't just a script-kiddie probably must have done this ages ago... :/ yes, and was banned for this alone, but if this was to go public - everyone gonna use it and Tenb won't be able to tell apart botters and users of this new public client but it's not like doing what you suggested would break any rules, so why not to try. This post has been edited by Owyn: Jan 31 2014, 22:01
|
|
|
|
 |
|
Jan 31 2014, 21:58
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
QUOTE(Owyn @ Jan 31 2014, 17:12)  1.2 (don't use this, it has a bug)
fastest_mouse_melee.user.js.zip ( 984bytes )
Number of downloads: 102 Introducing Mousemelee Lightning+! Like Lement's or Dan31's Mousemelee :3 - 'Shift' hotkey to disable the script till you turn it back on or restart the browser *or launch the game in another window\tab (you can see when it's turned off in the Title) - Show colored borders arounds monsters if low on hp\mp\sp (like in original MouseMelee) (works even when disabled) = Works only for Firefox (sorry, Chrome can't handle its awesomeness) Just was testing stuff and made this. It sets onhover attributes of monsters in the moment they appear and not later, did some measurments and this seem to show a bit better results than original mousmelle (might be better on faster computers) my timings in ms between monster hits: CODE this: 276,267,269,244,255,245,250,257,267,322,325,284,269,276,274,279,255,327,282,272,287,275,268,270
original: 285,270,266,286,239,281,261,266,265,271,295,258,260,282,265,250,280,272,268,250,272,287,267,282 1.2f
fastest_mouse_melee.user.js.zip ( 999bytes )
Number of downloads: 218 *made a quick fix so you won't hit yourself ;p Now it sets onhover attributes of monsters even before they appear :3 TIME TRAVEL YEAH! *finnaly got my own method for new mouse melee to kill monsters with like Dan31 and Lament did Upgraded a little, now average setup time is 66 ms instead of old 72 from document-start (for me) + it lightes page actions up a bit as a result of new method (didn't measure - who cares now anyway - the cap is 250ms). my short result times from document-start to the moment everything is set up and ready to go: CODE [64 , 61 , 62 , 68 , 70 , 76 , 80 , 79 , 56 , 71 , 55 , 77 , 74 , 77 , 78 , 80 , 84 , 64 , 58 , 61 , 62 , 68 , 70 , 77 , 54 , 60 , 64 , 70 , 66 , 56 , 61 , 62 , 63 , 67 , 54 , 70 , 58 , 58 , 65 , 68 , 74 , 61 , 77 , 66 , 70 , 68 , 74 , 71 , 56 , 59 , 65 , 96 , 54 , 68 , 59 , 65]
[64 , 71 , 69 , 76 , 75 , 80 , 59 , 66 , 66 , 72 , 76 , 79 , 58 , 77 , 85 , 61 , 65 , 70 , 60 , 83 , 67 , 64 , 64 , 72 , 70 , 60 , 76 , 59 , 64 , 74 , 72 , 71 , 73 , 69 , 65 , 77 , 84 , 82 , 87 , 76 , 84 , 61 , 84 , 62 , 78 , 62 , 88 , 80 , 84 , 62 , 86 , 84 , 63 , 85 , 64]
This post has been edited by Owyn: Jan 31 2014, 22:31
|
|
|
|
 |
|
Jan 31 2014, 22:44
|
Razor320
Group: Members
Posts: 220
Joined: 17-October 13

|
Technically, your measure is invalid. You are measuring time spent on loading page and creating DOM. Throttle your internet connection until HV pages will load slowly and measure again.
|
|
|
Jan 31 2014, 22:48
|
Owyn
Group: Members
Posts: 692
Joined: 12-May 10

|
Well, I measured my something and I then improved my something, so it would probably improve something of users as well, no? (IMG:[ invalid] style_emoticons/default/happy.gif)
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
 |
 |
 |
|