Jump to content

Ingame Channel Switcher System


Recommended Posts

  • Bronze

M2 Download Center

This is the hidden content, please
( Internal )

Hey,

 

after somone sells it under his name and earns money with my work i release it now.
looks like a normal warp

Is ne 10min Arbeit aber naja was solls.

Spoiler

 

actual working with this ports.

Spoiler

ch1:
13002 - 13008
ch2:
13102 - 13108
ch3:
13202 - 13208
ch4:
13302 - 13308

 


cmd.cp:
    after:
        ACMD(do_warp);
    add:
        ACMD(do_channel_switch);

    after:
        { "mall_close",    do_mall_close,        0,            POS_DEAD,    GM_PLAYER    },
    add:
        { "channel",        do_channel_switch,        0,            POS_DEAD,    GM_PLAYER    },
    

cmd_general.cpp:
    
    after:
        ACMD(do_set_run_mode)
        {
            ch->SetNowWalking(false);
            ch->SetWalking(false);
        }
    add:
        ACMD(do_channel_switch)
        {
    
            char arg1[256];
            one_argument(argument, arg1, sizeof(arg1));
            if (!*arg1)
                    return;
            
            int new_ch;
            str_to_number(new_ch, arg1);
            if( new_ch <1 || new_ch >4)   // REPLACE 2 WITH YOUR MAX_CHANNEL 
                return;
            if (!ch->IsPC())
                return;
            ch->ChannelSwitch(new_ch);
            
        }

char.h:
    
    after:
        void                StartWarpNPCEvent();
    add:
        void                            ChannelSwitch(int new_ch);
 

char.cpp:
    after:
        EVENTFUNC(warp_npc_event)
        {
            char_event_info* info = dynamic_cast<char_event_info*>( event->info );
            if ( info == NULL )
            {
                sys_err( "warp_npc_event> <Factor> Null pointer" );
                return 0;
            }
            LPCHARACTER    ch = info->ch;
            if (ch == NULL) { // <Factor>
                return 0;
            }    
            if (!ch->GetSectree())
            {
                ch->m_pkWarpNPCEvent = NULL;
                return 0;
            }
            FuncCheckWarp f(ch);
            if (f.Valid())
                ch->GetSectree()->ForEachAround(f);
            return passes_per_sec / 2;
        }

    add:
        void CHARACTER::ChannelSwitch(int new_ch){
            long lAddr;
            long lMapIndex;
            WORD wPort;
            long x = this->GetX();
            long y = this->GetY();
            if (!CMapLocation::instance().Get(x, y, lMapIndex, lAddr, wPort))
            {
                    sys_err("cannot find map location index %d x %d y %d name %s", lMapIndex, x, y, GetName());
                    return;
            }
            if(lMapIndex >= 10000){
                return;
            }
            
            std::map<WORD, int>micha;
            
            for(int i = 0; i < 4; i++){ //replace with maximum channels -1   actual 1300x - 1330x
                for(int i2 = 2; i2 < 9; i2++){ //replace with your core values actual  13x02 - 13x08
                    micha[13*1000 + i*100 + i2] = i+1;
                }        
            }
            //micha[13002] = 1;
            int chan;
            if(micha.find(wPort) != micha.end()){
                chan = micha[wPort];
            }else{return;}
            Stop();
            Save();
            
            if(GetSectree()){
                GetSectree()->RemoveEntity(this);
                ViewCleanup();
                EncodeRemovePacket(this);
            }
            TPacketGCWarp p;
            p.bHeader    = HEADER_GC_WARP;
            p.lX    = x;
            p.lY    = y;
            p.lAddr    = lAddr;
            p.wPort    = (wPort - 100*(chan-1) + 100*(new_ch-1));
            
            GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
        }

Py script + howto in description

 

 

have fun with it

  • Metin2 Dev 56
  • kekw 1
  • Eyes 2
  • Sad 1
  • Cry 1
  • Confused 1
  • Scream 1
  • Lmao 3
  • Good 28
  • Love 5
  • Love 62
Link to comment
Share on other sites

  • Premium

What is the problem guys? 

 

0701 06:47:33421 :: Traceback (most recent call last):

0701 06:47:33421 ::   File "ui.py", line 1007, in CallEvent

0701 06:47:33422 ::   File "uiChannel.py", line 60, in <lambda>

