Jump to content

Specu

Members
  • Posts

    14
  • Joined

  • Last visited

  • Days Won

    1
  • Donations

    0.00 GBP 

Everything posted by Specu

  1. Great, tool is way better than creating systemd services. Adding it to Tools is a good decision.
  2. Hello @Elmsroth nice tool. What is really confusing is $NOW variable. In your script it looks like: NOW=$(date +"%s-%d-%m-%Y") echo $NOW 1595580505-24-07-2020 so if mangos restarts *.log shows 1595568627-24-07-2020 mangosd stopped, restarting! More human readable would be: NOW=$(date +"%T-%d-%m-%Y") echo $NOW 10:53:48-24-07-2020
  3. Nope only options that I put while cmake was -DCMAKE_INSTALL_PREFIX. I thought that if I define options in CMakeLists.txt file they will be compiled. EDIT: mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/bin/mangos -DPLAYERBOTS=1 && make -j12 && make install _______________________________________________________ MaNGOS Server: World Initialization Complete _______________________________________________________ Server Version : 2118001 Database Version : Rel21.22.1 Supporting Clients : 1.12.x Builds : 5875 6005 6141 Module Status - Eluna : Enabled Warden : Enabled PlayerBots : Disabled ScriptDev3 (SD3) : Enabled Remote Access (RA) : Disabled _______________________________________________________ build a while ago -rwxr-xr-x 1 root root 1343320 Jul 24 11:52 realmd -rwxr-xr-x 1 root root 15472792 Jul 24 12:10 mangosd Of course I deleted build folder when I build server again.
  4. Hi, I just compiled recent MaNGOS Zero server with Playerbots enabled. But when I run the server: _______________________________________________________ MaNGOS Server: World Initialization Complete _______________________________________________________ Server Version : 2118001 Database Version : Rel21.22.1 Supporting Clients : 1.12.x Builds : 5875 6005 6141 Module Status - Eluna : Enabled Warden : Enabled PlayerBots : Disabled ScriptDev3 (SD3) : Enabled Remote Access (RA) : Disabled _______________________________________________________ CMakeLists.txt #================================================================================== # Define available cmake options below option(BUILD_MANGOSD "Build the main server" ON) option(BUILD_REALMD "Build the login server" ON) option(BUILD_TOOLS "Build the map/vmap/mmap extractors" ON) option(USE_STORMLIB "Use StormLib for reading MPQs" OFF) option(SCRIPT_LIB_ELUNA "Compile with support for Eluna scripts" ON) option(SCRIPT_LIB_SD3 "Compile with support for ScriptDev3 scripts" ON) option(PLAYERBOTS "Enable Player Bots" ON) option(SOAP "Enable remote access via SOAP" OFF) option(PCH "Enable precompiled headers" ON) option(DEBUG "Enable debug build (only on non IDEs)" OFF) #================================================================================== cat mangos/etc/aiplayerbot.conf ########################################## # MANGOS Ai Playerbot Configuration file # ########################################## [AiPlayerbotConf] ConfVersion=2010102201 # Enable or disable AI Playerbot AiPlayerbot.Enabled = 1
  5. Hi, I just wonder is there any way to make playerbots act as real player? I mean bot can: - exp as normal player - when is invited to party, buffs me without any commands to bot If yes, could anyone explaing how to configure it properly?
  6. Well you should replace mysql with mariadb-server ;) While installing DB will not work with script, you can do it with manual import.
  7. I've added link to video of the installation process.
  8. @razz2u2 First of all in default configuration LXD is set up with lxdbr interface. Also you cant access your container from network even from LAN. If you want to access to your container from LAN you have to assign another profile to your container or change default one. New profile must be set up with network bridge or using macvlan (L2 layer) - both methods are good. In other words, by default your container is in 10.x.x.x subnet, if you want to assign subnet from your router DHCP i.e. 192.168.x.x, you MUST change or add bridge or macvlan profile. Then your container will have IP in 192.168.x.x subnet instead 10.x.x.x (lxdbr). Here how it should look: $~: lxc list +----------+---------+-----------------------+ | NAME | STATE | IPV4 | +----------+---------+-----------------------+ | mangos0 | RUNNING | 192.168.x.x (eth1) | +----------+---------+-----------------------+ | test1 | RUNNING | 10.x.x.x (eth0) | +----------+---------+-----------------------+ | test2 | RUNNING | 10.x.x.x (eth0) | +----------+---------+-----------------------+ $~: lxc info mangos0 Name: mangos0 Remote: unix:// Architecture: x86_64 Created: 2019/10/30 17:48 UTC Status: Running Type: persistent Profiles: macvlan $~: lxc profile show macvlan config: {} description: macvlan profile devices: eth0: name: eth1 nictype: macvlan parent: enp2s0 type: nic root: path: / pool: default type: disk name: macvlan used_by: - /1.0/containers/mangos0 Configuration such as this needs intermediate knowledge about LXD and network, so I do not recommend it for newbies.
  9. What do you mean? Edit: Yes, server installation you do inside the container.
  10. Why you anserw default question in opossit way? Would you like to use LXD clustering? (yes/no) [default=no]: You should anserw NO or hit enter to accept DEFAULT=no anserw...
  11. LXD installation is very simple, believe me Better to use LXD, why? because you do not mess at your host system. But ofcourse you can use this guide to setup on your Ubuntu host.
  12. With LXD you can easy take snapshots and move your server to another physical machine. Guide is fully tested on MaNGOS Zero with bots module enabled. Check the video with installation process: https://asciinema.org/a/299001 If you do not want to use LXD, simple pass LXD instruction and go further. Let's start LXD installation & configuration: sudo apt install lxd && reboot Reboot is needed for reloading groups that will be assigned to your account. sudo lxd init with above command anserw defaults to all questions. Create container for our server: lxc launch ubuntu:bionic mangos-zero check if your container is running: lxc list +-------------+---------+-----------------------+-----------------------------------------------+------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +-------------+---------+-----------------------+-----------------------------------------------+------------+-----------+ | mangos-zero | RUNNING | *.*.*.* (eth1) | | PERSISTENT | 3 | +-------------+---------+-----------------------+-----------------------------------------------+------------+-----------+ now we will connect to our container: lxc exec mangos-zero bash Please verify that you are on your contierner, you should have promt like this root@mangos-zero:~# if not you must try again with previous command providing your container name. MaNGOS server installation Install necessary packages: apt install git make cmake libssl-dev libbz2-dev build-essential default-libmysqlclient-dev libace-6.4.5 libace-dev mysql-server We need also install additional mysql package. I've attached file in this post so you don't need to search it. Download this file and send to your container. Open another terminal window and type: lxc file push /DOWNLOADED_DIRECTORY/mysql-apt-config_0.8.14-1_all.deb mangos-zero/root/ Go back to first terminal where you are logged to your container and type: dpkg -i /root/mysql-apt-config_0.8.14-1_all.deb on installation window check mysql 5.7 is selected and hit Enter, when window will close type: apt update && apt full-upgrade -y When all packages are installed, secure your mysql installation. Please type and anserw to few questions to secure your mysql server. mysql_secure_installation Create new username and password to access our mysql server: mysql GRANT ALL ON *.* to 'mangos'@'localhost' IDENTIFIED BY 'set_database_password'; Getting MaNGOS source code, compile and configuration. We will create new folder for sources: mkdir /opt/mangos && cd /opt/mangos Now we will download server and database sources to created folder. MaNGOS zero source (if you want different mangos version please change mangoszero to different repo name): git clone https://github.com/mangoszero/server.git --recursive --depth 1 Database files: git clone https://github.com/mangoszero/database.git --recursive --depth 1 Compiling MaNGOS (if your CPU have less than 4cores change -j4 to -j2 for two core CPU): cd server && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/bin/mangos && make -j4 && make install above command will create build folder, compile and install compiled server. Database installation: cd /opt/mangos/database && chmod -R +x *.sh && ./InstallDatabases.sh above command will fix script permissions and install your database. GameData files extraction: This can me done inside or outside the container, choice is yours how you do it. Remember that extraction take some time, so go take a cup of tea/coffe and cookie and wait. (ETA 1-2h) We need proper files for exctraction, go to your mangos installation and copy those files to yor game client: cd /usr/local/bin/mangos/bin/ && chmod -R +x *.sh && cp -av tools/* ExtractResources.sh MoveMapGen.sh mmap_excluded.txt offmesh.txt /GAME_CLIENT_DESTINATION now go to your game client and run: ./ExtractResources.sh Server configuration: First we have to fix path to MaNGOS configruation. We can do this in config files or simply creating a symlink. In this tutorial we will create symlink to keep defaults. cd /usr/local/bin/mangos/ && ln -s ../etc Now we have to copy config files: cd etc/ && cp -av mangosd.conf.dist mangosd.conf && cp -av realmd.conf.dist realmd.conf In realmd.conf find "LoginDatabaseInfo" and change database username and password to credentials we created before. In mangosd.conf find "LoginDatabaseInfo", "WorldDatabaseInfo", "CharacterDatabaseInfo" and change database username and password to credentials we created before. Systemd configuration: Create systemd configuration to autostart your realmd and mangosd. In LXD I recommend to run mangosd in screen, we prepare such a configuration in this tutorial. Realmd service: cat > /etc/systemd/system/realmd.service <<EOF [Unit] Description=MangosZ server After=network.target mysql.service [Service] Type=simple User=root ExecStart=/usr/local/bin/mangos/bin/realmd -c /usr/local/bin/mangos/etc/realmd.conf WorkingDirectory=/usr/local/bin/mangos/bin/ Restart=on-abort [Install] WantedBy=multi-user.target EOF Mangosd service: cat > /etc/systemd/system/mangosd.service <<EOF [Unit] Description=MangosZ server After=network.target mysql.service [Service] Type=simple User=root #ExecStart=/usr/local/bin/mangos/bin/mangosd -c /usr/local/bin/mangos/etc/mangosd.conf ExecStart=/usr/bin/screen -mdS mangosd /usr/local/bin/mangos/bin/mangosd -c /usr/local/bin/mangos/etc/mangosd.conf WorkingDirectory=/usr/local/bin/mangos/bin/ PIDFile=/usr/local/bin/mangos/etc/mzero.pid RemainAfterExit=true Restart=on-abort [Install] WantedBy=multi-user.target EOF Reload systemd with: systemctl daemon-reload Enable services for autostart: systemctl enable realmd systemctl enable mangosd Start services: systemctl start realmd systemctl start mangosd Checking status of running services: systemctl status realmd systemctl status mangosd If you want to attach to mangosd console, simply type: screen -r mangosd to detach mangosd screen press keyboard combination: CTRL+A+D Update IP address in database, so you can connect to your server: mysql realmd -h localhost -u mangos -p check your values in realmlist table select address,localAddress from realmlist; +---------------+---------------+ | address | localAddress | +---------------+---------------+ | 192.168.1.180 | 192.168.1.180 | +---------------+---------------+ then update address and localAddress values with two query (replace IP_ADDRESS with yours) update realmlist set address='IP_ADDRESS'; update realmlist set localAddress='IP_ADDRESS'; Last thing is to restart both services and try to connect. At the end I wan't to share with you LXD container image, I made this tutorial based on it. Container do not include GameData so you have to extract it by yourself. MaNGOS-Zero LXD container based on Ubuntu 18.04 How to use it? Download the file and type in terminal (you must have LXD) lxc image import mangoszero-serv.tar.gz --alias mangosz-img lxc launch mangosz-img mangos-zero mysql-apt-config_0.8.16-1_all.deb
×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use