Closed TSChampion closed 1 year ago
Hi,
You don't have to save the requirements.txt
file anywhere. You only need to install the packages mentioned in the requirements.txt
file. This can be done by using the command pip install -r requirements
.txt. Before you do that, ensure that Python is installed and added to your PATH variables.
If you encounter issues while installing any of the packages, you can find the installation files at this link. Simply search for the package you need and install the appropriate wheel file based on your Python version and chip type (32-bit or 64-bit).
Additionally, when you install Tesseract don't forget to set the path appropriately:
https://github.com/HCA97/jw_bot/blob/bdcc9eea3503d8e6ef1b501d6902f0dcd3f8bfab/jw_bot.py#L14
Note The last time I played Jurrasic World Alive was 1 year ago before they ruined each class. I am not sure if the detection part still works since it is based on color.
here is the error when I ran the main.py, seem is missing a picture, is this OK to run? Press Ctrl-C to quit.
Traceback (most recent call last):
File "C:\Users\kent1\AppData\Local\Programs\Python\Python311\main.py", line 17, in
seem many changes since you quit playing this, I tried but it only collect one supply chest then stop if you have time, please help to update the bot thank you! unlucky for me that there is no bot for this games right now, but yours
Hi,
I've managed to run my code successfully with only minor modifications. The UI seems to have stayed relatively unchanged since I stopped playing.
I encountered issues due to some packages being deprecated. To address this, I've created a file named requirements_detailed.txt
. If you encounter errors related to third-party packages (such as numpy, PIL, etc.), you can reinstall the packages using requirements_detailed.txt
, as it contains the exact versions matching my local setup. Additionally, I'm using Python 3.9, but I believe it should work on other versions of Python 3.x.
Selection Code:
https://github.com/HCA97/jw_bot/blob/02958f02086f94590389c9fc5ac7c4e176fabce3/main.py#L21
When running the BlueStacks app, avoid using full-screen mode. I've hardcoded button locations, so using full-screen mode will cause a mismatch in these locations.
test_action.py
for AssistanceA file named test_action.py
serves as a visual aid for hardcoded locations (run it like the bot). When executed, a matplotlib plot will appear, displaying important locations:
time.sleep
Depending on your computer and internet speed, the amount of lag can vary. You might need to change the sleep time after performing an action. Key locations to adjust are:
During my bot runs, I found Japan, Tokyo to have more dinosaurs compared to other parts of the world. This experience was shared by some friends as well. So, for optimal results, I suggest staying in Japan, Tokyo. (This should work in other parts of the world too)
Google Maps Location: Japan, Tokyo
Sometimes the bot might act unexpectedly and click on unintended items. I recommend keeping an eye on it for the first few minutes after starting. If it behaves well during this time, it should continue smoothly. To stop the bot, simply press the q
key on your keyboard.
Much of the detection relies on color-based mechanisms. During events like Christmas, you might need to adjust the following parameters:
Note: While a more robust detection would be ideal, I haven't had the time to gather and annotate data for training a classifier.
This bot is primarily designed for collecting daily missions and obtaining better rewards from Alliance weekly chests. It's okay at hunting dinosaurs, but I think its best features is collecting coins.
The scarcity of JW Alive bots is likely due to diminishing returns. This means that the more supply drops you collect, the fewer resources you obtain—this applies to coin chests as well.
I hope you find this information helpful. Setting up might be a bit tricky at first, but once you've done it, the JW bot will let you focus on the fun part of the game, which is arena and raids :)
I've shared this code with friends, and they had similar experiences. While the initial setup took some time, they no longer needed to worry about resource collection (except for legendary/epic dinosaurs in weekends).
Incredible, It works fine with me, thank you very much, now I can have a good sleep every night :D
I am glad it works. If you encounter errors, let me know. If it is a quick fix (takes 1-2 days) I can try to fix it.
Note I don't think running the bot is the most optimal strategy. After a while, supply drops and coins chests will drop darts only, and most of the DNA you collect will be from common dinos.
when the script clicks on the dino, there are 3 actions the script makes:
Hi,
So I do not 100% understand what you mean but it seems like your problem is:
When the bot detects a dinosaur and clicks on it, the time it waits after the click is too short. As a result, the bot mistakenly identifies it as not a dinosaur and attempts to click on the button (x). However, during this time, the dinosaur is still loading, leading to an incorrect button click, and subsequently, the bot becomes stuck on the dinosaur screen.
If this is indeed the issue you're referring to, you should adjust the sleep duration in the following sections of your code:
https://github.com/HCA97/jw_bot/blob/552902657dd8d3536420480daa1a2cbf35d3473a/jw_bot.py#L782
https://github.com/HCA97/jw_bot/blob/552902657dd8d3536420480daa1a2cbf35d3473a/jw_bot.py#L791
If this doesn't those two lines don't resolve your problem, you may want to look at the following functions:
Maybe increase the sleep duration by 0.5 seconds for each sleep interval.
I hope this helps :)
your "time to shoot" is incredible, If I want to change the script to search & catch Dino only, please advise me which part should I delete?
Thanks :)
If you're interested in seeing how it works, you can watch this YouTube video.
You have the flexibility to choose what you want to collect by commenting or uncommenting specific functions in main.py
. The function names are self-explanatory, and you can find them here [Link to Code]:
# get coins
bot.collect_coin()
# get supply drops
bot.collect_supply_drop()
# get dinos
bot.collect_dino()
Note: If you choose to collect dinos continuously, keep in mind that you'll run out of darts fast. If your goal is primarily to collect dinosaurs, I recommend you to, collect supply drops as well because they always drop darts.
I added "time.sleep(0.5)" below the "pos = []" of the "def detect_dino" help me attack 100% dino :D The app crashed after 1-2hrs playing JWA, do you have any solution to stop crashing, please advise to me
What do you mean by "JWA crashes"? the bot crashes or the game crashes? If it's the game that's crashing, unfortunately, we can't fix that. If the game crashes frequently, you might consider reporting the issue on the JWA forum. Just be sure not to mention that you were using a bot 🙂
By the way, when the crash happens, what exactly occurs? Do you get sent back to BlueStacks' main menu, or do you find yourself stuck on the game's loading screen? If you're stuck on the game's loading screen, there's a possibility that the bot can recover from it.
the app crashes on Bluestack & LD player, the bot is working fine. thank you very much.
then there is nothing I or you can do. You can send Bluestack a ticket and maybe they can help you.
Hi, I will close the issue but feel free to open it again
I followed your instruction, stuck at the install requirement.txt because I don't know where to store the requirement.txt could you please give more details?