masterking32 / MasterHamsterKombatBot

Master Hamster Kombat Bot is a Python-based automation tool specifically designed for the game Hamster Kombat. This bot is capable of performing all in-game tasks, including auto-tapping, cipher tasks, and purchasing the best cards on your behalf. It's a free and fully automated farming bot that enhances your Hamster Kombat gaming experience.
https://github.com/masterking32/MasterCryptoFarmBot
Apache License 2.0
281 stars 90 forks source link

Character issue #452

Closed tboy1337 closed 1 month ago

tboy1337 commented 1 month ago

Some of the characters are not showing correctly, also Not enough coins to buy a daily combo. message doesn't have an icon.

error

Fy0urM commented 1 month ago

because there's no emoji in this line.

image

https://github.com/masterking32/MasterHamsterKombatBot/blob/0af053146637b0a2682e16748d77a74e07c44c07/main.py#L684

tboy1337 commented 1 month ago

Just seems like it should for continuity but the main issue is the other missing icons/characters.

Fy0urM commented 1 month ago

i'm not sure what you mean.

tboy1337 commented 1 month ago

4th line down from the top, look at the character to the left of Getting basic account data. then carry on looking down, there are a lot of them.

Fy0urM commented 1 month ago

most likely this is because the system in which the script is running does not support emoji. it's termux or what?

tboy1337 commented 1 month ago

Windows 10 running python 3.12.5, I run main.py through python.exe through CMD (python main.py).

Fy0urM commented 1 month ago

indeed, maybe it's the standard windows terminal that doesn't support emoji. image

Fy0urM commented 1 month ago

I'm using this terminal by default, it supports emoji.

https://www.microsoft.com/store/productId/9N0DX20HK701

Fy0urM commented 1 month ago

sources https://github.com/microsoft/terminal

tboy1337 commented 1 month ago

Yea i guess i should probably start using it lol

tboy1337 commented 1 month ago

just tried it, it fixes the emoji issue but creates another one so i can live with it lol.

Fy0urM commented 1 month ago

what's the new problem?

tboy1337 commented 1 month ago

I’m running the updater i made alongside the bot (updater.py), i have 16 bots plus 16 updaters, i run the updater with py.exe and the bot with python.exe so there are two different taskbar window groups which i can tile and see what is actually going on but when i open them all with terminal they have the same taskbar window grouping so I cant tile it without the windows being too small.

Fy0urM commented 1 month ago

I don't quite understand why you need a separate Updater for each bot, try to learn what symlink is. I sketched a small bat script that creates a specified number of clones and creates symbolic links to the necessary files for each clone, all you need to do is put the config file separately in each clone folder and run the bot from the clone folder. in this case you will only need 1 updater process for the main folder where the fork itself is located. and if necessary you will need to terminate all running bot processes and restart them.

the advantage is that symlink will always point to the file as long as it exists, even if you delete the original file and create another file named as original, symlink will link to it.

symlinker.bat ```batch @echo off @chcp 65001 >nul setlocal enabledelayedexpansion :: variables set "sourceFolder=%userprofile%\Desktop\TgCryptoBots\HamsterKombatBot\fork" set "clonesFolder=%userprofile%\Desktop\TgCryptoBots\HamsterKombatBot\clones" set "botsCount=3" :: files to symlink set files[1]=main.py set files[2]=promogames.py set files[3]=utilities.py set files[4]=warna.py set files[5]=banner.py :: index of last file set num_files=5 :: check if folder for clones already exists if exist %clonesFolder% ( echo Folder for clones already exists. >nul ) else ( mkdir %clonesFolder% ) :: main loop for /L %%i in (1,1,%botsCount%) do ( :: set selected clone path in loop set "new_folder=!clonesFolder!\bot%%i" :: check if folder already exists if exist "!new_folder!" ( echo Folder !new_folder! already exists. >nul ) else ( mkdir "!new_folder!" >nul echo Folder created: !new_folder! >nul ) :: creating symlinks in clone folder loop for /L %%j in (1,1,%num_files%) do ( echo [%%j] - !files[%%j]! set "file=!files[%%j]!" set "link=!new_folder!\!file!" :: check if symlink already exists if exist "!link!" ( echo Link to !file! already exists in !new_folder!. >nul ) else ( mklink "!link!" "%source_folder%\!file!" echo Symlink to file !file! created in !new_folder!. >nul ) ) ) ```
tboy1337 commented 1 month ago

@Fy0urM what do you mean by fork in the code? Also will my updater work with this set up? Will it create differently named clone folders?

Fy0urM commented 1 month ago

fork means your copy of someone else's repository, I forgot that you work with your own repository. but it doesn't matter, it is enough to have one folder with the main repository as a base and updates, and to run bots from the created “clones”. symlinker creates clone folders in the format bot# where # is the number of the clone. In bat you set the required number of clones, set “botsCount=3”. the loop runs from 1 to botsCount and creates a clone folder for each iteration. but most likely you will have to modify your updater to close all clone processes when you need to update and run each clone looking in the clones folder.

Fy0urM commented 1 month ago

this is just my suggestion, nothing more. i don't insist on using it. it just seemed to me that having 1 updated repository is easier than constantly checking for updates for each bot.

tboy1337 commented 1 month ago

Ah i see, ok thanks for the code, i was just wondering why fork, maybe master would be a better name for it. Currently the updater looks for the process running from the same folder as itself, it took a while to get it working so idk if i want to start again to get it working lol.