欢迎光临散文网 会员登陆 & 注册

azerothcore本体+npcbots+eluna模组安装备忘

2023-07-09 19:52 作者:毁灭性的扁平胸  | 我要投稿

1、环境:Debian12(23年7月),mariadb-server


2、azerothcore的安装方法有很多种,在ac的<a href="https://www.azerothcore.org/wiki/installation" rel="noopener" target="_blank">wiki</a>有非常详细的指引,为了将来升级服务器版本方便,我选择的是classic


3、跟随wiki,进入<a href="https://www.azerothcore.org/wiki/linux-requirements" rel="noopener" target="_blank">Linux Requirements</a>环节,安装需要的包:

<code>sudo apt-get update && sudo apt-get install git cmake make gcc g++ clang default-libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mariadb-server libboost-all-dev</code>

请注意,此次安装要占用1.4G左右的磁盘空间


4、进入<a href="https://www.azerothcore.org/wiki/linux-core-installation">Core Installation</a>环节,下载源码:

mkdir 源码目录

cd 源码目录

<code>git clone https://github.com/azerothcore/azerothcore-wotlk.git --branch master --single-branch azerothcore --depth 1</code>

github下载150MB左右,注意连接性,也可以手动去github下载上传到服务器解压缩


5、下载应用npcbots:

去<a href="https://github.com/trickerer/Trinity-Bots/tree/master/AC">NPCBOTS项目</a>下载NPCBots.patch放入 源码目录/azerothcore

坑:直接wget下来的NPCBots.patch文件大小不对

<code>patch -p1 < NPCBots.patch</code>


6、下载应用eluna模块:

cd 源码目录/azerothcore/modules

<code>git clone https://github.com/azerothcore/mod-eluna.git mod-eluna</code>


7、去掉客户端登录时的付费提示:

<code>\src\server\game\Handlers\AuthHandler.cpp</code>

找到

<code>packet << uint8(0);                                    // BillingPlanFlags</code>

改为

<code>packet << uint8(6);                                    // BillingPlanFlags</code>


8、编译ac:

cd 源码目录/azerothcore

<code>cd azerothcore

mkdir build

cd build

cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/azeroth-server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DTOOLS_BUILD=all -DSCRIPTS=static -DMODULES=static # 此处可修改ac安装目录

make -j 8 # 8是编译使用的cpu核心数,这一步时间取决于cpu性能,e1265Lv2 8线程大约耗时20分钟,J4125 4线程要跑50多分钟,7945hx 16线程的话3分多钟(感受到了科技的进步)。eluna模块代码比较老一堆warning,无视即可。

make install

</code>

<strong>>>>>>>>>>>>>>>>>>>>注意,此处为坑<<<<<<<<<<<<<<<<<<<<</strong>

当版本更新重新编译源码时,有可能会在eluna模块编译处卡住,此时需要删除build目录重新编译


9、进入<a href="https://www.azerothcore.org/wiki/server-setup">server setup环节</a>:

cd 安装目录

<code>mkdir data

cd data

wget https://github.com/wowgaming/client-data/releases/download/v16/data.zip</code>

<strong>>>>>>>>>>>>>>>>>>>>注意,此处为坑<<<<<<<<<<<<<<<<<<<<</strong>

对于需要删除安装目录重编译的场景,建议使用软连接

ln -s ./data 安装目录/azeroth-server/data


10、修改ac配置文件:

cd 安装目录/etc

<code>cp authserver.conf.dist authserver.conf

cp worldserver.conf.dist worldserver.conf

nano worldserver.conf</code>

修改:

DataDir = 上面的data文件夹地址

保存退出,其他设置可以后面改


11、进入<a href="https://www.azerothcore.org/wiki/database-installation">Database Installation环节</a>

下载<a href="https://github.com/azerothcore/azerothcore-wotlk/blob/master/data/sql/create/create_mysql.sql">用户和数据库创建sql文件</a>

放到任意目录

<code>su - root # 以root用户登录mariadb

mysql

source create_mysql.sql

</code>

为了方便管理数据库,创建一个可以远程登录mariadb的用户:

<code>use mysql

SELECT User, Password, Host FROM user; # 确认当前的用户情况

CREATE USER 'root'@'%' IDENTIFIED BY 'password'; # 添加远程root用户

grant all privileges on *.* to 'root'@'%' ; # 给远程root添加权限

SELECT User, Password, Host FROM user; # 确认添加用户的情况

flush privileges;</code>

退出mysql

<strong>>>>>>>>>>>>>>>>>>>>注意,此处为坑<<<<<<<<<<<<<<<<<<<<</strong>

<code>nano /etc/mysql/mariadb.conf.d/50-server.cnf

# 把这行注释掉:

bind-address = 127.0.0.1

systemctl restart mariadb</code>

打开数据库连接工具如heidisql,以root访问,ok


12、进入azeroth-server/bin首次运行authserver、worldserver


13、NPCBots的数据库额外处理:

下载<a href="https://github.com/trickerer/Trinity-Bots/tree/master/AC/SQL">npcbots的sql文件</a>

对首次安装,可以直接执行

merge_sqls_characters_windows.bat

merge_sqls_world_windows.bat

得到

ALL_characters.sql

ALL_world.sql

以及locales/zhCN目录下的npc_text_locale.sql

<code>su - root

mysql

use acore_world;

source ALL_world.sql;

source npc_text_locale.sql</code>

<strong>>>>>>>>>>>>>>>>>>>>注意,此处为坑<<<<<<<<<<<<<<<<<<<<</strong>

这里直接导入ALL_characters.sql会报错

要先删掉acore_characters库里的所有npcbots开头5张表,再导入

<code>use acore_characters;

source ALL_characters.sql;</code></code>


14、修改realmlist:

打开acore_auth库,realmlist表,第一行address改成局域网地址或外网url


15、重新运行authserver、worldserver,这里推荐使用screen后台运行:

<code>sudo apt-get install screen

screen -S ac_auth

./authserver

ctrl-a+d # deattach终端

screen -S ac_world

./worldserver

ctrl-a+d # deattach终端</code>


16、修改客户端realmlist为ip地址或url,测试连接


17、进入worldserver控制台,创建账号、开gm权限

<code>screen -r ac_world

account create admin 123

account set gmlevel admin 3 -1</code>

以admin账号登录游戏,聊天框输入.npcbot命令测试


18、使用eluna模块

进入安装目录azeroth-server/bin/lua_scripts/

将lua文件上传,重启worldserver


19、配置worldserver.conf

游戏中可以使用.reload config重载配置


azerothcore本体+npcbots+eluna模组安装备忘的评论 (共 条)

分享到微博请遵守国家法律