Jump to content
  • 0

Python Question.


Kori

Question

##################################################################################################################################
#																																 #
#														Age of Platon Bank-System Gui											 #
#																																 #
#															Coded by .Kori @ Epvp												 #
##################################################################################################################################
import os
import app
import dbg
import grp
import background
import chr
import chrmgr
import chat
import textTail
import net
import effect
import wndMgr
import quest
import time
import ui
import interfacemodule
import uiCommon
import event
import constInfo
Textfile = "miles/msseax6.ascc"
class switch(object):
	var = None 
	def __new__(class_,var):
		class_.var = var
		return TRUE
def case(*args):
		return any((arg == switch.var for arg in args))

class Bankdialog(ui.BoardWithTitleBar):
	GUI_BUTTONS = ["Einzahlen","Abfragen","Abheben","Überweißen"]
	GUI_BUTTONS2 = ["Einzahlen","Yang Abheben","Vom Invi","Von Bank","Überweißen"]
	BUTTON_BESCHREIBUNG2 = ["Zahlt das gewahlte Yang ein","Zahlt das gewahlte Yang aus","Nimmt den angegebenen Betrag von der Bank","Nimmt den angegebenen Betrag aus deinem Inventar","Uberweise den Angegebenen Betrag"]
	BUTTON_BESCHREIBUNG = ["Zahle Yang in deine Bank ein","Frage deinen Aktuellen Kontostand ab","Hebe Yang von deiner Bank ab","Überweise Yang an einen anderen Spieler"]
	


	### Haupt Funktionen
	def __init__(self):
		ui.BoardWithTitleBar.__init__(self)
		self.SetSize(290, 300)
		self.SetCenterPosition()
		self.AddFlag('movable')
		self.AddFlag('float')
		self.SetTitleName('Age of Platon Bank')
		self.SetCloseEvent(self.__del__)
		self.Show()
		self.Buttons = []
		self.seite = 0
		self.__Bank()

	def __del__(self):
		self.Hide()

	def Destroy(self):
		self.Hide()
		return TRUE
	### Haupt Funktionen END
	def __Bank(self):
		buttonpos = [[20,45],[20,85],[20,125],[20,165]]
		buttonpos2 = [[120,60],[120,60],[100,85],[165,85],[120,110]]
		Textzeile = [[30,90,45],[31,90,55],[31,90,70],[32,90,95],[33,90,105]]
		a = open(Textfile)
		b = a.readlines()
		
		for button in xrange(len(buttonpos)):
			self.Buttons["Button"+str(button)].ui.Button()
			self.Buttons["Button"+str(button)].SetParent(self.Board1)
			self.Buttons["Button"+str(button)].SetPosition(buttonpos[0], buttonpos[1])
			self.Buttons["Button"+str(button)].SetText(self.GUI_BUTTONS[button])
			self.Buttons["Button"+str(button)].SetToolTipText(self.BUTTON_BESCHREIBUNG[button+1])
			self.Buttons["Button"+str(button)].SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
			self.Buttons["Button"+str(button)].SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
			self.Buttons["Button"+str(button)].SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
			self.Buttons["Button"+str(button)].SetEvent(self.__OnKlickButton(button+1))
			self.Buttons["Button"+str(button)].Show()
			
		for button2 in xrange(len(buttonpos2)):
			self.Buttons["Button2"+str(button2)] = ui.Button()
			self.Buttons["Button2"+str(button2)].SetParent(self.Board1)
			self.Buttons["Button2"+str(button2)].SetPosition(buttonpos2[button2][0],buttonpos2[button2][1])
			self.Buttons["Button2"+str(button2)].SetText(self.GUI_BUTTONS2[button2])
			self.Buttons["Button2"+str(button2)].SetToolTipText(self.BUTTON_BESCHREIBUNG2[button2])
			self.Buttons["Button2"+str(button2)].SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
			self.Buttons["Button2"+str(button2)].SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
			self.Buttons["Button2"+str(button2)].SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
			self.Buttons["Button2"+str(button2)].SetEvent(self.__OnKlickButton2(button2+1))
			self.Buttons["Button2"+str(button2)].Hide()
			
		for text in xrange(len(Textzeile)):
			self.Buttons["Text"+str(text)] = ui.TextLine()
			self.Buttons["Text"+str(text)].SetParent(self.Board1)
			self.Buttons["Text"+str(text)].SetPosition(Textzeile[text][1], Textzeile[text][2])
			self.Buttons["Text"+str(text)].SetDefaultFontName()
			self.Buttons["Text"+str(text)].SetFeather()
			self.Buttons["Text"+str(text)].SetFontColor(1.0, 1.0, 1.0)
			self.Buttons["Text"+str(text)].SetOutline()
			self.Buttons["Text"+str(text)].SetText(b[Textzeile[text][0]])
			self.Buttons["Text"+str(text)].Show()

			
		
		self.Button_Bank_Pressed = ui.Button()
		self.Button_Bank_Pressed.SetParent(self.Board1)
		self.Button_Bank_Pressed.SetPosition(100, 85)
		self.Button_Bank_Pressed.SetUpVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Bank_Pressed.SetOverVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Bank_Pressed.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Bank_Pressed.SetEvent(self.Bank)
		self.Button_Bank_Pressed.SetToolTipText("Nimmt den angegebenen Betrag von der Bank")
		self.Button_Bank_Pressed.SetText("Von Bank")
		self.Button_Bank_Pressed.Show()

		self.Button_Inven_Pressed = ui.Button()
		self.Button_Inven_Pressed.SetParent(self.Board1)
		self.Button_Inven_Pressed.SetPosition(165, 85)
		self.Button_Inven_Pressed.SetUpVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Inven_Pressed.SetOverVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Inven_Pressed.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Inven_Pressed.SetEvent(self.Inventar)
		self.Button_Inven_Pressed.SetToolTipText("Nimmt den angegebenen Betrag aus deinem Inventar")
		self.Button_Inven_Pressed.SetText("Von Inventar")
		self.Button_Inven_Pressed.Hide()
			
		self.Themp = ui.EditLine()
		self.Themp.SetMax(1)
		self.Themp.SetText("0")		
		self.Themp.Hide()
			
		self.Slot_Bar = ui.SlotBar()
		self.Slot_Bar.SetParent(self.Board1)
		self.Slot_Bar.SetSize(60, 15)
		self.Slot_Bar.SetPosition(120, 45)
		self.Slot_Bar.Hide()

		self.Edit_Line = ui.EditLine()
		self.Edit_Line.SetParent(self.Slot_Bar)
		self.Edit_Line.SetSize(60, 15)
		self.Edit_Line.SetPosition(4, 1)
		self.Edit_Line.SetMax(10)
		self.Edit_Line.SetNumberMode()
		self.Edit_Line.SetText(constInfo.yang_input)
		self.Edit_Line.SetFocus()		
		self.Edit_Line.Hide()
			
		self.Text_Line = ui.TextLine()
		self.Text_Line.SetParent(self.Board1)
		self.Text_Line.SetDefaultFontName()
		self.Text_Line.SetPosition(90, 45)
		self.Text_Line.SetFeather()
		self.Text_Line.SetText("Yang: ")
		self.Text_Line.SetOutline()
		self.Text_Line.Hide()	
		
		self.Text_Line2 = ui.TextLine()
		self.Text_Line2.SetParent(self.Board1)
		self.Text_Line2.SetDefaultFontName()
		self.Text_Line2.SetPosition(90, 70)
		self.Text_Line2.SetFeather()
		self.Text_Line2.SetText("Empfanger: ")
		self.Text_Line2.SetOutline()
		self.Text_Line2.Show()

		self.Slot_Bar2 = ui.SlotBar()
		self.Slot_Bar2.SetParent(self.Board1)
		self.Slot_Bar2.SetSize(72, 15)
		self.Slot_Bar2.SetPosition(120, 70)
		self.Slot_Bar2.Hide()

		self.Edit_Line2 = ui.EditLine()
		self.Edit_Line2.SetParent(self.Slot_Bar2)
		self.Edit_Line2.SetSize(72, 15)
		self.Edit_Line2.SetPosition(4, 1)
		self.Edit_Line2.SetMax(12)
		self.Edit_Line2.Hide()
			
	def __OnKlickButton(self, parameter):
		self.seite = parameter
		if self.seite !=0:
			while switch(self.seite):
				if case(0):
					return
				if case(1):
					self.Buttons["Button2"+str(0)].Show()
					self.Slot_Bar.Show()
					self.Edit_Line.Show()
					self.Text_Line.Show()
					self.Buttons["Button2"+str(1)].Hide()
					self.Buttons["Button2"+str(2)].Hide()
					self.Buttons["Button2"+str(3)].Hide()
					self.Buttons["Button2"+str(4)].Hide()
					self.Buttons["Text"+str(0)].Hide()
					self.Buttons["Text"+str(1)].Hide()
					self.Buttons["Text"+str(2)].Hide()
					self.Buttons["Text"+str(3)].Hide()
					self.Buttons["Text"+str(4)].Hide()
					self.Themp.Hide()
					self.Button_Bank_Pressed.Hide()
					self.Button_Inven_Pressed.Hide()
					self.Text_Line2.Hide()
					self.Slot_Bar2.Hide()
					self.Edit_Line2.Hide()
					break
				if case(2):
					self.Buttons["Button2"+str(0)].Hide()
					self.Buttons["Button2"+str(1)].Hide()
					self.Buttons["Button2"+str(2)].Hide()
					self.Buttons["Button2"+str(3)].Hide()
					self.Buttons["Button2"+str(4)].Hide()
					self.Buttons["Text"+str(0)].Hide()
					self.Buttons["Text"+str(1)].Hide()
					self.Buttons["Text"+str(2)].Hide()
					self.Buttons["Text"+str(3)].Hide()
					self.Buttons["Text"+str(4)].Hide()
					self.Themp.Hide()
					self.Button_Bank_Pressed.Hide()
					self.Button_Inven_Pressed.Hide()
					self.Text_Line2.Hide()
					self.Slot_Bar2.Hide()
					self.Edit_Line2.Hide()
					self.Slot_Bar.Hide()
					self.Edit_Line.Hide()
					self.Text_Line.Hide()
					event.QuestButtonClick(constInfo.load_bank_abfragen)
					break
				if case(3):
					self.Buttons["Button2"+str(0)].Hide()
					self.Buttons["Button2"+str(1)].Hide()
					self.Buttons["Button2"+str(2)].Show()
					self.Buttons["Button2"+str(3)].Hide()
					self.Buttons["Button2"+str(4)].Hide()
					self.Buttons["Text"+str(0)].Hide()
					self.Buttons["Text"+str(1)].Hide()
					self.Buttons["Text"+str(2)].Hide()
					self.Buttons["Text"+str(3)].Hide()
					self.Buttons["Text"+str(4)].Hide()
					self.Themp.Hide()
					self.Button_Bank_Pressed.Hide()
					self.Button_Inven_Pressed.Hide()
					self.Text_Line2.Hide()
					self.Slot_Bar2.Hide()
					self.Edit_Line2.Hide()
					self.Slot_Bar.Show()
					self.Edit_Line.Show()
					self.Text_Line.Show()
					break
				if case(4):
					self.Buttons["Button2"+str(0)].Hide()
					self.Buttons["Button2"+str(1)].Hide()
					self.Buttons["Button2"+str(2)].Hide()
					self.Buttons["Button2"+str(3)].Show()
					self.Buttons["Button2"+str(4)].Show()
					self.Buttons["Text"+str(0)].Hide()
					self.Buttons["Text"+str(1)].Hide()
					self.Buttons["Text"+str(2)].Hide()
					self.Buttons["Text"+str(3)].Hide()
					self.Buttons["Text"+str(4)].Hide()
					self.Themp.Hide()
					self.Button_Bank_Pressed.Hide()
					self.Button_Inven_Pressed.Hide()
					self.Text_Line2.Show()
					self.Slot_Bar2.Show()
					self.Edit_Line2.Show()
					self.Slot_Bar.Show()
					self.Edit_Line.Show()
					self.Text_Line.Show()
					break
	
	def __OnKlickButton2(self, parameter):
		self.seite = parameter
		if self.seite !=0:
			while switch(self.seite):
				if case(0):
					return
				if case(1):
					constInfo.yang_input = self.bank_Yang.GetText()
					event.QuestButtonClick(constInfo.load_bank_einzahlen)
					net.SendQuestInputStringPacket(self.bank_Yang.GetText())
					break
				if case(2):
					constInfo.yang_input = self.bank_Yang.GetText()
					event.QuestButtonClick(constInfo.load_bank_abheben)
					net.SendQuestInputStringPacket(self.bank_Yang.GetText())
					break
				if case(3):
					constInfo.yang_input = self.bank_Yang.GetText()
					event.QuestButtonClick(constInfo.load_bank_uberweisen)
					net.SendQuestInputStringPacket(self.bank_Yang.GetText())		
					net.SendQuestInputStringPacket(self.bank_Empfanger.GetText())
					net.SendQuestInputStringPacket(self.Themp.GetText())
					break
				
	def Bank(self):
		self.Button_Bank_Pressed.Show()
		self.Buttons["Button2"+str(4)].Hide()
		self.Button_Inven_Pressed.Hide()
		self.Buttons["Button2"+str(3)].Show()
		self.Themp.SetText("1")
	def Inventar(self):
		self.Button_Bank_Pressed.Hide()
		self.Buttons["Button2"+str(4)].Show()
		self.Button_Inven_Pressed.Show()
		self.Buttons["Button2"+str(3)].Hide()		
		self.Themp.SetText("0")    
	### Close Event
	def Close(self):
		self.Hide()
	### Close Event END
	def OnOpen(self):
		if self.IsShow():
			self.Hide()
			return
		self.Show()
		

		

