This bot is designed to retrieve and display Magic Stones from NFTs in the MMORPG game Mir4. By providing a link to an NFT on the XDraco platform, the bot fetches detailed information about the Magic Stones associated with that NFT. The bot processes the data and generates a downloadable CSV file containing the relevant details, such as item names and option values. The CSV is formatted using commas as decimal separators for percentages and semicolons as column separators to ensure compatibility with various spreadsheet software.
- Magic Stone Filtering: Extracts Magic Stones with specific names from the NFT inventory, focusing on
[L] Magic Stoneand[E] Magic Stone. - API Integration: Connects to Mir4’s API to retrieve detailed item data, including item options and values.
- CSV Generation: Creates a downloadable CSV file with all the extracted Magic Stone data, ready for analysis in Excel, Google Sheets, or other spreadsheet tools.
- Queue Management: Handles multiple user requests with a queue system, ensuring that each request is processed in turn without overloading the API.
- User Input: The bot listens for a URL link to a specific NFT on the XDraco platform.
- Data Retrieval: The bot fetches the NFT's summary and inventory data from Mir4’s API.
- Magic Stone Processing: It filters the inventory to find relevant Magic Stones and retrieves detailed stats for each one.
- CSV Creation: The bot formats the data and generates a CSV file with proper formatting, including commas for decimal percentages and semicolons as column delimiters.
- Response: The bot sends the CSV file as a response to the user in the Discord channel.
- Python 3.8+
- Discord.py
- Requests
- Clone the Repository:
git clone https://github.com/naustagic/MiR4_NFT_Magic_Stones.git
- Install Dependencies:
pip install -r requirements.txt
- Configure the Bot:
- Set your bot token and channel ID in the script.
- Run the Bot:
python bot.py
This bot is an efficient tool for players and collectors who want to quickly access and organize Magic Stone data for their NFTs in Mir4.