Jump to content

Recommended Posts

Hello comunity, i noticed that some servers, mainly Rubinum, has a system created by Vegas which you recieve a PM from the Server. I really liked this ideia and i would really like to add this feature to my server, My question is if, is it possible to do it from the quest functions? If so, how? game.send_pm(name, buffer)?

Hmm maybe modifying the CInputMain::Whisper from input_main.cpp but how would i trigger it from the quests? And the name "SERVER" maybe in packet.h?
char    szNameFrom[CHARACTER_NAME_MAX_LEN + 1];

Link to comment
https://metin2.dev/topic/15888-pm-from-quest/
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

3 hours ago, PACI said:

you can do it without even touching your source files, messing around with the quest login statement and a cmdchat().

There is someone that already make that by using py and lua, but as you said is just on login, maybe someone update it to share the message when the admin wants...

As long as I'll be a threat for you , i will always be your target :3

Link to comment
https://metin2.dev/topic/15888-pm-from-quest/#findComment-88703
Share on other sites

https://youtu.be/28v78Jk9YZU?t=4s

I think he speak about this system from Rubinum, but i dont know if is possible to do with lua (real time for all channels and select all players data) because there need to check all players from all channels and check them language if is en, de or if is global, and send it with special colors, block to send message etc. (like this screen, i find on patchlog of them)

c8983fa3acee460f9a73677cd98acdc6.png=

c17afb05c2ad43eca5cdd843415ba557.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/15888-pm-from-quest/#findComment-88907
Share on other sites

6 hours ago, Tasho said:

https://youtu.be/28v78Jk9YZU?t=4s

I think he speak about this system from Rubinum, but i dont know if is possible to do with lua (real time for all channels and select all players data) because there need to check all players from all channels and check them language if is en, de or if is global, and send it with special colors, block to send message etc. (like this screen, i find on patchlog of them)

c8983fa3acee460f9a73677cd98acdc6.png=

c17afb05c2ad43eca5cdd843415ba557.png

It's posibble, i made it myself, the client send a message from py and writes the message from lua, updated without reboot or so.

Edited by Metin2 Dev
Core X - External 2 Internal

As long as I'll be a threat for you , i will always be your target :3

Link to comment
https://metin2.dev/topic/15888-pm-from-quest/#findComment-88912
Share on other sites

On 2017-6-5 at 5:50 AM, Braxy said:

It's posibble, i made it myself, the client send a message from py and writes the message from lua, updated without reboot or so.

sure, thats easy but... how would you change the senders name to [SERVER]?

net.SendWhisperPacket(self.targetName, text)
bool CPythonNetworkStream::SendWhisperPacket(const char * name, const char * c_szChat)
{
	if (strlen(c_szChat) >= 255)
		return true;

	int iTextLen = strlen(c_szChat) + 1;
	TPacketCGWhisper WhisperPacket;
	WhisperPacket.bHeader = HEADER_CG_WHISPER;
	WhisperPacket.wSize = sizeof(WhisperPacket) + iTextLen;

	strncpy(WhisperPacket.szNameTo, name, sizeof(WhisperPacket.szNameTo) - 1);

	if (!Send(sizeof(WhisperPacket), &WhisperPacket))
		return false;

	if (!Send(iTextLen, c_szChat))
		return false;

	return SendSequence();
}

 

Link to comment
https://metin2.dev/topic/15888-pm-from-quest/#findComment-89054
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.