Jump to content

[WIP] Discord Bot - roCORD


Normynator

Recommended Posts


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   189
  • Joined:  11/27/11
  • Last Seen:  

4 hours ago, Normynator said:

Discord API requires a websocket and http. That’s what the bridge is for. But this version will be abondend soon in favor of a pure C++ version, which you can find here: https://github.com/Normynator/roCORD/tree/development?files=1

I understand, but good choice I think to make a pure C++ version!

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

Props on the project man!

Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

Dropped support for Version 1.

Added reference links for Version 2.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  10/21/13
  • Last Seen:  

nice project

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

I have many failures to install these patches and then I tried to do it manually but the .diff files are not very detailed and I do not know where to add the code having many different files from the original rAthena files.

NOHKyo (1).jpg

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

You are using v1, v1 is no longer supported. Please use v2 (https://github.com/Normynator/roCORD)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

ok now it's ok but but I have a doubt... in the map.cpp file where I have to put the line "discord_init();"

/// Called when a terminate signal is received.
void do_shutdown(void)
{
	if( runflag != MAPSERVER_ST_SHUTDOWN )
	{
		runflag = MAPSERVER_ST_SHUTDOWN;
		ShowStatus("Shutting down...\n");
		{
			struct map_session_data* sd;
			struct s_mapiterator* iter = mapit_getallusers();
			for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )
				clif_GM_kick(NULL, sd);
			mapit_free(iter);
			flush_fifos();
		}
		chrif_check_shutdown();
	}
}

 

map.cpp

Edited by CyberDevil
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

Into the do_init function.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

3 hours ago, Normynator said:

Into the do_init function.

...like this is correct?

int do_init(int argc, char *argv[])
{
	discord_init();
	runflag = MAPSERVER_ST_STARTING;
#ifdef GCOLLECT
	GC_enable_incremental();
#endif

	INTER_CONF_NAME="conf/inter_athena.conf";
	LOG_CONF_NAME="conf/log_athena.conf";
etc... etc... etc...

 

EDIT: I have re-try to recompile with this corrction but I recive all time this errors:

Quote

/usr/bin/ld: obj/map.o: in function `do_init(int, char**)':
/root/rAthena/src/map/map.cpp:5184: undefined reference to `discord_init()'
/usr/bin/ld: obj/script.o: in function `buildin_discord(script_state*)':
/root/rAthena/src/map/script.cpp:23953: undefined reference to `discord_script(char const*, char const*)'
/usr/bin/ld: obj/channel.o: in function `channel_send(Channel*, map_session_data*, char const*)':
/root/rAthena/src/map/channel.cpp:458: undefined reference to `discord_send(char const*, char const*, char const*)'

 

Edited by CyberDevil
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

Hello,

@Normynator I'm having this error below.

image.png.12d818233faae244bad03db029ca6b75.png

However, if I try to recompile on a debian, it works perfectly fine.

Here's what I found out:
1. During the make install process the login-server is created but after finishing it, it is automatically deleted or removed. What could be the reason for it? Posted a detailed issue on the Github Repo

Edited by iAmGnome
Added more information.
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

Try only make, instead of make install

  • MVP 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

@Normynator worked perfect! Thanks! 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  136
  • Reputation:   48
  • Joined:  06/18/12
  • Last Seen:  

Can i test this on my localhost? Is there a Windows Guide?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

On 4/23/2019 at 8:14 PM, Gerzzie said:

Can i test this on my localhost? Is there a Windows Guide?

There is no windows guide available.

 

A patch file for a recent rAthena version was added by @sctnightcore.
It can be found here: https://github.com/Normynator/roCORD/tree/master/diff/user_patches
If you are using this project with a rAthena hash which is not available in the repository feel free to create a PR. It would be highly appreciated.

~norm

Link to comment
Share on other sites

  • 10 months later...

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  111
  • Reputation:   2
  • Joined:  05/09/13
  • Last Seen:  

hi!

im trying to install this , i have allot of errors allready fixed but still im getting new ones like

obj/channel.o: In function channel_send(Channel*, map_session_data*, char const*)': /src/map/channel.cpp:460: undefined reference to discord_send(char const, char const, char const)' obj/script.o: In function `buildin_discord(script_state)': /src/map/script.cpp:23944: undefined reference to `discord_script(char const, char const)'

 

can someone help me out ??

 

Edited by BFPkiller
Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   2
  • Joined:  01/23/14
  • Last Seen:  

Hi!

I am getting an error when I try to make (or make install)

rathena/src/map/discord/discord_core.cpp:259:68: error: no matching function for call to ‘regex_replace(std::string&, std::regex, const char [1]’
   content = std::regex_replace(content, std::regex("^\\s|\\s$"), "");

Centos7

cmake version 3.6.2

gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

any help would be greately appreciated!

 

 

Edited by biali
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

  • 5 months later...

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   19
  • Joined:  11/19/11
  • Last Seen:  

Sory how to solve this??

 

        CXX     unit.cpp
        CXX     vending.cpp
        LD      map-server
obj/channel.o: In function `channel_send(Channel*, map_session_data*, char const*)':
/home/rathena/src/map/channel.cpp:460: undefined reference to `discord_send(char const*, char const*, char const*)'
obj/map.o: In function `do_init(int, char**)':
/home/rathena/src/map/map.cpp:5257: undefined reference to `discord_init()'
obj/mob.o: In function `mob_dead(mob_data*, block_list*, int)':
/home/rathena/src/map/mob.cpp:2802: undefined reference to `discord_announce_drop(char const*)'
obj/script.o: In function `buildin_discord(script_state*)':
/home/rathena/src/map/../custom/script.inc:27: undefined reference to `discord_script(char const*, char const*)'
collect2: error: ld returned 1 exit status
Makefile:72: recipe for target 'map-server' failed
make[1]: *** [map-server] Error 1
make[1]: Leaving directory '/home/rathena/src/map'
Makefile:50: recipe for target 'map' failed
make: *** [map] Error 2
root@ubuntu:/home/rathena#

 

and where file name index.js ??

thx for answer

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.01
  • Content Count:  28
  • Reputation:   1
  • Joined:  10/20/20
  • Last Seen:  

i got this error i'm using latest rathena trunk
image.png.9166f88bcca221b701676817576ae05b.png

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  67
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   29
  • Joined:  10/21/12
  • Last Seen:  

@Normynator

image.png.056ea36205cef45e6aa56e8d43a822f0.png

 

having this error on latest git.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   68
  • Joined:  10/25/20
  • Last Seen:  

18 hours ago, qtdan said:

@Normynator

image.png.056ea36205cef45e6aa56e8d43a822f0.png

 

having this error on latest git.


That part should be added on map.cpphttps://github.com/Normynator/roCORD/blob/master/diff/rev2/map.diff

Also Normynator said he don't support roCORD anymore, so don't expect help. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  248
  • Reputation:   34
  • Joined:  11/19/11
  • Last Seen:  

this topic should be closed or move. since the creator discontinue the project. 

 

Thanks!

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

This topic has been moved to the "Abandoned Projects" sub-forum.

If the author is still working on this project, they may request that a moderator moves the topic back and removes this post.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...