Reverse engineered prompt

GitHub

Build me a text based RPG bot for Telegram that runs completely inside chat, using plain PHP and MySQL. I want players to be able to start a character, see a profile with stats, level, XP, coins and avatar, explore battle maps, fight lots of monsters, collect loot, manage an unlimited inventory, equip gear, use consumables, level up attributes, perks and specializations, and climb a leaderboard.

Please also include player to player trading in private chats or group chats, a referral system, and a premium shop that uses Telegram Stars for in game advantages. It should feel like a real progression game with combat, exploration, upgrades, mailbox style messages, shops, blacksmith type upgrades, and clear help and settings screens, all through Telegram commands and buttons.

Keep it simple and old school, no heavy frameworks, just straightforward PHP with database tables and setup that I can run on a normal server. Include the SQL schema, config, and anything scheduled jobs need. You can look up the current Telegram Bot API docs if needed.

Have a live product UI? Try website reverse