Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 02:31

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

Advertisement



Mt2 Python Problem 10PSC

Discussion on Mt2 Python Problem 10PSC within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
xSpongBoZZ's Avatar
 
elite*gold: 0
Join Date: Sep 2013
Posts: 108
Received Thanks: 124
Mt2 Python Problem 10PSC

Moin,
Mein Problem ist das wenn ich meinen Ingame Swichbot Öffne Und ihn Wieder Schließe Kann Ich Ihn nicht Mehr Öffnen Nur Wenn ich Den Clienten Neustarte:

PHP Code:
import chat
import item
import net
import player
import snd
import locale
import shop
import ui
import uiTip

Bonus0 
0
Bonus1 
0
Bonus2 
0
Bonus3 
0
Bonus4 
0
Bonus5 
0
Bonus6 
0
SwitchButton 
0
SwitchButton7 
0    
Boniswitchvalue 
71084
Boniswitchvalue2 
71052
PRESSWISH0 
0
PRESSWISH1 
0
PRESSWISH2 
0
PRESSWISH3 
0
PRESSWISH4 
0
PRESSWISH5 
0
PRESSWISH6 
0

class SwitchBotDialog(ui.ThinBoard):
    
def __init__(self):
        
ui.ThinBoard.__init__(self)
        
self.LoadSwitchbotDialog()
        
    
def __del__(self):
        
ui.ThinBoard.__del__(self)

    
def Destroy(self):
        
self.Hide()
        return 
TRUE
        
    def Bonuschangevalue
(self):
        global 
Boniswitchvalue
        
for i in xrange(player.INVENTORY_PAGE_SIZE*2):
            
itemIndex player.GetItemIndex(i)
            
item.SelectItem(itemIndex)
            
ItemValue player.GetItemIndex(i)
            if 
item.IsAntiFlag(74112) and item.IsFlag(8196) and item.GetItemSubType() == 18:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"Gegenstand verzaubern liegt auf Value: " str(ItemValue))
                
Boniswitchvalue int(ItemValue)
            
elif str(item.GetItemName()) == "Gegenstand verzaubern":
                
chat.AppendChat(chat.CHAT_TYPE_INFO"Gegenstand verzaubern liegt auf Value: " str(ItemValue))
                
Boniswitchvalue int(ItemValue)
        global 
Boniswitchvalue2
        
for i1 in xrange(player.INVENTORY_PAGE_SIZE*2):
            
itemIndex1 player.GetItemIndex(i1)
            
item.SelectItem(itemIndex1)
            
ItemValue1 player.GetItemIndex(i1)
            if 
item.IsAntiFlag(33152) and item.IsFlag(24576) and item.GetItemSubType() == 10:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"Gegenstand segnen liegt auf Value: " str(ItemValue1))
                
Boniswitchvalue2 int(ItemValue1)
                break
            
elif str(item.GetItemName()) == "Gegenstand segnen":
                
chat.AppendChat(chat.CHAT_TYPE_INFO"Gegenstand segnen liegt auf Value: " str(ItemValue1))
                
Boniswitchvalue2 int(ItemValue1)
                break

    
def LoadSwitchbotDialog(self):
        if 
str(locale.APP_TITLE).find("DragonWrath") != -1:
            return
        
self.SetCenterPosition()
        
self.SetSize(410360)
        
self.Show()
        
self.AddFlag("movable")
        
self.AddFlag("float")
        
snd.PlaySound("sound/ui/type.wav")
        
        
self.LoadTextLines()
        
self.LoadButtons()
        
self.LoadEditLines()
        
self.Bonuschangevalue()
        
        
self.BoardMessage uiTip.BigBoard()
    
    
def LoadEditLines(self):
        
self.SlotwahlSlotBar ui.SlotBar()
        
self.SlotwahlSlotBar.SetParent(self)
        
self.SlotwahlSlotBar.SetSize(2914)
        
# self.SlotwahlSlotBar.SetPosition(172, 110)
        
self.SlotwahlSlotBar.SetPosition(172141)
        
self.SlotwahlSlotBar.SetWindowHorizontalAlignCenter()
        
self.SlotwahlSlotBar.Show()
        
        
self.Slotbar ui.EditLine()
        
self.Slotbar.SetParent(self.SlotwahlSlotBar)
        
self.Slotbar.SetSize(2918)
        
self.Slotbar.SetPosition(60)
        
self.Slotbar.SetMax(2)
        
self.Slotbar.SetNumberMode()
        
self.Slotbar.SetText("0")
        
self.Slotbar.Show()
        
        
self.BonusValue7SlotBar ui.SlotBar()
        
self.BonusValue7SlotBar.SetParent(self)
        
self.BonusValue7SlotBar.SetSize(2914)
        
self.BonusValue7SlotBar.SetPosition(172110)
        
self.BonusValue7SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue7SlotBar.Show()
        
        
self.Bvalue7 ui.EditLine()
        
self.Bvalue7.SetParent(self.BonusValue7SlotBar)
        
self.Bvalue7.SetSize(2918)
        
self.Bvalue7.SetPosition(60)
        
self.Bvalue7.SetMax(4)
        
self.Bvalue7.SetNumberMode()
        
self.Bvalue7.SetFocus()
        
self.Bvalue7.SetText("0")
        
self.Bvalue7.SetTabEvent(ui.__mem_func__(self.Slotbar.SetFocus))
        
self.Bvalue7.SetReturnEvent(ui.__mem_func__(self.Slotbar.SetFocus))
        
self.Bvalue7.Show()
        
        
self.BonusValue6SlotBar ui.SlotBar()
        
self.BonusValue6SlotBar.SetParent(self)
        
self.BonusValue6SlotBar.SetSize(2914)
        
self.BonusValue6SlotBar.SetPosition(17279)
        
self.BonusValue6SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue6SlotBar.Show()
        
        
self.Bvalue6 ui.EditLine()
        
self.Bvalue6.SetParent(self.BonusValue6SlotBar)
        
self.Bvalue6.SetSize(2918)
        
self.Bvalue6.SetPosition(60)
        
self.Bvalue6.SetMax(4)
        
self.Bvalue6.SetNumberMode()
        
self.Bvalue6.SetFocus()
        
self.Bvalue6.SetText("0")
        
self.Bvalue6.SetTabEvent(ui.__mem_func__(self.Bvalue7.SetFocus))
        
self.Bvalue6.SetReturnEvent(ui.__mem_func__(self.Bvalue7.SetFocus))
        
self.Bvalue6.Show()
        
        
self.BonusValue5SlotBar ui.SlotBar()
        
self.BonusValue5SlotBar.SetParent(self)
        
self.BonusValue5SlotBar.SetSize(2914)
        
self.BonusValue5SlotBar.SetPosition(17244)
        
self.BonusValue5SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue5SlotBar.Show()
        
        
self.Bvalue5 ui.EditLine()
        
self.Bvalue5.SetParent(self.BonusValue5SlotBar)
        
self.Bvalue5.SetSize(2918)
        
self.Bvalue5.SetPosition(60)
        
self.Bvalue5.SetMax(4)
        
self.Bvalue5.SetNumberMode()
        
self.Bvalue5.SetText("0")
        
self.Bvalue5.SetTabEvent(ui.__mem_func__(self.Bvalue6.SetFocus))
        
self.Bvalue5.SetReturnEvent(ui.__mem_func__(self.Bvalue6.SetFocus))
        
self.Bvalue5.Show()
        
        
self.BonusValue4SlotBar ui.SlotBar()
        
self.BonusValue4SlotBar.SetParent(self)
        
self.BonusValue4SlotBar.SetSize(2914)
        
self.BonusValue4SlotBar.SetPosition(-27141)
        
self.BonusValue4SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue4SlotBar.Show()
        
        
self.Bvalue4 ui.EditLine()
        
self.Bvalue4.SetParent(self.BonusValue4SlotBar)
        
self.Bvalue4.SetSize(2918)
        
self.Bvalue4.SetPosition(60)
        
self.Bvalue4.SetMax(4)
        
self.Bvalue4.SetNumberMode()
        
self.Bvalue4.SetFocus()
        
self.Bvalue4.SetText("0")
        
self.Bvalue4.SetTabEvent(ui.__mem_func__(self.Bvalue5.SetFocus))
        
self.Bvalue4.SetReturnEvent(ui.__mem_func__(self.Bvalue5.SetFocus))
        
self.Bvalue4.Show()

        
self.BonusValue3SlotBar ui.SlotBar()
        
