Active Member ReFresh 2340 Posted December 18, 2015 Active Member Share Posted December 18, 2015 Does anyone know how I have to modify the code to look like picture? Spoiler def SendWhisper(self): import time text = self.chatLine.GetText() textLength = len(text) if textLength > 0: if net.IsInsultIn(text): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING) return time = time.strftime("%H:%M") net.SendWhisperPacket(self.targetName, ": |cFFFFA500|h[Lv. " + str(player.GetStatus(player.LEVEL)) + "] " "|cffffff00|h[" + time + "]:|cffffffff|h " + text) self.chatLine.SetText("") chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() + ": |cFFFFA500|h[Lv. " + str(player.GetStatus(player.LEVEL)) + "] " "|cffffff00|h[" + time + "]|cffffffff|h: " + text) Thanks for your answers! Kind Regards ReFresh I'll be always helpful! Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted December 19, 2015 Author Active Member Share Posted December 19, 2015 #push I'll be always helpful! Link to comment Share on other sites More sharing options...
gancy94 0 Posted December 20, 2015 Share Posted December 20, 2015 Here is the python function, have fun Spoiler def SendWhisper(self): text = self.chatLine.GetText() textLength = len(text) if textLength > 0: if net.IsInsultIn(text): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING) return PcLevel = str(player.GetStatus(player.LEVEL)) Time = time.strftime("%H:%M") net.SendWhisperPacket(self.targetName, text) self.chatLine.SetText("") chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName,"[" + Time + "] " + player.GetName() + " (" + PcLevel + ") : " + text) Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted December 27, 2015 Author Active Member Share Posted December 27, 2015 @gancy94 Thank for your answer, but your code doesn't work. Sending whisper works good but recieving whisper doesn't work. I'll be always helpful! Link to comment Share on other sites More sharing options...
Frozen 189 Posted December 27, 2015 Share Posted December 27, 2015 Try this: Go to game.py and search for OnRecvWhisper add in the beggining: line = line[len(name)+3:] Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted December 28, 2015 Author Active Member Share Posted December 28, 2015 20 hours ago, Frozen said: Try this: Go to game.py and search for OnRecvWhisper add in the beggining: line = line[len(name)+3:] Thank you for your answer, but still doesn't work. I'll be always helpful! Link to comment Share on other sites More sharing options...
Frozen 189 Posted December 28, 2015 Share Posted December 28, 2015 7 hours ago, ReFresh said: Thank you for your answer, but still doesn't work. show print pls Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted December 28, 2015 Author Active Member Share Posted December 28, 2015 #SOLVED I'll be always helpful! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now