Colocar SubServer no Mu
Autor: Mr17 | Publicado: 2011-01-03T15:58:00-08:00

Galera, ja tive muita dificuldade em fazer subserver, e nem sei se esta correto a maneira que fiz, mas ate hoje não deu nem um erro em configurar dessa forma, litarealmente fiz pois niguem ensina isso na net pelo menos os tutoriais que vi não é nada parecido com esse que postei.
Se alguem tem outra forma de fazer melhor que essa ae fala e se tiver augo configurado errado fala se quizer ensinar é claro.

[1º PARTE]

1- Na pasta Connectserver\Data\Serverlist.dat deixa assim:
Citar0 "Server1" "svle.sytes.net" 55901 "SHOW"
19 "Servercs" "svle.sytes.net" 55919 "HIDE"
21 "Server2" "svle.sytes.net" 55903 "SHOW"
42 "Server3" "svle.sytes.net" 55905 "SHOW"
2- Na pasta Muserver\Data\MapServerInfo.dat deixa assim:
Citar//==================================================================================================================&nbsp;&nbsp;
//&nbsp;&nbsp;&nbsp;ServerCode&nbsp;&nbsp;&nbsp;MapServerGroup&nbsp;&nbsp;&nbsp;InitSetting&nbsp;&nbsp;&nbsp;IpAddress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PortNum
//==================================================================================================================&nbsp;&nbsp;
0
&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ssvle.sytes.net&nbsp;&nbsp;&nbsp;55901
&nbsp;&nbsp;&nbsp;19&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ssvle.sytes.net&nbsp;&nbsp;&nbsp;55919
&nbsp;&nbsp;&nbsp;21&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ssvle.sytes.net&nbsp;&nbsp;&nbsp;55903
&nbsp;&nbsp;&nbsp;42&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ssvle.sytes.net&nbsp;&nbsp;&nbsp;55905

end

//==================================================================================================================
//&nbsp; &nbsp; &nbsp; ServerCode&nbsp; MoveAbleOption&nbsp;&nbsp;&nbsp;Map&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DestServerCode
//==================================================================================================================
1

&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;30 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19
&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;31 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19
&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;34 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19

&nbsp; &nbsp; &nbsp; &nbsp; 19&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-1
&nbsp;&nbsp;&nbsp;19&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;31&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-1
&nbsp;&nbsp;&nbsp;19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uServer\SubServer\GameServer\Data\ServerInfo.d at de cada Subserver autere o ServerCode para o que vc determinar para cada Subserver.
Exemplo:

Se o seu Subserver1 (vip, vipgold, master seija la qual for) no arquivo MapServerInfo.dat, na coluna ServerCode ele for 21 entao seu
arquivo ServerInfo.dat vai ficar assim:
Citar[GameServerInfo]
ServerName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=Nome do Server
ServerCode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=21
ConnectMemberLoad&nbsp;&nbsp;&nbsp;=0

NonPK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=0
PkLimitFree&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=0
Se o seu Subserver2 (vip, vipgold, master seija la qual for) no arquivo MapServerInfo.dat, na coluna ServerCode ele for 42 entao seu
arquivo ServerInfo.dat vai ficar assim:
Citar[GameServerInfo]
ServerName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=Nome do server
ServerCode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=42
ConnectMemberLoad&nbsp;&nbsp;&nbsp;=0

NonPK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=0
PkLimitFree&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=0
[CRÉDITO]
ADM-DCastro


[2º PARTE]

Antes que alguem pergunte como eu faço para determinar um subserver vipmaster e outro vipgold.
Primeiro restrinja a entrada de jogadores no server colocando na linha ConnectMemberLoad o numero 1 em vez de 0 (zero).
Depois execute os procedimentos abaixo:

Agora iremos gerar os ConnectMemb.txt pros dois servers (VipMaster e VipGold)

Crie uma coluna na tabela MEMB_INFO com o nome de VIP, e deixe o valor padrão como 0

Definimos q o vip sera: VipMaster = 1 e VipGold = 2

Vamos agora trabalhar no query analizer!

No query analizer, coloque os seguintes códigos, e rodando-os logo em seguida:
CitarUSE MuOnline
GO

CREATE VIEW GERA_VipMaster AS
SELECT MEMB___ID = '"' + MEMB___ID + '"'
FROM MEMB_INFO
WHERE VIP = 1
GO
CitarUSE MuOnline
GO

CREATE VIEW GERA_VipGold AS
SELECT MEMB___ID = '"' + MEMB___ID + '"'
FROM MEMB_INFO
WHERE VIP = 2
GO
CitarUSE MuOnline
GO

CREATE Procedure LISTA_VipMaster
(
@arquivo varchar(100)
)
AS
BEGIN
DECLARE @lista varchar(8000)
SELECT @lista = 'bcp MuOnline..GERA_VipMaster out '+ @arquivo + ' -c '
EXEC master..xp_cmdshell @lista
END
GO
CitarUSE MuOnline
GO

CREATE Procedure LISTA_VipGold
(
@arquivo varchar(100)
)
AS
BEGIN
DECLARE @lista varchar(8000)
SELECT @lista = 'bcp MuOnline..GERA_VipGold out '+ @arquivo + ' -c '
EXEC master..xp_cmdshell @lista
END
GO
Agora para gerar seus arquivo, rode o seguinte (as duas linhas juntas, não tem problema):
CitarEXEC LISTA_VipMaster 'J:\MuServer\SubServerVMaster\Data\CONNECTMEMBER.txt'

EXEC LISTA_VipGold 'J:\MuServer\SubServerVGold\Data\CONNECTMEMBER.txt'
Esse de cima server pra gerar seu connectmemb, coloque-o pra rodar todo dia, ou de hora em hora, faça uma job. Não esqueçam de dar reload no GS, senão não funfa.
caso tenha usado outros nomes para os subservers, troque ali em cima.

&gt;&gt; Caso queira deletar o script de seu banco de dados, rode o script abaixo em seu Query Analyzer.
CitarDROP Procedure LISTA_VipMaster
DROP View GERA_VipGold
CitarDROP Procedure LISTA_VipMaster
DROP View GERA_VipGold

DROP Procedure LISTA_VipGold
DROP View GERA_VipGold
[CRÉDITOS]
Banned Experience Mu