[Turkish-Made(2)]Mini Python Script

03/18/2012 00:26 kralcocuk#1
Hi,

How to:
Open root.epk&eix, uichat.py:

Search:
Code:
__SendTalkingChatPacket(self, text):
change:
Code:
	def __SendTalkingChatPacket(self, text):
		if str(text)[0] == "@":
			chat.CreateWhisper(text[1:])
			chat.SetWhisperBoxSize(text[1:], self.GetWidth() - 60, self.GetHeight() - 90)
			net.SendWhisperPacket(text[1:], "Hello.")
			self.__ResetChat()
		else:
			self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING)
			self.__ResetChat()

Use: "@Nick"
Do need to explain? ;)
:)
03/18/2012 00:37 .Hiяo#2
if i Understood It Right you can Write a Provate Message to Somebody with the Ordner @Charaktername am i Right?

If thats so its a very nice HowTo^^
03/18/2012 00:42 kralcocuk#3
Quote:
Originally Posted by Hirogami View Post
if i Understood It Right you can Write a Provate Message to Somebody with the Ordner @Charaktername am i Right?

If thats so its a very nice HowTo^^

true. :)
03/18/2012 01:20 StayOut#4
Nice thx given
03/18/2012 02:29 xCPx#5
a little improve by me:
Code:
	def __SendTalkingChatPacket(self, text):
		if str(text)[0] == "@":
			sp = str(text).split(" ")
			kral = player.GetName()
			msgstring = ""
			chat.CreateWhisper(sp[0].replace("@", ""))
			chat.SetWhisperBoxSize(sp[0].replace("@", ""), self.GetWidth() - 60, self.GetHeight() - 90)				
			net.SendWhisperPacket(sp[0].replace("@", ""), str(text).replace(sp[0], ""))
			self.__ResetChat()
		else:
			self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING)
			self.__ResetChat()
what it does?
if you write for example:
@Micha i love you
then you automatically send an PN to Micha in which you say i love you
03/18/2012 09:30 kralcocuk#6
Quote:
Originally Posted by xCPx View Post
a little improve by me:
Code:
	def __SendTalkingChatPacket(self, text):
		if str(text)[0] == "@":
			sp = str(text).split(" ")
			kral = player.GetName()
			msgstring = ""
			chat.CreateWhisper(sp[0].replace("@", ""))
			chat.SetWhisperBoxSize(sp[0].replace("@", ""), self.GetWidth() - 60, self.GetHeight() - 90)				
			net.SendWhisperPacket(sp[0].replace("@", ""), str(text).replace(sp[0], ""))
			self.__ResetChat()
		else:
			self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING)
			self.__ResetChat()
what it does?
if you write for example:
@Micha i love you
then you automatically send an PN to Micha in which you say i love you
Is there a need for that?
:)
03/18/2012 12:59 Laben#7
haha "Mini Python Script" says bidet

afraid rookie :)
03/18/2012 14:34 latoscuro#8
Why don't you create a new button ?

for example : '%' CHAT_GUILD , '#' CHAT_PARTY ....

'@' CHAT_WISHPER
03/18/2012 16:24 xCPx#9
Quote:
Originally Posted by kralcocuk View Post
Is there a need for that?
:)
i like that style ^^
03/18/2012 19:03 netronmt2#10
Thank You

Teşekkürler
03/18/2012 21:32 TorKS#11
Both don't run for me :X
03/22/2012 21:02 akalod#12
PHP Code:
    def __SendTalkingChatPacket(selftext):
        if 
str(text)[0] == "@":
            
icerik=text[1:].split(";")
            
chat.CreateWhisper(icerik[0])
            
chat.SetWhisperBoxSize(icerik[0], self.GetWidth() - 60self.GetHeight() - 90)
            
net.SendWhisperPacket(icerik[0], icerik[1])
            
self.__ResetChat()
        else:
            
self.__SendChatPacket(textchat.CHAT_TYPE_TALKING)
            
self.__ResetChat() 
Güzel düşünmüşsün (: şu şekilde bir düzenleme yaptım
@nick;istediğin herhangi bir yazı ((:

english; good idea (: i modificated this..
"@nick; any think to saying..." ((: ";" is parser ;)

cya
03/22/2012 21:26 .Rebel#13
Quote:
Originally Posted by xCPx View Post
a little improve by me:
Code:
	def __SendTalkingChatPacket(self, text):
		if str(text)[0] == "@":
			sp = str(text).split(" ")
			kral = player.GetName()
			msgstring = ""
			chat.CreateWhisper(sp[0].replace("@", ""))
			chat.SetWhisperBoxSize(sp[0].replace("@", ""), self.GetWidth() - 60, self.GetHeight() - 90)				
			net.SendWhisperPacket(sp[0].replace("@", ""), str(text).replace(sp[0], ""))
			self.__ResetChat()
		else:
			self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING)
			self.__ResetChat()
what it does?
if you write for example:
@Micha i love you
then you automatically send an PN to Micha in which you say i love you
yours are very nice but dont make refresh on the pm
03/23/2012 11:21 kralcocuk#14
Quote:
Originally Posted by akalod View Post
PHP Code:
    def __SendTalkingChatPacket(selftext):
        if 
str(text)[0] == "@":
            
icerik=text[1:].split(";")
            
chat.CreateWhisper(icerik[0])
            
chat.SetWhisperBoxSize(icerik[0], self.GetWidth() - 60self.GetHeight() - 90)
            
net.SendWhisperPacket(icerik[0], icerik[1])
            
self.__ResetChat()
        else:
            
self.__SendChatPacket(textchat.CHAT_TYPE_TALKING)
            
self.__ResetChat() 
Güzel düşünmüşsün (: şu şekilde bir düzenleme yaptım
@nick;istediğin herhangi bir yazı ((:

english; good idea (: i modificated this..
"@nick; any think to saying..." ((: ";" is parser ;)

cya
Bu şekilde çalışmaz, içerik[0:] yazarsan adama pm olarak "@nick + text" olarak atar yani adamın nickini de yazar. Ayrıca chat.CreateWhisper(icerik[0]) olarak yaparsan "@nick" yaptığında pm isim yerine de "@nick" olarak yazar. Yani pm gitmez ;) :)
03/23/2012 11:58 akalod#15
yanlışın var (:
dikkatli okumamışsın icerik zaten 0 karakter haricindekileri aldığından @ karakteri gelmez haliyle icerik0 = direk nick (: ve icerik1 ise ; tan sonra ne yazıldıysa tamamıyla text olarak gelir ve de çalışıyor (:

misal..