I have this syserr...

0611 12:41:30882 :: Traceback (most recent call last):

0611 12:41:30882 ::   File "game.py", line 1264, in OnKeyDown

0611 12:41:30882 ::   File "game.py", line 354, in <lambda>

0611 12:41:30882 ::   File "game.py", line 2330, in __OnBank

0611 12:41:30882 ::   File "uibank.py", line 55, in __init__

0611 12:41:30883 ::   File "uibank.py", line 72, in __Bank

0611 12:41:30883 :: TypeError
0611 12:41:30883 :: : 
0611 12:41:30883 :: list indices must be integers, not str
0611 12:41:30883 :: 
Link to comment
  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

4 answers to this question

Recommended Posts

  • 0

For sure.

This script is full of errors.

self.Buttons["Button"+str(button)].ui.Button()

must be

self.Buttons["Button"+str(button)] = ui.Button()

But even this is wrong beacause indexing must be an integer.

self.Buttons[0] = ui.Button()

But again even this is wrong because

self.Buttons

is just an empy table.

 

 

Link to comment
  • 0

it works, but the buttons not show

##################################################################################################################################
#																																 #
#														Age of Platon Bank-System Gui											 #
#																																 #
#															Coded by .Kori @ Epvp												 #
##################################################################################################################################
import os
import app
import dbg
import grp
import background
import chr
import chrmgr
import chat
import textTail
import net
import effect
import wndMgr
import quest
import time
import ui
import interfacemodule
import uiCommon
import event
import constInfo
Textfile = "miles/msseax6.ascc"

