Closed FirePowi closed 3 years ago
Hello! It's not immediately obvious to me what is going on with this issue. The code base should ideally just be the unethical version minus the whole Mapping class bit and everything on my end seems to be up to date with the latest build on puru's end.
As for testing I couldn't reproduce what you are getting as an error. I've downloaded the latest zip of the client myself and was able to run your script just fine (after fixing the incorrect mss in printsn_end). I checked to make sure that the getSdt method existed that's being called and it is in the source here: https://github.com/Astarisk/ethical-copypasta/blob/765c194784f708f927dfcc0ec2ba1b4534b6bce2/src/haven/purus/pbot/api/PBotGob.java#L339
That aside I checked the call stack and everything seems to be properly there. I'm not sure what is going on with your script on your end. You could try to print out the object type that you are calling getSdt on just to see if it is what should be expected to be returned. I don't have a huge understanding of Puru's botting structure but at first glance I haven't seen anything in this version that is off.
As for advice on building it, I'd just clone the git in IntelliJ, Add the build.xml as an Ant file. Typically this works well enough minus issues with Java versions. I don't have experience with getting it to run in eclipse so I have no advice there.
I don’t really get it… I’ll try my best describing EVERY step.
So I want last version, I’m downloading the whole https://www.dropbox.com/s/i91o8fh2rkoucmp/ethical-pasta.zip?dl=0
Then I try to log on, but I have an issue:
Connection refused: connect
I figured it might come from hafen.jar, I download the latest and overwrite the one from downloaded files: https://www.dropbox.com/s/cwovglxqq1fdzm8/hafen.zip?dl=0
Then log-in without issue, but get_sdt()
isn’t here. I found the /pbot/api/PBotGob.java
and its content, the getSdt, I just don’t get what happened.
Also thanks for the "mss" ==> "msg" and sorry, I pasted and previous version where I didn’t fix this mistyping.
I’d like to add all my scripts using get_sdt()
has the same issue, I just don’t really get it – If needed:
$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment 18.9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.11+9, mixed mode)
On Windows Version 10.0.19042 Build 19042
PS: I’ll try to build with your advise
Ah, I see what is going on. You need to make sure to use the bat file to run the client. That is most likely causing the connection refused as the server information is passed as a parameter. As for the second link which contains just the jar. I thought I had removed that link when the first resource changes were done by the devs. That one is an old jar and could be triggering the get_sdt() error. I'll remove that from my post, in the mean time you can just copy the jar over from the bigger zip if you need it. If you still get connection refused after running the client using the bat file, then we may have more of a mystery on our hands. But from what I can tell at a glance the first half is a bat issue and the second half is me messing up.
I’ll follow your lead step by step and give you feedback
Make sure tu use bat to run client => To avoid "Connection refused: connect"
Still have "Connection refused: connect" // I even tried directly java -Xms512m -Xmx1024m -jar hafen.jar -U https://game.havenandhearth.com/res/ game.havenandhearth.com
in cmd, the error still happen
So I get only the old jar is connecting to client.
I’ll try another java version for now, it starts to really look like it’s our best friend (irony for me) messing up
Oh no… I checked and you’re using java11 too apparently. Well I’ve finished IntelliJ installation, I’ll try to rebuild the jar from sources
I'm a bit baffled as there shouldn't be any changes in between the jars that would cause the newer one to break. I'll keep re-looking through the commit history to see if I missed anything on that front. The best idea I could think is windows or java security blocking connection. But even that seems weird to me at this point. I haven't seen or heard anyone who ran into a connection error with proper parameters. You could in theory also copy the jar into puru folder and see if that launches it, though I'm not sure what that would fully solve.
I tried running it on a second PC and I noticed that the run.bat got connection refused on that one, however the second run_with_puru_params.bat did not. So give that a shot. Though it does make me wonder why it works fine on this machine over the other. If that is the case for you I'll remove my first bat file as it was just thrown in quickly when I put this together.
This is what it should look like:
start java -Xms1G -Xmx2G -Dsun.java2d.uiScale.enabled=false -Dhaven.defserv=game.havenandhearth.com -Dhaven.resurl=https://game.havenandhearth.com/res/ -Dhaven.screenurl=http://game.havenandhearth.com/mt/ss -Dhaven.cachebase=http://game.havenandhearth.com/render/ -Dhaven.mapbase=http://game.havenandhearth.com/java/ -Dhaven.fullscreen=off -jar hafen.jar
I’ve got this – I changed this line printsm_info("\t[-]I worked perfectly and sdt = {}".format(sdt))
to printsm_info("\t[-]It works… I mean Astarisk rocks!")
because of first attempt working, just to "celebrate" (kinda)
You’re doing an amazing support job
Thanks a lot!
I think we may close the issue if you have nothing to add
So I tried this script I wrote, using both clients:
Ethical fork showed this:
While the unethical client worked with it perfectly "[-]I worked perfectly and sdt = XX" been displayed.
I think there’s an issue with updating API in your version and I struggle building it with eclipse (I’m def not a Java dev)