0701 06:47:33422 ::   File "uiChannel.py", line 134, in __Fill_Up_ChannelList

0701 06:47:33422 ::   File "uiChannel.py", line 140, in __RequestServerStateList

0701 06:47:33422 ::   File "uiChannel.py", line 131, in __GetServerID

0701 06:47:33422 :: UnboundLocalError
0701 06:47:33422 :: : 
0701 06:47:33422 :: local variable 'serverID' referenced before assignment

 

Link to comment
Share on other sites

What is the problem guys? 

 

0701 06:47:33421 :: Traceback (most recent call last):

0701 06:47:33421 ::   File "ui.py", line 1007, in CallEvent

0701 06:47:33422 ::   File "uiChannel.py", line 60, in <lambda>

0701 06:47:33422 ::   File "uiChannel.py", line 134, in __Fill_Up_ChannelList

0701 06:47:33422 ::   File "uiChannel.py", line 140, in __RequestServerStateList

0701 06:47:33422 ::   File "uiChannel.py", line 131, in __GetServerID

0701 06:47:33422 :: UnboundLocalError
0701 06:47:33422 :: : 
0701 06:47:33422 :: local variable 'serverID' referenced before assignment

 

​I have the same problem, the script for clientside is shit :P

  • Good 1
Link to comment
Share on other sites

thx for the system i didnt test it or add it
also iam not c++ progream but your code it seem to be ugly -_-

good luck :)

​Really? I can't find anything ugly about this. Actually the c++ part is very nice. I didn't check on python.

And why are you wishing him good luck at his own release? ._. Sometimes I don't understand people...^^

 

Anyway, the idea behind that is great and I like the c++ part a lot. Oh, and a german sentence slipped through ;)

Link to comment
Share on other sites

  • Premium

thx for the system i didnt test it or add it
also iam not c++ progream but your code it seem to be ugly -_-

good luck :)

​Really? I can't find anything ugly about this. Actually the c++ part is very nice. I didn't check on python.

And why are you wishing him good luck at his own release? ._. Sometimes I don't understand people...^^

 

Anyway, the idea behind that is great and I like the c++ part a lot. Oh, and a german sentence slipped through ;)

 

I know that it isn't the best c++ Code, but I really.love using maps ^^

 

Py part is 1:1 from wom:o

 

And yeah the German sentence comes through :D

sorry for that ^^

Mobile phone and yeah :D

i dont know how to tell u why he is ugly

also iam arabic from libya not germany

If you're going to do something, then do it right.

Link to comment
Share on other sites

  • Former Staff

thx for the system i didnt test it or add it
also iam not c++ progream but your code it seem to be ugly -_-

good luck :)

Really? I can't find anything ugly about this. Actually the c++ part is very nice. I didn't check on python.

And why are you wishing him good luck at his own release? ._. Sometimes I don't understand people...^^

 

Anyway, the idea behind that is great and I like the c++ part a lot. Oh, and a german sentence slipped through ;)

 

I know that it isn't the best c++ Code, but I really.love using maps ^^

 

Py part is 1:1 from wom:o

 

And yeah the German sentence comes through :D

sorry for that ^^

Mobile phone and yeah :D

i dont know how to tell u why he is ugly

also iam arabic from libya not germany

alina wasn't talking to  you when he/she wrote this ---> "and a german sentence slipped through ;)"

he/she was talking to the topic maker

 

and for the python part :

go to uisystem.py in root and search for this tow times

self.GetChild("help_button").SAFE_SetEvent(self.__ClickHelpButton)

and under it write this

self.GetChild("Change_Channel").SAFE_SetEvent(self.__ClickChangeChButton)

and after this

	def __ClickInGameShopButton(self):	   	
	   	self.Close()
		net.SendChatPacket("/in_game_mall")

write this

 

	def	__ClickChangeChButton(self):
		if constInfo.channel == 0:
			constInfo.channel == 1
			self.uuchangechannel = uichannel.ChannelChanger()
			self.uuchangechannel.Show()
		elif constInfo.channel == 1:
			constInfo.channel == 0
			self.uuchangechannel = uichannel.ChannelChanger()
			self.uuchangechannel.hide()

save and exit

2: change uichannel.py in root with this

