Mod Java Onhold Stakhan

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
stakhan.jpg

Overview:
Stakhan is a standalone Java application meant to be a platform for running various bots for browser games. Although there may be many botting applications available, when searching in 2019, we have not found any applications that were free, extendable, capable of complex tasks and easy to use.
Current version contains modules for "nutaku", "haremheroes", "kamihime-r" and "taimanin asagi battle arena".

Over the time I got more and more aware of the things I could have done better or simplier. For now, stakhan has no graphical user interface and it is merely a command line application, although you can configure some routines using XML files. The coding part did get a bit messy and too abstract, something I certainly would want to simplify.

Unfortunately, due to updates to games themselves stakhan modules no longer work correctly. I am also devoted to some other private "project" for the time being and I it is not my priority to keep stakhan working. Once may other project has successfully finished I plan to revisit stakhan with some serious improvements to both UX and maintainability. This however is unlikely to happen any earlier than fall 2022.

I hope that some of this great community will enjoy using stakhan in its current form. And perhaps, that in future, I can bring stakhan to the next level.​

Updated: 2021/06/19
Game/Creator: various (now: , , ) / kurweta
App version: 1.0.2-20210619
Language: English

Features:
You don't have permission to view the spoiler content. Log in or register now.

Installation:
You don't have permission to view the spoiler content. Log in or register now.

Update:
You don't have permission to view the spoiler content. Log in or register now.

Change log:
You don't have permission to view the spoiler content. Log in or register now.

Download:
Distribution:
Source code (git bundle):

Running.PNG Running2.PNG UserGuide.PNG DevGuide1.PNG DevGuide2.PNG
 
Last edited:

bas

retired
Donor
Respected User
Former Staff
May 6, 2017
3,988
30,554
Hello F95Zone,

I have created a little java application for those who play nutaku games.

Currently supported games are:
- kamihime-r
- haremheroes

To run the application download the distribution (link below) and move default configurations from /conf/game-xxx to /conf and the run the 'stakhan.bat' file.
Application will ask you for your nutaku credentials, as it does play like you do. If you don't trust to enter you credentials, verify the security in source_code / decompiler or don't use the app!
If you still have problems starting the app, try reading the doc/user_guide.html.

As for what does this botting actually do you can read the configuration files.
Overall it works rather well without issues, but kamihime-r can will have trouble if you lose a fight. :(

You can download the distribution here:
Full source code is available here:

This is my first time writing this kind of application. Comments, feedback, bug reports are appreciated.
Git patches with bug-fixes and new modules are also very welcome :)
I've moved this to the "Mods" section of the forum. If you could please revise your post to explain what this mod actually does? thanks
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Im unable to type anything into the password field when it pops up~
It's a feature. When you type, the characters don't appear on the screen, but it doesn't mean it does not work. So just type your password and press enter.

Another alternative, if you don't want to type in your credentials every time, is to set them in the "nutaku.properties" file. Just uncomment the lines and you should endup file similar to:
Code:
# You can enter you nutaku credentials here, so that you won't be prompted for them at runtime.
nutaku.email=myemail@exmple.com
nutaku.password=mypassword
But then you know, you have your credentials in plain text on your file system, so your friends can find it. Not a big deal for most of the people!
 

Pandalicious

Member
Dec 13, 2017
111
152
It's a feature. When you type, the characters don't appear on the screen, but it doesn't mean it does not work. So just type your password and press enter.

Another alternative, if you don't want to type in your credentials every time, is to set them in the "nutaku.properties" file. Just uncomment the lines and you should endup file similar to:
Code:
# You can enter you nutaku credentials here, so that you won't be prompted for them at runtime.
nutaku.email=myemail@exmple.com
nutaku.password=mypassword
But then you know, you have your credentials in plain text on your file system, so your friends can find it. Not a big deal for most of the people!
Ahhhh, okey that makes sense. Yeah I have a google generated password, so its quite long. Thank you :) I'll give it a try
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Will this get you banned on nutaku ?
Short answer:
Well, botting games is illegal. It MAY get you banned, if somebody would care to invest enough time to find out. Unlikely.

Long answer:
long answer is really long and complex, involving social mechanics, IT background and insight, and many more factors than just the application itself.... Exciting right? I am going to work now, so I will type it another time if you are interested.
 

Pandalicious

Member
Dec 13, 2017
111
152
I've been using it for about a week now. Works pretty great with Harem heroes, but kamihime not so much.


Did you make any updates to the bot yet? :)
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Thanks Pandalicious!

Kamihime certainly needs some work. It's not that it is hard, it's just that I didn't put the time there.

In fact, I have spent some time writing this whole project already and I decided it's time to post it and put in on hold for a while. I have other private projects I need to start working on. As such I don't know when will I sit down to Kamihime and fix these bugs.

On the plus side, the current state of Stakhan is good enough for others to pick up and write new modules. In fact that's what I am hoping for! The general platform is there, so one can really get into writing the botting logic.

I guess I can sit down to it by the end of October. Unless more people ask for it that is.
 
  • Like