self.BonusValue3SlotBar.SetParent(self)
        
self.BonusValue3SlotBar.SetSize(2914)
        
self.BonusValue3SlotBar.SetPosition(-27110)
        
self.BonusValue3SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue3SlotBar.Show()
        
        
self.Bvalue3 ui.EditLine()
        
self.Bvalue3.SetParent(self.BonusValue3SlotBar)
        
self.Bvalue3.SetSize(2918)
        
self.Bvalue3.SetPosition(60)
        
self.Bvalue3.SetMax(4)
        
self.Bvalue3.SetNumberMode()
        
self.Bvalue3.SetText("0")
        
self.Bvalue3.SetTabEvent(ui.__mem_func__(self.Bvalue4.SetFocus))
        
self.Bvalue3.SetReturnEvent(ui.__mem_func__(self.Bvalue4.SetFocus))
        
self.Bvalue3.Show()

        
self.BonusValue2SlotBar ui.SlotBar()
        
self.BonusValue2SlotBar.SetParent(self)
        
self.BonusValue2SlotBar.SetSize(2914)
        
self.BonusValue2SlotBar.SetPosition(-2779)
        
self.BonusValue2SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue2SlotBar.Show()
        
        
self.Bvalue2 ui.EditLine()
        
self.Bvalue2.SetParent(self.BonusValue2SlotBar)
        
self.Bvalue2.SetSize(2918)
        
self.Bvalue2.SetPosition(60)
        
self.Bvalue2.SetMax(4)
        
self.Bvalue2.SetNumberMode()
        
self.Bvalue2.SetText("0")
        
self.Bvalue2.SetTabEvent(ui.__mem_func__(self.Bvalue3.SetFocus))
        
self.Bvalue2.SetReturnEvent(ui.__mem_func__(self.Bvalue3.SetFocus))
        
self.Bvalue2.Show()

        
self.BonusValue1SlotBar ui.SlotBar()
        
self.BonusValue1SlotBar.SetParent(self)
        
self.BonusValue1SlotBar.SetSize(2914)
        
self.BonusValue1SlotBar.SetPosition(-2744)
        
self.BonusValue1SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue1SlotBar.Show()
        
        
self.Bvalue1 ui.EditLine()
        
self.Bvalue1.SetParent(self.BonusValue1SlotBar)
        
self.Bvalue1.SetSize(2918)
        
self.Bvalue1.SetPosition(60)
        
self.Bvalue1.SetMax(4)
        
self.Bvalue1.SetNumberMode()
        
self.Bvalue1.SetText("0")
        
self.Bvalue1.SetFocus()
        
self.Bvalue1.SetTabEvent(ui.__mem_func__(self.Bvalue2.SetFocus))
        
self.Bvalue1.SetReturnEvent(ui.__mem_func__(self.Bvalue2.SetFocus))
        
self.Bvalue1.Show()
        
    
def LoadButtons(self):
        
self.CloseButton ui.Button()
        
self.CloseButton.SetParent(self)
        
self.CloseButton.SetPosition(37818)
        
self.CloseButton.SetUpVisual("d:/ymir work/ui/public/close_button_01.sub")
        
self.CloseButton.SetOverVisual("d:/ymir work/ui/public/close_button_02.sub")
        
self.CloseButton.SetDownVisual("d:/ymir work/ui/public/close_button_03.sub")
        
self.CloseButton.SetToolTipText(locale.UI_CLOSE0, - 23)
        
self.CloseButton.SetEvent(ui.__mem_func__(self.Close))
        
self.CloseButton.Show()

        
self.Wunschbonus01 ui.Button()
        
self.Wunschbonus01.SetParent(self)
        
self.Wunschbonus01.SetPosition(1540)
        
self.Wunschbonus01.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.Wunschbonus01.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.Wunschbonus01.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.Wunschbonus01.SetText("1.Bonus")
        
self.Wunschbonus01.SetEvent(ui.__mem_func__(self.__Wish_1_Option))
        
self.Wunschbonus01.Show()

        
self.Wunschbonus02 ui.Button()
        
self.Wunschbonus02.SetParent(self)
        
self.Wunschbonus02.SetPosition(1575)
        
self.Wunschbonus02.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.Wunschbonus02.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.Wunschbonus02.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.Wunschbonus02.SetText("2.Bonus")
        
self.Wunschbonus02.SetEvent(ui.__mem_func__(self.__Wish_2_Option))
        
self.Wunschbonus02.Show()

        
self.Wunschbonus03 ui.Button()
        
self.Wunschbonus03.SetParent(self)
        
self.Wunschbonus03.SetPosition(15110)
        
self.Wunschbonus03.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.Wunschbonus03.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.Wunschbonus03.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.Wunschbonus03.SetText("3.Bonus")
        
self.Wunschbonus03.SetEvent(ui.__mem_func__(self.__Wish_3_Option))
        
self.Wunschbonus03.Show()
        
        
self.Wunschbonus04 ui.Button()
        
self.Wunschbonus04.SetParent(self)
        
self.Wunschbonus04.SetPosition(15141)
        
self.Wunschbonus04.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.Wunschbonus04.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.Wunschbonus04.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.Wunschbonus04.SetText("4.Bonus")
        
self.Wunschbonus04.SetEvent(ui.__mem_func__(self.__Wish_4_Option))
        
self.Wunschbonus04.Show()

        
self.Wunschbonus05 ui.Button()
        
self.Wunschbonus05.SetParent(self)
        
self.Wunschbonus05.SetPosition(15 180 2140)
        
# self.Wunschbonus05.SetPosition(15 + 180 + 21, 75)
        
self.Wunschbonus05.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.Wunschbonus05.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.Wunschbonus05.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.Wunschbonus05.SetText("5.Bonus")
        
self.Wunschbonus05.SetEvent(ui.__mem_func__(self.__Wish_5_Option))
        
self.Wunschbonus05.Show()

        
self.Wunschbonus06 ui.Button()
        
self.Wunschbonus06.SetParent(self)
        
self.Wunschbonus06.SetPosition(15 180 2175)
        
self.Wunschbonus06.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.Wunschbonus06.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.Wunschbonus06.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.Wunschbonus06.SetText("6.Bonus")
        
self.Wunschbonus06.SetEvent(ui.__mem_func__(self.__Wish_6_Option))
        
self.Wunschbonus06.Show()
        
        
self.Wunschbonus07 ui.Button()
        
self.Wunschbonus07.SetParent(self)
        
self.Wunschbonus07.SetPosition(15 180 21110)
        
self.Wunschbonus07.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.Wunschbonus07.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.Wunschbonus07.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.Wunschbonus07.SetText("7.Bonus")
        
self.Wunschbonus07.SetEvent(ui.__mem_func__(self.__Wish_7_Option))
        
self.Wunschbonus07.Show()
        
        
self.ResetbonusallButton ui.Button()
        
self.ResetbonusallButton.SetParent(self)
        
self.ResetbonusallButton.SetPosition(90 45 80290)
        
self.ResetbonusallButton.SetUpVisual("d:/ymir work/ui/public/XLarge_Button_01.sub")
        
self.ResetbonusallButton.SetOverVisual("d:/ymir work/ui/public/XLarge_Button_02.sub")
        
self.ResetbonusallButton.SetDownVisual("d:/ymir work/ui/public/XLarge_Button_03.sub")
        
self.ResetbonusallButton.SetText("Bonis .......")
        
self.ResetbonusallButton.SetEvent(ui.__mem_func__(self.__Resetbonusall))
        
self.ResetbonusallButton.Show()

        
self.Switchtingabbruchbutton ui.Button()
        
self.Switchtingabbruchbutton.SetParent(self)
        
self.Switchtingabbruchbutton.SetPosition(90 45 80260)
        
self.Switchtingabbruchbutton.SetUpVisual("d:/ymir work/ui/public/XLarge_Button_01.sub")
        
self.Switchtingabbruchbutton.SetOverVisual("d:/ymir work/ui/public/XLarge_Button_02.sub")
        
self.Switchtingabbruchbutton.SetDownVisual("d:/ymir work/ui/public/XLarge_Button_03.sub")
        
self.Switchtingabbruchbutton.SetEvent(ui.__mem_func__(self.__BreakSwitching))
        
self.Switchtingabbruchbutton.SetText("Abbrechen")
        
self.Switchtingabbruchbutton.Show()

        
self.StartButton ui.Button()
        
self.StartButton.SetParent(self)
        
self.StartButton.SetPosition(90 45 122290)
        
self.StartButton.SetUpVisual("d:/ymir work/ui/public/XLarge_Button_01.sub")
        
self.StartButton.SetOverVisual("d:/ymir work/ui/public/XLarge_Button_02.sub")
        
self.StartButton.SetDownVisual("d:/ymir work/ui/public/XLarge_Button_03.sub")
        
self.StartButton.SetEvent(ui.__mem_func__(self.StartSwitchBot))
        
self.StartButton.SetText("Start")
        
self.StartButton.Show()
        
        
self.Switchtingabbruch7 ui.Button()
        
self.Switchtingabbruch7.SetParent(self)
        
self.Switchtingabbruch7.SetPosition(90 45 80320)
        
self.Switchtingabbruch7.SetUpVisual("d:/ymir work/ui/public/XLarge_Button_01.sub")
        
self.Switchtingabbruch7.SetOverVisual("d:/ymir work/ui/public/XLarge_Button_02.sub")
        
self.Switchtingabbruch7.SetDownVisual("d:/ymir work/ui/public/XLarge_Button_03.sub")
        
self.Switchtingabbruch7.SetEvent(ui.__mem_func__(self.__BreakSwitching7))
        
self.Switchtingabbruch7.SetText("6/7 Abbrechen")
        
self.Switchtingabbruch7.Show()
        
        
self.Start6Button ui.Button()
        
self.Start6Button.SetParent(self)
        
self.Start6Button.SetPosition(90 45 122320)
        
self.Start6Button.SetUpVisual("d:/ymir work/ui/public/XLarge_Button_01.sub")
        
self.Start6Button.SetOverVisual("d:/ymir work/ui/public/XLarge_Button_02.sub")
        
self.Start6Button.SetDownVisual("d:/ymir work/ui/public/XLarge_Button_03.sub")
        
self.Start6Button.SetEvent(ui.__mem_func__(self.StartSwitchBot7))
        
self.Start6Button.SetText("Start 6/7 Bonus")
        
self.Start6Button.Show()
        
        
self.SlotButton ui.Button()
        
self.SlotButton.SetParent(self)
        
self.SlotButton.SetPosition(15 180 21141)
        
self.SlotButton.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.SlotButton.SetOverVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.SlotButton.SetDownVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.SlotButton.SetText("Slotauswahl")
        
self.SlotButton.Show()        
        
    
def LoadTextLines(self):
        
self.Headline ui.TextLine()
        
self.Headline.SetParent(self)
        
self.Headline.SetDefaultFontName()
        
self.Headline.SetPosition(15015)
        
self.Headline.SetFeather()
        
self.Headline.SetText("SW")
        
self.Headline.SetFontColor(1.00.50.5)
        
self.Headline.SetOutline()
        
self.Headline.Show()

        
self.LastChangeText ui.TextLine()
        
self.LastChangeText.SetParent(self)
        
self.LastChangeText.SetDefaultFontName()
        
self.LastChangeText.SetPosition(220180)
        
self.LastChangeText.SetFeather()
        
self.LastChangeText.SetText("Change Log:")
        
self.LastChangeText.SetFontColor(0.60.71)
        
self.LastChangeText.SetOutline()
        
self.LastChangeText.Show()    

        
self.LastChange ui.TextLine()
        
self.LastChange.SetParent(self)
        
self.LastChange.SetDefaultFontName()
        
self.LastChange.SetPosition(220205)
        
self.LastChange.SetFeather()
        
self.LastChange.SetText("leer")
        
self.LastChange.SetFontColor(1.01.01.0)
        
self.LastChange.SetOutline()
        
self.LastChange.Show()    

        
self.SlotwahlText ui.TextLine()
        
self.SlotwahlText.SetParent(self)
        
self.SlotwahlText.SetPosition(15 272 21141)
        
self.SlotwahlText.SetFeather()
        
self.SlotwahlText.SetDefaultFontName()
        
self.SlotwahlText.SetText("Slot:")
        
self.SlotwahlText.SetFontColor(1.01.01.0)
        
self.SlotwahlText.SetOutline()
        
self.SlotwahlText.Show()    

        
self.BonusValue1Text ui.TextLine()
        
self.BonusValue1Text.SetParent(self)
        
self.BonusValue1Text.SetPosition(15 9244)
        
self.BonusValue1Text.SetFeather()
        
self.BonusValue1Text.SetDefaultFontName()
        
self.BonusValue1Text.SetText("Mind. Wert:")
        
self.BonusValue1Text.SetFontColor(1.01.01.0)
        
self.BonusValue1Text.SetOutline()
        
self.BonusValue1Text.Show()    

        
self.BonusValue2Text ui.TextLine()
        
self.BonusValue2Text.SetParent(self)
        
self.BonusValue2Text.SetPosition(15 9279)
        
self.BonusValue2Text.SetFeather()
        
self.BonusValue2Text.SetDefaultFontName()
        
self.BonusValue2Text.SetText("Mind. Wert:")
        
self.BonusValue2Text.SetFontColor(1.01.01.0)
        
self.BonusValue2Text.SetOutline()
        
self.BonusValue2Text.Show()    

        
self.BonusValue3Text ui.TextLine()
        
self.BonusValue3Text.SetParent(self)
        
self.BonusValue3Text.SetPosition(15 92110)
        
self.BonusValue3Text.SetFeather()
        
self.BonusValue3Text.SetDefaultFontName()
        
self.BonusValue3Text.SetText("Mind. Wert:")
        
self.BonusValue3Text.SetFontColor(1.01.01.0)
        
self.BonusValue3Text.SetOutline()
        
self.BonusValue3Text.Show()        

        
self.BonusValue4Text ui.TextLine()
        
self.BonusValue4Text.SetParent(self)
        
self.BonusValue4Text.SetPosition(15 92141)
        
self.BonusValue4Text.SetFeather()
        
self.BonusValue4Text.SetDefaultFontName()
        
self.BonusValue4Text.SetText("Mind. Wert:")
        
self.BonusValue4Text.SetFontColor(1.01.01.0)
        
self.BonusValue4Text.SetOutline()
        
self.BonusValue4Text.Show()    
        
        
self.BonusValue5Text ui.TextLine()
        
self.BonusValue5Text.SetParent(self)
        
self.BonusValue5Text.SetPosition(15 272 2144)
        
self.BonusValue5Text.SetFeather()
        
self.BonusValue5Text.SetDefaultFontName()
        
self.BonusValue5Text.SetText("Mind. Wert:")
        
self.BonusValue5Text.SetFontColor(1.01.01.0)
        
self.BonusValue5Text.SetOutline()
        
self.BonusValue5Text.Show()    

        
self.BonusValue6Text ui.TextLine()
        
self.BonusValue6Text.SetParent(self)
        
self.BonusValue6Text.SetPosition(15 272 21110)
        
self.BonusValue6Text.SetFeather()
        
self.BonusValue6Text.SetDefaultFontName()
        
self.BonusValue6Text.SetText("Mind. Wert:")
        
self.BonusValue6Text.SetFontColor(1.01.01.0)
        
self.BonusValue6Text.SetOutline()
        
self.BonusValue6Text.Show()

        
self.BonusValue7Text ui.TextLine()
        
self.BonusValue7Text.SetParent(self)
        
self.BonusValue7Text.SetPosition(15 272 2179)
        
self.BonusValue7Text.SetFeather()
        
self.BonusValue7Text.SetDefaultFontName()
        
self.BonusValue7Text.SetText("Mind. Wert:")
        
self.BonusValue7Text.SetFontColor(1.01.01.0)
        
self.BonusValue7Text.SetOutline()
        
self.BonusValue7Text.Show()

        
self.BonusHeadline ui.TextLine()
        
self.BonusHeadline.SetParent(self)
        
self.BonusHeadline.SetDefaultFontName()
        
self.BonusHeadline.SetPosition(18180)
        
self.BonusHeadline.SetFeather()
        
self.BonusHeadline.SetText("Gewünschte Bonis:")
        
self.BonusHeadline.SetFontColor(0.60.71)
        
self.BonusHeadline.SetOutline()
        
self.BonusHeadline.Show()    

        
self.Bonus1Attr ui.TextLine()
        
self.Bonus1Attr.SetParent(self)
        
self.Bonus1Attr.SetDefaultFontName()
        
self.Bonus1Attr.SetPosition(18190 13*0)
        
self.Bonus1Attr.SetFeather()
        
self.Bonus1Attr.SetText("-")
        
