Ping Sistemi Güncel [PY]

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 90

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Ping Sistemi Arkadaşlar Resimdeki Gibidir.
Root.epk-Root.eix Packlarınızı Herhangi Bir Pack Açıcı Programı ile Açmalısınız.
mPX3m4.jpg

Game.py Açılır
Kod:
import time import re import urllib import thread
testAlignment = 0
arat altına kodu yapıştır
Kod:
kalite = "" pingg = None sayi = None bugungiren = None def koray(): global pingg, sayi, bugungiren while 1 == 1: pingg = int(re.findall("[0-9][0-9]", str(os.popen("%WINDIR%/system32/ping -n 1 google.com").readlines()[-1]))[0]) sayi = urllib.urlopen("http://local.domain/xxx/index.php").read() bugungiren = urllib.urlopen("http://local.domain/xxx/durum.php").read() time.sleep(5) thread.start_new_thread(koray, ())
def __init__(self, stream): Aratılır
en altınada bu kodları yapştır
Kod:
self.playerGauge = uiPlayerGauge.PlayerGauge(self) self.playerGauge.Hide()]
Bu Komutun altınada
Kod:
## PING-FPS self.koray_board = ui.BoardWithTitleBar() self.koray_board.SetPosition(wndMgr.GetScreenWidth() - 350, 0) self.koray_board.SetSize(200, 145) self.koray_board.AddFlag('movable') self.koray_board.AddFlag("float") self.koray_board.Show() self.PrintFps = ui.TextLine() self.PrintFps.SetDefaultFontName() self.PrintFps.SetParent(self.koray_board) self.PrintFps.SetPosition(75, 33) self.PrintFps.Show() self.PrintOyuncu = ui.TextLine() self.PrintOyuncu.SetDefaultFontName() self.PrintOyuncu.SetParent(self.koray_board) self.PrintOyuncu.SetPosition(55, 50) self.PrintOyuncu.Show() self.PrintBugun = ui.TextLine() self.PrintBugun.SetDefaultFontName() self.PrintBugun.SetParent(self.koray_board) self.PrintBugun.SetPosition(30, 70) self.PrintBugun.Show() self.PrintPing = ui.TextLine() self.PrintPing.SetDefaultFontName() self.PrintPing.SetParent(self.koray_board) self.PrintPing.SetPosition(27, 90) self.PrintPing.Show() self.PrintSaat = ui.TextLine() self.PrintSaat.SetDefaultFontName() self.PrintSaat.SetParent(self.koray_board) self.PrintSaat.SetPosition(20, 110) self.PrintSaat.Show() ## PING-FPS //
En Alda Bu Kod Bulunmaktadır.
Kod:
def __del__(self):
Bilgi Olsun Diye Bunun Bi Gereği yok
def OnUpdate(self):
arat içine
app.UpdateGame() Arat ve alt kısma
Kod:
if self.isShowGameInfo: self.UpdateGameInfo()
Ekle
def UpdateGameInfo(self): Arat ve Alt Kısmına Bu Komutun içine Değil
Kod:
def UpdateGameInfo(self): global pingg, sayi, bugungiren nUpdateFPS = app.GetUpdateFPS() fbs = "FPS: %3d" % (nUpdateFPS) gun = time.strftime("%d") ay = time.strftime("%B") yil = time.strftime("%Y") aylar = {"January": "Ocak", "Feburary": "Subat", "March": "Mart", "April": "Nisan", "May": "Mayis", "Jun": "Haziran", "July": "Temmuz", "August ": "Agustos", "September": "Eylul", "October": "Ekim", "November ": "Kasim", "December": "Aralik" } ayyeni = aylar[ay] saat = "Saat: " + time.strftime("%H.%M.%S") + " Tarih: " + gun + "." + ayyeni + "." + yil aktif = str(sayi) + " oyuncu aktif" bugunkac = "Bugun: " + str(bugungiren) + " kisi oyuna girdi" if pingg <= 30 and pingg > 0:  kalite = "Mukemmel" elif pingg <= 60 and pingg > 30:  kalite = "Orta" elif pingg <= 100 and pingg > 60: kalite = "Kotu" elif pingg >= 100: kalite = "Cok Kotu" else: kalite = "Bilinmiyor" self.PrintFps.SetText(fbs) self.PrintSaat.SetText(saat) self.PrintOyuncu.SetText(aktif) self.PrintBugun.SetText(bugunkac) self.PrintPing.SetText("Ping: " + str(pingg) + " Baglanti Kalitesi: " + kalite)
ekleyin.
def Open(self):
aratılır
Kod:
self.ShowNameFlag = FALSE
Aratılır
Kod:
self.isShowGameInfo = TRUE
Altına Eklenir.
Kod:
Pinng.py
Adında Boş Belge Oluşturulur Root içine Atılır.
Kod:
import re, os kalite = "" pingg = None pingg = int(re.findall("[0-9][0-9]", str(os.popen("%WINDIR%/system32/ping -n 1 google.com").readlines()[-1]))[0]) while kalite != kalite: if pingg > 30:  kalite = "Mukemmel" if pingg > 70: kalite = "Orta"  if pingg > 110: kalite = "Kotu" else: kalite = "Berbat" if kalite == "": kalite = "None" while pingg - pingg > 10 or pingg - pingg < 10: pingg = pingg
Son Olarak
Durum.php Adında Belge Olurulup açılır
Kod:
<?php require_once("./Panher/config.php"); $exe = @mysql_query("SELECT COUNT(*) as count FROM account.account WHERE last_play LIKE '%".date("Y-m-d")."%' "); $player_online = @mysql_fetch_object($exe)->count; echo $player_online * 1; ?>
Index.php Adında Belge Oluştur aç
Kod:
<?php require_once("./Panher/config.php"); mysql_select_db("player"); $exe = mysql_query("SELECT COUNT(*) as count FROM player WHERE DATE_SUB(NOW(), INTERVAL 10 MINUTE) < last_play;"); $player_online = mysql_fetch_object($exe)->count; echo "$player_online" ?>
Panher Adında Klasör Oluştur Aç içine config.php Boş metin Oluştur Aç
Kod:
<?php $conn=mysql_connect ("ServerIP", "root", MysqlŞifre"); ?>

Ping Sistemi Güncel [PY] - Metin2 Lobby

Giriş
Metin2 özel sunucularında performans ve kullanıcı deneyimi açısından kritik öneme sahip olan ping sistemi, oyuncuların gecikme değerlerini ölçerek daha adil ve dengeli bir PvP ortamı oluşturmayı hedefler. Bu sistem özellikle C++ ve Python tabanlı sunucu yapılarında sıkça entegre edilmektedir. Bu yazıda güncel PY tabanlı ping sisteminin kurulumu, yapısı ve avantajları hakkında detaylı bilgi verilecektir.

Ping Nedir ve Neden Önemlidir?
Ping, oyuncunun bilgisayarının sunucuya gönderdiği veri paketlerinin ne kadar sürede geri döndüğünü gösteren değerdir. Düşük ping, daha hızlı ve sorunsuz oyun deneyimi anlamına gelir. Yüksek ping ise oyun içinde gecikmelere ve hatalı eylemlere yol açabilir. Özellikle Metin2 gibi gerçek zamanlı savaş oyunlarında ping farkı, bir savaşı kazandırabilir veya kaybettirebilir.

Python Tabanlı Ping Sisteminin Avantajları
Python dili, kolay okunabilirlik ve hızlı geliştirme imkanı sağladığı için Metin2 geliştiricileri tarafından sıklıkla tercih edilir. PY tabanlı ping sistemleri, sunucu tarafında düşük CPU tüketimiyle çalışırken, istemci tarafında da dinamik olarak ping değerlerini güncelleyebilir. Bu sayede geliştiriciler, ping bazlı savaş mekanizmaları oluşturabilir veya yüksek ping yapan oyuncuları otomatik olarak sınırlayabilirler.

Ping Sistemi Nasıl Çalışır?
Güncel PY ping sistemi, oyuncu giriş yaptığında belirli aralıklarla sunucuya ping sorgusu gönderir. Sunucu, bu sorguya yanıt vererek geçen süreyi hesaplar ve istemciye iletir. Bu değer, kullanıcı arayüzünde gösterilebilir veya PvP sistemlerinde karşılaştırma için kullanılabilir. Örneğin, bir oyuncunun ping değeri 200 ms'yi geçiyorsa PvP sırasında ona ceza verilebilir veya savaş yapması engellenebilir.

Kurulum ve Entegrasyon
PY ping sistemi genellikle 'root', 'uiscript' ve 'pack' dosyalarında değişiklikler gerektirir. Kurulum için öncelikle PY dosyası auth veya game sunucusuna entegre edilmelidir. Ardından, istemci tarafında bir UI penceresi açılarak ping değeri kullanıcıya gösterilmelidir. Bu süreçte MARTYSAMA gibi popüler Metin2 geliştirme araçları da yardımcı olabilir.

Ping Tabanlı PvP Sistemleri
Ping sistemi, sadece kullanıcı deneyimini değil aynı zamanda PvP adilini de artırır. Oyuncuların ping değerleri birbirine yakın olduğunda, saldırı ve savunma zamanlamaları daha doğru sonuçlar verir. Bu nedenle bazı Metin2 özel sunucuları, ping farkı fazla olan iki oyuncuyu aynı savaş ortamında eşleştirmemeyi tercih eder.

Sonuç
Günümüzde Metin2 özel sunucularında ping kontrolü, kullanıcı memnuniyetini artırmak ve oyun içi adaleti sağlamak adına hayati bir rol oynamaktadır. PY tabanlı ping sistemleri, bu süreci kolaylaştırarak hem geliştiriciler hem de oyuncular için daha verimli çözümler sunmaktadır. Sistem, doğru kurulduğunda hem PvP dengesini hem de sunucu performansını optimize edebilir.


Updated Ping System [PY] - Metin2 Lobby

Introduction
The ping system holds critical importance for performance and user experience in Metin2 private servers, measuring player latency to create a fairer and more balanced PvP environment. This system is frequently integrated into server structures based on C++ and Python. In this article, we will provide detailed information about the installation, structure, and advantages of the current PY-based ping system.

What Is Ping and Why Is It Important?
Ping represents the time it takes for data packets sent from a player's computer to return from the server. Low ping means faster and smoother gameplay, while high ping can cause delays and errors during the game. In real-time combat games like Metin2, ping differences can determine victory or defeat in battles.

Advantages of Python-Based Ping Systems
Due to its readability and fast development capabilities, the Python language is frequently preferred by Metin2 developers. PY-based ping systems operate with low CPU usage on the server side while dynamically updating ping values on the client side. This allows developers to implement ping-based combat mechanisms or automatically restrict players with high ping values.

How Does the Ping System Work?
The updated PY ping system sends periodic ping requests to the server upon player login. The server calculates the elapsed time and sends it back to the client. This value can be displayed in the user interface or used for comparisons within PvP systems. For example, if a player’s ping exceeds 200ms, penalties may apply or their ability to engage in combat may be restricted.

Installation and Integration
PY ping systems typically require modifications to 'root', 'uiscript', and 'pack' files. Installation starts with integrating the PY file into the auth or game server. Then, a UI window should be opened on the client side to display the ping value to the user. Tools like MARTYSAMA can also assist during this process.

Ping-Based PvP Systems
Ping systems enhance not only user experience but also PvP fairness. When players have similar ping values, attack and defense timings yield more accurate results. Therefore, some Metin2 private servers avoid matching players with large ping differences in the same combat environment.

Conclusion
In today’s Metin2 private servers, ping control plays a vital role in increasing user satisfaction and ensuring in-game fairness. PY-based ping systems simplify this process, providing efficient solutions for both developers and players. When properly installed, the system can optimize both PvP balance and server performance.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt