Hallo brauche hilfe bei Python bitte

06/09/2013 07:16 killerrex11#1
unszwar hab ich Problemm mit mein switcher kann mir einer helfen lade die py datei mal hier rein

und wenn ich es X mache und wieder starten will geht es nicht

So switcht der nicht obwohl es steht switching erfolgreich

[Only registered and activated users can see links. Click Here To Register...]

und Soo Switcht der mir es

[Only registered and activated users can see links. Click Here To Register...]


PHP Code:
import chat
import item
import net
import player
import shop
import ui
import uiTip
import systemSetting
import app
import time
import chr
import chrmgr
import nonplayer

Bonus1 
= (00)
Bonus2 = (00)
Bonus3 = (00)
Bonus4 = (00)
Bonus5 = (00)
SwitchButton 0
Boniswitchvalue 
71084
PRESSWISH 
0

class SwitchBotDialog(ui.ThinBoard):
    
MAINBONUSES  = ["1. Bonus""2. Bonus""3. Bonus""4. Bonus""5. Bonus"]
    
ALTERBONUSES = ["1. Bonus""2. Bonus""3. Bonus""4. Bonus""5. Bonus"]
    
GUI = []
    
def __init__(self):
        
ui.ThinBoard.__init__(self)

        
self.__Load_BindObject()
        
self.UpdateInventoryList()

    
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"Enchant Scroll's Vnum: " str(ItemValue))
                
Boniswitchvalue int(ItemValue)
                break
            
elif str(item.GetItemName()) == "Enchant Scroll":
                
chat.AppendChat(chat.CHAT_TYPE_INFO"Enchant Scroll's Vnum: " str(ItemValue))
                
Boniswitchvalue int(ItemValue)
                break

    
def __CreateInvListBox(self):
        
invListBox ui.ListBoxEx()
        
invListBox.SetParent(self)
        
invListBox.SetPosition(1535)
        
invListBox.Show()
        return 
invListBox

    def __Load_BindObject
(self):
        
self.AddFlag("movable")
        
self.AddFlag("float")
        
self.SetSize(470325)
        
self.SetCenterPosition()
        
self.Show()

        
self.invListBox self.__CreateInvListBox()
        
self.LoadScrollBar()
        
self.invListBox.SetScrollBar(self.ScrollBar)

        
self.LoadTextLines()
        
self.LoadButtons()
        
self.LoadEditLines()
        
self.LoadLine()
        
self.Bonuschangevalue()

        
self.BoardMessage uiTip.BigBoard()

    
def LoadEditLines(self):
        
self.BonusValue10SlotBar ui.SlotBar()
        
self.BonusValue10SlotBar.SetParent(self)
        
self.BonusValue10SlotBar.SetSize(2914)
        
self.BonusValue10SlotBar.SetPosition(-27+95+131143)
        
self.BonusValue10SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue10SlotBar.Show()

        
self.Bvalue10 ui.EditLine()
        
self.Bvalue10.SetParent(self.BonusValue10SlotBar)
        
self.Bvalue10.SetSize(2918)
        
self.Bvalue10.SetPosition(60)
        
self.Bvalue10.SetMax(4)
        
self.Bvalue10.SetNumberMode()
        
self.Bvalue10.SetText("0")
        
self.Bvalue10.SetTabEvent(ui.__mem_func__(self.StartSwitchBot))
        
self.Bvalue10.SetReturnEvent(ui.__mem_func__(self.StartSwitchBot))
        
self.Bvalue10.Show()

        
self.BonusValue9SlotBar ui.SlotBar()
        
self.BonusValue9SlotBar.SetParent(self)
        
self.BonusValue9SlotBar.SetSize(2914)
        
self.BonusValue9SlotBar.SetPosition(-27+95+131118)
        
self.BonusValue9SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue9SlotBar.Show()

        
self.Bvalue9 ui.EditLine()
        
self.Bvalue9.SetParent(self.BonusValue9SlotBar)
        
self.Bvalue9.SetSize(2918)
        
self.Bvalue9.SetPosition(60)
        
self.Bvalue9.SetMax(4)
        
self.Bvalue9.SetNumberMode()
        
self.Bvalue9.SetFocus()
        
self.Bvalue9.SetText("0")
        
self.Bvalue9.SetTabEvent(ui.__mem_func__(self.Bvalue10.SetFocus))
        
self.Bvalue9.SetReturnEvent(ui.__mem_func__(self.Bvalue10.SetFocus))
        
self.Bvalue9.Show()

        
self.BonusValue8SlotBar ui.SlotBar()
        
self.BonusValue8SlotBar.SetParent(self)
        
self.BonusValue8SlotBar.SetSize(2914)
        
self.BonusValue8SlotBar.SetPosition(-27+95+13193)
        
self.BonusValue8SlotBar.SetWindowHorizontalAlignCenter()
        
self.BonusValue8SlotBar.Show()

        
self.Bvalue8 ui.EditLine()
        
self.Bvalue8.SetParent(self.BonusValue8SlotBar)
        
self.Bvalue8.SetSize(2918)
        
self.Bvalue8.SetPosition(60)
        
self.Bvalue8.SetMax(4)
        
self.Bvalue8.SetNumberMode()
        
self.Bvalue8.SetText("0")
        
self.Bvalue8.SetTabEvent(ui.__mem_func__(self.Bvalue9.SetFocus))
        
self.Bvalue8.SetReturnEvent(ui.__mem_func__(self.Bvalue9.SetFocus))
        
self.Bvalue8.Show()

        
self.BonusValue7SlotBar ui.SlotBar()
        
self.BonusValue7SlotBar.SetParent(self)
        
self.BonusValue7SlotBar.SetSize(2914)
        
self.BonusValue7SlotBar.SetPosition(-27+95+13168)
        
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.SetText("0")
        
self.Bvalue7.SetTabEvent(ui.__mem_func__(self.Bvalue8.SetFocus))
        
self.Bvalue7.SetReturnEvent(ui.__mem_func__(self.Bvalue8.SetFocus))
        
self.Bvalue7.Show()

        
self.BonusValue6SlotBar ui.SlotBar()
        
self.BonusValue6SlotBar.SetParent(self)
        
self.BonusValue6SlotBar.SetSize(2914)
        
self.BonusValue6SlotBar.SetPosition(-27+95+13144)
        
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.SetText("0")
        
