Strukturze plików serwerowych Wymaganiach technicznych Podstawach konfiguracji +…
- User
Strukturze plików serwerowych Wymaganiach technicznych Podstawach konfiguracji + przykład kodu z tych plikow
Assistant
Struktura plików serwerowych Metin2
Typowy serwer Metin2 składa się z następujących głównych komponentów:
Katalogi główne:
- game/ - pliki wykonywalne serwera gry
- db/ - serwer bazy danych gry
- auth/ - serwer autoryzacji
- share/ - współdzielone pliki konfiguracyjne
- locale/ - pliki językowe i questów
- log/ - logi serwerowe
Ważniejsze pliki konfiguracyjne:
CONFIG (w katalogu game/):
HOSTNAME: game1 CHANNEL: 1 PORT: 13000 P2P_PORT: 14000 DB_ADDR: 127.0.0.1 DB_PORT: 15000 MAP_ALLOW: 1 21 41 PLAYER_SQL: localhost metin2 password player COMMON_SQL: localhost metin2 password common LOG_SQL: localhost metin2 password logitem_proto.txt (fragment):
1 돌칼 ITEM_WEAPON WEAPON_SWORD 1 ANTI_MUSA | ANTI_ASSASSIN | ANTI_SURA ITEM_TUNABLE WEAR_WEAPON NONE 0 0 0 0 0 LEVEL 5 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 100 150 11 13 0 0 5 -1 -1 -1 -1 -1 -1mob_proto.txt (fragment):
101 늑대 WOLF 1 0 0 MELEE 120 AGGR,BERSERK 0 ANIMAL MELEE 1 175 150 11 51 100 100 80 10000 120 1 2000 150 1 1 13 15 15 90 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0Wymagania techniczne
System operacyjny:
- FreeBSD 9.x - 12.x (najczęściej używane)
- Alternatywnie: Linux z kompatybilnością BSD
Sprzęt minimalny:
- CPU: 2+ rdzenie, 2.0 GHz
- RAM: 4-8 GB (zależnie od liczby graczy)
- Dysk: 20+ GB (SSD zalecany)
- Łącze: 100 Mbps symetryczne minimum
Oprogramowanie:
- MySQL 5.6+ lub MariaDB
- Python 2.7 (dla questów)
- GCC/Clang (do kompilacji)
- Devil/IL (biblioteki graficzne)
Podstawy konfiguracji
Struktura bazy danych:
-- Przykład tabeli gracza CREATE TABLE `player` ( `id` int(11) NOT NULL AUTO_INCREMENT, `account_id` int(11) NOT NULL DEFAULT '0', `name` varchar(24) NOT NULL DEFAULT '', `job` tinyint(2) unsigned NOT NULL DEFAULT '0', `voice` tinyint(1) unsigned NOT NULL DEFAULT '0', `dir` tinyint(2) NOT NULL DEFAULT '0', `x` int(11) NOT NULL DEFAULT '0', `y` int(11) NOT NULL DEFAULT '0', `z` int(11) NOT NULL DEFAULT '0', `map_index` int(11) NOT NULL DEFAULT '0', `exit_x` int(11) NOT NULL DEFAULT '0', `exit_y` int(11) NOT NULL DEFAULT '0', `exit_map_index` int(11) NOT NULL DEFAULT '0', `hp` int(11) NOT NULL DEFAULT '0', `mp` int(11) NOT NULL DEFAULT '0', `stamina` smallint(6) NOT NULL DEFAULT '0', `random_hp` smallint(5) unsigned NOT NULL DEFAULT '0', `random_sp` smallint(5) unsigned NOT NULL DEFAULT '0', `playtime` int(11) NOT NULL DEFAULT '0', `level` tinyint(2) unsigned NOT NULL DEFAULT '1', `level_step` tinyint(1) NOT NULL DEFAULT '0', `st` smallint(3) NOT NULL DEFAULT '0', `ht` smallint(3) NOT NULL DEFAULT '0', `dx` smallint(3) NOT NULL DEFAULT '0', `iq` smallint(3) NOT NULL DEFAULT '0', `exp` int(11) NOT NULL DEFAULT '0', `gold` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;Przykład questa (Python):
quest welcome_quest begin state start begin when login begin say_title("Witaj w grze!") say("Miło Cię widzieć, "..pc.get_name().."!") say("Oto mały prezent na start:") pc.give_item2(27001, 10) -- 10 czerwonych mikstur pc.give_gold(10000) -- 10000 yang set_state(done) end end state done begin end endSkrypt startowy (start.sh):
#!/bin/sh echo "Starting Metin2 Server..." # Start database cd /usr/home/metin2/server/db ./db & sleep 2 # Start auth cd /usr/home/metin2/server/auth ./auth & sleep 2 # Start game channels cd /usr/home/metin2/server/game/channel1 ./game & sleep 1 cd /usr/home/metin2/server/game/channel2 ./game & sleep 1 echo "Server started successfully!"To podstawowa struktura i przykłady. Pamiętaj, że uruchamianie serwera wymaga legalnej licencji i zgody właściciela praw autorskich Metin2.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.