self.Bonus1Attr.SetFontColor(1.01.01.0)
        
self.Bonus1Attr.SetOutline()
        
self.Bonus1Attr.Show()    

        
self.Bonus1Var ui.TextLine()
        
self.Bonus1Var.SetParent(self)
        
self.Bonus1Var.SetDefaultFontName()
        
self.Bonus1Var.SetPosition(168190 13*0)
        
self.Bonus1Var.SetFeather()
        
self.Bonus1Var.SetText("0")
        
self.Bonus1Var.SetFontColor(1.01.01.0)
        
self.Bonus1Var.SetOutline()
        
self.Bonus1Var.Show()    

        
self.Bonus2Attr ui.TextLine()
        
self.Bonus2Attr.SetParent(self)
        
self.Bonus2Attr.SetDefaultFontName()
        
self.Bonus2Attr.SetPosition(18190 13*1)
        
self.Bonus2Attr.SetFeather()
        
self.Bonus2Attr.SetText("-")
        
self.Bonus2Attr.SetFontColor(1.01.01.0)
        
self.Bonus2Attr.SetOutline()
        
self.Bonus2Attr.Show()    

        
self.Bonus2Var ui.TextLine()
        
self.Bonus2Var.SetParent(self)
        
self.Bonus2Var.SetDefaultFontName()
        
self.Bonus2Var.SetPosition(168190 13*1)
        
self.Bonus2Var.SetFeather()
        
self.Bonus2Var.SetText("0")
        
self.Bonus2Var.SetFontColor(1.01.01.0)
        
self.Bonus2Var.SetOutline()
        
self.Bonus2Var.Show()    

        
self.Bonus3Attr ui.TextLine()
        
self.Bonus3Attr.SetParent(self)
        
self.Bonus3Attr.SetDefaultFontName()
        
self.Bonus3Attr.SetPosition(18190 13*2)
        
self.Bonus3Attr.SetFeather()
        
self.Bonus3Attr.SetText("-")
        
self.Bonus3Attr.SetFontColor(1.01.01.0)
        
self.Bonus3Attr.SetOutline()
        
self.Bonus3Attr.Show()    

        
self.Bonus3Var ui.TextLine()
        
self.Bonus3Var.SetParent(self)
        
self.Bonus3Var.SetDefaultFontName()
        
self.Bonus3Var.SetPosition(168190 13*2)
        
self.Bonus3Var.SetFeather()
        
self.Bonus3Var.SetText("0")
        
self.Bonus3Var.SetFontColor(1.01.01.0)
        
self.Bonus3Var.SetOutline()
        
self.Bonus3Var.Show()    

        
self.Bonus4Attr ui.TextLine()
        
self.Bonus4Attr.SetParent(self)
        
self.Bonus4Attr.SetDefaultFontName()
        
self.Bonus4Attr.SetPosition(18190 13*3)
        
self.Bonus4Attr.SetFeather()
        
self.Bonus4Attr.SetText("-")
        
self.Bonus4Attr.SetFontColor(1.01.01.0)
        
self.Bonus4Attr.SetOutline()
        
self.Bonus4Attr.Show()    

        
self.Bonus4Var ui.TextLine()
        
self.Bonus4Var.SetParent(self)
        
self.Bonus4Var.SetDefaultFontName()
        
self.Bonus4Var.SetPosition(168190 13*3)
        
self.Bonus4Var.SetFeather()
        
self.Bonus4Var.SetText("0")
        
self.Bonus4Var.SetFontColor(1.01.01.0)
        
self.Bonus4Var.SetOutline()
        
self.Bonus4Var.Show()    

        
self.Bonus5Attr ui.TextLine()
        
self.Bonus5Attr.SetParent(self)
        
self.Bonus5Attr.SetDefaultFontName()
        
self.Bonus5Attr.SetPosition(18190 13*4)
        
self.Bonus5Attr.SetFeather()
        
self.Bonus5Attr.SetText("-")
        
self.Bonus5Attr.SetFontColor(1.01.01.0)
        
self.Bonus5Attr.SetOutline()
        
self.Bonus5Attr.Show()    

        
self.Bonus5Var ui.TextLine()
        
self.Bonus5Var.SetParent(self)
        
self.Bonus5Var.SetDefaultFontName()
        
self.Bonus5Var.SetPosition(168190 13*4)
        
self.Bonus5Var.SetFeather()
        
self.Bonus5Var.SetText("0")
        
self.Bonus5Var.SetFontColor(1.01.01.0)
        
self.Bonus5Var.SetOutline()
        
self.Bonus5Var.Show()    

        
self.Bonus6Attr ui.TextLine()
        
self.Bonus6Attr.SetParent(self)
        
self.Bonus6Attr.SetDefaultFontName()
        
self.Bonus6Attr.SetPosition(18190 13*5)
        
self.Bonus6Attr.SetFeather()
        
self.Bonus6Attr.SetText("-")
        
self.Bonus6Attr.SetFontColor(1.01.01.0)
        
self.Bonus6Attr.SetOutline()
        
self.Bonus6Attr.Show()    

        
self.Bonus6Var ui.TextLine()
        
self.Bonus6Var.SetParent(self)
        
self.Bonus6Var.SetDefaultFontName()
        
self.Bonus6Var.SetPosition(168190 13*5)
        
self.Bonus6Var.SetFeather()
        
self.Bonus6Var.SetText("0")
        
self.Bonus6Var.SetFontColor(1.01.01.0)
        
self.Bonus6Var.SetOutline()
        
self.Bonus6Var.Show()

        
self.Bonus7Attr ui.TextLine()
        
self.Bonus7Attr.SetParent(self)
        
self.Bonus7Attr.SetDefaultFontName()
        
self.Bonus7Attr.SetPosition(18190 13*6)
        
self.Bonus7Attr.SetFeather()
        
self.Bonus7Attr.SetText("-")
        
self.Bonus7Attr.SetFontColor(1.01.01.0)
        
self.Bonus7Attr.SetOutline()
        
self.Bonus7Attr.Show()    

        
self.Bonus7Var ui.TextLine()
        
self.Bonus7Var.SetParent(self)
        
self.Bonus7Var.SetDefaultFontName()
        
self.Bonus7Var.SetPosition(168190 13*6)
        
self.Bonus7Var.SetFeather()
        
self.Bonus7Var.SetText("0")
        
self.Bonus7Var.SetFontColor(1.01.01.0)
        
self.Bonus7Var.SetOutline()
        
self.Bonus7Var.Show()

    
def __BreakSwitching(self):
        global 
SwitchButton
        
if SwitchButton == 1:
            
self.LastChange.SetText("Switchvorgang wurde abgebrochen")
            
self.Switchtingabbruchbutton.SetText("Abbrechen")
            
SwitchButton 0        
        
else:
            
self.Hide()
            
    
def __BreakSwitching7(self):
        global 
SwitchButton7
        
if SwitchButton7 == 1:
            
self.LastChange.SetText("Switchvorgang wurde abgebrochen")
            
self.Switchtingabbruch7.SetText("6/7 Abbrechen")
            
SwitchButton7 0        
            
    def StartSwitchBot
(self):
        global 
SwitchButton
        
global SwitchButton7
        
if SwitchButton7 != 1:
            
SwitchButton 1        
            self
.LastChange.SetText("Switchvorgang gestartet")
            
self.Switchtingabbruchbutton.SetText("Switchen Stoppen")
            
self.__Switchtingdialog()
        else:
            
chat.AppendChat(chat.CHAT_TYPE_INFO"Entweder 1-5 oder 6/7 nicht beides")
        
    
def StartSwitchBot7(self):
        global 
SwitchButton
        
global SwitchButton7
        
if SwitchButton != 1:
            
SwitchButton7 1        
            self
.LastChange.SetText("Switchvorgang gestartet (6/7)")
            
self.__Switchtingdialog7()
        else:
            
chat.AppendChat(chat.CHAT_TYPE_INFO"Entweder 1-5 oder 6/7 nicht beides")
        
    
def __Switchtingdialog7(self):
        global 
BoniSwitchvalue2
        
global Bonus5
        
global Bonus6
        
global SwitchButton7
        Slot 
self.Slotbar.GetText()
        
