Register for your free account! | Forgot your password?

You last visited: Today at 10:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Servercommand_Build

Discussion on Servercommand_Build within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1

 
.yorliK's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 1,448
Received Thanks: 1,257
Servercommand_Build

Hey Com ,

ich wollte das was an Client durch cmdchat gesendet wird, nicht in der game.py behandeln, sondern in der .py , like Achievement-System von Yiv,
nur bekomme ich dann so einen syserr-Eintrag und das Spiel bleibt beim Ladebalken hängen..

In der Game.py

__init__
Code:
self.MountingSystem =  mounting.MountingWindow()
Servercommand_Build Eintrag:
Code:
			"MountSystem"				: self.MountingSystem.MountSystem,
Die .py

Der Fehler:
Code:
0524 13:18:18984 :: Traceback (most recent call last):

0524 13:18:18985 ::   File "networkModule.py", line 233, in SetGamePhase

0524 13:18:18985 ::   File "game.py", line 134, in __init__

0524 13:18:18985 ::   File "game.py", line 1816, in __ServerCommand_Build

0524 13:18:18985 :: AttributeError
0524 13:18:18985 :: : 
0524 13:18:18985 :: 'MountingWindow' object has no attribute 'MountSystem'
0524 13:18:18985 ::
Und ja die Klasse MountingWindow beinhaltet die Funktion MountSystem..
.yorliK is offline  
Old 05/25/2015, 11:46   #2
 
DasSchwarzeT's Avatar
 
elite*gold: 399
Join Date: Sep 2011
Posts: 5,323
Received Thanks: 3,937
Zeig uns doch mal die Klasse Dialog1 (komplett)
DasSchwarzeT is offline  
Old 05/25/2015, 13:46   #3

 
.yorliK's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 1,448
Received Thanks: 1,257
Code:
import ui
import dbg
import app
import chat
import constInfo
import net
import event

class MountingWindow(ui.Window):
	def __init__(self):
		ui.Window.__init__(self)
		self.Hide()
		self.Start = 0
		self.Loaded = 0

	def BuildWindow(self):
		if self.Loaded > 0:
			self.Show()
			self.Board.Show()
			return

		self.Loaded = 1

		self.Board = ui.BoardWithTitleBar()
		self.Board.SetSize(238, 200)
		self.Board.SetCenterPosition()
		self.Board.AddFlag("float")
		self.Board.SetTitleName("Reittier Panel")
		self.Board.SetCloseEvent(self.Open)
		self.Board.Show()

		self.GUI = []
		Buttons = [ [10,90, "small", "<<"], [185, 90, "small", ">>"],  [75,165, "large", "Auswählen"]]

		for i in xrange(len(Buttons)):
			Button = ui.Button()
			Button.SetParent(self.Board)
			Button.SetEvent(ui.__mem_func__(self.__Button), i)
			Button.SetPosition(Buttons[i][0], Buttons[i][1])
			Button.SetUpVisual("d:/ymir work/ui/public/" + Buttons[i][2] + "_button_01.sub")
			Button.SetOverVisual("d:/ymir work/ui/public/" + Buttons[i][2] + "_button_02.sub")
			Button.SetDownVisual("d:/ymir work/ui/public/" + Buttons[i][2] + "_button_03.sub")
			Button.SetText(Buttons[i][3])
			Button.Show()
			self.GUI.append(Button)
		self.Show()

	def __Button(self, arg):
		if arg<=1:
			pass
		else:
			self.Open()
			chat.AppendChat(1, "ClientQuest")
			constInfo.MountSystem["CMD"] = str(self.Start)
			event.QuestButtonClick(constInfo.MountSystem["index"])

	def MountSystem(self, info, i=0):
		if info=="Item":
			if i!=0:
				constInfo.MountSystem["index"] = int(i)
			self.Open()
		elif info=="Input":
			net.SendQuestInputStringPacket(str(constInfo.MountSystem["CMD"]))

	def Open(self):
		if self.IsShow():
			self.Board.Hide()
			self.Hide()
			return
		self.BuildWindow()
.yorliK is offline  
Reply




All times are GMT +1. The time now is 10:42.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.