import ui
import net
import app
import chat
import math
import wndMgr
import serverInfo
import background
import ServerStateChecker
import snd
import constInfo
Channel_window = "uiscript/channel.py"
class ChannelChanger(ui.ScriptWindow):
	def __init__(self):
		ui.ScriptWindow.__init__(self)

	def __del__(self):
		ui.ScriptWindow.__del__(self)

		
	def Show(self):
		self.__LoadWindow()
		ui.ScriptWindow.Show(self)
		
	def __LoadWindow(self):
		try:			
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, Channel_window)
		except:
			import exception
			exception.Abort("PetWindow.LoadWindow.LoadObject")
		#buttons
		self.TitleBar = self.GetChild("TitleBar")
		self.channel1 = self.GetChild("Channel_1")
		self.channel2 = self.GetChild("Channel_2")
		self.channel3 = self.GetChild("Channel_3")
		self.channel4 = self.GetChild("Channel_4")
		
		#event buttons
		self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close))
		self.channel1.SetEvent(ui.__mem_func__(self.___1))
		self.channel2.SetEvent(ui.__mem_func__(self.___2))
		self.channel3.SetEvent(ui.__mem_func__(self.___3))
		self.channel4.SetEvent(ui.__mem_func__(self.___4))
	

	
	def	___1(self):
		snd.PlaySound("sound/ui/click.wav")
		ch = "1"
		self.__OnChangeChannel(ch)
		
	def	___2(self):
		snd.PlaySound("sound/ui/click.wav")
		ch = "2"
		self.__OnChangeChannel(ch)
		
	def	___3(self):
		snd.PlaySound("sound/ui/click.wav")
		ch = "3"
		self.__OnChangeChannel(ch)
		
	def	___4(self):
		snd.PlaySound("sound/ui/click.wav")
		ch = "4"
		self.__OnChangeChannel(ch)
		
	def __IsSpecialMap(self):
		dis_maps = [
			"season1/metin2_map_oxevent",
			"season2/metin2_map_guild_inside01",
			"season2/metin2_map_empirewar01",
			"season2/metin2_map_empirewar02",
			"season2/metin2_map_empirewar03",
			"metin2_map_dragon_timeattack_01",
			"metin2_map_dragon_timeattack_02",
			"metin2_map_dragon_timeattack_03",
			"metin2_map_skipia_dungeon_boss",
			"metin2_map_skipia_dungeon_boss2",
			"metin2_map_devilsCatacomb",
			"metin2_map_deviltower1",
			"metin2_map_t1",
			"metin2_map_t2",
			"metin2_map_t3",
			"metin2_map_t4",
			"metin2_map_t5",
			"metin2_map_wedding_01",
			"metin2_map_duel",
			"metin2_map_orclabyrinth",
			"metin2_map_n_flame_dungeon_01",
			"metin2_map_n_snow_dungeon_01"
		]
		if str(background.GetCurrentMapName()) in dis_maps:
			return TRUE
		return FALSE
		
	def __OnChangeChannel(self, ch):
		ServerStateChecker.Update()
		channel = net.GetServerInfo()[-1]
#		channelnum = filter(str.isdigit, channel)
		if ch == channel:
			chat.AppendChat(chat.CHAT_TYPE_INFO, "You're already in the selected channel!")
			return
		if self.__IsSpecialMap():
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Sorry, This Is One of spiecal maps which you cannot change channel while you in it!")
			return
		net.SendChatPacket("/channel "+ str(ch))
		self.Close()
		
	def Close(self):
		constInfo.channel = 0
		self.Hide()
		return TRUE
		
	def OnPressEscapeKey(self):
		constInfo.channel = 0
		self.Hide()
		return TRUE
		

 

3: change systemdialog.py in uiscript with this

 

import uiScriptLocale

ROOT = "d:/ymir work/ui/public/"