val6bon6 player.GetItemAttribute((int(Slot)), 5#(itemposition, atrribute)
        
val7bon7 player.GetItemAttribute((int(Slot)), 6#(itemposition, atrribute)
        
Switchvalue Boniswitchvalue2
        Search5 
self.Bvalue6.GetText()
        
Search6 self.Bvalue7.GetText()
        
DELAY_SEC 0.3

#6 Bonus switchen:
        
if SwitchButton7 == 1:
            if (
int(Bonus6) == 0) and (val6 == int(Bonus5) and bon6 >= int(Search5) or (val7 == int(Bonus5) and bon7 >= int(Search5))):
                
self.BoardMessage.SetTip("Switching erfolgreich")
                
self.BoardMessage.SetTop()
                
self.LastChange.SetText("Switchbot sucessfull")
                
SwitchButton7 0                
#7 Bonis switchen:
            
elif (int(Bonus6) != 0) and (val6 == int(Bonus5) and bon6 >= int(Search5) or (val7 == int(Bonus5) and bon7 >= int(Search5))) and ((val6 == int(Bonus6) and bon6 >= int(Search6)) or (val7 == int(Bonus6) and bon7 >= int(Search6))):
                
self.BoardMessage.SetTip("Switching erfolgreich")
                
self.BoardMessage.SetTop()
                
self.LastChange.SetText("Switchbot sucessfull")
                
SwitchButton7 0        
            elif Bonus5 
== 0:
                
self.Switchtingabbruchbutton.SetText("Abbrechen")
                
SwitchButton 0        
                self
.LastChange.SetText("Switchvorgang (6/7) wurde abgebrochen")
                
chat.AppendChat(chat.CHAT_TYPE_INFO"Bitte trage Bonis ein oder trage sie")        
                
chat.AppendChat(chat.CHAT_TYPE_INFO"der Reihenfolge nach richtig ein!")        
            else:
                
self.WaitingDelay WaitingDialog()
                
self.WaitingDelay.Open(float(DELAY_SEC))
                
self.WaitingDelay.SAFE_SetTimeOverEvent(self.__Switchtingdialog7)
                for 
eachSlot in xrange(player.INVENTORY_PAGE_SIZE*2):
                    
itemVNum player.GetItemIndex(eachSlot)

                    if 
itemVNum == int(Switchvalue):
                        
net.SendItemUseToItemPacket(eachSlot, (int(Slot)))
                        break
            if 
player.GetItemCountByVnum(int(Switchvalue)) <= 1:
                for 
eachSlot in xrange(shop.SHOP_SLOT_COUNT):
                    
getShopItemID shop.GetItemID(eachSlot)
                    if 
getShopItemID == int(Switchvalue) and not itemVNum == int(Switchvalue):
                        
net.SendShopBuyPacket(eachSlot)
                
    
def __Switchtingdialog(self):
        global 
BoniSwitchvalue
        
global Bonus0
        
global Bonus1
        
global Bonus2
        
global Bonus3
        
global Bonus4
        
global SwitchButton
        Slot 
self.Slotbar.GetText()
        
val0bon0 player.GetItemAttribute((int(Slot)), 0#(itemposition, atrribute)
        
val1bon1 player.GetItemAttribute((int(Slot)), 1#(itemposition, atrribute)
        
val2bon2 player.GetItemAttribute((int(Slot)), 2#(itemposition, atrribute)
        
val3bon3 player.GetItemAttribute((int(Slot)), 3#(itemposition, atrribute)
        
val4bon4 player.GetItemAttribute((int(Slot)), 4#(itemposition, atrribute)
        
Switchvalue Boniswitchvalue
        Search0 
self.Bvalue1.GetText()
        
Search1 self.Bvalue2.GetText()
        
Search2 self.Bvalue3.GetText()
        
Search3 self.Bvalue4.GetText()
        
Search4 self.Bvalue5.GetText()
        
DELAY_SEC 0.5

#1 Bonus switchen:
        
if SwitchButton == 1:
            if (
int(Bonus1) == 0) and (val0 == int(Bonus0) and bon0 >= int(Search0) or (val1 == int(Bonus0) and bon1 >= int(Search0)) or (val2 == int(Bonus0) and bon2 >= int(Search0)) or (val3 == int(Bonus0) and bon3 >= int(Search0)) or (val4 == int(Bonus0) and bon4 >= int(Search0))):
                
self.BoardMessage.SetTip("Switching erfolgreich")
                
self.BoardMessage.SetTop()
                
self.LastChange.SetText("Switchbot sucessfull")
                
self.Switchtingabbruchbutton.SetText("Abbrechen")
                
SwitchButton 0        
#2 Bonis switchen:
            
elif (int(Bonus2) == 0) and (val0 == int(Bonus0) and bon0 >= int(Search0) or (val1 == int(Bonus0) and bon1 >= int(Search0)) or (val2 == int(Bonus0) and bon2 >= int(Search0)) or (val3 == int(Bonus0) and bon3 >= int(Search0)) or (val4 == int(Bonus0) and bon4 >= int(Search0))) and ((val0 == int(Bonus1) and bon0 >= int(Search1)) or (val1 == int(Bonus1) and bon1 >= int(Search1)) or (val2 == int(Bonus1) and bon2 >= int(Search1)) or (val3 == int(Bonus1) and bon3 >= int(Search1)) or (val4 == int(Bonus1) and bon4 >= int(Search1))):
                
self.BoardMessage.SetTip("Switching erfolgreich")
                
self.BoardMessage.SetTop()
                
self.LastChange.SetText("Switchbot sucessfull")
                
self.Switchtingabbruchbutton.SetText("Abbrechen")
                
SwitchButton 0        
#3 Bonis switchen:
            
elif (int(Bonus3) == 0) and (val0 == int(Bonus0) and bon0 >= int(Search0) or (val1 == int(Bonus0) and bon1 >= int(Search0)) or (val2 == int(Bonus0) and bon2 >= int(Search0)) or (val3 == int(Bonus0) and bon3 >= int(Search0)) or (val4 == int(Bonus0) and bon4 >= int(Search0))) and ((val0 == int(Bonus1) and bon0 >= int(Search1)) or (val1 == int(Bonus1) and bon1 >= int(Search1)) or (val2 == int(Bonus1) and bon2 >= int(Search1)) or (val3 == int(Bonus1) and bon3 >= int(Search1)) or (val4 == int(Bonus1) and bon4 >= int(Search1))) and ((val0 == int(Bonus2) and bon0 >= int(Search2)) or (val1 == int(Bonus2) and bon1 >= int(Search2)) or (val2 == int(Bonus2) and bon2 >= int(Search2)) or (val3 == int(Bonus2) and bon3 >= int(Search2)) or (val4 == int(Bonus2) and bon4 >= int(Search2))):
                
self.BoardMessage.SetTip("Switching erfolgreich")
                
self.BoardMessage.SetTop()
                
self.LastChange.SetText("Switchbot sucessfull")
                
self.Switchtingabbruchbutton.SetText("Abbrechen")
                
SwitchButton 0        
#4 Bonis switchen:
            
elif (int(Bonus4) == 0) and (val0 == int(Bonus0) and bon0 >= int(Search0) or (val1 == int(Bonus0) and bon1 >= int(Search0)) or (val2 == int(Bonus0) and bon2 >= int(Search0)) or (val3 == int(Bonus0) and bon3 >= int(Search0)) or (val4 == int(Bonus0) and bon4 >= int(Search0))) and ((val0 == int(Bonus1) and bon0 >= int(Search1)) or (val1 == int(Bonus1) and bon1 >= int(Search1)) or (val2 == int(Bonus1) and bon2 >= int(Search1)) or (val3 == int(Bonus1) and bon3 >= int(Search1)) or (val4 == int(Bonus1) and bon4 >= int(Search1))) and ((val0 == int(Bonus2) and bon0 >= int(Search2)) or (val1 == int(Bonus2) and bon1 >= int(Search2)) or (val2 == int(Bonus2) and bon2 >= int(Search2)) or (val3 == int(Bonus2) and bon3 >= int(Search2)) or (val4 == int(Bonus2) and bon4 >= int(Search2))) and ((val0 == int(Bonus3) and bon0 >= int(Search3)) or (val1 == int(Bonus3) and bon1 >= int(Search3)) or (val2 == int(Bonus3) and bon2 >= int(Search3)) or (val3 == int(Bonus3) and bon3 >= int(Search3)) or (val4 == int(Bonus3) and bon4 >= int(Search3))):
                
self.BoardMessage.SetTip("Switching erfolgreich")
                
self.BoardMessage.SetTop()
                
self.LastChange.SetText("Switchbot sucessfull")
                
self.Switchtingabbruchbutton.SetText("Abbrechen")
                
SwitchButton 0        
#5 Bonis switchen:
            
elif (int(Bonus4) != 0) and (val0 == int(Bonus0) and bon0 >= int(Search0) or (val1 == int(Bonus0) and bon1 >= int(Search0)) or (val2 == int(Bonus0) and bon2 >= int(Search0)) or (val3 == int(Bonus0) and bon3 >= int(Search0)) or (val4 == int(Bonus0) and bon4 >= int(Search0))) and ((val0 == int(Bonus1) and bon0 >= int(Search1)) or (val1 == int(Bonus1) and bon1 >= int(Search1)) or (val2 == int(Bonus1) and bon2 >= int(Search1)) or (val3 == int(Bonus1) and bon3 >= int(Search1)) or (val4 == int(Bonus1) and bon4 >= int(Search1))) and ((val0 == int(Bonus2) and bon0 >= int(Search2)) or (val1 == int(Bonus2) and bon1 >= int(Search2)) or (val2 == int(Bonus2) and bon2 >= int(Search2)) or (val3 == int(Bonus2) and bon3 >= int(Search2)) or (val4 == int(Bonus2) and bon4 >= int(Search2))) and ((val0 == int(Bonus3) and bon0 >= int(Search3)) or (val1 == int(Bonus3) and bon1 >= int(Search3)) or (val2 == int(Bonus3) and bon2 >= int(Search3)) or (val3 == int(Bonus3) and bon3 >= int(Search3)) or (val4 == int(Bonus3) and bon4 >= int(Search3))) and ((val0 == int(Bonus4) and bon0 >= int(Search4)) or (val1 == int(Bonus4) and bon1 >= int(Search4)) or (val2 == int(Bonus4) and bon2 >= int(Search4)) or (val3 == int(Bonus4) and bon3 >= int(Search4)) or (val4 == int(Bonus4) and bon4 >= int(Search4))):
                
self.BoardMessage.SetTip("Switching erfolgreich")
                
self.BoardMessage.SetTop()
                
self.LastChange.SetText("Switchbot sucessfull")
                
self.Switchtingabbruchbutton.SetText("Abbrechen")
                
SwitchButton 0        
            elif Bonus0 
== 0:
                
self.Switchtingabbruchbutton.SetText("Abbrechen")
                
SwitchButton 0        
                self
.LastChange.SetText("Switchvorgang wurde abgebrochen")
                
chat.AppendChat(chat.CHAT_TYPE_INFO"Bitte trage Bonis ein oder trage sie")        
                
chat.AppendChat(chat.CHAT_TYPE_INFO"der Reihenfolge nach richtig ein!")        
            else:
                
self.WaitingDelay WaitingDialog()
                
self.WaitingDelay.Open(float(DELAY_SEC))
                
self.WaitingDelay.SAFE_SetTimeOverEvent(self.__Switchtingdialog)
                for 
eachSlot in xrange(player.INVENTORY_PAGE_SIZE*2):
                    
itemVNum player.GetItemIndex(eachSlot)

                    if 
itemVNum == int(Switchvalue):
                        
net.SendItemUseToItemPacket(eachSlot, (int(Slot)))
                        break
            if 
player.GetItemCountByVnum(int(Switchvalue)) <= 1:
                for 
eachSlot in xrange(shop.SHOP_SLOT_COUNT):
                    
getShopItemID shop.GetItemID(eachSlot)
                    if 
getShopItemID == int(Switchvalue) and not itemVNum == int(Switchvalue):
                        
net.SendShopBuyPacket(eachSlot)
            
    
def __Resetbonusall(self):
        global 
Bonus0
        
global Bonus1
        
global Bonus2
        
global Bonus3
        
global Bonus4
        Bonus0 
0
        Bonus1 
0
        Bonus2 
0
        Bonus3 
0
        Bonus4 
0
        self
.Bvalue1.SetText("0")
        
self.Bvalue2.SetText("0")
        
self.Bvalue3.SetText("0")
        
self.Bvalue4.SetText("0")
        
self.Bvalue5.SetText("0")
        
self.Bonus1Attr.SetText("-")
        
self.Bonus2Attr.SetText("-")
        
self.Bonus3Attr.SetText("-")
        
self.Bonus4Attr.SetText("-")
        
self.Bonus5Attr.SetText("-")
        
self.LastChange.SetText("Deleted saved Bonis")
    
    
def __Wish_1_Option(self):
        global 
Bonus0
        
global PRESSWISH0
        PRESSWISH0 
1
        self
.BonusListBox FileListDialog()
        
    
def __Wish_2_Option(self):
        global 
Bonus1
        
global PRESSWISH1
        PRESSWISH1 
1
        self
.BonusListBox FileListDialog()
        
    
def __Wish_3_Option(self):
        global 
Bonus2
        
global PRESSWISH2
        PRESSWISH2 
1
        self
.BonusListBox FileListDialog()

    
def __Wish_4_Option(self):
        global 
Bonus3
        
global PRESSWISH3
        PRESSWISH3 
1
        self
.BonusListBox FileListDialog()
        
    
def __Wish_5_Option(self):
        global 
Bonus4
        
global PRESSWISH4
        PRESSWISH4 
1
        self
.BonusListBox FileListDialog()
        
    
def __Wish_6_Option(self):
        global 
Bonus5
        
global PRESSWISH5
        PRESSWISH5 
1
        self
.BonusListBox FileListDialog()
        
    
def __Wish_7_Option(self):
        global 
Bonus6
        
global PRESSWISH6
        PRESSWISH6 
1
        self
.BonusListBox FileListDialog()
        
    
def OnUpdate(self):
        global 
Bonus0
        
global Bonus1
        
global Bonus2
        
global Bonus3
        
global Bonus4
        
global Bonus5
        
global Bonus6
        
if self.Bonus1Attr.GetText() != str(BonusListe[int(Bonus0)]) and int(Bonus0) != 0:
            
self.Bonus1Attr.SetText(str(BonusListe[int(Bonus0)]))
        
elif self.Bonus1Attr.GetText() != "" and int(Bonus0) == 0:
            
self.Bonus1Attr.SetText("-")        
        if 
self.Bonus2Attr.GetText() != str(BonusListe[int(Bonus1)]) and int(Bonus1) != 0:
            
self.Bonus2Attr.SetText(str(BonusListe[int(Bonus1)]))
        
elif self.Bonus2Attr.GetText() != "" and int(Bonus1) == 0:
            
self.Bonus2Attr.SetText("-")        
        if 
self.Bonus3Attr.GetText() != str(BonusListe[int(Bonus2)]) and int(Bonus2) != 0:
            
self.Bonus3Attr.SetText(str(BonusListe[int(Bonus2)]))
        
elif self.Bonus3Attr.GetText() != "" and int(Bonus2) == 0:
            
self.Bonus3Attr.SetText("-")        
        if 
self.Bonus4Attr.GetText() != str(BonusListe[int(Bonus3)]) and int(Bonus3) != 0:
            
self.Bonus4Attr.SetText(str(BonusListe[int(Bonus3)]))
        
elif self.Bonus4Attr.GetText() != "" and int(Bonus3) == 0:
            
self.Bonus4Attr.SetText("-")        
        if 
self.Bonus5Attr.GetText() != str(BonusListe[int(Bonus4)]) and int(Bonus4) != 0:
            
self.Bonus5Attr.SetText(str(BonusListe[int(Bonus4)]))
        
elif self.Bonus5Attr.GetText() != "" and int(Bonus4) == 0:
            
self.Bonus5Attr.SetText("-")
        if 
self.Bonus6Attr.GetText() != str(BonusListe[int(Bonus5)]) and int(Bonus5) != 0:
            
self.Bonus6Attr.SetText(str(BonusListe[int(Bonus5)]))
        
elif self.Bonus6Attr.GetText() != "" and int(Bonus5) == 0:
            
self.Bonus6Attr.SetText("-")
        if 
self.Bonus7Attr.GetText() != str(BonusListe[int(Bonus6)]) and int(Bonus6) != 0:
            
self.Bonus7Attr.SetText(str(BonusListe[int(Bonus6)]))
        
elif self.Bonus7Attr.GetText() != "" and int(Bonus6) == 0:
            
self.Bonus7Attr.SetText("-")
            
        if 
self.Bonus1Var.GetText() != self.Bvalue1.GetText():
            
self.Bonus1Var.SetText(str(self.Bvalue1.GetText()))
        if 
self.Bonus2Var.GetText() != self.Bvalue2.GetText():
            
self.Bonus2Var.SetText(str(self.Bvalue2.GetText()))
        if 
self.Bonus3Var.GetText() != self.Bvalue3.GetText():
            
self.Bonus3Var.SetText(str(self.Bvalue3.GetText()))
        if 
self.Bonus4Var.GetText() != self.Bvalue4.GetText():
            
self.Bonus4Var.SetText(str(self.Bvalue4.GetText()))
        if 
self.Bonus5Var.GetText() != self.Bvalue5.GetText():
            
self.Bonus5Var.SetText(str(self.Bvalue5.GetText()))
        if 
self.Bonus6Var.GetText() != self.Bvalue6.GetText():
            
self.Bonus6Var.SetText(str(self.Bvalue6.GetText()))
        if 
self.Bonus7Var.GetText() != self.Bvalue7.GetText():
            
self.Bonus7Var.SetText(str(self.Bvalue7.GetText()))
        
    
def Show(self):
        
ui.ThinBoard.Show(self)
        
    
def Close(self):
        
self.Hide()
        return 
TRUE
        
    def OnPressEscapeKey
(self):
        
self.Hide()
        return 
TRUE

BonusListe 
= ( 
    
"",
    
"Max. TP",
    
"Max. MP",
    
"Vitalität",
    
"Intelligenz"
    
"Stärke",
    
"Beweglichkeit",
    
"Angriffsgeschwindigkeit",
    
"Bewegungsgeschwindigkeit",
    
"Zaubergeschwindigkeit",
    
"TP-Regeneration",
    
"",
    
"Vergiftungschance",
    
"Ohnmachtschance",
    
"",
    
"Kritischer Treffer",
    
"Durchbohrender Treffer",
    
"Stark ggn Halbmenschen",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"Nahkampf-Angriff blocken",
    
"Pfeilangriff ausweichen",
    
"Schwertverteidigung",
    
"Zweihandverteidigung",
    
"Dolchverteidigung",
    
"Glockenverteidigung",
    
"Fächerverteidigung",
    
"Pfeilwiderstand",
    
"Feuerwiderstand",
    
"Blitzwiderstand",
    
"Magieverteidigung",
    
"Windverteidigung",
    
"Nahkampftreffer reflektieren",
    
"",
    
"Giftverteidigung",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"Immun gegen Ohnmacht",
    
"",
    
"",
    
"",
    
"",
    
"Angriffswert",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"Fertigkeitsschaden",
    
"Durchschn. Schaden",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    )

BonusIDListe = { 
    
"" 0,
    
"Max. TP" 1,
    
"Max. MP" 2,
    
"Vitalität" 3,
    
"Intelligenz" 4
    
"Stärke" 5,
    
"Beweglichkeit" 6,
    
"Angriffsgeschwindigkeit" 7,
    
"Bewegungsgeschwindigkeit" 8,
    
"Zaubergeschwindigkeit" 9,
    
"TP-Regeneration" 10,
    
"" 11,
    
"Vergiftungschance" 12,
    
"Ohnmachtschance" 13,
    
"" 14,
    
"Kritischer Treffer" 15,
    
"Durchbohrender Treffer" 16,
    
"Stark ggn Halbmenschen" 17,
    
"" 18,
    
"" 19,
    
"" 20,
    
"" 21,
    
"" 22,
    
"" 23,
    
"" 24,
    
"" 25,
    
"" 26,
    
"Nahkampf-Angriff blocken" 27,
    
"Pfeilangriff ausweichen" 28,
    
"Schwertverteidigung" 29,
    
"Zweihandverteidigung" 30,
    
"Dolchverteidigung" 31,
    
"Glockenverteidigung" 32,
    
"Fächerverteidigung" 33,
    
"Pfeilwiderstand" 34,
    
"Feuerwiderstand" 35,
    
"Blitzwiderstand" 36,
    
"Magieverteidigung" 37,
    
"Windverteidigung" 38,
    
"Nahkampftreffer reflektieren" 39,
    
"" 40,
    
"Giftverteidigung" 41,
    
"" 42,
    
"" 43,
    
"" 44,
    
"" 45,
    
"" 46,
    
"" 47,
    
"Immun gegen Ohnmacht" 48,
    
"" 49,
    
"" 50,
    
"" 51,
    
"" 52,
    
"Angriffswert" 53,
    
"" 54,
    
"" 55,
    
"" 56,
    
"" 57,
    
"" 58,
    
"" 59,
    
"" 60,
    
"" 61,
    
"" 62,
    
"" 63,
    
"" 64,
    
"" 65,
    
"" 66,
    
"" 67,
    
"" 68,
    
"" 69,
    
"" 70,
    
"Fertigkeitsschaden" 71,
    
"Durchschn. Schaden" 72,
    
"" 73,
    
"" 74,
    
"" 75,
    
"" 76,
    
"" 77,
    
"" 78,
    
"" 79,
    
"" 80,
    
"" 81,
    }
    
class 
FileListDialog(ui.ThinBoard):
    
def __init__(self):
        
ui.ThinBoard.__init__(self)

        
self.isLoaded=0
        self
.selectEvent=None
        self
.fileListBox=None

        self
.SetCenterPosition()
        
self.SetSize(170600)
        
self.Show()
        
self.AddFlag("movable")
        
self.AddFlag("float")
        
    
def __del__(self):
        
ui.ThinBoard.__del__(self)

    
def Show(self):
        if 
self.isLoaded==0:
            
self.isLoaded=1

            self
.__Load()

        
ui.ThinBoard.Show(self)

    
def Open(self):
        
self.Show()

        
self.SetCenterPosition()
        
self.SetTop()
        
self.UpdateFileList()

    
def Close(self):
        
self.Hide()

    
def OnPressEscapeKey(self):
        
self.Close()
        return 
TRUE

    def __CreateFileListBox
(self):
        
fileListBox ui.ListBoxEx()
        
fileListBox.SetParent(self)
        
fileListBox.SetPosition(1550)
        
fileListBox.Show()
        return 
fileListBox

    def __Load
(self):
        
self.__Load_BindObject()

        
self.UpdateFileList()

    
def __Load_BindObject(self):
        
self.fileListBox self.__CreateFileListBox()
        
self.LoadFuckingScrollBar()
        
self.LoadTextLines()
        
self.fileListBox.SetScrollBar(self.ScrollBar)

        
self.UpdateButton ui.Button()
        
self.UpdateButton.SetParent(self)
        
self.UpdateButton.SetUpVisual("d:/ymir work/ui/public/Large_button_01.sub")
        
self.UpdateButton.SetOverVisual("d:/ymir work/ui/public/Large_button_02.sub")
        
self.UpdateButton.SetDownVisual("d:/ymir work/ui/public/Large_button_03.sub")
        
self.UpdateButton.SetText("Aktualisieren")
        
self.UpdateButton.SetPosition(15365)
        
self.UpdateButton.SetEvent(ui.__mem_func__(self.UpdateFileList))
        
self.UpdateButton.Show()
        
self.UpdateButton.Hide()
        
        
self.SelectBonus ui.Button()
        
self.SelectBonus.SetParent(self)
        
self.SelectBonus.SetPosition(19565)
        
self.SelectBonus.SetUpVisual("d:/ymir work/ui/public/Middle_Button_01.sub")
        
self.SelectBonus.SetOverVisual("d:/ymir work/ui/public/Middle_Button_02.sub")
        
self.SelectBonus.SetDownVisual("d:/ymir work/ui/public/Middle_Button_03.sub")
        
self.SelectBonus.SetText("OK")
        
self.SelectBonus.SetEvent(ui.__mem_func__(self.SetBonis))
        
self.SelectBonus.Show()

        
self.CancelBonus ui.Button()
        
self.CancelBonus.SetParent(self)
        
self.CancelBonus.SetPosition(89565)
        
self.CancelBonus.SetUpVisual("d:/ymir work/ui/public/Middle_Button_01.sub")
        
self.CancelBonus.SetOverVisual("d:/ymir work/ui/public/Middle_Button_02.sub")
        
self.CancelBonus.SetDownVisual("d:/ymir work/ui/public/Middle_Button_03.sub")
        
self.CancelBonus.SetText("Abbrechen")
        
self.CancelBonus.SetEvent(ui.__mem_func__(self.Close))
        
self.CancelBonus.Show()

        
    
def LoadTextLines(self):
        
self.copyright ui.TextLine()
        
self.copyright.SetParent(self)
        
self.copyright.SetDefaultFontName()
        
self.copyright.SetPosition(5029)
        
self.copyright.SetFeather()
        
self.copyright.SetText("Bonus wählen:")
        
self.copyright.SetFontColor(0.20.21.0)
        
self.copyright.SetOutline()
        
self.copyright.Show()


    
def LoadFuckingScrollBar(self):
        
self.ScrollBar ui.ScrollBar()
        
self.ScrollBar.SetParent(self)
        
self.ScrollBar.SetPosition(14040)
        
self.ScrollBar.SetScrollBarSize(520)
        
self.ScrollBar.Show()

    
def CancelGuildName(self):
        
self.guildNameBoard.Close()
        
self.guildNameBoard None
        
return TRUE

    def UpdateFileList
(self):
        
self.__RefreshFileList()
        for 
BonusType in BonusListe:
            if 
BonusType == "":
                
self.fileListBox.AppendItem(Item("......."))
            
elif BonusType != "":
                
self.fileListBox.AppendItem(Item(BonusType))
            
#chat.AppendChat(chat.CHAT_TYPE_INFO, str(BonusIDListe[BonusType]))        
        
    
def __RefreshFileList(self):
        
self.fileListBox.RemoveAllItems()
        
    
def SetBonis(self):
        global 
Bonus0
        
global Bonus1
        
global Bonus2
        
global Bonus3
        
global Bonus4
        
global Bonus5
        
global Bonus6
        
global PRESSWISH0
        
global PRESSWISH1
        
global PRESSWISH2
        
global PRESSWISH3
        
global PRESSWISH4
        
global PRESSWISH5
        
global PRESSWISH6
        SelectedIndex 
self.fileListBox.GetSelectedItem()
        
SelectedIndex SelectedIndex.GetText()
        if 
str(SelectedIndex) != "......." and str(SelectedIndex) != "":
            if 
PRESSWISH0 == 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"1.Bonus " str(SelectedIndex))
                
Bonus0 BonusIDListe[str(SelectedIndex)]
                
PRESSWISH0 0
            elif PRESSWISH1 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"2.Bonus " str(SelectedIndex))
                
Bonus1 int(BonusIDListe[SelectedIndex])
                
PRESSWISH1 0
            elif PRESSWISH2 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"3.Bonus " str(SelectedIndex))
                
Bonus2 int(BonusIDListe[SelectedIndex])
                
PRESSWISH2 0
            elif PRESSWISH3 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"4.Bonus " str(SelectedIndex))
                
Bonus3 int(BonusIDListe[SelectedIndex])
                
PRESSWISH3 0
            elif PRESSWISH4 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"5.Bonus " str(SelectedIndex))
                
Bonus4 int(BonusIDListe[SelectedIndex])
                
PRESSWISH4 0
            elif PRESSWISH5 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"6.Bonus " str(SelectedIndex))
                
Bonus5 int(BonusIDListe[SelectedIndex])
                
PRESSWISH5 0
            elif PRESSWISH6 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"7.Bonus " str(SelectedIndex))
                