self.Bvalue6.SetFocus()
        
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(-27+95143)
        
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.SetFocus()
        
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(-27+95118)
        
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(-27+9593)
        
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(-27+9568)
        
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(-27+9544)
        
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(44015)
        
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('Close'0, - 23)
        
self.CloseButton.SetEvent(ui.__mem_func__(self.Close))
        
self.CloseButton.Show()

        
self.StartButton ui.Button()
        
self.StartButton.SetParent(self)
        
self.StartButton.SetPosition(195 285)
        
self.StartButton.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.StartButton.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.StartButton.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.StartButton.SetEvent(ui.__mem_func__(self.StartSwitchBot))
        
self.StartButton.SetText("Start")
        
self.StartButton.Show()

        
self.SwitchingBreakButton ui.Button()
        
self.SwitchingBreakButton.SetParent(self)
        
self.SwitchingBreakButton.SetPosition(326285)
        
self.SwitchingBreakButton.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.SwitchingBreakButton.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.SwitchingBreakButton.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.SwitchingBreakButton.SetEvent(ui.__mem_func__(self.__BreakSwitching))
        
self.SwitchingBreakButton.SetText("Abbrechen")
        
self.SwitchingBreakButton.Show()

        
self.RefreshInvListButton ui.Button()
        
self.RefreshInvListButton.SetParent(self)
        
self.RefreshInvListButton.SetPosition(50285)
        
self.RefreshInvListButton.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
        
self.RefreshInvListButton.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
        
self.RefreshInvListButton.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
        
self.RefreshInvListButton.SetEvent(ui.__mem_func__(self.UpdateInventoryList))
        
self.RefreshInvListButton.SetText("Refresh")
        
self.RefreshInvListButton.Show()

        
self.DelaySlide ui.SliderBar()
        
self.DelaySlide.SetParent(self)
        
self.DelaySlide.SetPosition(217260)
        
self.DelaySlide.SetEvent(ui.__mem_func__(self.SetDelay))
        
self.DelaySlide.SetSliderPos(0.1)
        
self.DelaySlide.Show()

        
195
        y 
40
        i 
0
        
for Button in self.MAINBONUSES:
            
ButtonList_1 ui.Button()
            
ButtonList_1.SetParent(self)
            
ButtonList_1.SetPosition(xy)
            
ButtonList_1.SetUpVisual("d:/ymir work/ui/public/Large_button_01.sub")
            
ButtonList_1.SetOverVisual("d:/ymir work/ui/public/Large_button_02.sub")
            
ButtonList_1.SetDownVisual("d:/ymir work/ui/public/Large_button_03.sub")
            
ButtonList_1.SetText(Button)
            
ButtonList_1.Show()
            
Mod self.MAINBONUSES[i]
            
ButtonList_1.SetEvent(lambda arg Modself.ButtonList_1(arg))
            
self.GUI.append(ButtonList_1)
            
+= 25
            i 
+= 1

        x 
326
        y 
40
        i 
0
        
for Button in self.ALTERBONUSES:
            
ButtonList_2 ui.Button()
            
ButtonList_2.SetParent(self)
            
ButtonList_2.SetPosition(xy)
            
ButtonList_2.SetUpVisual("d:/ymir work/ui/public/Large_button_01.sub")
            
ButtonList_2.SetOverVisual("d:/ymir work/ui/public/Large_button_02.sub")
            
ButtonList_2.SetDownVisual("d:/ymir work/ui/public/Large_button_03.sub")
            
ButtonList_2.SetText(Button)
            
ButtonList_2.Show()
            
Mod self.ALTERBONUSES[i]
            
ButtonList_2.SetEvent(lambda arg Modself.ButtonList_2(arg))
            
self.GUI.append(ButtonList_2)
            
+= 25
            i 
+= 1

    def LoadLine
(self):
        
self.LineForKaching ui.Line()
        
self.LineForKaching.SetParent(self)
        
self.LineForKaching.SetPosition(198178)
        
self.LineForKaching.SetSize(2600)
        
self.LineForKaching.SetColor(0xff777777)
        
self.LineForKaching.Show()

    
def LoadTextLines(self):
    
####TitleName
        
self.TitleName ui.TextLine()
        
self.TitleName.SetParent(self)
        
self.TitleName.SetDefaultFontName()
        
self.TitleName.SetPosition(235-4410)
        
self.TitleName.SetFeather()
        
self.TitleName.SetText("Bonus Switcher by P3NG3R")
        
self.TitleName.SetFontColor(0.60.71)
        
self.TitleName.SetOutline()
        
self.TitleName.Show()

    
####Main
        
self.MainBonies ui.TextLine()
        
self.MainBonies.SetParent(self)
        
self.MainBonies.SetDefaultFontName()
        
self.MainBonies.SetPosition(198162)
        
self.MainBonies.SetFeather()
        
self.MainBonies.SetText("Main:")
        
self.MainBonies.SetFontColor(0.60.71)
        
self.MainBonies.SetOutline()
        
self.MainBonies.Show()

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

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

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

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

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

    
####MainBonusVars
        
self.Bonus1Var ui.TextLine()
        
self.Bonus1Var.SetParent(self)
        
self.Bonus1Var.SetDefaultFontName()
        
self.Bonus1Var.SetPosition(198+100180 13*0)
        
self.Bonus1Var.SetFeather()
        
self.Bonus1Var.SetText("0")
        
self.Bonus1Var.SetFontColor(1.01.01.0)
        
self.Bonus1Var.SetOutline()
        
self.Bonus1Var.Show()

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

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

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

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

    
####Alter
        
self.AlterBonies ui.TextLine()
        
self.AlterBonies.SetParent(self)
        
self.AlterBonies.SetDefaultFontName()
        
self.AlterBonies.SetPosition(329162)
        
self.AlterBonies.SetFeather()
        
self.AlterBonies.SetText("Alternative:")
        
self.AlterBonies.SetFontColor(0.60.71)
        
self.AlterBonies.SetOutline()
        
self.AlterBonies.Show()

    
####AlterBonusAttrs
        
self.Bonus6Attr ui.TextLine()
        
self.Bonus6Attr.SetParent(self)
        
self.Bonus6Attr.SetDefaultFontName()
        
self.Bonus6Attr.SetPosition(329180 13*0)
        
self.Bonus6Attr.SetFeather()
        
self.Bonus6Attr.SetText("-")
        
self.Bonus6Attr.SetFontColor(1.01.01.0)
        
self.Bonus6Attr.SetOutline()
        
self.Bonus6Attr.Show()

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

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

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

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

    
####AlterBonusVars
        
self.Bonus6Var ui.TextLine()
        
self.Bonus6Var.SetParent(self)
        
self.Bonus6Var.SetDefaultFontName()
        
self.Bonus6Var.SetPosition(329+100180 13*0)
        
self.Bonus6Var.SetFeather()
        
self.Bonus6Var.SetText("0")
        
self.Bonus6Var.SetFontColor(1.01.01.0)
        
self.Bonus6Var.SetOutline()
        
self.Bonus6Var.Show()

        
self.Bonus7Var ui.TextLine()
        
self.Bonus7Var.SetParent(self)
        
self.Bonus7Var.SetDefaultFontName()
        
self.Bonus7Var.SetPosition(329+100180 13*1)
        
self.Bonus7Var.SetFeather()
        
self.Bonus7Var.SetText("0")
        
self.Bonus7Var.SetFontColor(1.01.01.0)
        
self.Bonus7Var.SetOutline()
        
self.Bonus7Var.Show()

        
self.Bonus8Var ui.TextLine()
        
self.Bonus8Var.SetParent(self)
        
self.Bonus8Var.SetDefaultFontName()
        
self.Bonus8Var.SetPosition(329+100180 13*2)
        
self.Bonus8Var.SetFeather()
        
self.Bonus8Var.SetText("0")
        
self.Bonus8Var.SetFontColor(1.01.01.0)
        
self.Bonus8Var.SetOutline()
        
self.Bonus8Var.Show()

        
self.Bonus9Var ui.TextLine()
        
self.Bonus9Var.SetParent(self)
        
self.Bonus9Var.SetDefaultFontName()
        
self.Bonus9Var.SetPosition(329+100180 13*3)
        
self.Bonus9Var.SetFeather()
        
self.Bonus9Var.SetText("0")
        
self.Bonus9Var.SetFontColor(1.01.01.0)
        
self.Bonus9Var.SetOutline()
        
self.Bonus9Var.Show()

        
self.Bonus10Var ui.TextLine()
        
self.Bonus10Var.SetParent(self)
        
self.Bonus10Var.SetDefaultFontName()
        
self.Bonus10Var.SetPosition(329+100180 13*4)
        
self.Bonus10Var.SetFeather()
        
self.Bonus10Var.SetText("0")
        
self.Bonus10Var.SetFontColor(1.01.01.0)
        
self.Bonus10Var.SetOutline()
        
self.Bonus10Var.Show()

    
####Delay
        
self.DelayText ui.TextLine()
        
self.DelayText.SetParent(self)
        
self.DelayText.SetDefaultFontName()
        
self.DelayText.SetPosition(198180 13*5)
        
self.DelayText.SetFeather()
        
self.DelayText.SetText("Delay:")
        
self.DelayText.SetFontColor(0.60.71)
        
self.DelayText.SetOutline()
        
self.DelayText.Show()

    
####DelayValue
        
self.DelayValue ui.TextLine()
        
self.DelayValue.SetParent(self)
        
self.DelayValue.SetDefaultFontName()
        
self.DelayValue.SetPosition(297270)
        
self.DelayValue.SetFeather()
        
self.DelayValue.SetText("0.5 s")
        
self.DelayValue.SetFontColor(0.60.71)
        
self.DelayValue.SetOutline()
        
self.DelayValue.Show()

    
def LoadScrollBar(self):
        
self.ScrollBar ui.ScrollBar()
        
self.ScrollBar.SetParent(self)
        
self.ScrollBar.SetPosition(17035)
        
self.ScrollBar.SetScrollBarSize(210)
        
self.ScrollBar.Show()

    
def SetDelay(self):
        
Delay self.DelayValue.GetText()
        if 
self.DelaySlide.GetSliderPos() * != Delay:
            
Delay self.DelaySlide.GetSliderPos() * 5
            
try:
                
Tmp str(Delay).split(".")
                if 
int(Delay) < 0.1:
                    
Tmp str(Delay).split(".")[0]+str(Delay).split(".")[1].replace('0','1')
                
Delay str(Tmp[0]) + "." Tmp[1][:1]
            
except:
                
pass

        self
.DelayValue.SetText(str(Delay) + " s")

    
def ButtonList_1(selfarg):
        global 
PRESSWISH

        
if str(arg) == self.MAINBONUSES[0]:
            
PRESSWISH 1
        elif str
(arg) == self.MAINBONUSES[1]:
            
PRESSWISH 2
        elif str
(arg) == self.MAINBONUSES[2]:
            
PRESSWISH 3
        elif str
(arg) == self.MAINBONUSES[3]:
            
PRESSWISH 4
        elif str
(arg) == self.MAINBONUSES[4]:
            
PRESSWISH 5
        self
.BonusListBox FileListDialog()

    
def ButtonList_2(selfarg):
        global 
PRESSWISH

        
if str(arg) == self.ALTERBONUSES[0]:
            
PRESSWISH 6
        elif str
(arg) == self.ALTERBONUSES[1]:
            
PRESSWISH 7
        elif str
(arg) == self.ALTERBONUSES[2]:
            
PRESSWISH 8
        elif str
(arg) == self.ALTERBONUSES[3]:
            
PRESSWISH 9
        elif str
(arg) == self.ALTERBONUSES[4]:
            
PRESSWISH 10
        self
.BonusListBox FileListDialog()

    
def UpdateInventoryList(self):
        
self.invListBox.RemoveAllItems()
        for 
i in xrange(player.INVENTORY_PAGE_SIZE*2):
            
ItemIndex player.GetItemIndex(i)
            if 
not ItemIndex:
                continue
            if 
ItemIndex != 0:
                
item.SelectItem(ItemIndex)
                
item.GetItemName(ItemIndex)
                
ItemName item.GetItemName()
                
self.invListBox.AppendItem(Item(str(i) + " | " ItemName))

    
def __BreakSwitching(self):
        global 
SwitchButton
        
if SwitchButton == 1:
            
self.SwitchingBreakButton.SetText("Abbrechen")
            
SwitchButton 0
        
else:
            
self.Hide()

    
def StartSwitchBot(self):
        global 
SwitchButton
        SwitchButton 
1
        self
.SwitchingBreakButton.SetText("Stop")
        
self.__Switchtingdialog()

    
def __Switchtingdialog(self):
        global 
BoniSwitchvalue
        
global Bonus1
        
global Bonus2
        
global Bonus3
        
global Bonus4
        
global Bonus5
        
global SwitchButton

        Main1
Alter1 Bonus1
        Main2
Alter2 Bonus2
        Main3
Alter3 Bonus3
        Main4
Alter4 Bonus4
        Main5
Alter5 Bonus5
        SelectedIndex 
self.invListBox.GetSelectedItem()
        
#If you do not select item on the inventory list, the slot will be 0.
        
if not SelectedIndex:
            
SelectedIndex 0
        
else:
            
SelectedIndex SelectedIndex.GetText().split(' | ')[0]
        
Slot SelectedIndex
        val0
bon0 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
        Search1 
self.Bvalue1.GetText()
        
Search2 self.Bvalue2.GetText()
        
Search3 self.Bvalue3.GetText()
        
Search4 self.Bvalue4.GetText()
        
Search5 self.Bvalue5.GetText()
        
Search6 self.Bvalue6.GetText()
        
Search7 self.Bvalue7.GetText()
        
Search8 self.Bvalue8.GetText()
        
Search9 self.Bvalue9.GetText()
        
Search10 self.Bvalue10.GetText()
        
DELAY_SEC self.DelayValue.GetText().split(' s')[0]

        if 
SwitchButton == 1:
            
#1 Bonus switchen:
            
if ((int(Main2) == 0) and\
                (
val0 == int(Main1) and bon0 >= int(Search1) or\
                (
val1 == int(Main1) and bon1 >= int(Search1)) or\
                (
val2 == int(Main1) and bon2 >= int(Search1)) or\
                (
val3 == int(Main1) and bon3 >= int(Search1)) or\
                (
val4 == int(Main1) and bon4 >= int(Search1)))) or\
                ((
int(Alter2) == 0) and\
                (
val0 == int(Alter1) and bon0 >= int(Search6) or\
                (
val1 == int(Alter1) and bon1 >= int(Search6)) or\
                (
val2 == int(Alter1) and bon2 >= int(Search6)) or\
                (
val3 == int(Alter1) and bon3 >= int(Search6)) or\
                (
val4 == int(Alter1) and bon4 >= int(Search6)))):
                
self.BoardMessage.SetTip("Switching erfolgreich!")
                
self.BoardMessage.SetTop()
                
self.__BreakSwitching()
            
#2 Bonis switchen:
            
elif ((int(Main3) == 0) and\
                (
val0 == int(Main1) and bon0 >= int(Search1) or\
                (
val1 == int(Main1) and bon1 >= int(Search1)) or\
                (
val2 == int(Main1) and bon2 >= int(Search1)) or\
                (
val3 == int(Main1) and bon3 >= int(Search1)) or\
                (
val4 == int(Main1) and bon4 >= int(Search1))) and\
                ((
val0 == int(Main2) and bon0 >= int(Search2)) or\
                (
val1 == int(Main2) and bon1 >= int(Search2)) or\
                (
val2 == int(Main2) and bon2 >= int(Search2)) or\
                (
val3 == int(Main2) and bon3 >= int(Search2)) or\
                (
val4 == int(Main2) and bon4 >= int(Search2)))) or\
                ((
int(Alter3) == 0) and\
                (
val0 == int(Alter1) and bon0 >= int(Search6) or\
                (
val1 == int(Alter1) and bon1 >= int(Search6)) or\
                (
val2 == int(Alter1) and bon2 >= int(Search6)) or\
                (
val3 == int(Alter1) and bon3 >= int(Search6)) or\
                (
val4 == int(Alter1) and bon4 >= int(Search6))) and\
                ((
val0 == int(Alter2) and bon0 >= int(Search7)) or\
                (
val1 == int(Alter2) and bon1 >= int(Search7)) or\
                (
val2 == int(Alter2) and bon2 >= int(Search7)) or\
                (
val3 == int(Alter2) and bon3 >= int(Search7)) or\
                (
val4 == int(Alter2) and bon4 >= int(Search7)))):
                
self.BoardMessage.SetTip("Switching erfolgreich!")
                
self.BoardMessage.SetTop()
                
self.__BreakSwitching()
            
#3 Bonis switchen:
            
elif ((int(Main4) == 0) and\
                (
val0 == int(Main1) and bon0 >= int(Search1) or\
                (
val1 == int(Main1) and bon1 >= int(Search1)) or\
                (
val2 == int(Main1) and bon2 >= int(Search1)) or\
                (
val3 == int(Main1) and bon3 >= int(Search1)) or\
                (
val4 == int(Main1) and bon4 >= int(Search1))) and\
                ((
val0 == int(Main2) and bon0 >= int(Search2)) or\
                (
val1 == int(Main2) and bon1 >= int(Search2)) or\
                (
val2 == int(Main2) and bon2 >= int(Search2)) or\
                (
val3 == int(Main2) and bon3 >= int(Search2)) or\
                (
val4 == int(Main2) and bon4 >= int(Search2))) and\
                ((
val0 == int(Main3) and bon0 >= int(Search3)) or\
                (
val1 == int(Main3) and bon1 >= int(Search3)) or\
                (
val2 == int(Main3) and bon2 >= int(Search3)) or\
                (
val3 == int(Main3) and bon3 >= int(Search3)) or\
                (
val4 == int(Main3) and bon4 >= int(Search3)))) or\
                ((
int(Alter4) == 0) and\
                (
val0 == int(Alter1) and bon0 >= int(Search6) or\
                (
val1 == int(Alter1) and bon1 >= int(Search6)) or\
                (
val2 == int(Alter1) and bon2 >= int(Search6)) or\
                (
val3 == int(Alter1) and bon3 >= int(Search6)) or\
                (
val4 == int(Alter1) and bon4 >= int(Search6))) and\
                ((
val0 == int(Alter2) and bon0 >= int(Search7)) or\
                (
val1 == int(Alter2) and bon1 >= int(Search7)) or\
                (
val2 == int(Alter2) and bon2 >= int(Search7)) or\
                (
val3 == int(Alter2) and bon3 >= int(Search7)) or\
                (
val4 == int(Alter2) and bon4 >= int(Search7))) and\
                ((
val0 == int(Alter3) and bon0 >= int(Search8)) or\
                (
val1 == int(Alter3) and bon1 >= int(Search8)) or\
                (
val2 == int(Alter3) and bon2 >= int(Search8)) or\
                (
val3 == int(Alter3) and bon3 >= int(Search8)) or\
                (
val4 == int(Alter3) and bon4 >= int(Search8)))):
                
self.BoardMessage.SetTip("Switching erfolgreich!")
                
self.BoardMessage.SetTop()
                
self.__BreakSwitching()
            
#4 Bonis switchen:
            
elif ((int(Main5) == 0) and\
                (
val0 == int(Main1) and bon0 >= int(Search1) or\
                (
val1 == int(Main1) and bon1 >= int(Search1)) or\
                (
val2 == int(Main1) and bon2 >= int(Search1)) or\
                (
val3 == int(Main1) and bon3 >= int(Search1)) or\
                (
val4 == int(Main1) and bon4 >= int(Search1))) and\
                ((
val0 == int(Main2) and bon0 >= int(Search2)) or\
                (
val1 == int(Main2) and bon1 >= int(Search2)) or\
                (
val2 == int(Main2) and bon2 >= int(Search2)) or\
                (
val3 == int(Main2) and bon3 >= int(Search2)) or\
                (
val4 == int(Main2) and bon4 >= int(Search2))) and\
                ((
val0 == int(Main3) and bon0 >= int(Search3)) or\
                (
val1 == int(Main3) and bon1 >= int(Search3)) or\
                (
val2 == int(Main3) and bon2 >= int(Search3)) or\
                (
val3 == int(Main3) and bon3 >= int(Search3)) or\
                (
val4 == int(Main3) and bon4 >= int(Search3))) and\
                ((
val0 == int(Main4) and bon0 >= int(Search4)) or\
                (
val1 == int(Main4) and bon1 >= int(Search4)) or\
                (
val2 == int(Main4) and bon2 >= int(Search4)) or\
                (
val3 == int(Main4) and bon3 >= int(Search4)) or\
                (
val4 == int(Main4) and bon4 >= int(Search4)))) or\
                ((
int(Alter5) == 0) and\
                (
val0 == int(Alter1) and bon0 >= int(Search6) or\
                (
val1 == int(Alter1) and bon1 >= int(Search6)) or\
                (
val2 == int(Alter1) and bon2 >= int(Search6)) or\
                (
val3 == int(Alter1) and bon3 >= int(Search6)) or\
                (
val4 == int(Alter1) and bon4 >= int(Search6))) and\
                ((
val0 == int(Alter2) and bon0 >= int(Search7)) or\
                (
val1 == int(Alter2) and bon1 >= int(Search7)) or\
                (
val2 == int(Alter2) and bon2 >= int(Search7)) or\
                (
val3 == int(Alter2) and bon3 >= int(Search7)) or\
                (
val4 == int(Alter2) and bon4 >= int(Search7))) and\
                ((
val0 == int(Alter3) and bon0 >= int(Search8)) or\
                (
val1 == int(Alter3) and bon1 >= int(Search8)) or\
                (
val2 == int(Alter3) and bon2 >= int(Search8)) or\
                (
val3 == int(Alter3) and bon3 >= int(Search8)) or\
                (
val4 == int(Alter3) and bon4 >= int(Search8))) and\
                ((
val0 == int(Alter4) and bon0 >= int(Search9)) or\
                (
val1 == int(Alter4) and bon1 >= int(Search9)) or\
                (
val2 == int(Alter4) and bon2 >= int(Search9)) or\
                (
val3 == int(Alter4) and bon3 >= int(Search9)) or\
                (
val4 == int(Alter4) and bon4 >= int(Search9)))):
                
self.BoardMessage.SetTip("Switching erfolgreich!")
                
self.BoardMessage.SetTop()
                
self.__BreakSwitching()
            
#5 Bonis switchen:
            
elif ((int(Main5) != 0) and\
                (
val0 == int(Main1) and bon0 >= int(Search1) or\
                (
val1 == int(Main1) and bon1 >= int(Search1)) or\
                (
val2 == int(Main1) and bon2 >= int(Search1)) or\
                (
val3 == int(Main1) and bon3 >= int(Search1)) or\
                (
val4 == int(Main1) and bon4 >= int(Search1))) and\
                ((
val0 == int(Main2) and bon0 >= int(Search2)) or\
                (
val1 == int(Main2) and bon1 >= int(Search2)) or\
                (
val2 == int(Main2) and bon2 >= int(Search2)) or\
                (
val3 == int(Main2) and bon3 >= int(Search2)) or\
                (
val4 == int(Main2) and bon4 >= int(Search2))) and\
                ((
val0 == int(Main3) and bon0 >= int(Search3)) or\
                (
val1 == int(Main3) and bon1 >= int(Search3)) or\
                (
val2 == int(Main3) and bon2 >= int(Search3)) or\
                (
val3 == int(Main3) and bon3 >= int(Search3)) or\
                (
val4 == int(Main3) and bon4 >= int(Search3))) and\
                ((
val0 == int(Main4) and bon0 >= int(Search4)) or\
                (
val1 == int(Main4) and bon1 >= int(Search4)) or\
                (
val2 == int(Main4) and bon2 >= int(Search4)) or\
                (
val3 == int(Main4) and bon3 >= int(Search4)) or\
                (
val4 == int(Main4) and bon4 >= int(Search4))) and\
                ((
val0 == int(Main5) and bon0 >= int(Search5)) or\
                (
val1 == int(Main5) and bon1 >= int(Search5)) or\
                (
val2 == int(Main5) and bon2 >= int(Search5)) or\
                (
val3 == int(Main5) and bon3 >= int(Search5)) or\
                (
val4 == int(Main5) and bon4 >= int(Search5)))) or\
                ((
int(Alter5) != 0) and\
                (
val0 == int(Alter1) and bon0 >= int(Search6) or\
                (
val1 == int(Alter1) and bon1 >= int(Search6)) or\
                (
val2 == int(Alter1) and bon2 >= int(Search6)) or\
                (
val3 == int(Alter1) and bon3 >= int(Search6)) or\
                (
val4 == int(Alter1) and bon4 >= int(Search6))) and\
                ((
val0 == int(Alter2) and bon0 >= int(Search7)) or\
                (
val1 == int(Alter2) and bon1 >= int(Search7)) or\
                (
val2 == int(Alter2) and bon2 >= int(Search7)) or\
                (
val3 == int(Alter2) and bon3 >= int(Search7)) or\
                (
val4 == int(Alter2) and bon4 >= int(Search7))) and\
                ((
val0 == int(Alter3) and bon0 >= int(Search8)) or\
                (
val1 == int(Alter3) and bon1 >= int(Search8)) or\
                (
val2 == int(Alter3) and bon2 >= int(Search8)) or\
                (
val3 == int(Alter3) and bon3 >= int(Search8)) or\
                (
val4 == int(Alter3) and bon4 >= int(Search8))) and\
                ((
val0 == int(Alter4) and bon0 >= int(Search9)) or\
                (
val1 == int(Alter4) and bon1 >= int(Search9)) or\
                (
val2 == int(Alter4) and bon2 >= int(Search9)) or\
                (
val3 == int(Alter4) and bon3 >= int(Search9)) or\
                (
val4 == int(Alter4) and bon4 >= int(Search9))) and\
                ((
val0 == int(Alter5) and bon0 >= int(Search10)) or\
                (
val1 == int(Alter5) and bon1 >= int(Search10)) or\
                (
val2 == int(Alter5) and bon2 >= int(Search10)) or\
                (
val3 == int(Alter5) and bon3 >= int(Search10)) or\
                (
val4 == int(Alter5) and bon4 >= int(Search10)))):
                
self.BoardMessage.SetTip("Switching erfolgreich!")
                
self.BoardMessage.SetTop()
                
self.__BreakSwitching()
            
elif Main1 == and Alter1 == 0:
                
self.SwitchingBreakButton.SetText("Abbrechen")
                
chat.AppendChat(chat.CHAT_TYPE_INFO"While you do not select min. 1 bonus, you can not start the switching!")
                
SwitchButton 0
            
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 OnUpdate(self):
        global 
Bonus1
        
global Bonus2
        
global Bonus3
        
global Bonus4
        
global Bonus5

        Main1
Alter1 Bonus1
        Main2
Alter2 Bonus2
        Main3
Alter3 Bonus3
        Main4
Alter4 Bonus4
        Main5
Alter5 Bonus5

        
if self.Bonus1Attr.GetText() != str(BonusListe[int(Main1)]) and int(Main1) != 0:
            if 
len(str(BonusListe[int(Main1)])) > 18:
                
self.Bonus1Attr.SetText(str(BonusListe[int(Main1)])[:18]+'...')
            else:
                
self.Bonus1Attr.SetText(str(BonusListe[int(Main1)]))
        
elif self.Bonus1Attr.GetText() != "" and int(Main1) == 0:
            
self.Bonus1Attr.SetText("-")

        if 
self.Bonus2Attr.GetText() != str(BonusListe[int(Main2)]) and int(Main2) != 0:
            if 
len(str(BonusListe[int(Main2)])) > 18:
                
self.Bonus2Attr.SetText(str(BonusListe[int(Main2)])[:18]+'...')
            else:
                
self.Bonus2Attr.SetText(str(BonusListe[int(Main2)]))
        
elif self.Bonus2Attr.GetText() != "" and int(Main2) == 0:
            
self.Bonus2Attr.SetText("-")

        if 
self.Bonus3Attr.GetText() != str(BonusListe[int(Main3)]) and int(Main3) != 0:
            if 
len(str(BonusListe[int(Main3)])) > 18:
                
self.Bonus3Attr.SetText(str(BonusListe[int(Main3)])[:18]+'...')
            else:
                
self.Bonus3Attr.SetText(str(BonusListe[int(Main3)]))
        
elif self.Bonus3Attr.GetText() != "" and int(Main3) == 0:
            
self.Bonus3Attr.SetText("-")

        if 
self.Bonus4Attr.GetText() != str(BonusListe[int(Main4)]) and int(Main4) != 0:
            if 
len(str(BonusListe[int(Main4)])) > 18:
                
self.Bonus4Attr.SetText(str(BonusListe[int(Main4)])[:18]+'...')
            else:
                
self.Bonus4Attr.SetText(str(BonusListe[int(Main4)]))
        
elif self.Bonus4Attr.GetText() != "" and int(Main4) == 0:
            
self.Bonus4Attr.SetText("-")

        if 
self.Bonus5Attr.GetText() != str(BonusListe[int(Main5)]) and int(Main5) != 0:
            if 
len(str(BonusListe[int(Main5)])) > 18:
                
self.Bonus5Attr.SetText(str(BonusListe[int(Main5)])[:18]+'...')
            else:
                
self.Bonus5Attr.SetText(str(BonusListe[int(Main5)]))
        
elif self.Bonus5Attr.GetText() != "" and int(Main5) == 0:
            
self.Bonus5Attr.SetText("-")

        if 
self.Bonus6Attr.GetText() != str(BonusListe[int(Alter1)]) and int(Alter1) != 0:
            if 
len(str(BonusListe[int(Alter1)])) > 18:
                
self.Bonus6Attr.SetText(str(BonusListe[int(Alter1)])[:18]+'...')
            else:
                
self.Bonus6Attr.SetText(str(BonusListe[int(Alter1)]))
        
elif self.Bonus6Attr.GetText() != "" and int(Alter1) == 0:
            
self.Bonus6Attr.SetText("-")

        if 
self.Bonus7Attr.GetText() != str(BonusListe[int(Alter2)]) and int(Alter2) != 0:
            if 
len(str(BonusListe[int(Alter2)])) > 18:
                
self.Bonus7Attr.SetText(str(BonusListe[int(Alter2)])[:18]+'...')
            else:
                
self.Bonus7Attr.SetText(str(BonusListe[int(Alter2)]))
        
elif self.Bonus7Attr.GetText() != "" and int(Alter2) == 0:
            
self.Bonus7Attr.SetText("-")

        if 
self.Bonus8Attr.GetText() != str(BonusListe[int(Alter3)]) and int(Alter3) != 0:
            if 
len(str(BonusListe[int(Alter3)])) > 18:
                
self.Bonus8Attr.SetText(str(BonusListe[int(Alter3)])[:18]+'...')
            else:
                
self.Bonus8Attr.SetText(str(BonusListe[int(Alter3)]))
        
elif self.Bonus8Attr.GetText() != "" and int(Alter3) == 0:
            
self.Bonus8Attr.SetText("-")

        if 
self.Bonus9Attr.GetText() != str(BonusListe[int(Alter4)]) and int(Alter4) != 0:
            if 
len(str(BonusListe[int(Alter4)])) > 18:
                
self.Bonus9Attr.SetText(str(BonusListe[int(Alter4)])[:18]+'...')
            else:
                
self.Bonus9Attr.SetText(str(BonusListe[int(Alter4)]))
        
elif self.Bonus9Attr.GetText() != "" and int(Alter4) == 0:
            