window = {
	"name" : "SystemDialog",
	"style" : ("float",),

	"x" : SCREEN_WIDTH/2 - 100,
	"y" : SCREEN_HEIGHT/2 - 114,

	"width" : 200,
	"height" : 298,

	"children" :
	(
		{
			"name" : "board",
			"type" : "thinboard",

			"x" : 0,
			"y" : 0,

			"width" : 200,
			"height" : 298,

			"children" :
			(
				{
					"name" : "Change_Channel",
					"type" : "button",

					"x" : 10,
					"y" : 17,

					"text" : uiScriptLocale.SYSTEM_CHANGE_CH,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "help_button",
					"type" : "button",

					"x" : 10,
					"y" : 47,

					"text" : uiScriptLocale.SYSTEM_HELP,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},

				{
					"name" : "system_option_button",
					"type" : "button",

					"x" : 10,
					"y" : 97,

					"text" : uiScriptLocale.SYSTEMOPTION_TITLE,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "game_option_button",
					"type" : "button",

					"x" : 10,
					"y" : 127,

					"text" : uiScriptLocale.GAMEOPTION_TITLE,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "change_button",
					"type" : "button",

					"x" : 10,
					"y" : 157,

					"text" : uiScriptLocale.SYSTEM_CHANGE,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "logout_button",
					"type" : "button",

					"x" : 10,
					"y" : 187,

					"text" : uiScriptLocale.SYSTEM_LOGOUT,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "exit_button",
					"type" : "button",

					"x" : 10,
					"y" : 217,

					"text" : uiScriptLocale.SYSTEM_EXIT,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "cancel_button",
					"type" : "button",

					"x" : 10,
					"y" : 257,

					"text" : uiScriptLocale.CANCEL,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
			),
		},
	),
}

 

4: channel.py in upscript folder // i forgot it

[spoiler]

import item
import app
import uiScriptLocale

UI = "d:/ymir work/ui/"
PUBLIC = "d:/ymir work/ui/public/"

window = {
	"name" : "Channel_Switcher",
	
	"x" : SCREEN_WIDTH/2 ,
	"y" : SCREEN_HEIGHT/2 ,
	
	"style" : ("movable", "float",),
	
	"width" : 150,
	"height" : 150,	
	
	"children" :
	(
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),
			
			"x" : 0,
			"y" : 0,
			
			"width" : 150,
			"height" : 150,
			
			"children" :
			(
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),
					
					"x" : 8,
					"y" : 7,
					
					"width" : 135,
					
					"children" :
					(
						{ 
							"name":"TitleName",
							"type":"text",

							"x":65,
							"y":3,

							"text":uiScriptLocale.SYSTEM_CHANGE_CH,
							"text_horizontal_align":"center"
							
						},
					),
				},
				{
					"name" : "Channel_1",
					"type" : "button",
					
					"x" : 50,
					"y" : 35,
					
					"text" : "Channel 1",
					
					"default_image" : PUBLIC + "middle_button_01.sub",
					"over_image" : PUBLIC + "middle_button_02.sub",
					"down_image" : PUBLIC + "middle_button_03.sub",
				},
				
				{
					"name" : "Channel_2",
					"type" : "button",
					
					"x" : 50,
					"y" : 60,
					
					"text" : "Channel 2",
					
					"default_image" : PUBLIC + "middle_button_01.sub",
					"over_image" : PUBLIC + "middle_button_02.sub",
					"down_image" : PUBLIC + "middle_button_03.sub",
				},
				{
					"name" : "Channel_3",
					"type" : "button",
					
					"x" : 50,
					"y" : 85,
					
					"text" : "Channel 3",
					
					"default_image" : PUBLIC + "middle_button_01.sub",
					"over_image" : PUBLIC + "middle_button_02.sub",
					"down_image" : PUBLIC + "middle_button_03.sub",
				},
				{
					"name" : "Channel_4",
					"type" : "button",
					
					"x" : 50,
					"y" : 110,
					
					"text" : "Channel 4",
					
					"default_image" : PUBLIC + "middle_button_01.sub",
					"over_image" : PUBLIC + "middle_button_02.sub",
					"down_image" : PUBLIC + "middle_button_03.sub",
				},
			),
		},
	),
}


[/spoiler]

and finally go to constnfo.py in root and write this

channel = 0

and the python part is over <3

Edited by flygun
Update
Link to comment
Share on other sites

thx for the system i didnt test it or add it
also iam not c++ progream but your code it seem to be ugly -_-

good luck :)

Really? I can't find anything ugly about this. Actually the c++ part is very nice. I didn't check on python.

And why are you wishing him good luck at his own release? ._. Sometimes I don't understand people...^^

 

Anyway, the idea behind that is great and I like the c++ part a lot. Oh, and a german sentence slipped through ;)

 

I know that it isn't the best c++ Code, but I really.love using maps ^^

 

Py part is 1:1 from wom:o

 

And yeah the German sentence comes through :D

sorry for that ^^

Mobile phone and yeah :D

i dont know how to tell u why he is ugly

also iam arabic from libya not germany

