Mod Java Onhold Stakhan

Kyr4l

Newbie
Aug 16, 2018
74
32
i don't know if that's a bug but the program is buying a LOT of boosts which aren't used but bouht every time, im losing some money because of this is there a way to fix it ? 1569075112822.png
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
That's not a bug, it's just the default configuration. There's a configuration for that in the hh.activities.xml file. See the following lines.

Code:
    <buyItems>
        <itemMatcher type="potion" minRarity="common"/>
        <itemMatcher type="booster" minRarity="rare" maxRarity="legendary"/>
    </buyItems>
    <applyBoosters>
        <itemMatcher minRarity="epic" maxRarity="epic" name="Ginseng"/>
        <itemMatcher minRarity="epic" maxRarity="epic" name="Ginseng"/>
        <itemMatcher minRarity="epic" maxRarity="epic" name="Ginseng"/>
        <itemMatcher minRarity="epic" maxRarity="epic"/>
    </applyBoosters>
You can change rarity settings to normal, rare, epic, legendary. If you make a mistake in configuration, stakhan should tell you about it next time you start it, so you can play around. Name value, can be any part of the item name.

But perhaps, the more worrying part, is that it doesn't have the negative effect you might think it has! :)
There's actually a bug in the HH application itself and I found out here by mistake. The way the stakhan buys items, he does not actually use kobans... xD
 
  • Like
Reactions: Kyr4l

Kyr4l

Newbie
Aug 16, 2018
74
32
1569094970980.png her'es my config, i only edited the minenergy setting
stakhan is always using epic boosters, is there a way to only allow epic ones ?
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Sure.

Change the "buy items" configuration. To the following:
XML:
<buyItems>
    <itemMatcher type="potion" minRarity="common"/>
    <itemMatcher type="booster" minRarity="epic" maxRarity="epic"/>
</buyItems>
Also, consider changing the "Apply Boosts" configuration, so that it doesn't require 3 ginseng roots, cause if you won't have enough then you might have unused booster slot. For example:
XML:
<applyBoosters>
    <itemMatcher minRarity="epic" maxRarity="epic"/>
    <itemMatcher minRarity="epic" maxRarity="epic"/>
    <itemMatcher minRarity="epic" maxRarity="epic"/>
    <itemMatcher minRarity="epic" maxRarity="epic"/>
</applyBoosters>
Hopefully I did not make a typo anywhere :)
 
  • Like
Reactions: Kyr4l

Kyr4l

Newbie
Aug 16, 2018
74
32
1569145338522.png the buyitem section has 3 lines for me and 2 for you, does that change anything ?
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
No. BuyItems routine just buys all items from that shop that match ANY of the item matchers defined in the config. I will try to do better job documenting these actions next time.
 
  • Like
Reactions: Kyr4l

Kyr4l

Newbie
Aug 16, 2018
74
32
ok nice, so i modified it and it should be aokya now
btw sometime i get this error, but the program seems to retry and starts normally
1569151729016.png
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
You seem very curious to understand all little details. Maybe you should pick up some Java book and look into it? ;-)

This particular message, is related to sessions. Every time you start a game, you establish a "game session". This is a state that's stored on the server. It is important piece of information, because it contains, among other things, your identity. Once established, every future request you send to the server must include an "HTTP cookie" which contains the 'sessionId' of the earlier established session.

The thing is that sessions are valid only for a certain amount of time. Stakhan's HH module does not actually know for how long hh sessions are valid for (I only guess it's 6 hours), so sometimes it sends a request and receives a response that session is no longer valid. Stakhan then establishes a new session.

You may see this message especially if You close Stakhan with "Ctrl+C" and start it up some hours later.

At last I can add that you can witness this "error" when using regular browser. If you open HH game, keep the window open for 6 hours or so and after that you attempt to play the game, your sesions will be expired and you will see a window with Bunny telling you to restart. :)
 
  • Like
Reactions: Kyr4l

Kyr4l