self.Bonus9Attr.SetText("-")

        if 
self.Bonus10Attr.GetText() != str(BonusListe[int(Alter5)]) and int(Alter5) != 0:
            if 
len(str(BonusListe[int(Alter5)])) > 18:
                
self.Bonus10Attr.SetText(str(BonusListe[int(Alter5)])[:18]+'...')
            else:
                
self.Bonus10Attr.SetText(str(BonusListe[int(Alter5)]))
        
elif self.Bonus10Attr.GetText() != "" and int(Alter5) == 0:
            
self.Bonus10Attr.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()))
        if 
self.Bonus8Var.GetText() != self.Bvalue8.GetText():
            
self.Bonus8Var.SetText(str(self.Bvalue8.GetText()))
        if 
self.Bonus9Var.GetText() != self.Bvalue9.GetText():
            
self.Bonus9Var.SetText(str(self.Bvalue9.GetText()))
        if 
self.Bonus10Var.GetText() != self.Bvalue10.GetText():
            
self.Bonus10Var.SetText(str(self.Bvalue10.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",
    
"Ausweichwert",
    
"Angriffsgeschwindigkeit",
    
"Bewegungsgeschwindigkeit",
    
"Zaubergeschwindigkeit",
    
"TP-Regeneration",
    
"MP-Regeneration",
    
"Vergiftungschance",
    
"Ohnmachtschance",
    
"Verlangsamungschance",
    
"Kritischer Treffer",
    
"Durchbohrender Treffer",
    
"Stark ggn Halbmenschen",
    
"Stark ggn Tiere",
    
"Stark ggn Orks",
    
"Stark ggn Esoterische",
    
"Stark ggn Untote",
    
"Stark ggn Teufel",
    
"TP-Absorbierung",
    
"MP-Absorbierung",
    
"Chance auf Manaraub",
    
"Chance MP-Regeneration",
    
"Nahkampf-Angriff blocken",
    
"Pfeilangriff ausweichen",
    
"Schwertverteidigung",
    
"Zweihandverteidigung",
    
"Dolchverteidigung",
    
"Glockenverteidigung",
    
"Fächerverteidigung",
    
"Pfeilwiderstand",
    
"Feuerwiderstand",
    
"Blitzwiderstand",
    
"Magieverteidigung",
    
"Windverteidigung",
    
"Nahkampftreffer reflektieren",
    
"Fluch reflektieren",
    
"Giftverteidigung",
    
"Chance MP wiederherzustellen",
    
"Exp-Bonus",
    
"Yang-Drop",
    
"Item-Drop",
    
"steigernde Trankwirkung",
    
"Chance TP wiederherzustellen",
    
"Immun gegen Ohnmacht",
    
"Immun gegen Verlangsamung",
    
"Immun gegen Stürzen",
    
"APPLY_SKILL",
    
"Pfeilreichweite",
    
"Angriffswert",
    
"Verteidigungswert",
    
"Magischer Angriffswert",
    
"Magischer Verteidigungswert",
    
"",
    
"Max. Ausdauer",
    
"Stark gegen Krieger",
    
"Stark gegen Ninjas",
    
"Stark gegen Suras",
    
"Stark gegen Schamanen",
    
"Stark gegen Monster",
    
"Itemshop Angriffswert",
    
"Itemshop Verteidigungswert",
    
"Itemshop Exp-Bonus",
    
"Itemshop Item-Bonus",
    
"Itemshop Yang-Bonus",
    
"APPLY_MAX_HP_PCT",
    
"APPLY_MAX_SP_PCT",
    
"Fertigkeitsschaden",
    
"Durchschn. Schaden",
    
"Fertigkeitsschaden Widerstand",
    
"Durchschn. Schadenswiderstand",
    
"",
    
"iCafe EXP-Bonus",
    
"iCafe Item-Bonus",
    
"Abwehr ggn Krieger",
    
"Abwehr ggn Ninjas",
    
"Abwehr ggn Suras",
    
"Abwehr ggn Schamanen",
)

BonusIDListe = {
    
"" 0,
    
"Max. TP" 1,
    
"Max. MP" 2,
    
"Vitalität" 3,
    
"Intelligenz" 4,
    
"Stärke" 5,
    
"Ausweichwert" 6,
    
"Angriffsgeschwindigkeit" 7,
    
"Bewegungsgeschwindigkeit" 8,
    
"Zaubergeschwindigkeit" 9,
    
"TP-Regeneration" 10,
    
"MP-Regeneration" 11,
    
"Vergiftungschance" 12,
    
"Ohnmachtschance" 13,
    
"Verlangsamungschance" 14,
    
"Kritischer Treffer" 15,
    
"Durchbohrender Treffer" 16,
    
"Stark ggn Halbmenschen" 17,
    
"Stark ggn Tiere" 18,
    
"Stark ggn Orks" 19,
    
"Stark ggn Esoterische" 20,
    
"Stark ggn Untote" 21,
    
"Stark ggn Teufel" 22,
    
"TP-Absorbierung" 23,
    
"MP-Absorbierung" 24,
    
"Chance auf Manaraub" 25,
    
"Chance MP-Regeneration" 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,
    
"Fluch reflektieren" 40,
    
"Giftverteidigung" 41,
    
"Chance MP wiederherzustellen" 42,
    
"Exp-Bonus" 43,
    
"Yang-Drop" 44,
    
"Item-Drop" 45,
    
"steigernde Trankwirkung" 46,
    
"Chance TP wiederherzustellen" 47,
    
"Immun gegen Ohnmacht" 48,
    
"Immun gegen Verlangsamung" 49,
    
"Immun gegen Stürzen" 50,
    
"APPLY_SKILL" 51,
    
"Pfeilreichweite" 52,
    
"Angriffswert" 53,
    
"Verteidigungswert" 54,
    
"Magischer Angriffswert" 55,
    
"Magischer Verteidigungswert" 56,
    
"" 57,
    
"Max. Ausdauer" 58,
    
"Stark gegen Krieger" 59,
    
"Stark gegen Ninjas" 60,
    
"Stark gegen Suras" 61,
    
"Stark gegen Schamanen" 62,
    
"Stark gegen Monster" 63,
    
"Itemshop Angriffswert" 64,
    
"Itemshop Verteidigungswert" 65,
    
"Itemshop Exp-Bonus" 66,
    
"Itemshop Item-Bonus" 67,
    
"Itemshop Yang-Bonus" 68,
    
"APPLY_MAX_HP_PCT" 69,
    
"APPLY_MAX_SP_PCT" 70,
    
"Fertigkeitsschaden" 71,
    
"Durchschn. Schaden" 72,
    
"Fertigkeitsschaden Widerstand" 73,
    
"Durchschn. Schadenswiderstand" 74,
    
"" 75,
    
"iCafe EXP-Bonus" 76,
    
"iCafe Item-Bonus" 77,
    
"Abwehr ggn Krieger" 78,
    
"Abwehr ggn Ninjas" 79,
    
"Abwehr ggn Suras" 80,
    
"Abwehr ggn Schamanen" 81,
}

class 
FileListDialog(ui.Board):
    
def __init__(self):
        
ui.Board.__init__(self)
        
self.isLoaded 0
        self
.selectEvent None
        self
.fileListBox None
        self
.SetCenterPosition()
        
self.SetSize(190305)
        
self.Show()
        
self.AddFlag("movable")
        
self.AddFlag("float")

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

    
def Show(self):
        if 
self.isLoaded == 0:
            
self.isLoaded 1
            self
.__Load()
        
ui.Board.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("Actualize")
        
self.UpdateButton.SetPosition(15265)
        
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(19265)
        
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(109265)
        
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(6029)
        
self.copyright.SetFeather()
        
self.copyright.SetText("Bonus wählen:")
        
self.copyright.SetFontColor(110.0)
        
self.copyright.SetOutline()
        
self.copyright.Show()

    
def LoadFuckingScrollBar(self):
        
self.ScrollBar ui.ScrollBar()
        
self.ScrollBar.SetParent(self)
        
self.ScrollBar.SetPosition(16040)
        
self.ScrollBar.SetScrollBarSize(220)
        
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("Löschen"))
            
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 
Bonus1
        
