Opublikowano 12 Marca 20241 r Szukam programu skryptu który robi podchanelle Lub jak zrobić nowy podkanał
Opublikowano 12 Marca 20241 r Spoiler skopiuj sobie channel przykładowo ch1, zmień nazwe np. na ch5. w pliku CONFIG zmieniasz: HOSTNAME: channel11 CHANNEL: 1 PORT: 13000 P2P_PORT: 14000 zamieniasz na : HOSTNAME: channel51 CHANNEL: 5 PORT: 13004 P2P_PORT: 14004 Dopisujesz do skryptu na start serwera nowy channel w cliencie: serverinfo.py CH_NAME5 = "Ch5" CH5_PORT = 13004 5:{"key":15,"name":CH_NAME5,"ip":SERVER_IP,"tcp_port":CH5_PORT,"udp_port":CH5_PORT,"state":STATE_NONE,}, To chyba będzie wszystko, jeżeli gdzieś popełniłem błąd to przepraszam robiłem na szybko. Wiadome przy wyłączonym serwerze i warto wyczyścić logi z kanałów bo po co przerzucać spam 😄 "poradnik" robiłem na sf i cliencie terenzo! Edytowane 13 Marca 20241 r przez ExoCarossa
Opublikowano 14 Marca 20241 r Autor Jeszcze skrypt do startowania o ile się nie myle? #!/bin/sh # -------------------------------------- # # Script to execute all required files # # for metin2 game server. # # -------------------------------------- # # Copyright (C) Ethoard (www.ethoard.tk) # # -------------------------------------- # echo -e "\033[32m" read -p "Ile channeli chcesz uruchomiæ? (1/4) : " rch if [ -z $rch ] || [ $rch -lt 1 ] || [ $rch -gt 4 ] ; then exit fi echo -e "\033[0m" ./clear.sh echo -e "\033[32m" SFROOT=$PWD echo -e "# ---------------------------------------------------------------------------- #" echo -e "# Uruchamianie db..." cd $SFROOT/db/ # ./db & sleep 2 ./db >> start.log 2>&1 & sleep 2 i1=1 while [ $i1 -le $rch ] do for i2 in 1 2 do echo -e "# Uruchamianie ch$i1$i2..." cd $SFROOT/chs/ch$i1$i2/ # ./ch$i1$i2 & sleep 1 ./ch$i1$i2 >> start.log 2>&1 & sleep 1 # env LD_PRELOAD=/usr/home/m2lib/gamelib.so ./ch$i1$i2 >> start.log 2>&1 & sleep 1 done i1=$(( $i1 + 1 )) done echo -e "# Uruchamianie ch99..." cd $SFROOT/chs/ch99/ # ./ch99 & sleep 1 ./ch99 >> start.log 2>&1 & sleep 1 # env LD_PRELOAD=/usr/home/m2lib/gamelib.so ./ch99 >> start.log 2>&1 & sleep 1 echo -e "# Uruchamianie auth..." cd $SFROOT/auth/ # ./auth & sleep 1 ./auth >> start.log 2>&1 & sleep 1 echo -e "# ---------------------------------------------------------------------------- #" echo -e "\033[0m" Zmieniłe intuicyjnie ale wysypało błędy nie mam pomysłu jak to odpowiednio z edytować
Opublikowano 14 Marca 20241 r Rozwiązanie #!/bin/sh # -------------------------------------- # # Script to create new configuration # # files and required symlinks for metin2 # # game server. # # -------------------------------------- # # Copyright (C) Ethoard (www.ethoard.tk) # # -------------------------------------- # SFROOT=$PWD ./clear.sh MAP_ALLOW01="1 21 41 3 23 43 4 24 44 5 25 45 108 109 215 216 217 218" MAP_ALLOW02="61 64 66 62 63 65 69 70 206 67 68 80 104 71 193 72 73 207" MAP_ALLOW99="26 81 113 212 103 105 110 111 114 118 119 120 121 122 123 124 125 126 127 128 181 182 183 190 191 192" MAX_LEVEL="105" TEST_SERVER="0" XTRAP_ENABLE="0" CHECK_MULTIHACK="0" DB_PORT="15000" DB_ADDR="localhost" TABLE_POSTFIX="" PASSES_PER_SEC="25" SAVE_EVENT_SECOND_CYCLE="180" PING_EVENT_SECOND_CYCLE="180" PLAYER_SQL="localhost mt2 mt2!@# player" COMMON_SQL="localhost mt2 mt2!@# common" LOG_SQL="localhost mt2 mt2!@# log" SERVER_KEY="fIFjs5S47kdhsMUxsgjSrisTfGRB79PN4qi/D4U6yCX1LYUqBDQOxleqtAxp+cFteti2gp6fnnQ9Td2QFUWjpSuwLX/XDfCTgkCwoxYzb0P20YgIraXKDrN5FHbKYUvOl0Y69NcHUpGo+xU+Tbs2O6AEJYLrqW0BW3ggL6JeVUM*" MALL_URL="localhost" ADMINPAGE_IP="localhost" ADMINPAGE_IP1="localhost" ADMINPAGE_IP2="localhost" ADMINPAGE_IP3="localhost" ADMINPAGE_PASSWORD="@)BV<gvfdzRK_)3b" VIEW_RANGE="20000" echo -e "\033[32m" echo -e "# ---------------------------------------------------------------------------- #" echo -e "# Tworzenie konfiguracji" echo -e "# ---------------------------------------------------------------------------- #" echo -e "# MAX_LEVEL: $MAX_LEVEL, TEST_SERVER: $TEST_SERVER" echo -e "# MAP_ALLOW01: $MAP_ALLOW01" echo -e "# MAP_ALLOW02: $MAP_ALLOW02" echo -e "# MAP_ALLOW99: $MAP_ALLOW99" echo -e "# ---------------------------------------------------------------------------- #" rm $SFROOT/auth/auth ln -s $SFROOT/share/game $SFROOT/auth/auth rm $SFROOT/auth/data ln -s $SFROOT/share/data $SFROOT/auth/data rm $SFROOT/auth/locale ln -s $SFROOT/share/locale $SFROOT/auth/locale rm $SFROOT/auth/package ln -s $SFROOT/share/package $SFROOT/auth/package rmdir $SFROOT/logs/auth mkdir $SFROOT/logs/auth rm $SFROOT/auth/log ln -s $SFROOT/logs/auth $SFROOT/auth/log rmdir $SFROOT/logs/db mkdir $SFROOT/logs/db rm $SFROOT/db/log ln -s $SFROOT/logs/db $SFROOT/db/log for ch in 1 2 3 4 do for podch in 1 2 do if [ $podch == 1 ]; then MAP_ALLOW=$MAP_ALLOW01 elif [ $podch == 2 ]; then MAP_ALLOW=$MAP_ALLOW02 fi CONFIG="$SFROOT/chs/ch$ch$podch/CONFIG" PORT=$((12999 + $ch + $podch * 50 - 50)) P2P_PORT=$((13999 + $ch + ($podch * 50) - 50)) echo -e "# ch$ch$podch: port = "$PORT", p2p_port = "$P2P_PORT echo "HOSTNAME: channel"$ch""$podch > "$CONFIG" echo "CHANNEL: $ch" >> "$CONFIG" echo "PORT: $PORT" >> "$CONFIG" echo "P2P_PORT: $P2P_PORT" >> "$CONFIG" echo "DB_PORT: $DB_PORT" >> "$CONFIG" echo "DB_ADDR: $DB_ADDR" >> "$CONFIG" echo "MAP_ALLOW: $MAP_ALLOW" >> "$CONFIG" echo "TABLE_POSTFIX: $TABLE_POSTFIX" >> "$CONFIG" echo "PASSES_PER_SEC: $PASSES_PER_SEC" >> "$CONFIG" echo "SAVE_EVENT_SECOND_CYCLE: $SAVE_EVENT_SECOND_CYCLE" >> "$CONFIG" echo "PING_EVENT_SECOND_CYCLE: $PING_EVENT_SECOND_CYCLE" >> "$CONFIG" echo "PLAYER_SQL: $PLAYER_SQL" >> "$CONFIG" echo "COMMON_SQL: $COMMON_SQL" >> "$CONFIG" echo "LOG_SQL: $LOG_SQL" >> "$CONFIG" echo "SERVER_KEY: $SERVER_KEY" >> "$CONFIG" echo "MALL_URL: $MALL_URL" >> "$CONFIG" echo "ADMINPAGE_IP: $ADMINPAGE_IP" >> "$CONFIG" echo "ADMINPAGE_IP1: $ADMINPAGE_IP1" >> "$CONFIG" echo "ADMINPAGE_IP2: $ADMINPAGE_IP2" >> "$CONFIG" echo "ADMINPAGE_IP3: $ADMINPAGE_IP3" >> "$CONFIG" echo "ADMINPAGE_PASSWORD: $ADMINPAGE_PASSWORD" >> "$CONFIG" echo "VIEW_RANGE: $VIEW_RANGE" >> "$CONFIG" echo "CHECK_MULTIHACK: $CHECK_MULTIHACK" >> "$CONFIG" echo "MAX_LEVEL: $MAX_LEVEL" >> "$CONFIG" echo "TEST_SERVER: $TEST_SERVER" >> "$CONFIG" echo "XTRAP_ENABLE: $XTRAP_ENABLE" >> "$CONFIG" rm $SFROOT/chs/ch$ch$podch/ch$ch$podch ln -s $SFROOT/share/game $SFROOT/chs/ch$ch$podch/ch$ch$podch rm $SFROOT/chs/ch$ch$podch/data ln -s $SFROOT/share/data $SFROOT/chs/ch$ch$podch/data rm $SFROOT/chs/ch$ch$podch/locale ln -s $SFROOT/share/locale $SFROOT/chs/ch$ch$podch/locale rm $SFROOT/chs/ch$ch$podch/package ln -s $SFROOT/share/package $SFROOT/chs/ch$ch$podch/package rm $SFROOT/chs/ch$ch$podch/CMD ln -s $SFROOT/share/CMD $SFROOT/chs/ch$ch$podch/CMD rmdir $SFROOT/logs/ch$ch$podch mkdir $SFROOT/logs/ch$ch$podch rm $SFROOT/chs/ch$ch$podch/log ln -s $SFROOT/logs/ch$ch$podch $SFROOT/chs/ch$ch$podch/log done done PORT=$((13099)) P2P_PORT=$((14099)) echo -e "# ch99: port = $PORT, p2p_port = $P2P_PORT" CONFIG="$SFROOT/chs/ch99/CONFIG" echo "HOSTNAME: channel99" > "$CONFIG" echo "CHANNEL: 99" >> "$CONFIG" echo "PORT: $PORT" >> "$CONFIG" echo "P2P_PORT: $P2P_PORT" >> "$CONFIG" echo "DB_PORT: $DB_PORT" >> "$CONFIG" echo "DB_ADDR: $DB_ADDR" >> "$CONFIG" echo "MAP_ALLOW: $MAP_ALLOW99" >> "$CONFIG" echo "TABLE_POSTFIX: $TABLE_POSTFIX" >> "$CONFIG" echo "PASSES_PER_SEC: $PASSES_PER_SEC" >> "$CONFIG" echo "SAVE_EVENT_SECOND_CYCLE: $SAVE_EVENT_SECOND_CYCLE" >> "$CONFIG" echo "PING_EVENT_SECOND_CYCLE: $PING_EVENT_SECOND_CYCLE" >> "$CONFIG" echo "PLAYER_SQL: $PLAYER_SQL" >> "$CONFIG" echo "COMMON_SQL: $COMMON_SQL" >> "$CONFIG" echo "LOG_SQL: $LOG_SQL" >> "$CONFIG" echo "SERVER_KEY: $SERVER_KEY" >> "$CONFIG" echo "MALL_URL: $MALL_URL" >> "$CONFIG" echo "ADMINPAGE_IP: $ADMINPAGE_IP" >> "$CONFIG" echo "ADMINPAGE_IP1: $ADMINPAGE_IP1" >> "$CONFIG" echo "ADMINPAGE_IP2: $ADMINPAGE_IP2" >> "$CONFIG" echo "ADMINPAGE_IP3: $ADMINPAGE_IP3" >> "$CONFIG" echo "ADMINPAGE_PASSWORD: $ADMINPAGE_PASSWORD" >> "$CONFIG" echo "VIEW_RANGE: $VIEW_RANGE" >> "$CONFIG" echo "CHECK_MULTIHACK: $CHECK_MULTIHACK" >> "$CONFIG" echo "MAX_LEVEL: $MAX_LEVEL" >> "$CONFIG" echo "TEST_SERVER: $TEST_SERVER" >> "$CONFIG" echo "XTRAP_ENABLE: $XTRAP_ENABLE" >> "$CONFIG" rm $SFROOT/chs/ch99/ch99 ln -s $SFROOT/share/game $SFROOT/chs/ch99/ch99 rm $SFROOT/chs/ch99/data ln -s $SFROOT/share/data $SFROOT/chs/ch99/data rm $SFROOT/chs/ch99/locale ln -s $SFROOT/share/locale $SFROOT/chs/ch99/locale rm $SFROOT/chs/ch99/package ln -s $SFROOT/share/package $SFROOT/chs/ch99/package rm $SFROOT/chs/ch99/CMD ln -s $SFROOT/share/CMD $SFROOT/chs/ch99/CMD rmdir $SFROOT/logs/ch99 mkdir $SFROOT/logs/ch99 rm $SFROOT/chs/ch99/log ln -s $SFROOT/logs/ch99 $SFROOT/chs/ch99/log echo -e "# ---------------------------------------------------------------------------- #" echo -e "\033[0m"
Opublikowano 14 Marca 20241 r Autor Ręce opadają dodałem podch 13 działa normalnie analogicznie dodałem ch23 i przy zamykaniu wywala jakiś kill ocb?
Szukam programu skryptu który robi podchanelle
Lub jak zrobić nowy podkanał