Jump to content

Official Move Channel


Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

This is the hidden content, please

Client side is from 2018 official root.

It checks the status of the channel from db and gets the port and addr.

It also checks if that map exists in that channel(config).

*Info: This is currently disabled on official servers.

Edited by Mali
  • Metin2 Dev 238
  • kekw 2
  • Eyes 1
  • Dislove 2
  • Angry 1
  • Not Good 1
  • Sad 1
  • Think 1
  • Confused 2
  • Scream 5
  • Good 61
  • Love 14
  • Love 131

 

Link to comment
Share on other sites

3 hours ago, Tatsumaru said:

Amazing how much you give to this community. More than one would cram their offers with what you share for free.

Have you ever heard of voicechat? Maybe you could try to make such a system. This is just a suggestion.

 

I think it would only be a good idea to have a guild | group version, so that everyone can hear everyone else, which would lead to a lot of conflict.

Link to comment
Share on other sites

  • Honorable Member
8 hours ago, Tatsumaru said:

Amazing how much you give to this community. More than one would cram their offers with what you share for free.

Have you ever heard of voicechat? Maybe you could try to make such a system. This is just a suggestion.

 

At Land of Heroes we have ingame voice-chat, but people rarely use it.

  • Metin2 Dev 1

WRnRW3H.gif

Link to comment
Share on other sites

  • Honorable Member
1 hour ago, Distraught said:

At Land of Heroes we have ingame voice-chat, but people rarely use it.

p6Utzb9.gif

Edited by Metin2 Dev
Core X - External 2 Internal
  • Lmao 5
  • Love 1

 

Link to comment
Share on other sites

  • Active+ Member

Good job 👍

The ideea with geting the port from db it's nice (I think wom started this ideea some time ago), but not very good when we speak about a big server that use the db a lot (longer times when changing the channel). My advice it's to send all other channels info to every channel at boot and that will help you with more than change channel (now the current channel recieve the info about ch99 and other cores of the current channel if I'm not mistaken).

The IsHack check is bad placed there and it can cause big problem for the server (players start the timer and jump over the check but in those 10 seconds they can open safebox and other stuff), also I recommend you use both CanWarp and IsHack checks because people skip one or the other when they implement new stuff 😂

 

Link to comment
Share on other sites

  • Honorable Member
6 minutes ago, Abel(Tiger) said:

Good job 👍

The ideea with geting the port from db it's nice (I think wom started this ideea some time ago), but not very good when we speak about a big server that use the db a lot (longer times when changing the channel). My advice it's to send all other channels info to every channel at boot and that will help you with more than change channel (now the current channel recieve the info about ch99 and other cores of the current channel if I'm not mistaken).

The IsHack check is bad placed there and it can cause big problem for the server (players start the timer and jump over the check but in those 10 seconds they can open safebox and other stuff), also I recommend you use both CanWarp and IsHack checks because people skip one or the other when they implement new stuff 😂

 

trying to make gf style xd

mNJFnOE.png

also db check is fine for me. that channel may not be online at that time.

Edited by Metin2 Dev
Core X - External 2 Internal

 

Link to comment
Share on other sites

  • Active+ Member
11 minutes ago, Mali said:

also db check is fine for me. that channel may not be online at that time.

Yeah, that's a good approach. I think it's about what you want to sacrifice 😂 time or player experience (also if a channel it's not online something is wrong and need to be fixed asap, a good server never crash or maybe once a year 😂)

11 minutes ago, Mali said:

trying to make gf style xd

Yeah, I know, I just said things that can happen without proper checks.

Edited by Abel(Tiger)
  • Lmao 1
Link to comment
Share on other sites

  • Premium
17 hours ago, Tatsumaru said:

Amazing how much you give to this community. More than one would cram their offers with what you share for free.

Have you ever heard of voicechat? Maybe you could try to make such a system. This is just a suggestion.

 

If there is interest, I can provide already a prototype of the system, which is functional, but there is a bug in which, if 2 or 3 people speak in the same time, it'll start to interrupt and stuff.

  • Metin2 Dev 1
Link to comment
Share on other sites

  • 4 weeks later...

Peer.cpp add 

#include <sstream>

 

spacer.png


spacer.png

spacer.png

 

 

net.GetChannelName

It has no function in my files. I installed the system without any problems. But I guess it doesn't match with my files. I'm changing channels, but the old channel count still remains under the minimap.

That's why Vegas' editing works better.

edit game.py

self.interface.RefreshServerInfo(channelNumber)

Edit interfacemodule.py.

if app.BL_MOVE_CHANNEL:
def RefreshServerInfo(self, channelNumber):
if self.wndMiniMap:
self.wndMiniMap.RefreshServerInfo(channelNumber)

edit minimap.py

if app.BL_MOVE_CHANNEL:
def RefreshServerInfo(self, channelNumber):
if channelNumber == 99:
serverInfoStr = serverInfo.SERVER_1 + ' - Common Channel'
else:
serverInfoStr = serverInfo.SERVER_1 + ' - ' + 'Channel ' + str(channelNumber)
self.serverInfo.SetText(serverInfoStr)
net.SetServerInfo(serverInfoStr)

fixed.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 weeks later...

MOVE_CHANNEL_NOTICE_GAME_99    You are connected with the Affiliate Channel.
MOVE_CHANNEL_NOTICE_DUNGEON    You are connected to a dungeon channel or a map.


    if app.BL_MOVE_CHANNEL:
        def __SeverInfo(self, channelNumber, mapIndex):
            #print "__SeverInfo %s %s" % (channelNumber, mapIndex)
            
            _chNum    = int(channelNumber.strip())
            _mapIdx    = int(mapIndex.strip())
            
            if _chNum == 99:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE_GAME_99)
            elif _mapIdx >= 10000:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE_DUNGEON)
            else:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % _chNum)
                
            net.SetChannelName(_chNum)
            net.SetMapIndex(_mapIdx)
            self.interface.RefreshServerInfo(channelNumber)

