mavzermete 1
mavzermete
darkbey42 1
darkbey42
xranzei 1
xranzei
Bvural41 1
Bvural41
PrimeAC 1
PrimeAC
Payidar2 1
Payidar2
Fethi Polat 1
Fethi Polat
Wizard' 1
Wizard'
shrpnl 1
shrpnl
Queinn 1
Queinn
NovaLst 1
NovaLst
InfernoShade 1
InfernoShade
Hikaye Ekle

[Python] Sohbet Satırından PM Gönderme (Hızlı PM)

  • Konuyu başlatan Konuyu başlatan Silverhand
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 11
  • Görüntüleme Görüntüleme 908

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Merhaba,

Sistem sohbet üzerinden /msg <oyuncu adı> <mesaj> şeklinde oyuncuya özel mesaj gönderebilmenizi sağlar.
Her şeyin kısa bir yolu olsun kafasında ilerleyen sistem ekle çıkarcılar için kullanışlı bir sistem olabilir.

Ne gerek vardı? Hiç de yoktu aslında...

root/uichat.py içerisinde arat :

Kod:
    def __SendChatPacket(self, text, type):

Ekle

Kod:
        if len(text) >= 5 and text[0:4] == "/msg":
            args = text[5:].split(" ", 1)
            if len(args) != 2:
                chat.AppendChat(1, "usage: /msg <player> <message>")
                return
            target = args[0].strip()
            message = args[1].strip()
            if target != "" and message != "":
                net.SendWhisperPacket(target, message)
            else:
                chat.AppendChat(1, "usage: /msg <player> <message>")
            return
 
Son düzenleme:
Merhaba,

Sistem sohbet üzerinden /msg <oyuncu adı> <mesaj> şeklinde oyuncuya özel mesaj gönderebilmenizi sağlar.
Her şeyin kısa bir yolu olsun kafasında ilerleyen sistem ekle çıkarcılar için kullanışlı bir sistem olabilir.

Ne gerek vardı? Hiç de yoktu aslında...

root/uichat.py içerisinde arat :

Kod:
    def __SendChatPacket(self, text, type):

Ekle

Kod:
        if len(text) >= 5 and text[0:4] == "/msg":
            args = text[5:].split(" ")
            if len(args) != 3:
                chat.AppendChat(1, "usage: /msg <player> <message>")
                return
            target = args[0].strip()
            message = " ".join(args[1:]).strip()
            if target != "" and message != "":
                net.SendWhisperPacket(target, message)
            else:
                chat.AppendChat(1, "usage: /msg <player> <message>")
            return
ekledim çalışmadı dostum kontrol et istersen
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst