Error en mp

Topic created · 7 Mensajes · 597 Visitas
  • Hola a todos!

    Bueno, ultimamente no he tenido tiempo de pasarme por aqui (examenes y otros compromisos). Pero a partir de ahora me pasare mas a menudo para intentar resolver las dudas que pueda, y aportar varias cosas.

    Bueno, venia a comentaros si alguien sabe a que se debe este error:

    Si sabeis como solucionarlo os agradeceria que me ayudarais!

    Un saludo y gracias de antemano :wiii:

  • Edito: Antes de nada guardate el original!!

    Intenta probar cambiando el uiwhisper.py del root.

    Te dejo aqui el de mi cliente. Es para los files 2010, al menos es el instant que yo uso:

    import ui
    import net
    import chat
    import player
    import app
    import locale
    import ime
    
    class WhisperButton(ui.Button):
    	def __init__(self):
    		ui.Button.__init__(self, "TOP_MOST")
    	def __del__(self):
    		ui.Button.__del__(self)
    	def SetToolTipText(self, text, x=0, y = 32):
    		ui.Button.SetToolTipText(self, text, x, y)
    		self.ToolTipText.Show()
    
    	def ShowToolTip(self):
    		if 0 != self.ToolTipText:
    			self.ToolTipText.Show()
    	def HideToolTip(self):
    		if 0 != self.ToolTipText:
    			self.ToolTipText.Show()
    
    class WhisperDialog(ui.ScriptWindow):
    
    	class TextRenderer(ui.Window):
    		def SetTargetName(self, targetName):
    			self.targetName = targetName
    
    		def OnRender(self):
    			(x, y) = self.GetGlobalPosition()
    			chat.RenderWhisper(self.targetName, x, y)
    
    	class ResizeButton(ui.DragButton):
    
    		def __init__(self):
    			ui.DragButton.__init__(self)
    
    		def __del__(self):
    			ui.DragButton.__del__(self)
    
    		def OnMouseOverIn(self):
    			app.SetCursor(app.HVSIZE)
    
    		def OnMouseOverOut(self):
    			app.SetCursor(app.NORMAL)
    
    	def __init__(self, eventMinimize, eventClose):
    		print "NEW WHISPER DIALOG  ----------------------------------------------------------------------------"
    		ui.ScriptWindow.__init__(self)
    		self.targetName = ""
    		self.eventMinimize = eventMinimize
    		self.eventClose = eventClose
    		self.eventAcceptTarget = None
    	def __del__(self):
    		print "---------------------------------------------------------------------------- DELETE WHISPER DIALOG"
    		ui.ScriptWindow.__del__(self)		
    
    	def LoadDialog(self):
    		try:
    			pyScrLoader = ui.PythonScriptLoader()
    			pyScrLoader.LoadScriptFile(self, "UIScript/WhisperDialog.py")
    		except:
    			import exception
    			exception.Abort("WhisperDialog.LoadDialog.LoadScript")
    
    		try:
    			GetObject=self.GetChild
    			self.titleName = GetObject("titlename")
    			self.titleNameEdit = GetObject("titlename_edit")
    			self.closeButton = GetObject("closebutton")
    			self.scrollBar = GetObject("scrollbar")
    			self.chatLine = GetObject("chatline")
    			self.minimizeButton = GetObject("minimizebutton")
    			self.ignoreButton = GetObject("ignorebutton")
    			self.acceptButton = GetObject("acceptbutton")
    			self.sendButton = GetObject("sendbutton")
    			self.board = GetObject("board")
    			self.editBar = GetObject("editbar")
    		except:
    			import exception
    			exception.Abort("DialogWindow.LoadDialog.BindObject")
    
    		self.titleName.SetText("")
    		self.titleNameEdit.SetText("")
    		self.minimizeButton.SetEvent(ui.__mem_func__(self.Minimize))
    		self.closeButton.SetEvent(ui.__mem_func__(self.Close))
    		self.scrollBar.SetPos(1.0)
    		self.scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
    		self.chatLine.SetReturnEvent(ui.__mem_func__(self.SendWhisper))
    		self.chatLine.SetEscapeEvent(ui.__mem_func__(self.Minimize))
    		self.chatLine.SetMultiLine()
    		self.sendButton.SetEvent(ui.__mem_func__(self.SendWhisper))
    		self.titleNameEdit.SetReturnEvent(ui.__mem_func__(self.AcceptTarget))
    		self.titleNameEdit.SetEscapeEvent(ui.__mem_func__(self.Close))
    		self.ignoreButton.SetToggleDownEvent(ui.__mem_func__(self.IgnoreTarget))
    		self.ignoreButton.SetToggleUpEvent(ui.__mem_func__(self.IgnoreTarget))
    		self.acceptButton.SetEvent(ui.__mem_func__(self.AcceptTarget))
    
    		self.textRenderer = self.TextRenderer()
    		self.textRenderer.SetParent(self)
    		self.textRenderer.SetPosition(20, 28)
    		self.textRenderer.SetTargetName("")
    		self.textRenderer.Show()
    
    		self.resizeButton = self.ResizeButton()
    		self.resizeButton.SetParent(self)
    		self.resizeButton.SetSize(20, 20)
    		self.resizeButton.SetPosition(260, 180)
    		self.resizeButton.SetMoveEvent(ui.__mem_func__(self.ResizeWhisperDialog))
    		self.resizeButton.Show()
    
    		self.ResizeWhisperDialog()
    
    	def Destroy(self):
    
    		self.eventMinimize = None
    		self.eventClose = None
    		self.eventAcceptTarget = None
    
    		self.ClearDictionary()
    		self.scrollBar.Destroy()
    		self.titleName = None
    		self.titleNameEdit = None
    		self.closeButton = None
    		self.scrollBar = None
    		self.chatLine = None
    		self.sendButton = None
    		self.ignoreButton = None
    		self.acceptButton = None
    		self.minimizeButton = None
    		self.textRenderer = None
    		self.board = None
    		self.editBar = None
    		self.resizeButton = None
    
    	def ResizeWhisperDialog(self):
    		(xPos, yPos) = self.resizeButton.GetLocalPosition()
    		if xPos < 200:
    			self.resizeButton.SetPosition(200, yPos)
    			return
    		if yPos < 150:
    			self.resizeButton.SetPosition(xPos, 150)
    			return
    		self.SetWhisperDialogSize(xPos + 20, yPos + 20)
    
    	def SetWhisperDialogSize(self, width, height):
    		try:
    
    			max = int((width-90)/6) * 3 - 6
    
    			self.board.SetSize(width, height)
    			self.scrollBar.SetPosition(width-25, 35)
    			self.scrollBar.SetScrollBarSize(height-100)
    			self.scrollBar.SetPos(1.0)
    			self.sendButton.SetPosition(width-80, 10)
    			self.editBar.SetPosition(10, height-60)
    			self.editBar.SetSize(width-18, 50)
    			self.chatLine.SetSize(width-90, 40)
    			self.chatLine.SetLimitWidth(width-90)
    			self.SetChatLineMax(max)
    			self.SetSize(width, height)
    
    			self.minimizeButton.SetPosition(width-42, 12)
    			self.closeButton.SetPosition(width-24, 12)
    
    			if 0 != self.targetName:
    				chat.SetWhisperBoxSize(self.targetName, width - 50, height - 90)
    
    		except:
    			import exception
    			exception.Abort("WhisperDialog.SetWhisperDialogSize.BindObject")
    
    	def SetChatLineMax(self, max):
    		self.chatLine.SetMax(max)
    
    		from grpText import GetSplitingTextLine
    
    		text = self.chatLine.GetText()
    		if text:
    			self.chatLine.SetText(GetSplitingTextLine(text, max, 0))
    
    	def OpenWithTarget(self, targetName):
    
    		chat.CreateWhisper(targetName)
    		chat.SetWhisperBoxSize(targetName, self.GetWidth() - 60, self.GetHeight() - 90)
    
    		self.chatLine.SetFocus()
    		self.titleName.SetText(targetName)
    		self.targetName = targetName
    		self.textRenderer.SetTargetName(targetName)
    
    		self.titleNameEdit.Hide()
    		self.ignoreButton.Hide()
    		self.acceptButton.Hide()
    		self.minimizeButton.Show()
    
    	def OpenWithoutTarget(self, event):
    
    		self.eventAcceptTarget = event
    
    		self.titleName.SetText("")
    		self.titleNameEdit.SetText("")
    		self.titleNameEdit.SetFocus()
    		self.targetName = 0
    		self.titleNameEdit.Show()
    		self.ignoreButton.Hide()
    		self.acceptButton.Show()
    		self.minimizeButton.Hide()
    
    	def Minimize(self):
    		self.titleNameEdit.KillFocus()
    		self.chatLine.KillFocus()
    		self.Hide()
    
    		if None != self.eventMinimize:
    			self.eventMinimize(self.targetName)
    
    	def Close(self):
    		chat.ClearWhisper(self.targetName)
    		self.titleNameEdit.KillFocus()
    		self.chatLine.KillFocus()
    		self.Hide()
    
    		if None != self.eventClose:
    			self.eventClose(self.targetName)
    
    	def IgnoreTarget(self):
    		net.SendChatPacket("/ignore " + self.targetName)
    
    	def AcceptTarget(self):
    		name = self.titleNameEdit.GetText()
    		if len(name)
  • Hmm tengo ganas de aportar algo por si acaso no te sirvio ese ya que es 2010 pues te paso el mio es 2007 :wiii:

    import ui
    import net
    import chat
    import player
    import app
    import locale
    
    class WhisperButton(ui.Button):
    	def __init__(self):
    		ui.Button.__init__(self, "TOP_MOST")
    	def __del__(self):
    		ui.Button.__del__(self)
    	def SetToolTipText(self, text, x=0, y = 32):
    		ui.Button.SetToolTipText(self, text, x, y)
    		self.ToolTipText.Show()
    
    	def ShowToolTip(self):
    		if 0 != self.ToolTipText:
    			self.ToolTipText.Show()
    	def HideToolTip(self):
    		if 0 != self.ToolTipText:
    			self.ToolTipText.Show()
    
    class WhisperDialog(ui.ScriptWindow):
    
    	class TextRenderer(ui.Window):
    		def SetTargetName(self, targetName):
    			self.targetName = targetName
    
    		def OnRender(self):
    			(x, y) = self.GetGlobalPosition()
    			chat.RenderWhisper(self.targetName, x, y)
    
    	class ResizeButton(ui.DragButton):
    
    		def __init__(self):
    			ui.DragButton.__init__(self)
    
    		def __del__(self):
    			ui.DragButton.__del__(self)
    
    		def OnMouseOverIn(self):
    			app.SetCursor(app.HVSIZE)
    
    		def OnMouseOverOut(self):
    			app.SetCursor(app.NORMAL)
    
    	def __init__(self, eventMinimize, eventClose):
    		print "NEW WHISPER DIALOG  ----------------------------------------------------------------------------"
    		ui.ScriptWindow.__init__(self)
    		self.targetName = ""
    		self.eventMinimize = eventMinimize
    		self.eventClose = eventClose
    		self.eventAcceptTarget = None
    	def __del__(self):
    		print "---------------------------------------------------------------------------- DELETE WHISPER DIALOG"
    		ui.ScriptWindow.__del__(self)		
    
    	def LoadDialog(self):
    		try:
    			pyScrLoader = ui.PythonScriptLoader()
    			pyScrLoader.LoadScriptFile(self, "UIScript/WhisperDialog.py")
    		except:
    			import exception
    			exception.Abort("WhisperDialog.LoadDialog.LoadScript")
    
    		try:
    			GetObject=self.GetChild
    			self.titleName = GetObject("titlename")
    			self.titleNameEdit = GetObject("titlename_edit")
    			self.closeButton = GetObject("closebutton")
    			self.scrollBar = GetObject("scrollbar")
    			self.chatLine = GetObject("chatline")
    			self.minimizeButton = GetObject("minimizebutton")
    			self.ignoreButton = GetObject("ignorebutton")
    			self.acceptButton = GetObject("acceptbutton")
    			self.sendButton = GetObject("sendbutton")
    			self.board = GetObject("board")
    			self.editBar = GetObject("editbar")
    		except:
    			import exception
    			exception.Abort("DialogWindow.LoadDialog.BindObject")
    
    		self.titleName.SetText("")
    		self.titleNameEdit.SetText("")
    		self.minimizeButton.SetEvent(ui.__mem_func__(self.Minimize))
    		self.closeButton.SetEvent(ui.__mem_func__(self.Close))
    		self.scrollBar.SetPos(1.0)
    		self.scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
    		self.chatLine.SetReturnEvent(ui.__mem_func__(self.SendWhisper))
    		self.chatLine.SetEscapeEvent(ui.__mem_func__(self.Minimize))
    		self.chatLine.SetMultiLine()
    		self.sendButton.SetEvent(ui.__mem_func__(self.SendWhisper))
    		self.titleNameEdit.SetReturnEvent(ui.__mem_func__(self.AcceptTarget))
    		self.titleNameEdit.SetEscapeEvent(ui.__mem_func__(self.Close))
    		self.ignoreButton.SetToggleDownEvent(ui.__mem_func__(self.IgnoreTarget))
    		self.ignoreButton.SetToggleUpEvent(ui.__mem_func__(self.IgnoreTarget))
    		self.acceptButton.SetEvent(ui.__mem_func__(self.AcceptTarget))
    
    		self.textRenderer = self.TextRenderer()
    		self.textRenderer.SetParent(self)
    		self.textRenderer.SetPosition(20, 28)
    		self.textRenderer.SetTargetName("")
    		self.textRenderer.Show()
    
    		self.resizeButton = self.ResizeButton()
    		self.resizeButton.SetParent(self)
    		self.resizeButton.SetSize(20, 20)
    		self.resizeButton.SetPosition(260, 180)
    		self.resizeButton.SetMoveEvent(ui.__mem_func__(self.ResizeWhisperDialog))
    		self.resizeButton.Show()
    
    		self.ResizeWhisperDialog()
    
    	def Destroy(self):
    
    		self.eventMinimize = None
    		self.eventClose = None
    		self.eventAcceptTarget = None
    
    		self.ClearDictionary()
    		self.scrollBar.Destroy()
    		self.titleName = None
    		self.titleNameEdit = None
    		self.closeButton = None
    		self.scrollBar = None
    		self.chatLine = None
    		self.sendButton = None
    		self.ignoreButton = None
    		self.acceptButton = None
    		self.minimizeButton = None
    		self.textRenderer = None
    		self.board = None
    		self.editBar = None
    		self.resizeButton = None
    
    	def ResizeWhisperDialog(self):
    		(xPos, yPos) = self.resizeButton.GetLocalPosition()
    		if xPos < 200:
    			self.resizeButton.SetPosition(200, yPos)
    			return
    		if yPos < 150:
    			self.resizeButton.SetPosition(xPos, 150)
    			return
    		self.SetWhisperDialogSize(xPos + 20, yPos + 20)
    
    	def SetWhisperDialogSize(self, width, height):
    		try:
    
    			max = int((width-90)/6) * 3 - 6
    
    			self.board.SetSize(width, height)
    			self.scrollBar.SetPosition(width-25, 35)
    			self.scrollBar.SetScrollBarSize(height-100)
    			self.scrollBar.SetPos(1.0)
    			self.sendButton.SetPosition(width-80, 10)
    			self.editBar.SetPosition(10, height-60)
    			self.editBar.SetSize(width-18, 50)
    			self.chatLine.SetSize(width-90, 40)
    			self.chatLine.SetLimitWidth(width-90)
    			self.SetChatLineMax(max)
    			self.SetSize(width, height)
    
    			self.minimizeButton.SetPosition(width-42, 12)
    			self.closeButton.SetPosition(width-24, 12)
    
    			if 0 != self.targetName:
    				chat.SetWhisperBoxSize(self.targetName, width - 50, height - 90)
    
    		except:
    			import exception
    			exception.Abort("WhisperDialog.SetWhisperDialogSize.BindObject")
    
    	def SetChatLineMax(self, max):
    		self.chatLine.SetMax(max)
    
    		from grpText import GetSplitingTextLine
    
    		text = self.chatLine.GetText()
    		if text:
    			self.chatLine.SetText(GetSplitingTextLine(text, max, 0))
    
    	def OpenWithTarget(self, targetName):
    
    		chat.CreateWhisper(targetName)
    		chat.SetWhisperBoxSize(targetName, self.GetWidth() - 60, self.GetHeight() - 90)
    
    		self.chatLine.SetFocus()
    		self.titleName.SetText(targetName)
    		self.targetName = targetName
    		self.textRenderer.SetTargetName(targetName)
    
    		self.titleNameEdit.Hide()
    		self.ignoreButton.Hide()
    		self.acceptButton.Hide()
    		self.minimizeButton.Show()
    
    	def OpenWithoutTarget(self, event):
    
    		self.eventAcceptTarget = event
    
    		self.titleName.SetText("")
    		self.titleNameEdit.SetText("")
    		self.titleNameEdit.SetFocus()
    		self.targetName = 0
    		self.titleNameEdit.Show()
    		self.ignoreButton.Hide()
    		self.acceptButton.Show()
    		self.minimizeButton.Hide()
    
    	def Minimize(self):
    		self.titleNameEdit.KillFocus()
    		self.chatLine.KillFocus()
    		self.Hide()
    
    		if None != self.eventMinimize:
    			self.eventMinimize(self.targetName)
    
    	def Close(self):
    		chat.ClearWhisper(self.targetName)
    		self.titleNameEdit.KillFocus()
    		self.chatLine.KillFocus()
    		self.Hide()
    
    		if None != self.eventClose:
    			self.eventClose(self.targetName)
    
    	def IgnoreTarget(self):
    		net.SendChatPacket("/ignore " + self.targetName)
    
    	def AcceptTarget(self):
    		name = self.titleNameEdit.GetText()
    		if len(name) 
    

    Jejeje Saludos!

  • :S No me sirvio pero igualmente gracias a los dos!

  • Busca lo siguiente en game.py:

    def OnRecvWhisperError(self, mode, name, line):
    

    Ahora toma el texto desde esa "declaración" hasta la linea

    def RecvWhisper(self, name):

    Y pegas esto:

    def OnRecvWhisperError(self, mode, name, line):
                               
                        if locale.WHISPER_ERROR.has_key(mode):
                                chat.AppendWhisper(chat.WHISPER_TYPE_INFO, name, locale.WHISPER_ERROR[mode](name))
                               
                        elif mode == 5:
                                chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, name, "%s : %s" % (name,line))
                                
                        else:
                                chat.AppendWhisper(chat.WHISPER_TYPE_INFO, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
                            
                        self.interface.RecvWhisper(name)
    

    NO, reemplaces lo rosado osea no reemplaces
    def RecvWhisper(self, name):
    Ese, no se quita.

  • @Mr.Troll said:

    Busca lo siguiente en game.py:

    def OnRecvWhisperError(self, mode, name, line):
    

    Ahora toma el texto desde esa "declaración" hasta la linea

    def RecvWhisper(self, name):

    Y pegas esto:

    def OnRecvWhisperError(self, mode, name, line):
                               
                        if locale.WHISPER_ERROR.has_key(mode):
                                chat.AppendWhisper(chat.WHISPER_TYPE_INFO, name, locale.WHISPER_ERROR[mode](name))
                               
                        elif mode == 5:
                                chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, name, "%s : %s" % (name,line))
                                
                        else:
                                chat.AppendWhisper(chat.WHISPER_TYPE_INFO, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
                            
                        self.interface.RecvWhisper(name)
    

    NO, reemplaces lo rosado osea no reemplaces
    def RecvWhisper(self, name):
    Ese, no se quita.

    Resultó En Esto: & Te Adjunto mi game.py por si quieres echar un vistazo.

  • Prueba con este

    def OnRecvWhisperSystemMessage(self, name, line):
    		chat.AppendWhisper(chat.WHISPER_TYPE_INFO, name, line)
    		self.interface.RecvWhisper(name)
    
    	def OnRecvWhisperError(self, mode, name, line):
                               
                        if locale.WHISPER_ERROR.has_key(mode):
                                chat.AppendWhisper(chat.WHISPER_TYPE_INFO, name, locale.WHISPER_ERROR[mode](name))
                               
                        elif mode == 5:
                                chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, name, "%s : %s" % (name,line))
                                
                        else:
                                chat.AppendWhisper(chat.WHISPER_TYPE_INFO, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
                            
                        self.interface.RecvWhisper(name)
    
    	def RecvWhisper(self, name):
    

    La tabulación debe ser IGUAL al de los otros def

    Ejemplo:

    Los puntos (.) hacen de espacios
    Bueno:

    ..............def __LOL(self):
    ..............def __WTF(self):

    Malo:

    ...............def __LOL(self):
    def __WTF(self):