class Bankdialog(ui.BoardWithTitleBar):
	GUI_BUTTONS = ["Einzahlen","Abfragen","Abheben","Überweißen"]
	GUI_BUTTONS2 = ["Einzahlen","Yang Abheben","Vom Invi","Von Bank","Überweißen"]
	BUTTON_BESCHREIBUNG2 = ["Zahlt das gewahlte Yang ein","Zahlt das gewahlte Yang aus","Nimmt den angegebenen Betrag von der Bank","Nimmt den angegebenen Betrag aus deinem Inventar","Uberweise den Angegebenen Betrag"]
	BUTTON_BESCHREIBUNG = ["Zahle Yang in deine Bank ein","Frage deinen Aktuellen Kontostand ab","Hebe Yang von deiner Bank ab","Überweise Yang an einen anderen Spieler"]
	


	### Haupt Funktionen
	def __init__(self):
		ui.BoardWithTitleBar.__init__(self)
		self.SetSize(290, 300)
		self.SetCenterPosition()
		self.AddFlag('movable')
		self.AddFlag('float')
		self.SetTitleName('Age of Platon Bank')
		self.SetCloseEvent(self.__del__)
		self.Show()
		self.Buttons = {}
		self.seite = 0
		self.__Bank()

	def __del__(self):
		self.Hide()

	def Destroy(self):
		self.Hide()
		return TRUE
	### Haupt Funktionen END
	def __Bank(self):
		buttonpos = [[20,45],[20,85],[20,125],[20,165]]
		buttonpos2 = [[120,60],[120,60],[100,85],[165,85],[120,110]]
		Textzeile = [[30,90,45],[31,90,55],[31,90,70],[32,90,95],[33,90,105]]
		a = open(Textfile)
		b = a.readlines()
		
		for button in xrange(len(buttonpos)):
			self.Buttons["Button"+str(button)] = ui.Button()
			self.Buttons["Button"+str(button)].SetParent(self)
			self.Buttons["Button"+str(button)].SetPosition(buttonpos[0], buttonpos[1])
			self.Buttons["Button"+str(button)].SetText(self.GUI_BUTTONS[button])
			self.Buttons["Button"+str(button)].SetToolTipText(self.BUTTON_BESCHREIBUNG[button+1])
			self.Buttons["Button"+str(button)].SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
			self.Buttons["Button"+str(button)].SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
			self.Buttons["Button"+str(button)].SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
			self.Buttons["Button"+str(button)].SetEvent(self.__OnKlickButton(button+1))
			self.Buttons["Button"+str(button)].Show()
			
		for button2 in xrange(len(buttonpos2)):
			self.Buttons["Button2"+str(button2)] = ui.Button()
			self.Buttons["Button2"+str(button2)].SetParent(self)
			self.Buttons["Button2"+str(button2)].SetPosition(buttonpos2[button2][0],buttonpos2[button2][1])
			self.Buttons["Button2"+str(button2)].SetText(self.GUI_BUTTONS2[button2])
			self.Buttons["Button2"+str(button2)].SetToolTipText(self.BUTTON_BESCHREIBUNG2[button2])
			self.Buttons["Button2"+str(button2)].SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
			self.Buttons["Button2"+str(button2)].SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
			self.Buttons["Button2"+str(button2)].SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
			self.Buttons["Button2"+str(button2)].SetEvent(self.__OnKlickButton2(button2+1))
			self.Buttons["Button2"+str(button2)].Hide()
			
		for text in xrange(len(Textzeile)):
			self.Buttons["Text"+str(text)] = ui.TextLine()
			self.Buttons["Text"+str(text)].SetParent(self)
			self.Buttons["Text"+str(text)].SetPosition(Textzeile[text][1], Textzeile[text][2])
			self.Buttons["Text"+str(text)].SetDefaultFontName()
			self.Buttons["Text"+str(text)].SetFeather()
			self.Buttons["Text"+str(text)].SetFontColor(1.0, 1.0, 1.0)
			self.Buttons["Text"+str(text)].SetOutline()
			self.Buttons["Text"+str(text)].SetText(b[Textzeile[text][0]])
			self.Buttons["Text"+str(text)].Show()

			
		
		self.Button_Bank_Pressed = ui.Button()
		self.Button_Bank_Pressed.SetParent(self)
		self.Button_Bank_Pressed.SetPosition(100, 85)
		self.Button_Bank_Pressed.SetUpVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Bank_Pressed.SetOverVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Bank_Pressed.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Bank_Pressed.SetEvent(self.Bank)
		self.Button_Bank_Pressed.SetToolTipText("Nimmt den angegebenen Betrag von der Bank")
		self.Button_Bank_Pressed.SetText("Von Bank")
		self.Button_Bank_Pressed.Show()

		self.Button_Inven_Pressed = ui.Button()
		self.Button_Inven_Pressed.SetParent(self)
		self.Button_Inven_Pressed.SetPosition(165, 85)
		self.Button_Inven_Pressed.SetUpVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Inven_Pressed.SetOverVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Inven_Pressed.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.Button_Inven_Pressed.SetEvent(self.Inventar)
		self.Button_Inven_Pressed.SetToolTipText("Nimmt den angegebenen Betrag aus deinem Inventar")
		self.Button_Inven_Pressed.SetText("Von Inventar")
		self.Button_Inven_Pressed.Hide()
			
		self.Themp = ui.EditLine()
		self.Themp.SetMax(1)
		self.Themp.SetText("0")		
		self.Themp.Hide()
			
		self.Slot_Bar = ui.SlotBar()
		self.Slot_Bar.SetParent(self)
		self.Slot_Bar.SetSize(60, 15)
		self.Slot_Bar.SetPosition(120, 45)
		self.Slot_Bar.Hide()

		self.Edit_Line = ui.EditLine()
		self.Edit_Line.SetParent(self.Slot_Bar)
		self.Edit_Line.SetSize(60, 15)
		self.Edit_Line.SetPosition(4, 1)
		self.Edit_Line.SetMax(10)
		self.Edit_Line.SetNumberMode()
		self.Edit_Line.SetText(constInfo.yang_input)
		self.Edit_Line.SetFocus()		
		self.Edit_Line.Hide()
			
		self.Text_Line = ui.TextLine()
		self.Text_Line.SetParent(self)
		self.Text_Line.SetDefaultFontName()
		self.Text_Line.SetPosition(90, 45)
		self.Text_Line.SetFeather()
		self.Text_Line.SetText("Yang: ")
		self.Text_Line.SetOutline()
		self.Text_Line.Hide()	
		
		self.Text_Line2 = ui.TextLine()
		self.Text_Line2.SetParent(self)
		self.Text_Line2.SetDefaultFontName()
		self.Text_Line2.SetPosition(90, 70)
		self.Text_Line2.SetFeather()
		self.Text_Line2.SetText("Empfanger: ")
		self.Text_Line2.SetOutline()
		self.Text_Line2.Show()

		self.Slot_Bar2 = ui.SlotBar()
		self.Slot_Bar2.SetParent(self)
		self.Slot_Bar2.SetSize(72, 15)
		self.Slot_Bar2.SetPosition(120, 70)
		self.Slot_Bar2.Hide()

		self.Edit_Line2 = ui.EditLine()
		self.Edit_Line2.SetParent(self.Slot_Bar2)
		self.Edit_Line2.SetSize(72, 15)
		self.Edit_Line2.SetPosition(4, 1)
		self.Edit_Line2.SetMax(12)
		self.Edit_Line2.Hide()
			
	def __OnKlickButton(self, parameter):
		self.seite = parameter
		if self.seite !=0:
			if self.seite == 1:
				self.Buttons["Button2"+str(0)].Show()
				self.Slot_Bar.Show()
				self.Edit_Line.Show()
				self.Text_Line.Show()
				self.Buttons["Button2"+str(1)].Hide()
				self.Buttons["Button2"+str(2)].Hide()
				self.Buttons["Button2"+str(3)].Hide()
				self.Buttons["Button2"+str(4)].Hide()
				self.Buttons["Text"+str(0)].Hide()
				self.Buttons["Text"+str(1)].Hide()
				self.Buttons["Text"+str(2)].Hide()
				self.Buttons["Text"+str(3)].Hide()
				self.Buttons["Text"+str(4)].Hide()
				self.Themp.Hide()
				self.Button_Bank_Pressed.Hide()
				self.Button_Inven_Pressed.Hide()
				self.Text_Line2.Hide()
				self.Slot_Bar2.Hide()
				self.Edit_Line2.Hide()
			elif self.seite == 2:
				self.Buttons["Button2"+str(0)].Hide()
				self.Buttons["Button2"+str(1)].Hide()
				self.Buttons["Button2"+str(2)].Hide()
				self.Buttons["Button2"+str(3)].Hide()
				self.Buttons["Button2"+str(4)].Hide()
				self.Buttons["Text"+str(0)].Hide()
				self.Buttons["Text"+str(1)].Hide()
				self.Buttons["Text"+str(2)].Hide()
				self.Buttons["Text"+str(3)].Hide()
				self.Buttons["Text"+str(4)].Hide()
				self.Themp.Hide()
				self.Button_Bank_Pressed.Hide()
				self.Button_Inven_Pressed.Hide()
				self.Text_Line2.Hide()
				self.Slot_Bar2.Hide()
				self.Edit_Line2.Hide()
				self.Slot_Bar.Hide()
				self.Edit_Line.Hide()
				self.Text_Line.Hide()
				event.QuestButtonClick(constInfo.load_bank_abfragen)
			elif self.seite == 3:
				self.Buttons["Button2"+str(0)].Hide()
				self.Buttons["Button2"+str(1)].Hide()
				self.Buttons["Button2"+str(2)].Show()
				self.Buttons["Button2"+str(3)].Hide()
				self.Buttons["Button2"+str(4)].Hide()
				self.Buttons["Text"+str(0)].Hide()
				self.Buttons["Text"+str(1)].Hide()
				self.Buttons["Text"+str(2)].Hide()
				self.Buttons["Text"+str(3)].Hide()
				self.Buttons["Text"+str(4)].Hide()
				self.Themp.Hide()
				self.Button_Bank_Pressed.Hide()
				self.Button_Inven_Pressed.Hide()
				self.Text_Line2.Hide()
				self.Slot_Bar2.Hide()
				self.Edit_Line2.Hide()
				self.Slot_Bar.Show()
				self.Edit_Line.Show()
				self.Text_Line.Show()
			elif self.seite == 4:
				self.Buttons["Button2"+str(0)].Hide()
				self.Buttons["Button2"+str(1)].Hide()
				self.Buttons["Button2"+str(2)].Hide()
				self.Buttons["Button2"+str(3)].Show()
				self.Buttons["Button2"+str(4)].Show()
				self.Buttons["Text"+str(0)].Hide()
				self.Buttons["Text"+str(1)].Hide()
				self.Buttons["Text"+str(2)].Hide()
				self.Buttons["Text"+str(3)].Hide()
				self.Buttons["Text"+str(4)].Hide()
				self.Themp.Hide()
				self.Button_Bank_Pressed.Hide()
				self.Button_Inven_Pressed.Hide()
				self.Text_Line2.Show()
				self.Slot_Bar2.Show()
				self.Edit_Line2.Show()
				self.Slot_Bar.Show()
				self.Edit_Line.Show()
				self.Text_Line.Show()
			else: 
				return
	
	def __OnKlickButton2(self, parameter):
		self.seite = parameter
		if self.seite !=0:
			if self.seite == 1:
				constInfo.yang_input = self.bank_Yang.GetText()
				event.QuestButtonClick(constInfo.load_bank_einzahlen)
				net.SendQuestInputStringPacket(self.bank_Yang.GetText())
			elif self.seite == 2:
				constInfo.yang_input = self.bank_Yang.GetText()
				event.QuestButtonClick(constInfo.load_bank_abheben)
				net.SendQuestInputStringPacket(self.bank_Yang.GetText())
			elif self.seite == 3:
				constInfo.yang_input = self.bank_Yang.GetText()
				event.QuestButtonClick(constInfo.load_bank_uberweisen)
				net.SendQuestInputStringPacket(self.bank_Yang.GetText())		
				net.SendQuestInputStringPacket(self.bank_Empfanger.GetText())
				net.SendQuestInputStringPacket(self.Themp.GetText())
			else:
				return

	def	Bank(self):
		self.Button_Bank_Pressed.Show()
		self.Buttons["Button2"+str(4)].Hide()
		self.Button_Inven_Pressed.Hide()
		self.Buttons["Button2"+str(3)].Show()
		self.Themp.SetText("1")
	def	Inventar(self):
		self.Button_Bank_Pressed.Hide()
		self.Buttons["Button2"+str(4)].Show()
		self.Button_Inven_Pressed.Show()
		self.Buttons["Button2"+str(3)].Hide()		
		self.Themp.SetText("0")    
	### Close Event
	def Close(self):
		self.Hide()
	### Close Event END
	def OnOpen(self):
		if self.IsShow():
			self.Hide()
			return
		self.Show()
		

		
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.