HaremHeroes Automatic

Open the menu in HaremHeroes(topright) to toggle AutoControlls. Supports AutoSalary, AutoContest, AutoMission, AutoQuest, AutoTrollBattle, AutoArenaBattle and AutoPachinko(Free). Messages are printed in local console.

< 脚本HaremHeroes Automatic的反馈

提问/评论

§
发表于:2018-04-19
编辑于:2018-04-20

AutoQuest not working in new update

After the new update: Back to Heroism: Heroes University, My AutoQuest does not work. Heres my console log.

Navigating to current quest.
VM196 userscript.html:570 autoLoop Disabled
VM224 userscript.html:2 ERROR: Execution of script 'Harem Heroes++ modified by 1121' failed! Cannot read property 'split' of null
(anonymous) @ VM224 userscript.html:2
(anonymous) @ VM224 userscript.html:3
(anonymous) @ VM224 userscript.html:1159
(anonymous) @ VM224 userscript.html:1161
(anonymous) @ VM213:2
b @ VM213:1
E_u @ VM213:2
p @ VM215:62
oa @ VM215:61
create @ VM215:72
e @ VM215:16
runListeners @ VM215:16
(anonymous) @ VM215:73
k @ VM213:9
e @ VM199 content.js:6
send @ VM199 content.js:8
(anonymous) @ VM199 content.js:28
processQueue @ VM199 content.js:3
a @ VM199 content.js:10
VM224 userscript.html:2 TypeError: Cannot read property 'split' of null
    at ModifyScenes (VM224 userscript.html:803)
    at Window.eval (VM224 userscript.html:276)
    at <anonymous>:2:120
    at eval (VM224 userscript.html:2)
    at eval (VM224 userscript.html:3)
    at Object.eval (VM224 userscript.html:1159)
    at eval (VM224 userscript.html:1161)
    at eval (<anonymous>)
    at <anonymous>:2:120
    at Object.b [as F_c] (<anonymous>:1:398)
VM226 userscript.html:190 Proceeding for free.
VM226 userscript.html:190 Proceeding for free.
VM226 userscript.html:199 Spending 7 Energy to proceed.
VM226 userscript.html:214 Spending 7 Money to proceed.
VM226 userscript.html:559 Restoring page https://nutaku.haremheroes.com/activities.html

Update: AutoPachinko works.

§
发表于:2018-05-08
编辑于:2018-05-08

It doesn't work because of this line:

var moneyCurrent = Number($("div[hero='soft_currency'] span").text().trim().replace(',', ''));

The text inside the span of div[hero='soft_currency'] can have something like "10.8M" inside so .trim().replace(',','') would still give you "10.8M". And when you go to the line

if(proceedCostMoney <= moneyCurrent){ ... }

you'll get an error. If you have millions of currency you'll always get an error. A statement like 170654 <= 10.8M is super nonsense for a computer.

In my code I solved this and other problems but the moderator at greasyfork is giving me a hard time so I refuse to upload it.

§
发表于:2018-05-08
编辑于:2018-05-08

what do you mean by the moderators here? and also the auto pachinko is still broken. IT works sometimes.

发表回复

登录以发表回复。