Link to comment
Share on other sites

  • 1 month later...

Could someone please help me with these errors?

https://metin2.download/picture/FVrunE0od7GBgdiV9Cl9ACT02F7ZDblJ/.png
https://metin2.download/picture/fJnR1H6414lCX346sh9h15skLwvbr2jG/.png

The first is the syserr when opening the window, and the second is that the options menu does not close.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 4 weeks later...
On 12/2/2021 at 2:14 AM, Near said:

Could someone please help me with these errors?

https://metin2.download/picture/FVrunE0od7GBgdiV9Cl9ACT02F7ZDblJ/.png
https://metin2.download/picture/fJnR1H6414lCX346sh9h15skLwvbr2jG/.png

The first is the syserr when opening the window, and the second is that the options menu does not close.

if app.BL_MOVE_CHANNEL:
	class MoveChannelDialog(ui.ScriptWindow):
		def __init__(self):
			ui.ScriptWindow.__init__(self)
			self.__LoadDialog()
			
			self.IsShow = False
			
		def __del__(self):
			ui.ScriptWindow.__del__(self)
			
		def __LoadDialog(self) :	
			try:
				pyScrLoader = ui.PythonScriptLoader()
				pyScrLoader.LoadScriptFile(self, "UIScript/MoveChannelDialog.py")
			except:
				import exception
				exception.Abort("MoveChannelDialog.__LoadDialog")
			

			self.ParentBoard = self.GetChild("MoveChannelBoard")
			self.ChildBoard = self.GetChild("BlackBoard")
			self.GetChild("MoveChannelTitle").SetCloseEvent(ui.__mem_func__(self.Close))
			
			self.ChannelList = []
			cnt = 5
			cnt = cnt - 1 # 99서버 제외
			
			self.DlgWidht = 190
			self.BlackBoardHeight = 23*cnt + 5*(cnt-1) + 13
			self.DlgHeight = self.BlackBoardHeight + 75
			
			self.AcceptBtn = ui.MakeButton(self.ParentBoard, 13, self.DlgHeight - 33, "", "d:/ymir work/ui/public/", "middle_button_01.sub", "middle_button_02.sub", "middle_button_03.sub")
			self.AcceptBtn.SetText( localeInfo.MOVE_CHANNEL_SELECT )
			self.AcceptBtn.SetEvent(ui.__mem_func__(self.AcceptButton))
			self.CloseBtn = ui.MakeButton(self.ParentBoard, self.DlgWidht - 73, self.DlgHeight - 33, "", "d:/ymir work/ui/public/", "middle_button_01.sub", "middle_button_02.sub", "middle_button_03.sub")
			self.CloseBtn.SetText( localeInfo.MOVE_CHANNEL_CANCEL )
			self.CloseBtn.SetEvent(ui.__mem_func__(self.Close))

			for i in xrange(cnt):
				btn = ui.MakeButton(self.ChildBoard, 8, 6 + i*28, "", "d:/ymir work/ui/game/myshop_deco/", "select_btn_01.sub", "select_btn_02.sub", "select_btn_03.sub")
				btn.SetText("Kanal {0}".format(int(i+1)))
				btn.SetEvent(ui.__mem_func__(self.__SelectChannel), i+1)
				self.ChannelList.append(btn)
			
			self.ParentBoard.SetSize(self.DlgWidht, self.DlgHeight)
			self.ChildBoard.SetSize(self.DlgWidht - 26, self.BlackBoardHeight)
			self.SetSize(self.DlgWidht, self.DlgHeight)
			
			self.UpdateRect()
			
		def __SelectChannel(self, idx):
			self.ChangeChannelNumber = idx
			
			for btn in self.ChannelList:
				btn.SetUp()
				btn.Enable()
				
			self.ChannelList[idx-1].Down()
			self.ChannelList[idx-1].Disable()
			
		def AcceptButton(self):
			if self.ChangeChannelNumber == self.StartChannelNumber:
				return
			
			net.MoveChannelGame(self.ChangeChannelNumber)
			self.StartChannelNumber = self.ChangeChannelNumber
			self.Close()
						
		def Show(self) :
			ui.ScriptWindow.Show(self)
			
			self.StartChannelNumber = net.GetChannelNumber()
			self.__SelectChannel(self.StartChannelNumber)
			
			self.IsShow = True
		
		def Close(self):
			self.Hide()
			
			self.IsShow = False
			
		def OnPressEscapeKey(self):
			self.Close()
			return True
			
		def IsShowWindow(self):
			return self.IsShow