global Bonus2
        
global Bonus3
        
global Bonus4
        
global Bonus5
        
global PRESSWISH

        Main1
Alter1 Bonus1
        Main2
Alter2 Bonus2
        Main3
Alter3 Bonus3
        Main4
Alter4 Bonus4
        Main5
Alter5 Bonus5
        SelectedIndex 
self.fileListBox.GetSelectedItem()
        if 
not SelectedIndex:
            return 
TRUE
        SelectedIndex 
SelectedIndex.GetText()
        if 
str(SelectedIndex) != "Löschen" and str(SelectedIndex) != "":
            if 
PRESSWISH == 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"1. Main bonus : " str(SelectedIndex))
                
Bonus1 = (int(BonusIDListe[str(SelectedIndex)]), Alter1)
                
PRESSWISH 0
            elif PRESSWISH 
== 2:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"2. Main bonus : " str(SelectedIndex))
                
Bonus2 = (int(BonusIDListe[SelectedIndex]), Alter2)
                
PRESSWISH 0
            elif PRESSWISH 
== 3:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"3. Main bonus : " str(SelectedIndex))
                
Bonus3 = (int(BonusIDListe[SelectedIndex]), Alter3)
                
PRESSWISH 0
            elif PRESSWISH 
== 4:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"4. Main bonus : " str(SelectedIndex))
                
Bonus4 = (int(BonusIDListe[SelectedIndex]), Alter4)
                
PRESSWISH 0
            elif PRESSWISH 
== 5:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"5. Main bonus : " str(SelectedIndex))
                
Bonus5 = (int(BonusIDListe[SelectedIndex]), Alter5)
                
PRESSWISH 0
            elif PRESSWISH 
== 6:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"1. Alternative bonus : " str(SelectedIndex))
                
Bonus1 = (Main1int(BonusIDListe[str(SelectedIndex)]))
                
PRESSWISH 0
            elif PRESSWISH 
== 7:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"2. Alternative bonus : " str(SelectedIndex))
                
Bonus2 = (Main2int(BonusIDListe[str(SelectedIndex)]))
                
PRESSWISH 0
            elif PRESSWISH 
== 8:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"3. Alternative bonus : " str(SelectedIndex))
                
Bonus3 = (Main3int(BonusIDListe[str(SelectedIndex)]))
                
PRESSWISH 0
            elif PRESSWISH 
== 9:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"4. Alternative bonus : " str(SelectedIndex))
                
Bonus4 = (Main4int(BonusIDListe[str(SelectedIndex)]))
                
PRESSWISH 0
            elif PRESSWISH 
== 10:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"5. Alternative bonus : " str(SelectedIndex))
                
Bonus5 = (Main5int(BonusIDListe[str(SelectedIndex)]))
                
PRESSWISH 0
        elif str
(SelectedIndex) == "Löschen" and str(SelectedIndex) != "":
            if 
PRESSWISH == 1:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"1. Main bonus deleted")
                
Bonus1 = (0Alter1)
                
PRESSWISH 0
            elif PRESSWISH 
== 2:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"2. Main bonus deleted")
                
Bonus2 = (0Alter2)
                
PRESSWISH 0
            elif PRESSWISH 
== 3:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"3. Main bonus deleted")
                
Bonus3 = (0Alter3)
                
PRESSWISH 0
            elif PRESSWISH 
== 4:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"4. Main bonus deleted")
                
Bonus4 = (0Alter4)
                
PRESSWISH 0
            elif PRESSWISH 
== 5:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"5. Main bonus deleted")
                
Bonus5 = (0Alter5)
                
PRESSWISH 0
            elif PRESSWISH 
== 6:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"1. Alternative bonus deleted")
                
Bonus1 = (Main10)
                
PRESSWISH 0
            elif PRESSWISH 
== 7:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"2. Alternative bonus deleted")
                
Bonus2 = (Main20)
                
PRESSWISH 0
            elif PRESSWISH 
== 8:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"3. Alternative bonus deleted")
                
Bonus3 = (Main30)
                
PRESSWISH 0
            elif PRESSWISH 
== 9:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"4. Alternative bonus deleted")
                
Bonus4 = (Main40)
                
PRESSWISH 0
            elif PRESSWISH 
== 10:
                
chat.AppendChat(chat.CHAT_TYPE_INFO"5. Alternative bonus deleted")
                
Bonus5 = (Main50)
                
PRESSWISH 0
        
else:
            
chat.AppendChat(chat.CHAT_TYPE_INFO"You do not select bonus!")
        
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):
        
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):
        
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()
chat.AppendChat(chat.CHAT_TYPE_INFO"Original file by DaRealFreak (v1.7) :)"