Code Monkey home page Code Monkey logo

receiver-meow's Introduction

receiver-meow

All Contributors Build status MIT Native.SDK NLua

能运行lua脚本的接待喵qq机器人,欢迎加入交流群931546484

功能特点

  • 消息处理逻辑,完全由lua实现
  • lua代码动态加载,更改完后重载虚拟机,立即生效
  • Lua层可直接调用C#层接口,酷Q功能随意使用
  • 自带了http(s) post/get、2D图片处理、数据存储(xml)等接口
  • 底层使用C#开发,.net framework 4.5版本

下载

正式版:GitHub Releases

快照版:appveyor

默认脚本

自从插件的V2.0.0版本开始,默认脚本仓库与主仓库分离,Lua代码可在此仓库查看:receiver-meow-lua

lua接口

调用C#接口,请参考Nlua关于import函数的使用说明

Task架构介绍

主虚拟机由Task框架调度,具体的任务、定时器用法请见LuaTask项目的Readme

每次收到新的消息上报,便会加到对应名称的Lua虚拟机中来处理,具体分配代码见Events.cs

整个LuaTask管理,由LuaStates.cs控制:

                  LuaStates.cs文件的代码逻辑

           +-----------+                +--------------------+
New message|           | Name not exist |                    |
>>>>>>>>>>>+ lua pool  +--------------->+create new lua state|
           |           |                |                    |
           +----+------+                +-------+----------+-+
                |                               |          |
                |Name Exist                     |          |
                v                               |          |
       +--------+-------------------+           |          |
       | add new task to this state +<----------+          |
       +-------------+--------------+                      |
                     |                                     |
                     |                                     |
       +-------------+-------------+                       |
       |                           |   start run new state |
       |   task framework running  +<----------------------+
       |                           |
       +---------------------------+

食用

实际使用时,只需要将cpk文件放入酷q的app文件夹,cpk文件可以去这里下载,或者自行编译

然后,启用插件,打开设置面板,点击初始化脚本按钮,下载完默认Lua脚本后即可食用

同时,请在设置面板上修改机器人的管理员QQ号

向机器人发送帮助help加上页数,可以查看指令说明

脚本的功能解释请见Lua脚本项目的Readme

结尾

插件基于Native.SDK

Contributors ✨

Thanks goes to these wonderful people (emoji key):


一般通过吃瓜群众

🚧 💻 🤔

CXM

💻 🐛

morinoyuki

💻 🐛

gy39830

💻 🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

receiver-meow's People

Contributors

allcontributors[bot] avatar chenxuuu avatar morinoyuki avatar nagatoyukl avatar

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.