İnterFaceModule.py

    if app.BL_MOVE_CHANNEL:
        def RefreshServerInfo(self, channelNumber):
            if self.wndMiniMap:
                self.wndMiniMap.RefreshServerInfo(channelNumber)

Game.py

    if app.BL_MOVE_CHANNEL:
        def __SeverInfo(self, channelNumber, mapIndex):
            #print "__SeverInfo %s %s" % (channelNumber, mapIndex)
            
            _chNum    = int(channelNumber.strip())
            _mapIdx    = int(mapIndex.strip())
            
            if _chNum == 99:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE_GAME_99)
            elif _mapIdx >= 10000:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE_DUNGEON)
            else:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % _chNum)
                
            net.SetChannelName(_chNum)
            net.SetMapIndex(_mapIdx)
            self.interface.RefreshServerInfo(channelNumber)

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 4 weeks later...
Peer.cpp: In member function 'bool CPeer::CheckMapIndex(long int) const':
Peer.cpp:141:14: error: 'find' is not a member of 'std'
  return std::find(std::begin(m_alMaps), std::end(m_alMaps), lMapIndex) != std::end(m_alMaps);
              ^~~~
Peer.cpp:141:14: note: suggested alternative: 'bind'
  return std::find(std::begin(m_alMaps), std::end(m_alMaps), lMapIndex) != std::end(m_alMaps);
              ^~~~
              bind


how do i fix this error? Thanks

Link to comment
Share on other sites

1 hour ago, xcsp said:
Peer.cpp: In member function 'bool CPeer::CheckMapIndex(long int) const':
Peer.cpp:141:14: error: 'find' is not a member of 'std'
  return std::find(std::begin(m_alMaps), std::end(m_alMaps), lMapIndex) != std::end(m_alMaps);
              ^~~~
Peer.cpp:141:14: note: suggested alternative: 'bind'
  return std::find(std::begin(m_alMaps), std::end(m_alMaps), lMapIndex) != std::end(m_alMaps);
              ^~~~
              bind


how do i fix this error? Thanks

#include <algorithm>

Link to comment
Share on other sites

  • Honorable Member
18 minutes ago, Debloat said:

Works absolutely great! Thank you so much for sharing! Just a small question tho, where to localize this text? 

spacer.png

This is the hidden content, please

Use LC_TEXT to avoid problems with special characters of your language.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 27
  • Eyes 2
  • Good 5
  • Love 8

 

Link to comment
Share on other sites

25 minutes ago, Mali said:

This is the hidden content, please

Use LC_TEXT to avoid problems with special characters of your language.

Since this is on the server end, is it possible to change the text from the client locale_xx just like the other variables such as MOVE_CHANNEL_NOTICE to support multi languages?

  • Metin2 Dev 2
  • Love 1
Link to comment
Share on other sites

  • 1 month later...

I use translation

Is this an error? Because after changing channel, I can't go back to my old channel. I have attached a video and syserr below. 

Client syserr

0328 12:23:17657 :: Unknown Server Command server_info 1 41 | server_info
0328 12:23:35030 :: Unknown Server Command server_info 2 41 | server_info
 

https://files.fm/f/xx9hhagqx

 

@ Mali

Nyami HARMONY

...............................................

sgn05b7.png

Link to comment
Share on other sites

  • 1 month later...
  • Active+ Member

I'm getting this error:

0501 05:51:10824 :: Traceback (most recent call last): 0501 05:51:10824 :: File "ui.py", line 1051, in CallEvent

0501 05:51:10824 :: File "ui.py", line 88, in call

0501 05:51:10824 :: File "ui.py", line 70, in call

0501 05:51:10824 :: File "introLogin.py", line 1541, in __OnClickSelectServerButton

0501 05:51:10824 :: KeyError

0501 05:51:10824 :: :

0501 05:51:10824 :: 4

0501 05:51:10824 ::

 

Someone has this fix?

  • Metin2 Dev 1
Link to comment
Share on other sites

  • 4 weeks later...
On 5/1/2022 at 4:53 AM, Th1Doose said:

I'm getting this error:

0501 05:51:10824 :: Traceback (most recent call last): 0501 05:51:10824 :: File "ui.py", line 1051, in CallEvent

0501 05:51:10824 :: File "ui.py", line 88, in call

0501 05:51:10824 :: File "ui.py", line 70, in call

0501 05:51:10824 :: File "introLogin.py", line 1541, in __OnClickSelectServerButton

0501 05:51:10824 :: KeyError

0501 05:51:10824 :: :

0501 05:51:10824 :: 4

0501 05:51:10824 ::

 

Someone has this fix?

Check the tabs

Link to comment
Share on other sites

Announcements



×
×
  • 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.