Reactions: Pandalicious

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
nope, not anytime this month. Like I said, maybe I will sit down to it near the end of October. However, all source is open, together with a brief guide, feel free to continue the work and make some commits.
 
  • Like
Reactions: Kyr4l

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
i was aking because the program instatly crashes when i launch it
Well, it should not. But I suppose that the window just closes itself shortly after you start the app.

Try run application from command line, like the .bat file does:
Code:
$ cd <stakhan_root_folder>
$ java -cp lib\* mini.stakhan.core.Stakhan
and see if the error message make any sense to You. If not send me them (copy from console window, or screenshot) in private message, I will see what I can do.
 
  • Like
Reactions: Kyr4l

Kyr4l

Newbie
Aug 16, 2018
75
32
it works when using the command like, without the bat file, thanks
edit : 1568573263337.png i'm getting this error now
 
Last edited:

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Right, that makes sense. Bat file probably runs the same thing, it just closes instantly after printing that message. I will try to address this issue next time I sit down to coding.

This message is not an error, it is telling you that you have not configured the actions to bot. To get some actions configured move configuration files to the <stakhan>/conf directory. There are default configuration files in subfolders of the conf, so you can use these. I recommend to use nutaku.properties and hh.activities.xml, but you can also use the configs from kamihime folder... but beware that KH module is still buggy. Also, don't be afraid to edit these files, these are not that complex and you can change some values here and there :)

In case you face more trouble, try reading through <stakhan>/doc/user_guide.html and if that does not help, write here again.
 
  • Like
Reactions: Kyr4l

Kyr4l

Newbie
Aug 16, 2018
75
32
okay so i moved the config files to the conf folder and the program launched, then it crashed with this error (from critical.log)
Code:
17:57:54 ERROR Unhandled exception during execution. Http history saved to: C:\Users\Kyr4l\Apps_Files\stakhan-1.0.0-SNAPSHOT\logs\httpdumps\httpdump0001.txt
17:57:54 ERROR Error when retrieving application state. Activity list job will be unscheduled.
mini.stakhan.core.http.HttpActionException: Missing required cookies: [HH_SESS_13]
    at mini.stakhan.core.http.listeners.SetCookieListener.afterExecute(SetCookieListener.java:117) ~[core-1.0.0-SNAPSHOT.jar:?]
    at mini.stakhan.core.http.runners.BookkeepingHttpActionRunner.run(BookkeepingHttpActionRunner.java:187) ~[core-1.0.0-SNAPSHOT.jar:?]
    at mini.stakhan.game.haremheroes.api.SessionAPI.startGame(SessionAPI.java:66) ~[haremheroes-1.0.0-SNAPSHOT.jar:?]
    at mini.stakhan.game.haremheroes.gamelogic.HhActivityListJob.getState(HhActivityListJob.java:43) ~[haremheroes-1.0.0-SNAPSHOT.jar:?]
    at mini.stakhan.game.haremheroes.gamelogic.HhActivityListJob.getState(HhActivityListJob.java:20) ~[haremheroes-1.0.0-SNAPSHOT.jar:?]
    at mini.stakhan.games.activitylist.ActivityListJob.execute(ActivityListJob.java:92) [games-1.0.0-SNAPSHOT.jar:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:?]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:?]
then i started it by command line, without batch file i mean
and it launched and works very well, thanks btw for the tips
but i guess this log isn't normal tho
 

Kyr4l

Newbie
Aug 16, 2018
75
32
btw is it possible to ask stakhan to fight event bosses in priority ? (in harem heroes)
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Well, I am glad you got it to work. I am also sad that it was so hard for you. Oh well, always an opportunity to improve.

btw is it possible to ask stakhan to fight event bosses in priority ? (in harem heroes)
So in Harem-Heroes fighting with trolls is not that configurable yet. It is however somewhat smart, it will iterate over world stages until it finds a stage with a troll that yields a girl reward. In my case, when there is an event, it starts fighting first troll that has an event girl. Once that girl is claimed, it iterates stages again, after all event girls are claimed it starts fighting troll from last stage. This is because I got all "story mode" girls up until the last stage. For current event, I already got both girls, without using extra kobans. Stakhan will do the same for you. Hopefully, that's enough for you now. :-|

Adding more configuration options to this particular activity (fight trolls) is possible. With little bit of tweaking I could get it to run. You speak of priority for event girls, now I assume you would also want it to be the girl with highest current affection, or some other algorithm? What kind of configuration options or algorithm(s) would you see fitting for choice of a troll to fight? If you describe it well enough, I might as well add it in next version.
 
  • Like
Reactions: Kyr4l

Kyr4l

Newbie
Aug 16, 2018
75
32
yes i'm talking about priority for event girls, i guess giving the choice to the player which girl is the most important is better than just fighting the one with the best stats
eg : i sometimes prefer a common event girl than an epic one, because sometime the common one looks better than the epic one
so i think there could be an option like "best" or "custom" to make a choice between the best looking one and the best stats

here's my idea :
the program could display a list of the currently available event girls and the user could be asked to make a choice (1,2,3,4...)
this would be the "custom" setting

the "best" would make the program check the stats of each one and prioritize the best one
 
  • Like
Reactions: Kurweta