An automated bot for Craft World game that handles mining, factory operations, and area claiming with multi-account support.
- Automated Mining: Start and claim mines automatically
- Factory Operations: Automated factory management
- Area Claiming: Auto-claim areas for expansion
- Multi-Account Support: Process multiple accounts sequentially
-
Clone the repository
git clone https://github.com/vikitoshi/Craft-World-Auto-Bot.git cd Craft-World-Auto-Bot
-
Install dependencies
npm install
-
Create configuration files
touch token.txt touch config.json
-
Add your tokens Open
token.txt
and add your JWT tokens (one per line):your_jwt_token_1 your_jwt_token_2 your_jwt_token_3
-
Configure account IDs Create
config.json
with your mine, factory, and area IDs:{ "mineId_1": "your_mine_id_for_account_1", "factoryId_1": "your_factory_id_for_account_1", "areaId_1": "your_area_id_for_account_1", "mineId_2": "your_mine_id_for_account_2", "factoryId_2": "your_factory_id_for_account_2", "areaId_2": "your_area_id_for_account_2" }
Note: Each account needs its own set of IDs. Use the format
{type}Id_{number}
where number starts from 1.
node index.js
You need to obtain three types of IDs for each account: Mine ID, Factory ID, and Area ID.
-
Open Craft World Game
- Go to https://preview.craft-world.gg/
- Login to your account
-
Open Developer Tools
- Press
F12
or right-click and select "Inspect Element" - Go to the Network tab
- Make sure to check "Preserve log" option
- Press
-
Get Mine ID
- In the game, click on any mine to start mining
- In the Network tab, look for requests to
user-actions/ingest
- Click on the request and check the Request Payload
- Look for
"actionType": "START_MINE"
and copy themineId
value
-
Get Factory ID
- Click on any factory in the game to start production
- In the Network tab, find the request with
"actionType": "START_FACTORY"
- Copy the
factoryId
value from the payload
-
Get Area ID
- Click on any area to claim it
- Look for requests with
"actionType": "CLAIM_AREA"
- Copy the
areaId
value from the payload
{
"data": [{
"id": "uuid-here",
"actionType": "START_MINE",
"payload": {
"mineId": "06838603-fec0-7831-8000-01085828af7a"
},
"time": 1234567890
}]
}
{
"mineId_1": "06838603-fec0-7831-8000-01085828af7a",
"factoryId_1": "0683ea27-51fb-7e76-8000-334a76e821ae",
"areaId_1": "0683e9f4-3f4f-7df3-8000-490a6d41be7e",
"mineId_2": "different-mine-id-for-account-2",
"factoryId_2": "different-factory-id-for-account-2",
"areaId_2": "different-area-id-for-account-2"
}
Craft-World-Auto-Bot/
├── index.js # Main bot script
├── token.txt # JWT tokens (one per line)
├── config.json # Account IDs configuration
├── package.json # Node.js dependencies
├── README.md # This file
└── .gitignore # Git ignore rules
⚠️ Never share your JWT tokens- 🔐 Keep your
token.txt
andconfig.json
files secure and private - 🚫 Don't commit tokens or sensitive IDs to version control
- 🔄 Tokens may expire and need refreshing
- 🔒 Each account has unique IDs - don't mix them up
-
"No tokens found in token.txt"
- Make sure
token.txt
exists in the project directory - Ensure tokens are properly formatted (one per line)
- Check that tokens don't have extra spaces
- Make sure
-
"Missing IDs for account X in config.json"
- Make sure
config.json
exists and is properly formatted - Verify you have
mineId_X
,factoryId_X
, andareaId_X
for each account - Check that the JSON syntax is correct
- Make sure
-
"Error: ENOTFOUND preview.craft-world.gg"
- Check your internet connection
- Verify the game servers are online
-
"Failed to start mine/factory/claim area"
- Token might be expired - get a fresh token
- Check if your account has sufficient resources
- Verify that your IDs are correct and not expired
-
Bot stops unexpectedly
- Check console for error messages
- Ensure stable internet connection
- The bot now has retry mechanisms for failed requests
- Open Craft World in your browser
- Open Developer Tools (F12)
- Go to Network tab
- Perform any action in the game
- Look for requests to
craft-world.gg/api
- Copy the JWT token from the Authorization header (it will be in format:
Bearer jwt_your_token_here
) - Only copy the part after
jwt_
for your token.txt file
Follow the detailed tutorial above in the "Getting Required IDs" section to obtain your Mine ID, Factory ID, and Area ID for each account.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This bot is for educational purposes only. Use at your own risk. The developers are not responsible for any account suspensions or other consequences resulting from the use of this bot.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please give it a ⭐ on GitHub!
For issues and questions, please open an issue in the GitHub repository.
Happy Botting! 🎮✨