Newbie
Aug 16, 2018
74
32
ah ok i tought that was more serious than just an expired cookie
btw i 'm not very interrested with java itself, but a friend of me and myself will try to make a module for hentai heroes (the "nutaku less" version)

are you still working on this program ? i mean are you gonna update it soon ?
 
Last edited:

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
I am not working on it currently. I have spent substantial amount of time on it already and I need to work on another project.

I will try to put some hours at some point in October though, because I am using it myself. However, that does not mean I have exclusiveness on making changes to Stakhan. Shall anyone write some more code and send patches I would be more than happy to merge it in.
 
  • Like
Reactions: Kyr4l

Kyr4l

Newbie
Aug 16, 2018
74
32
I am not working on it currently. I have spent substantial amount of time on it already and I need to work on another project.

I will try to put some hours at some point in October though, because I am using it myself. However, that does not mean I have exclusiveness on making changes to Stakhan. Shall anyone write some more code and send patches I would be more than happy to merge it in.
ok so before i try to make a module for it, here's what i need (plz) :
the nutaku core module (not compiled)
harem heroes modules (not compiled too)
and maybe anything that could help or another dependance i didn't found before
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
:))))))

Entire project, with maven's .pom & local git repository is downloadable on mega share. Given you have apache maven and java JDK 1.8+ you should have no problems building it. If you have more questions or would like some assistance, send me a private message on this forum, we could also arrange some VoIP call.

There is a link in the main post. For legal reasons, I did not make a public (nor private) repository on any git hosting website. So if you manage to get anything going, send me git patches and I will try to keep both links -- source and distro -- up to date.
 

Kyr4l

Newbie
Aug 16, 2018
74
32
i'm not a native english speaker so VoIP call won't be understandeable for you because of my accent lmao
i'll try to make the module and send it to you when ready
 

Kyr4l

Newbie
Aug 16, 2018
74
32
hey i don't know if that's a bug or not, but it's still buying common and rare boosters even with this config :
XML:
<?xml version="1.0" encoding="UTF-8" ?>
<harem-heroes-stakhan
        xmlns="urn:stakhan:site:harem-heroes"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:stakhan:site:harem-heroes http://www.stakhan.com/schemas/harem-heroes.xsd">

    <progressAdventure minEnergy="40"/>
    <collectSalaries/>
    <collectMissions/>
    <applyBoosters>
        <itemMatcher minRarity="epic" maxRarity="epic" name="Ginseng"/>
        <itemMatcher minRarity="epic" maxRarity="epic" name="Ginseng"/>
        <itemMatcher minRarity="epic" maxRarity="epic" name="Ginseng"/>
        <itemMatcher minRarity="epic" maxRarity="epic"/>
    </applyBoosters>
    <collectPachinkos/>
    <fightArenas>
        <teamComposition levellingSlots="2" minLevellingLevelRel="-15"/>
    </fightArenas>
    <fightTrolls minEnergy="10"/>
    <fightLeagues avoidPromotion="false" minEnergy="3">
        <teamComposition levellingSlots="0"/>
    </fightLeagues>
    <fightChampions maxChampion="3"/>
    <buyItems>
        <itemMatcher type="potion" minRarity="common"/>
        <itemMatcher type="booster" minRarity="epic" maxRarity="epic"/>
    </buyItems>
    <applyPotions targetLevelRel="-20"/>
</harem-heroes-stakhan>
 

Kyr4l

Newbie
Aug 16, 2018
74
32
probably, i just re checked today after selling all my common and rare boosts
and i still have rare and common boosts, different ones than before
 

Kyr4l

Newbie
Aug 16, 2018
74
32
i found another issue : the auto girl leveling is a great feature but the bot keeps buying items to boost girls even when it's not needed, so i have a lot of books in my inventory,

here's how to fix it
just add a verification to check if the bot need to level up girls BEFORE buying items
if not, don't buy them
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Version 1.0.0 (dropped the snapshot) uploaded.

Notable changes:
+ Kamihime module should now be stable
+ Major refactoring :)
+ Rewritten user-guide and developer-guide
+ Source code is now distributed as a git bundle, rather than zipped folder