Code Monkey home page Code Monkey logo

riki's Introduction


Riki

A simple tool to intercept Riichi City's websocket message and translate it to MJAI message for Mahjong AI model.



Ask me anything about this at Discord

Report Bug . Request Feature

About The Project

"The purpose of this project is to provide people with a convenient way to real-time understand their performance in Riichi City game matches and to learn and improve from it. This project is intended for educational purposes only, and the author is not responsible for any actions taken by users using this project. Riichi City officials may detect abnormal behavior, and any consequences such as account suspension are not related to the author."

Usage

Installation.

You will need:

  1. Python 3.10~3.12
  2. A mortal.pth. (Get one from Discord server if you don't have one.)
  3. Proxifier or similar software to redirect Riichi City connection to MITM.

Get mortal.pth at Discord

  1. Go to #verify and click the ✅ reaction.
  2. Go to #bot-zip
  3. Download a bot you like.
  4. Extract the zip.
  5. And mortal.pth is there.

Windows

  1. Clone this repository
  2. cd in to the directory (cd Riki)
  3. Create a virtual environment (python -m venv venv)
  4. Activate the virtual environment (.\venv\Scripts\Activate)
  5. Install the requirements (pip install -r requirements.txt)
  6. Open mitmproxy if this is your first time using it.
  7. Close it.
  8. Go to your user home directory ~/.mitmproxy
  9. Install the certificate.
  10. Put mortal.pth into ./Akagi/mjai/bot
  11. Setup Proxifier or similar software to redirect Riichi City connection to MITM.

Mac

  1. Clone this repository
  2. cd in to the directory (cd Riki)
  3. Create a virtual environment (python -m venv venv)
  4. Activate the virtual environment (source venv/bin/activate)
  5. Install the requirements (pip install -r requirements.txt)
  6. Open mitmproxy if this is your first time using it.
  7. Close it.
  8. Go to your user home directory ~/.mitmproxy
  9. Install the certificate.
  10. Put mortal.pth into ./Akagi/mjai/bot
  11. Setup Proxifier or similar software to redirect Riichi City connection to MITM.

Launch

  1. cd into the directory (cd Riki)
  2. Activate the virtual environment (.\venv\Scripts\Activate or source venv/bin/activate)
  3. Run the script (python mitm.py)
  4. Open Riichi City and play a game.

TODO

  • Add GUI

Special Thanks

Equim-chan/Mortal

smly/mjai.app

LICENSE

“Commons Clause” License Condition v1.0

The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.

Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.

For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice.

Software: Riki

License: GNU Affero General Public License version 3 with Commons Clause

Licensor: shinkuan

riki's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.