alina wasn't talking to  you when he/she wrote this ---> "and a german sentence slipped through ;)"

he/she was talking to the topic maker

 

and for the python part :

go to uisystem.py in root and search for this tow times

self.GetChild("help_button").SAFE_SetEvent(self.__ClickHelpButton)

and under it write this

self.GetChild("Change_Channel").SAFE_SetEvent(self.__ClickChangeChButton)

and after this

	def __ClickInGameShopButton(self):	   	
	   	self.Close()
		net.SendChatPacket("/in_game_mall")

write this

	def	__ClickChangeChButton(self):
		if constInfo.channel == 0:
			constInfo.channel == 1
			self.uuchangechannel = uichannel.ChannelChanger()
			self.uuchangechannel.Show()
		elif constInfo.channel == 1:
			constInfo.channel == 0
			self.uuchangechannel = uichannel.ChannelChanger()
			self.uuchangechannel.hide()

save and exit

2: change uichannel.py in root with this

import ui
import net
import app
import chat
import math
import wndMgr
import serverInfo
import background
import ServerStateChecker
import snd
import constInfo
Channel_window = "uiscript/channel.py"
class ChannelChanger(ui.ScriptWindow):
	def __init__(self):
		ui.ScriptWindow.__init__(self)

	def __del__(self):
		ui.ScriptWindow.__del__(self)

		
	def Show(self):
		self.__LoadWindow()
		ui.ScriptWindow.Show(self)
		
	def __LoadWindow(self):
		try:			
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, Channel_window)
		except:
			import exception
			exception.Abort("PetWindow.LoadWindow.LoadObject")
		#buttons
		self.TitleBar = self.GetChild("TitleBar")
		self.channel1 = self.GetChild("Channel_1")
		self.channel2 = self.GetChild("Channel_2")
		self.channel3 = self.GetChild("Channel_3")
		self.channel4 = self.GetChild("Channel_4")
		
		#event buttons
		self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close))
		self.channel1.SetEvent(ui.__mem_func__(self.___1))
		self.channel2.SetEvent(ui.__mem_func__(self.___2))
		self.channel3.SetEvent(ui.__mem_func__(self.___3))
		self.channel4.SetEvent(ui.__mem_func__(self.___4))
	

	
	def	___1(self):
		snd.PlaySound("sound/ui/click.wav")
		ch = "1"
		self.__OnChangeChannel(ch)
		
	def	___2(self):
		snd.PlaySound("sound/ui/click.wav")
		ch = "2"
		self.__OnChangeChannel(ch)
		
	def	___3(self):
		snd.PlaySound("sound/ui/click.wav")
		ch = "3"
		self.__OnChangeChannel(ch)
		
	def	___4(self):
		snd.PlaySound("sound/ui/click.wav")
		ch = "4"
		self.__OnChangeChannel(ch)
		
	def __IsSpecialMap(self):
		dis_maps = [
			"season1/metin2_map_oxevent",
			"season2/metin2_map_guild_inside01",
			"season2/metin2_map_empirewar01",
			"season2/metin2_map_empirewar02",
			"season2/metin2_map_empirewar03",
			"metin2_map_dragon_timeattack_01",
			"metin2_map_dragon_timeattack_02",
			"metin2_map_dragon_timeattack_03",
			"metin2_map_skipia_dungeon_boss",
			"metin2_map_skipia_dungeon_boss2",
			"metin2_map_devilsCatacomb",
			"metin2_map_deviltower1",
			"metin2_map_t1",
			"metin2_map_t2",
			"metin2_map_t3",
			"metin2_map_t4",
			"metin2_map_t5",
			"metin2_map_wedding_01",
			"metin2_map_duel",
			"metin2_map_orclabyrinth",
			"metin2_map_n_flame_dungeon_01",
			"metin2_map_n_snow_dungeon_01"
		]
		if str(background.GetCurrentMapName()) in dis_maps:
			return TRUE
		return FALSE
		
	def __OnChangeChannel(self, ch):
		ServerStateChecker.Update()
		channel = net.GetServerInfo()[-1]
#		channelnum = filter(str.isdigit, channel)
		if ch == channel:
			chat.AppendChat(chat.CHAT_TYPE_INFO, "You're already in the selected channel!")
			return
		if self.__IsSpecialMap():
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Sorry, This Is One of spiecal maps which you cannot change channel while you in it!")
			return
		net.SendChatPacket("/channel "+ str(ch))
		self.Close()
		
	def Close(self):
		constInfo.channel = 0
		self.Hide()
		return TRUE
		
	def OnPressEscapeKey(self):
		constInfo.channel = 0
		self.Hide()
		return TRUE
		

