天龙八部私服架设教程

  1. 天龙八部私服架设教程
    1. 一、环境架设
    2. 二、换端操作
      1. 1、上传服务端版本
      2. 2、更改配置文件
      3. 3、运行
    3. 三、billing验证
    4. 四、配置客户端

天龙八部私服架设教程

一、环境架设

安装好Linux,一般用ubuntu centos等,可直接使用已搭建好mysql和驱动的ubuntu,或者CentOS。这里略过。

可用VMware 直接启动系统,在VM中Edit -> virtual network setting -> VMnet8 -> NAT -> Subnet IP 192.168.1.0

我安装的是Ubuntu20.4LTS-server的服务器端,数据库是mariadb10 ,详见 MySQL[mariadb]数据库入门知识

二、换端操作

1、上传服务端版本

利用Winscp 将tlbb.tar.gz 服务端上传到/home 目录,再用CRT连接后,解压:

cd /home
sudo tar zxvf tlbb.tar.gz

2、更改配置文件

配置文件在/home/tlbb/Server/Config内,需要修改的共有个文件:

ServerInfo.ini、LoginInfo.ini、ShareMemInfo.ini 详细请看

ServerInfo.ini文件内容:

[System]
Desc0=功能:配置服务器端程序的相关情况;
Desc1=IP0、Port0指外网的地址和端口;
Desc2=IP1、Port1指内网的地址和端口;
Desc3=Type:Game=0;Login=1;

CurrentServerID=0
ServerNumber=2

EnableEffAudit=0
EffAuditSaveResultInterval=0
EffAuditReportInterval=0

EnableEffAuditSceneID_1ST=0
EnableEffAuditSceneID_2ND=0
EnableEffAuditSceneID_3RD=0
EnableEffAuditSceneID_3RD=0

[Mother]
IP=0.0.0.0
Port=0

[World]
IP=127.0.0.1
Port=777

[Billing]	;这是验证网关
Number=1
IP0=192.168.9.33	;验证网关地址
Port0=9470	;验证网关端口
IP1=0.0.0.0
Port1=10101
IP2=0.0.0.0
Port2=10101
IP3=0.0.0.0
Port3=10101
IP4=0.0.0.0
Port4=10101

[Proxy]
Proxy0ForCncUser= 0.0.0.0
;Proxy1ForCncUser=0.0.0.0
Proxy0ForCtcUser=0.0.0.0
;Proxy1ForCtcUser=0.0.0.0
Proxy0ForEduUser= 0.0.0.0
;Proxy1ForEduUser=0.0.0.0

[Server0]
ServerID=0
MachineID=0
IP0=127.0.0.1
Port0=7776	;这是游戏端口,在客户端中填入游戏端口内容;外网连接
IP1=127.0.0.1
Port1=8880	;这是游戏端口,在客户端中填入游戏端口内容;内网连接
Type=0
IP(CNC)= 0.0.0.0
Port(CNC)=1000
IP(CTC)=0.0.0.0
Port(CTC)=0
IP(EDU)= 0.0.0.0
Port(EDU)=1000
HumanSMKey=1001
PlayShopSMKey=4001
ItemSerialKey=7001
CommisionShopKey=6001
EnableShareMem=1

[Server1]
ServerID=2
MachineID=0
IP0=127.0.0.1
Port0=7775	;登陆端口,外网连接
IP1=127.0.0.1
Port1=8882	;登陆端口,内网连接
Type=1
IP(CNC)= 0.0.0.0
Port(CNC)=1000
IP(CTC)=0.0.0.0
Port(CTC)=0
IP(EDU)= 0.0.0.0
Port(EDU)=1000
HumanSMKey=1003
PlayShopSMKey=4003
ItemSerialKey=7003
CommisionShopKey=6003
EnableShareMem=0

LoginInfo.ini文件内容:

[System]	
LoginID=2	
DBIP=127.0.0.1
DBPort=3306	
DBName=tlbbdb	
DBUser=root	
DBPassword=xiaomaomao
ClientVersion=1005	
DBConnectCount=10	
TurnPlayerCount=100	
CryptPwd=0	
ProxyConnect=1	

ShareMemInfo.ini文件内容:

[System]
DBIP=127.0.0.1		;数据库ip
DBPort=3306		;数据库端口
DBName=tlbbdb		;数据库名称
DBUser=root		;用户名
DBPassword=xiaomaomao	;密码
SMUInterval=1200000		;world数据存盘时间(毫秒)
DATAInterval=900000		;Human数据存盘时间(毫秒)
CryptPwd=0		;密码是否加密

[ShareMem]
KeyCount=11
Key0=1001
Type0=1     ;HumanSMU
Key1=2001
Type1=2     ;GuildSMU
Key2=3001
Type2=3     ;MailSMU
Key3=4001
Type3=4     ;PlayerShopSM
Key4=5001
Type4=5     ;GlobalDataSMU
Key5=6001
Type5=6     ;CommisionShopSMU
Key6=7001
Type6=7     ;ItemSerialKeySMU
Key7=8001
Type7=8     ;PetProcreateItemSM
Key8=9001
Type8=9     ;CitySMU
Key9=10001
Type9=10    ;GuildLeagueSMU
Key10=11001
Type10=11   ;FindFriendADSMU

3、运行

cd /home/tlbb
sudo ./run.sh

三、billing验证

一般是用windows来验证,这里用liuguangw的linux 版验证,就可以达到一个系统运行服务器的操作,原来是要两个系统(linux和windows),同时也就可以减少服务器资源,特别是单机vmware虚拟机情况下,很节省。
项目开源:
https://github.com/liuguangw/billing
下载:
https://github.com/liuguangw/billing/releases/

cd /home
wget https://github.com/liuguangw/billing_go/releases/download/v1.3.3/billing-release-x64.tar.gz
cd billing
./billing

配置文件config.yaml:

ip: 127.0.0.1
port: 12680     #监听端口
db_host: 127.0.0.1      #数据库ip
db_port: 3306       #数据库端口
db_user: root       #数据库用户名
db_password: 'root'     #数据库密码
db_name: web        #数据表
allow_old_password: false
auto_reg: true      #是否自动注册
#allow_ips:     
#  - 127.0.0.1
#  - 192.168.10.3
max_client_count: 500
pc_max_client_count: 3

四、配置客户端


转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 vault@coolxy.cn

×

喜欢就点赞,疼爱就打赏

github