Ping Anzeige Ingame ?

03/29/2014 20:37 rollback#1
Könnte man eine Ping Anzeige (wie bei LoL) machen ? (ohne eine Sicherheitslücke auf zu machen)
03/30/2014 07:06 ebert.tonna#2
Ich glaube du solltest dich mal auf hochbegabt testen lassen.
Du hast echt tolle Ideen.
03/30/2014 07:48 H.A.Z.E#3
Quote:
Originally Posted by ebert.tonna View Post
Ich glaube du solltest dich mal auf hochbegabt testen lassen.
Du hast echt tolle Ideen.
Unterlass Spam wenn du nichts zu sagen hast.
Rein theoretisch ist es möglich aber Metin2 braucht so etwas einfach nicht, da der Internetverbrauch auch deutlich niedriger ist.
03/30/2014 10:13 MrTherzon#4
Ist eigentlich Möglich, vielleicht ich mal paar Freunde Fragen ob wir es nicht mal versuchen wollen.

MfG MrTherzon
03/30/2014 10:13 Poccix#5
Code:
import subprocess
# execute the code and pipe the result to a string
test = "ping xxx.xxx.xxx.xxx"
process = subprocess.Popen(test, shell=True, stdout=subprocess.PIPE)
# give it time to respond
process.wait()
# optional check (0 --> success)
print process.returncode  
# read the result to a string
result_str = process.stdout.read()
# test it ...
print result_str
Falls subprocess.py fehlt: [Only registered and activated users can see links. Click Here To Register...]

Versuch es mal so, ist aus einem Python Forum.
Habs nicht getestet, liege noch im Bett.
Gruß
03/30/2014 13:04 .Inya#6
Quote:
Originally Posted by Lord Poccix View Post
Code:
import subprocess
# execute the code and pipe the result to a string
test = "ping xxx.xxx.xxx.xxx"
process = subprocess.Popen(test, shell=True, stdout=subprocess.PIPE)
# give it time to respond
process.wait()
# optional check (0 --> success)
print process.returncode  
# read the result to a string
result_str = process.stdout.read()
# test it ...
print result_str
Falls subprocess.py fehlt: [Only registered and activated users can see links. Click Here To Register...]

Versuch es mal so, ist aus einem Python Forum.
Habs nicht getestet, liege noch im Bett.
Gruß
Soweit ich weiß würde process.wait() den Clienten kurz einfrieren lassen
03/30/2014 13:06 rollback#7
Quote:
Originally Posted by H.A.Z.E View Post
Unterlass Spam wenn du nichts zu sagen hast.
Rein theoretisch ist es möglich aber Metin2 braucht so etwas einfach nicht, da der Internetverbrauch auch deutlich niedriger ist.
Wieso unnötig? Erstmal würde der Spieler wissen ob es sich z.B. lohnt zu Switchen (weil bei hohem Ping z.B. bei Serverangriffen alles überswitcht wird) und ausserdem könnte man neben der Ping anzeige evtl. in den Ingame-Switchbot einbauen dass die Switchzeit immer Ping + 100ms beträgt.
Quote:
Originally Posted by Lord Poccix View Post
Code:
import subprocess
# execute the code and pipe the result to a string
test = "ping xxx.xxx.xxx.xxx"
process = subprocess.Popen(test, shell=True, stdout=subprocess.PIPE)
# give it time to respond
process.wait()
# optional check (0 --> success)
print process.returncode  
# read the result to a string
result_str = process.stdout.read()
# test it ...
print result_str
Falls subprocess.py fehlt: [Only registered and activated users can see links. Click Here To Register...]

Versuch es mal so, ist aus einem Python Forum.
Habs nicht getestet, liege noch im Bett.
Gruß
Danke werde es testen :)