Bonus6 int(BonusIDListe[SelectedIndex])
                
PRESSWISH6 0

        elif str
(SelectedIndex) == "......." and str(SelectedIndex) != "":
            if 
PRESSWISH0 == 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"1.Bonus wurde gelöscht")
                
Bonus0 0
                PRESSWISH0 
0
            elif PRESSWISH1 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"2.Bonus wurde gelöscht")
                
Bonus1 0
                PRESSWISH1 
0
            elif PRESSWISH2 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"3.Bonus wurde gelöscht")
                
Bonus2 0
                PRESSWISH2 
0
            elif PRESSWISH3 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"4.Bonus wurde gelöscht")
                
Bonus3 0
                PRESSWISH3 
0
            elif PRESSWISH4 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"5.Bonus wurde gelöscht")
                
Bonus4 0
                PRESSWISH4 
0    
            elif PRESSWISH5 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"6.Bonus wurde gelöscht")
                
Bonus5 0
                PRESSWISH5 
0    
            elif PRESSWISH6 
== 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"7.Bonus wurde gelöscht")
                
Bonus6 0
                PRESSWISH6 
0    
                
        
else:
            
chat.AppendChat(chat.CHAT_TYPE_INFO"Kein Bonus ausgewählt")        
        
self.Close()

class 
WaitingDialog(ui.ScriptWindow):

    
def __init__(self):
        