3: change systemdialog.py in uiscript with this

import uiScriptLocale

ROOT = "d:/ymir work/ui/public/"

window = {
	"name" : "SystemDialog",
	"style" : ("float",),

	"x" : SCREEN_WIDTH/2 - 100,
	"y" : SCREEN_HEIGHT/2 - 114,

	"width" : 200,
	"height" : 298,

	"children" :
	(
		{
			"name" : "board",
			"type" : "thinboard",

			"x" : 0,
			"y" : 0,

			"width" : 200,
			"height" : 298,

			"children" :
			(
				{
					"name" : "Change_Channel",
					"type" : "button",

					"x" : 10,
					"y" : 17,

					"text" : uiScriptLocale.SYSTEM_CHANGE_CH,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "help_button",
					"type" : "button",

					"x" : 10,
					"y" : 47,

					"text" : uiScriptLocale.SYSTEM_HELP,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},

				{
					"name" : "system_option_button",
					"type" : "button",

					"x" : 10,
					"y" : 97,

					"text" : uiScriptLocale.SYSTEMOPTION_TITLE,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "game_option_button",
					"type" : "button",

					"x" : 10,
					"y" : 127,

					"text" : uiScriptLocale.GAMEOPTION_TITLE,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "change_button",
					"type" : "button",

					"x" : 10,
					"y" : 157,

					"text" : uiScriptLocale.SYSTEM_CHANGE,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "logout_button",
					"type" : "button",

					"x" : 10,
					"y" : 187,

					"text" : uiScriptLocale.SYSTEM_LOGOUT,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "exit_button",
					"type" : "button",

					"x" : 10,
					"y" : 217,

					"text" : uiScriptLocale.SYSTEM_EXIT,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
				{
					"name" : "cancel_button",
					"type" : "button",

					"x" : 10,
					"y" : 257,

					"text" : uiScriptLocale.CANCEL,

					"default_image" : ROOT + "XLarge_Button_01.sub",
					"over_image" : ROOT + "XLarge_Button_02.sub",
					"down_image" : ROOT + "XLarge_Button_03.sub",
				},
			),
		},
	),
}

and finally go to constnfo.py in root and write this

channel = 0

and the python part is over <3

Yeah,but what if the user just write /channel x? With that way the user will just skip the map check :rolleyes:

Link to comment
Share on other sites

 idk why he wrote the map check function with python he could do it with c++ :mellow:

 

and i'm very sorry i don't know how to use spoiler with this new interface (design):blush:

Just write [ spoiler ] [ /spoiler ] without spaces and...

Voila!

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

  • Former Staff

 idk why he wrote the map check function with python he could do it with c++ :mellow:

 

and i'm very sorry i don't know how to use spoiler with this new interface (design):blush:

Just write [ spoiler ] [ /spoiler ] without spaces and...

 

Hidden Content

thank you ;) .... anyway i got some problems with my FreeBSD OS so i can't test the system with server so i just wrote the codes cus i just couldn't see the python code look like this without rewriting it lol

 

btw with / without my code the /channel x problem is still there so i think he must write it with some c++ codes to be more functional

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

  • Bronze

You know that the system as released here works perfectly or? 

 

But you need correct entries in the serverinfo and also the right ports

 

Also the map checks is serverside 

If Ch99 isn't set to the map then you function allways returns if player is in ch99

The clientside part I just took from wom2 because was too lazy go create own guy 

 

Edited by Micha aka xCPx
Link to comment
Share on other sites

I not really understand phase ports, so I port 50000 two core, why should I change?

 

		    for(int i = 0; i < 4; i++){ //replace with maximum channels -1   actual 1300x - 1330x
		        for(int i2 = 2; i2 < 9; i2++){ //replace with your core values actual  13x02 - 13x08
		            micha[13*1000 + i*100 + i2] = i+1;

in

		    for(int i = 0; i < 4; i++){ //replace with maximum channels -1   actual 1300x - 1330x
		        for(int i2 = 2; i2 < 9; i2++){ //replace with your core values actual  13x02 - 13x08
		            micha[50*1000 + i*100 + i2] = i+1;

right?

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.