Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] Research & Development → LUA with PvPGN (discordia)

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 2

1

Topic: LUA with PvPGN (discordia)

Hello,

I was playing around with LUA with the pvpgn but finding great detailed documentation has been hard. I know a few programming languages but mostly object oriented languages.

I was curious if lua will be updated, can we exclude folders so they don't auto load, change the file path or maybe have pvpgn run luvit instead of lua5.1. That way we can make scripts for discord, tcpip, etc.

I tried to add discordia into lua pvpgn. I was not completely successful. If I called a bat file to execute luvit discordbot.lua it worked for the bot but lost communication to pvpgn due to being another process. So I'm trying to get pvpgn to use these packages but the biggest headache has been file paths, and pvpgn froze until the window is closed.

https://github.com/SinisterRectus/Discordia

Need to somehow create an object to run luvit discordbot.lua from the pvpgn lua vm and still use the global variables from pvpgn.

Any ideas or help would be greatly appreciated.

2

Re: LUA with PvPGN (discordia)

luvit is standalone project like nodejs and it can not be embed into C project. But if you can do it or add support for Lua 5.1/5.2 where it will be possible to "require" modules from the scripts - you are welcome! All the code for LUA is marked by "WITH_LUA". Finding by this keyword gives all the depended code.
Now pvpgn uses https://github.com/clark15b/luasp/tree/ … luawrapper which is represented by two files (luawrapper.cpp and luawrapper.h) which can be found on https://github.com/pvpgn/pvpgn-server/t … /src/bnetd

Discordia works on luvit only. Discord has own external public HTTP API, so a programming language does not matter for use it .
Discordia can be successfully rewritten on PHP or Javascript.

Do not ask for support in PM.

Posts: 2

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 0 guests, 0 registered users

forums.pvpgn.pro → [EN] Research & Development → LUA with PvPGN (discordia)