ui.ScriptWindow.__init__(self)
        
self.eventTimeOver lambda *argNone
        self
.eventExit lambda *argNone

    def __del__
(self):
        
ui.ScriptWindow.__del__(self)

    
def Open(selfwaitTime):
        
import time
        curTime 
time.clock()
        
self.endTime curTime waitTime

        self
.Show()        

    
def Close(self):
        
self.Hide()

    
def Destroy(self):
        
self.Hide()

    
def SAFE_SetTimeOverEvent(selfevent):
        
self.eventTimeOver ui.__mem_func__(event)

    
def SAFE_SetExitEvent(selfevent):
        
self.eventExit ui.__mem_func__(event)
        
    
def OnUpdate(self):
        
import time
        lastTime 
max(0self.endTime time.clock())
        if 
== lastTime:
            
self.Close()
            
self.eventTimeOver()
        else:
            return
        
    
def OnPressExitKey(self):
        
self.Close()
        return 
TRUE
        
FILE_NAME_LEN 
40 

class Item(ui.ListBoxEx.Item):
    
def __init__(selffileName):
        
ui.ListBoxEx.Item.__init__(self)
        
self.canLoad=0
        self
.text=fileName
        self
.textLine=self.__CreateTextLine(fileName[:FILE_NAME_LEN])          

    
def __del__(self):
        
ui.ListBoxEx.Item.__del__(self)

    
def GetText(self):
        return 
self.text

    def SetSize
(selfwidthheight):
        
ui.ListBoxEx.Item.SetSize(self6*len(self.textLine.GetText()) + 4height)

    
def __CreateTextLine(selffileName):
        
textLine=ui.TextLine()
        
textLine.SetParent(self)
        
textLine.SetPosition(00)
        
textLine.SetText(fileName)
        
textLine.Show()
        return 
textLine
        
StartDialog 
SwitchBotDialog()
StartDialog.Show() 
xSpongBoZZ is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
Python Problem!!!
08/22/2012 - Metin2 - 2 Replies
HeyHo ich bins mal wieder mit einem Python Problem xD undzwar wollte ich einfach mal wissen wie man VID's über eine gnaze map scannen kann =) ich kriege es nur so hin das ich alle VID's in sichtweite gefasst kriege bitte um hilfe!!!:handsdown::handsdown:
Python Problem
08/09/2012 - Metin2 - 2 Replies
Wollte mal eine frage an die Python kenne stellen ich habe ein Problem wollte mal mit Python in metin2 anfangen und wollte etwas ganz leichtes machen aber pustekuchen es funzt nicht..... import chat chat.AppendChat(chat.CHAT_TYPE_NOTICE, "Metin2 ")
Python Problem :S
07/12/2012 - Metin2 Private Server - 8 Replies
Haillo, wie euch schon mein Thread "vorraussagt" habe ich einen Python Problem. Das Problem ist folgendes, ich habe einen neuen Button eingebaut wenn ich jedoch auf dem Button drücke (Funktion eingebunden) passiert rein garnichts. Die Syserr sagt lediglich folgendes aus: 0709 16:40:40787 :: Traceback (most recent call last): 0709 16:40:40788 :: File "ui.py", line 1006, in CallEvent 0709 16:40:40788 :: File "ui.py", line 87, in __call__
[PROBLEM]Python Uhr
03/18/2012 - General Coding - 3 Replies
Hallo, Ich habe solch ein Script lt = time.localtime() jahr,monat,tag,stunde,minute,sekunde = lt zeit = "%02i:%02i:%02i" % (stunde, minute, sekunde) Nun mache ich z.b. "text" : zeit,
Python Problem.
10/29/2011 - Metin2 Private Server - 4 Replies
Hey Leute. Ich wollte gerade Python auf Freebsd 8.2 installieren nach dem Tut. http://www.elitepvpers.com/forum/metin2-pserver-g uides-strategies/937110-how2-python-f-r-alles.html Nach make install clean kommt ein Fenster ich gehe auf Close doch nun kommt. Horny# cd /usr/ports/lang/python Horny# make install clean ===> Installing for python-2.7,2 ===> python-2.7,2 depends on file: /usr/local/bin/python2.7 - not found



All times are GMT +1. The time now is 02:31.


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.