Jump to content

HA MeCa

Banned
  • Posts

    131
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by HA MeCa

  1.  

     

     

     

    any have compile binary with?:

    pls dl link

    Log in mainline_released/mainline_sg/Srcs/Client/Userinterface after open GameType.h after search this
    ?
    1
    const DWORD c_Inventory_Page_Count = 2;
    Replace to
    ?
    1
    const DWORD c_Inventory_Page_Count = 4;

     

    @Added ;)

     

    Best Regards

    HaveBeen

     

     

    Next problem, WHY? XD

     

    LOLjpg_enrhpxe.jpg

     

     

    Are you sure you are make part of python? Because i test it and it's work correctly :)

     

    Best Regards

    HaveBeen

     

     

     

    try to fix it, maybe I made a mistake ;p

  2.  

     

    any have compile binary with?:

    pls dl link

    Log in mainline_released/mainline_sg/Srcs/Client/Userinterface after open GameType.h after search this
    ?
    1
    const DWORD c_Inventory_Page_Count = 2;
    Replace to
    ?
    1
    const DWORD c_Inventory_Page_Count = 4;

     

    @Added ;)

     

    Best Regards

    HaveBeen

     

     

    Next problem, WHY? XD

     

    LOLjpg_enrhpxe.jpg

  3. i try swap questmanager.cpp with mainline to novaline, and swap questpc.o

     

    Quest work but:

     

    dc normal player

    0425 17:22:53861 ::   File "game.py", line 735, in RefreshQuest
    
    0425 17:22:53861 ::   File "interfaceModule.py", line 575, in RefreshQuest
    
    0425 17:22:53861 ::   File "uiCharacter.py", line 668, in RefreshQuest
    
    0425 17:22:53861 :: IndexError
    0425 17:22:53861 :: : 
    0425 17:22:53861 :: string index out of range
    0425 17:22:53861 :: 
    
    0425 17:22:53876 :: Unknown packet header: 105, last: 81 2

    new normal player no dc:

    lol

     

    0kek46.jpg

     

     

    and

    ( - WTF

     

    hjn09q.jpg

     

     

  4. /usr/home/mt2/share/locale/poland/quest

    Kind Regards

    HaveBeen

     

    SYSERR: Apr 25 15:41:29 :: heart_idle: losing 96 seconds. (lag occured)
    SYSERR: Apr 25 15:42:00 :: heart_idle: losing 30 seconds. (lag occured)
    SYSERR: Apr 25 15:42:46 :: Analyze: login phase does not handle this packet! header 61
    SYSERR: Apr 25 15:43:17 :: Click: CQuestManager::Click(pid=1, target_npc_name=Seon-Pyeong) - NOT EXIST NPC RACE VNUM[20091]
    SYSERR: Apr 25 15:39:52 :: ChildLoop: AsyncSQL: query failed: Table 'log.invalid_server_log' doesn't exist (query: INSERT INTO invalid_server_log(locale_type, log_date, ip, revision) VALUES(13, NOW(), 'xxx ip', 40250) errno: 1146)

    quests R.I.P

     

    i must delete it:

     

    j5qpz5.jpg

  5. 25 15:17:25 :: ReadQuestCategoryFile: QUEST Cannot open 'questcategory.txt'

    this feature for metin2. If you don't use to this system, just create questcategory.txt :P Problem fixed.

     

    is there any critical error in your syser?

     

    Questcategory system from world of metin2

     

    7xUQM.png

     

    Best Regards

    HaveBeen

     

     

    THX, man, just create empty questcategory.txt ?

     

    in:

     

    /usr/home/mt2/share/locale/poland

     

    or

     

    /usr/home/mt2/share/locale/poland/quest

     

    ?

  6. Hi, i compiled game with source (novaliny) and now all quests doesn't work, wath is this?

     

    syslog:

    25 15:17:25 :: ReadQuestCategoryFile: QUEST Cannot open 'questcategory.txt'
    

    questcategory.txt - i don't have this.

     

    my modifications:

    m_mapNPC[npc].OnKill(*pPC);

    on

    if(npc > 0)
    			{
    				m_mapNPC[npc].OnKill(*pPC);
    			}

    fix invisible and

    // {
    	
    		// nPrismCount = ch->CountSpecifyItem(ITEM_PRISM);
    
    		// if (nPrismCount < hyperlinks)
    			// return 1;
    	// }
    

    now all quests doesn't work.

  7. i need c++ for global chat. i have this: /sry bad english :D

     

    this effect have only GM:

    nnwwb1.jpg

     

    every change to every player could?

    BYTE m_bEmpire;
    
    	FuncShout(const char * str, BYTE bEmpire) : m_str(str), m_bEmpire(bEmpire)
    	{
    	}   
    
    	void operator () (LPDESC d)
    	{
    	
    		if (!d->GetCharacter())
    			return;
    			
    		if(!g_bGlobalShoutEnable && (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire))
    			return;
    		
    		
    		d->GetCharacter()->ChatPacket(CHAT_TYPE_SHOUT, "%s", m_str);
    	}
    };
    
    void SendShout(const char * szText, BYTE bEmpire)
    {
    	const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet();
    	std::for_each(c_ref_set.begin(), c_ref_set.end(), FuncShout(szText, bEmpire));
    }
    
    void CInputP2P::Shout(const char * c_pData)
    {
    	TPacketGGShout * p = (TPacketGGShout *) c_pData;
    	SendShout(p->szText, p->bEmpire);
    }
  8. just change?:

    const TItemTable* pTable = ITEM_MANAGER::instance().GetTable(ITEM_PRISM);
    
    
    if (NULL != pTable)
    {
    if (3==processReturn) //±łČŻÁß
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»çżëÇŇĽö ľř˝Ŕ´Ď´Ů."), pTable->szLocaleName);
    else
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%sŔĚ ÇĘżäÇŐ´Ď´Ů."), pTable->szLocaleName);
    
    }
    const TItemTable* pTable = ITEM_MANAGER::instance().GetTable(ITEM_PRISM);
    
    		if (NULL != pTable)
    		{
    			if (0==processReturn) //±łČŻÁß
    				ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»çżëÇŇĽö ľř˝Ŕ´Ď´Ů."), pTable->szLocaleName);
    			else
    				ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%sŔĚ ÇĘżäÇŐ´Ď´Ů."), pTable->szLocaleName);
    						
    		}
    
     
  9.  

    item_proto, mob_proto write of DB? This game is better than game 40250?

     

    /sry for bad english ;d

     

    You can choose with a CONFIG setting if you want to read protos from txt or DB.

     

    And yes, it's definately better. The people who know how to make difs are working with the source now, 40250 is a dead end.

     

     

    My chanell config:

    HOSTNAME: channel11
    CHANNEL: 1
    PORT: 13000
    P2P_PORT: 14000
    DB_PORT: 15000
    DB_ADDR: localhost
    MAP_ALLOW: 1 21 41 3 23 43 4 24 44 5 25 45 108 109 215 216 217 218
    TABLE_POSTFIX: 
    PASSES_PER_SEC: 25
    SAVE_EVENT_SECOND_CYCLE: 180
    PING_EVENT_SECOND_CYCLE: 180
    PLAYER_SQL: localhost mt2 mt2!@# player
    COMMON_SQL: localhost mt2 mt2!@# common
    LOG_SQL: localhost mt2 mt2!@# log
    LOCALE_SERVICE: poland
    TEST_SERVER: 0
    MALL_URL: localhost
    adminpage_ip: localhost
    admin_page_password: SlmCnmNbr?CanBARAN!
    VIEW_RANGE: 8000
    CHECK_MULTIHACK: 1
    MAX_LEVEL: 105
    MAX_LEVEL_STATUS: unsigned int
    MAX_STATUS: unsigned int
    SERVER_CHECK: 0
    SERVER_VERSION: unsigned int
    MAX_HT: 100
    MAX_IQ: 100
    MAX_ST: 100
    MAX_DX: 100
    ATTR_ALWAYS_ADD: 1
    ATTR_ALWAYS_5_ADD: 1
    ATTR_CHANGE_LIMIT: int
    GUILD_MAX_LEVEL: 10
    ITEM_OWNERSHIP_TIME: int
    MIN_ADDON_FKS: int
    MAX_ADDON_FKS: int
    MIN_ADDON_DSS: int
    MIN_ADDON_DSS: int
    SKILLBOOK_DELAY: int
    SKILLBOOK_NEED_EXP: int
    SKILLBOOK_ALWAYS_BOOK: 1
    GOLD_DROP_TIME_INTERVAL: int
    SEQUENCE_CHECK: 0
    SKILLBOOK_STEP_LEVELING: 1
    RAISE_EMPIRE_PRICES: 1
    HORSE_MAX_LEVEL: 30
    MARRIAGE_MAX_PERCENT: int
    PC_MAX_MOVEMENT_SPEED: 250
    PC_MAX_ATTACK_SPEED: 250
    MOB_MAX_MOVEMENT_SPEED: int
    MOB_MAX_ATTACK_SPEED: int
    TAXES: 100
    DYE_LEVEL: int
    YANG_MAX: 5.000.000.000
    GOLD_DROP_TIME: int
    BELT_FORCE_SLOTS: int
    package_enable: 0
    log_level: 0
    new_test_server: 0
    new_gm_host_check: 0
    adminpage_enable: 0
    adminpage_no_localhost: 0
    item_floor_time: int
    item_ownership_time: int
    max_rank_points: long int
    movement_speed: int
    belt_all_allow_items: 1
    attr_rare_enable: 0
    

    my db conf:

    WELCOME_MSG = "Mysql odpalone"
    SQL_ACCOUNT = "localhost account mt2 mt2!@# 0"
    SQL_PLAYER = "localhost player mt2 mt2!@# 0"
    SQL_COMMON = "localhost common mt2 mt2!@# 0"
    SQL_HOTBACKUP = "localhost hotbackup mt2 mt2!@# 0"
    TABLE_POSTFIX = ""
    BIND_PORT = 15000
    DB_SLEEP_MSEC = 10
    CLIENT_HEART_FPS = 10
    HASH_PLAYER_LIFE_SEC = 600
    BACKUP_LIMIT_SEC = 3600
    PLAYER_ID_START = 100
    PLAYER_DELETE_LEVEL_LIMIT = 75
    PLAYER_DELETE_CHECK_SIMPLE = 1
    ITEM_ID_RANGE = 100000 2100000000
    MIN_LENGTH_OF_SOCIAL_ID	= 6
    SIMPLE_SOCIALID = 1
    TXT_STARTUP: 1

    @EDIT - ALL WORK THX SO MUCH :D

     

    EEELEOEEO_exwpres.jpg

  10. Pokaże wam jak zrobić taki Bonusswitcher pod klawiszem F6, może się komuś przydać.
     
     
    W root ---> game.py
    Szukamy:
     



    onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)

     
     
    Pod tym dajemy:
     

    onPressKeyDict[app.DIK_F5]    = lambda : self.StatsChangerStart()

     
    Szukamy:
     

        def __Console_Enable(self):
            constInfo.CONSOLE_ENABLE = TRUE
            self.consoleEnable = TRUE
            app.EnableSpecialCameraMode()
            ui.EnablePaste(TRUE)

     
     
    Pod tym dodajemy:
     

    def StatsChangerStart(self):
            #import uiStats
            #self.Stats = uiStats.OptionDialog()
            #self.Stats.Show()
            import bonusswitcher
            self.StartDialog = bonusswitcher.SwitchBotDialog()
            self.StartDialog.Show()

     
     
    Tworzymy nowy plik w root o nazwie: bonusswitcher.py
    a jego zawartość to:
     

    [spoiler]import chat
    import item
    import net
    import player
    import snd
    import shop
    import ui
    import uiTip
    import locale
    
    Bonus0 = 0
    Bonus1 = 0
    Bonus2 = 0
    Bonus3 = 0
    Bonus4 = 0
    SwitchButton = 0
    Boniswitchvalue = 71084
    PRESSWISH0 = 0
    PRESSWISH1 = 0
    PRESSWISH2 = 0
    PRESSWISH3 = 0
    PRESSWISH4 = 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
    found = 0
    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:
    Boniswitchvalue = int(ItemValue)
    found = 1
    break
    
    def LoadSwitchbotDialog(self):
    self.SetCenterPosition()
    self.SetSize(410, 265)
    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.TimerSlotBar = ui.SlotBar()
    self.TimerSlotBar.SetParent(self)
    self.TimerSlotBar.SetSize(29, 14)
    self.TimerSlotBar.SetPosition(15, 10)
    self.TimerSlotBar.Show()
    
    self.TimerValue = ui.EditLine()
    self.TimerValue.SetParent(self.TimerSlotBar)
    self.TimerValue.SetSize(29, 18)
    self.TimerValue.SetPosition(6, 0)
    self.TimerValue.SetMax(3)
    self.TimerValue.SetFocus()
    self.TimerValue.SetText("0.7")
    self.TimerValue.Show()
    
    self.kValueSlotBar = ui.SlotBar()
    self.kValueSlotBar.SetParent(self)
    self.kValueSlotBar.SetSize(36, 14)
    self.kValueSlotBar.SetPosition(85, 10)
    
    self.ZaczarowanieValue = ui.EditLine()
    self.ZaczarowanieValue.SetParent(self.kValueSlotBar)
    self.ZaczarowanieValue.SetSize(36, 18)
    self.ZaczarowanieValue.SetPosition(6, 0)
    self.ZaczarowanieValue.SetMax(7)
    self.ZaczarowanieValue.SetFocus()
    self.ZaczarowanieValue.SetText(str(Boniswitchvalue))
    
    self.SlotwahlSlotBar = ui.SlotBar()
    self.SlotwahlSlotBar.SetParent(self)
    self.SlotwahlSlotBar.SetSize(29, 14)
    self.SlotwahlSlotBar.SetPosition(172, 110)
    self.SlotwahlSlotBar.SetWindowHorizontalAlignCenter()
    self.SlotwahlSlotBar.Show()
    
    self.Slotbar = ui.EditLine()
    self.Slotbar.SetParent(self.SlotwahlSlotBar)
    self.Slotbar.SetSize(29, 18)
    self.Slotbar.SetPosition(6, 0)
    self.Slotbar.SetMax(2)
    self.Slotbar.SetNumberMode()
    self.Slotbar.SetText("0")
    self.Slotbar.SetTabEvent(ui.__mem_func__(self.StartSwitchBot))
    self.Slotbar.SetReturnEvent(ui.__mem_func__(self.StartSwitchBot))
    self.Slotbar.Show()
    
    self.BonusValue5SlotBar = ui.SlotBar()
    self.BonusValue5SlotBar.SetParent(self)
    self.BonusValue5SlotBar.SetSize(29, 14)
    self.BonusValue5SlotBar.SetPosition(172, 79)
    self.BonusValue5SlotBar.SetWindowHorizontalAlignCenter()
    self.BonusValue5SlotBar.Show()
    
    self.Bvalue5 = ui.EditLine()
    self.Bvalue5.SetParent(self.BonusValue5SlotBar)
    self.Bvalue5.SetSize(29, 18)
    self.Bvalue5.SetPosition(6, 0)
    self.Bvalue5.SetMax(4)
    self.Bvalue5.SetNumberMode()
    self.Bvalue5.SetText("0")
    self.Bvalue5.SetTabEvent(ui.__mem_func__(self.Slotbar.SetFocus))
    self.Bvalue5.SetReturnEvent(ui.__mem_func__(self.Slotbar.SetFocus))
    self.Bvalue5.Show()
    
    self.BonusValue4SlotBar = ui.SlotBar()
    self.BonusValue4SlotBar.SetParent(self)
    self.BonusValue4SlotBar.SetSize(29, 14)
    self.BonusValue4SlotBar.SetPosition(172, 44)
    self.BonusValue4SlotBar.SetWindowHorizontalAlignCenter()
    self.BonusValue4SlotBar.Show()
    
    self.Bvalue4 = ui.EditLine()
    self.Bvalue4.SetParent(self.BonusValue4SlotBar)
    self.Bvalue4.SetSize(29, 18)
    self.Bvalue4.SetPosition(6, 0)
    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(29, 14)
    self.BonusValue3SlotBar.SetPosition(-27, 110)
    self.BonusValue3SlotBar.SetWindowHorizontalAlignCenter()
    self.BonusValue3SlotBar.Show()
    
    self.Bvalue3 = ui.EditLine()
    self.Bvalue3.SetParent(self.BonusValue3SlotBar)
    self.Bvalue3.SetSize(29, 18)
    self.Bvalue3.SetPosition(6, 0)
    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(29, 14)
    self.BonusValue2SlotBar.SetPosition(-27, 79)
    self.BonusValue2SlotBar.SetWindowHorizontalAlignCenter()
    self.BonusValue2SlotBar.Show()
    
    self.Bvalue2 = ui.EditLine()
    self.Bvalue2.SetParent(self.BonusValue2SlotBar)
    self.Bvalue2.SetSize(29, 18)
    self.Bvalue2.SetPosition(6, 0)
    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(29, 14)
    self.BonusValue1SlotBar.SetPosition(-27, 44)
    self.BonusValue1SlotBar.SetWindowHorizontalAlignCenter()
    self.BonusValue1SlotBar.Show()
    
    self.Bvalue1 = ui.EditLine()
    self.Bvalue1.SetParent(self.BonusValue1SlotBar)
    self.Bvalue1.SetSize(29, 18)
    self.Bvalue1.SetPosition(6, 0)
    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(378, 18)
    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_CLOSE, 0, - 23)
    self.CloseButton.SetEvent(ui.__mem_func__(self.Close))
    self.CloseButton.Show()
    
    self.Wunschbonus01 = ui.Button()
    self.Wunschbonus01.SetParent(self)
    self.Wunschbonus01.SetPosition(15, 40)
    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(15, 75)
    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(15, 110)
    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(15 + 180 + 21, 40)
    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 + 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.ResetbonusallButton = ui.Button()
    self.ResetbonusallButton.SetParent(self)
    self.ResetbonusallButton.SetPosition(90 + 45 + 80, 225)
    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("Usuń bonusy")
    self.ResetbonusallButton.SetEvent(ui.__mem_func__(self.__Resetbonusall))
    self.ResetbonusallButton.Show()
    
    self.Switchtingabbruchbutton = ui.Button()
    self.Switchtingabbruchbutton.SetParent(self)
    self.Switchtingabbruchbutton.SetPosition(90 + 45 + 80, 195)
    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("Wyjdź")
    self.Switchtingabbruchbutton.Show()
    
    self.StartButton = ui.Button()
    self.StartButton.SetParent(self)
    self.StartButton.SetPosition(90 + 45 - 122, 225)
    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.SlotButton = ui.Button()
    self.SlotButton.SetParent(self)
    self.SlotButton.SetPosition(15 + 201, 110)
    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("Slot")
    self.SlotButton.Show()
    
    def LoadTextLines(self):
    self.Headline = ui.TextLine()
    self.Headline.SetParent(self)
    self.Headline.SetDefaultFontName()
    self.Headline.SetPosition(200, 15)
    self.Headline.SetFeather()
    self.Headline.SetText("Bonusswitcher by MeCa")
    self.Headline.SetFontColor(1.0, 0.5, 0.5)
    self.Headline.SetOutline()
    self.Headline.Show()
    
    self.LastChangeText = ui.TextLine()
    self.LastChangeText.SetParent(self)
    self.LastChangeText.SetDefaultFontName()
    self.LastChangeText.SetPosition(220, 142)
    self.LastChangeText.SetFeather()
    self.LastChangeText.SetText("Stan:")
    self.LastChangeText.SetFontColor(0.6, 0.7, 1)
    self.LastChangeText.SetOutline()
    self.LastChangeText.Show()
    
    self.LastChange = ui.TextLine()
    self.LastChange.SetParent(self)
    self.LastChange.SetDefaultFontName()
    self.LastChange.SetPosition(220, 165)
    self.LastChange.SetFeather()
    self.LastChange.SetText("pusty")
    self.LastChange.SetFontColor(1.0, 1.0, 1.0)
    self.LastChange.SetOutline()
    self.LastChange.Show()
    
    self.SlotwahlText = ui.TextLine()
    self.SlotwahlText.SetParent(self)
    self.SlotwahlText.SetPosition(15 + 112 + 201, 110)
    self.SlotwahlText.SetFeather()
    self.SlotwahlText.SetDefaultFontName()
    self.SlotwahlText.SetText("Slot:")
    self.SlotwahlText.SetFontColor(1.0, 1.0, 1.0)
    self.SlotwahlText.SetOutline()
    self.SlotwahlText.Show()
    
    self.BonusValue1Text = ui.TextLine()
    self.BonusValue1Text.SetParent(self)
    self.BonusValue1Text.SetPosition(15 + 92, 44)
    self.BonusValue1Text.SetFeather()
    self.BonusValue1Text.SetDefaultFontName()
    self.BonusValue1Text.SetText("Wartość:")
    self.BonusValue1Text.SetFontColor(1.0, 1.0, 1.0)
    self.BonusValue1Text.SetOutline()
    self.BonusValue1Text.Show()
    
    self.BonusValue2Text = ui.TextLine()
    self.BonusValue2Text.SetParent(self)
    self.BonusValue2Text.SetPosition(15 + 92, 79)
    self.BonusValue2Text.SetFeather()
    self.BonusValue2Text.SetDefaultFontName()
    self.BonusValue2Text.SetText("Wartość:")
    self.BonusValue2Text.SetFontColor(1.0, 1.0, 1.0)
    self.BonusValue2Text.SetOutline()
    self.BonusValue2Text.Show()
    
    self.BonusValue3Text = ui.TextLine()
    self.BonusValue3Text.SetParent(self)
    self.BonusValue3Text.SetPosition(15 + 92, 110)
    self.BonusValue3Text.SetFeather()
    self.BonusValue3Text.SetDefaultFontName()
    self.BonusValue3Text.SetText("Wartość:")
    self.BonusValue3Text.SetFontColor(1.0, 1.0, 1.0)
    self.BonusValue3Text.SetOutline()
    self.BonusValue3Text.Show()
    
    self.BonusValue4Text = ui.TextLine()
    self.BonusValue4Text.SetParent(self)
    self.BonusValue4Text.SetPosition(15 + 272 + 21, 44)
    self.BonusValue4Text.SetFeather()
    self.BonusValue4Text.SetDefaultFontName()
    self.BonusValue4Text.SetText("Wartość:")
    self.BonusValue4Text.SetFontColor(1.0, 1.0, 1.0)
    self.BonusValue4Text.SetOutline()
    self.BonusValue4Text.Show()
    
    self.BonusValue5Text = ui.TextLine()
    self.BonusValue5Text.SetParent(self)
    self.BonusValue5Text.SetPosition(15 + 272 + 21, 79)
    self.BonusValue5Text.SetFeather()
    self.BonusValue5Text.SetDefaultFontName()
    self.BonusValue5Text.SetText("Wartość:")
    self.BonusValue5Text.SetFontColor(1.0, 1.0, 1.0)
    self.BonusValue5Text.SetOutline()
    self.BonusValue5Text.Show()
    
    self.BonusHeadline = ui.TextLine()
    self.BonusHeadline.SetParent(self)
    self.BonusHeadline.SetDefaultFontName()
    self.BonusHeadline.SetPosition(18, 142)
    self.BonusHeadline.SetFeather()
    self.BonusHeadline.SetText("Wybrane bonusy:")
    self.BonusHeadline.SetFontColor(0.6, 0.7, 1)
    self.BonusHeadline.SetOutline()
    self.BonusHeadline.Show()
    
    self.Bonus1Attr = ui.TextLine()
    self.Bonus1Attr.SetParent(self)
    self.Bonus1Attr.SetDefaultFontName()
    self.Bonus1Attr.SetPosition(18, 157 + 13*0)
    self.Bonus1Attr.SetFeather()
    self.Bonus1Attr.SetText("-")
    self.Bonus1Attr.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus1Attr.SetOutline()
    self.Bonus1Attr.Show()
    
    self.Bonus1Var = ui.TextLine()
    self.Bonus1Var.SetParent(self)
    self.Bonus1Var.SetDefaultFontName()
    self.Bonus1Var.SetPosition(168, 157 + 13*0)
    self.Bonus1Var.SetFeather()
    self.Bonus1Var.SetText("0")
    self.Bonus1Var.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus1Var.SetOutline()
    self.Bonus1Var.Show()
    
    self.Bonus2Attr = ui.TextLine()
    self.Bonus2Attr.SetParent(self)
    self.Bonus2Attr.SetDefaultFontName()
    self.Bonus2Attr.SetPosition(18, 157 + 13*1)
    self.Bonus2Attr.SetFeather()
    self.Bonus2Attr.SetText("-")
    self.Bonus2Attr.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus2Attr.SetOutline()
    self.Bonus2Attr.Show()
    
    self.Bonus2Var = ui.TextLine()
    self.Bonus2Var.SetParent(self)
    self.Bonus2Var.SetDefaultFontName()
    self.Bonus2Var.SetPosition(168, 157 + 13*1)
    self.Bonus2Var.SetFeather()
    self.Bonus2Var.SetText("0")
    self.Bonus2Var.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus2Var.SetOutline()
    self.Bonus2Var.Show()
    
    self.Bonus3Attr = ui.TextLine()
    self.Bonus3Attr.SetParent(self)
    self.Bonus3Attr.SetDefaultFontName()
    self.Bonus3Attr.SetPosition(18, 157 + 13*2)
    self.Bonus3Attr.SetFeather()
    self.Bonus3Attr.SetText("-")
    self.Bonus3Attr.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus3Attr.SetOutline()
    self.Bonus3Attr.Show()
    
    self.Bonus3Var = ui.TextLine()
    self.Bonus3Var.SetParent(self)
    self.Bonus3Var.SetDefaultFontName()
    self.Bonus3Var.SetPosition(168, 157 + 13*2)
    self.Bonus3Var.SetFeather()
    self.Bonus3Var.SetText("0")
    self.Bonus3Var.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus3Var.SetOutline()
    self.Bonus3Var.Show()
    
    self.Bonus4Attr = ui.TextLine()
    self.Bonus4Attr.SetParent(self)
    self.Bonus4Attr.SetDefaultFontName()
    self.Bonus4Attr.SetPosition(18, 157 + 13*3)
    self.Bonus4Attr.SetFeather()
    self.Bonus4Attr.SetText("-")
    self.Bonus4Attr.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus4Attr.SetOutline()
    self.Bonus4Attr.Show()
    
    self.Bonus4Var = ui.TextLine()
    self.Bonus4Var.SetParent(self)
    self.Bonus4Var.SetDefaultFontName()
    self.Bonus4Var.SetPosition(168, 157 + 13*3)
    self.Bonus4Var.SetFeather()
    self.Bonus4Var.SetText("0")
    self.Bonus4Var.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus4Var.SetOutline()
    self.Bonus4Var.Show()
    
    self.Bonus5Attr = ui.TextLine()
    self.Bonus5Attr.SetParent(self)
    self.Bonus5Attr.SetDefaultFontName()
    self.Bonus5Attr.SetPosition(18, 157 + 13*4)
    self.Bonus5Attr.SetFeather()
    self.Bonus5Attr.SetText("-")
    self.Bonus5Attr.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus5Attr.SetOutline()
    self.Bonus5Attr.Show()
    
    self.Bonus5Var = ui.TextLine()
    self.Bonus5Var.SetParent(self)
    self.Bonus5Var.SetDefaultFontName()
    self.Bonus5Var.SetPosition(168, 157 + 13*4)
    self.Bonus5Var.SetFeather()
    self.Bonus5Var.SetText("0")
    self.Bonus5Var.SetFontColor(1.0, 1.0, 1.0)
    self.Bonus5Var.SetOutline()
    self.Bonus5Var.Show()
    
    self.TimerText = ui.TextLine()
    self.TimerText.SetParent(self)
    self.TimerText.SetDefaultFontName()
    self.TimerText.SetPosition(50, 10)
    self.TimerText.SetFeather()
    self.TimerText.SetText("Czas")
    self.TimerText.SetFontColor(1.0, 1.0, 1.0)
    self.TimerText.SetOutline()
    self.TimerText.Show()
    
    def __BreakSwitching(self):
    global SwitchButton
    if SwitchButton == 1:
    self.LastChange.SetText("Zatrzymano")
    self.Switchtingabbruchbutton.SetText("Wyjdź")
    SwitchButton = 0
    else:
    self.Hide()
    
    def StartSwitchBot(self):
    global SwitchButton
    SwitchButton = 1
    self.LastChange.SetText("Uruchomiono")
    self.Switchtingabbruchbutton.SetText("Zatrzymaj")
    self.__Switchtingdialog()
    
    def __Switchtingdialog(self):
    global BoniSwitchvalue
    global Bonus0
    global Bonus1
    global Bonus2
    global Bonus3
    global Bonus4
    global SwitchButton
    Slot = self.Slotbar.GetText()
    val0, bon0 = player.GetItemAttribute((int(Slot)), 0) #(itemposition, atrribute)
    val1, bon1 = player.GetItemAttribute((int(Slot)), 1) #(itemposition, atrribute)
    val2, bon2 = player.GetItemAttribute((int(Slot)), 2) #(itemposition, atrribute)
    val3, bon3 = player.GetItemAttribute((int(Slot)), 3) #(itemposition, atrribute)
    val4, bon4 = player.GetItemAttribute((int(Slot)), 4) #(itemposition, atrribute)
    Switchvalue = int(self.ZaczarowanieValue.GetText())
    Search0 = self.Bvalue1.GetText()
    Search1 = self.Bvalue2.GetText()
    Search2 = self.Bvalue3.GetText()
    Search3 = self.Bvalue4.GetText()
    Search4 = self.Bvalue5.GetText()
    DELAY_SEC = self.TimerValue.GetText()
    
    #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("Udało się")
    self.BoardMessage.SetTop()
    self.LastChange.SetText("Powodzenie")
    self.Switchtingabbruchbutton.SetText("Wyjdź")
    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("Udało się")
    self.BoardMessage.SetTop()
    self.LastChange.SetText("Powodzenie")
    self.Switchtingabbruchbutton.SetText("Wyjdź")
    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("Udało się")
    self.BoardMessage.SetTop()
    self.LastChange.SetText("Powodzenie")
    self.Switchtingabbruchbutton.SetText("Wyjdź")
    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("Udało się")
    self.BoardMessage.SetTop()
    self.LastChange.SetText("Powodzenie")
    self.Switchtingabbruchbutton.SetText("Wyjdź")
    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("Udało się")
    self.BoardMessage.SetTop()
    self.LastChange.SetText("Powodzenie")
    self.Switchtingabbruchbutton.SetText("Wyjdź")
    SwitchButton = 0
    elif Bonus0 == 0:
    self.Switchtingabbruchbutton.SetText("Wyjdź")
    SwitchButton = 0
    self.LastChange.SetText("Przerwano")
    chat.AppendChat(chat.CHAT_TYPE_INFO, "Wprowadz bonusy")
    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("Usunięte zapamietane bonusy")
    
    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 OnUpdate(self):
    global Bonus0
    global Bonus1
    global Bonus2
    global Bonus3
    global Bonus4
    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.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()))
    
    def Show(self):
    ui.ThinBoard.Show(self)
    
    def Close(self):
    self.Hide()
    return TRUE
    
    def OnPressEscapeKey(self):
    self.Hide()
    return TRUE
    
    BonusListe = (
    "",
    "MAX HP",
    "MAX PE",
    "Energia Życiowa",
    "Inteligencja",
    "Siła",
    "Zręczność",
    "Szybkość Ataku",
    "Szybkość Ruchu",
    "Szybkość Zaklęcia",
    "Regeneracja PŻ",
    "Regeneracja PE",
    "Szansa na Otrucie",
    "Szansa na Omdlenie",
    "Szansa na Spowolnienie",
    "Szansa na krytyczne Uderzenie",
    "Szansa na przeszywające Uderzenie",
    "Silny przeciwko Ludziom",
    "Silny przeciwko Metinom",
    "Silny przeciwko Orkom",
    "Silny przeciwko Mistykom",
    "Silny przeciwko Nieumarłym",
    "Silny przeciwko Diabłom",
    "kradzież HP",
    "kradzież PE",
    "Szansa na kradzież PE",
    "Szansa na odzyskanie PE",
    "Szansa na blok ciosów",
    "Szansa na uniknięcie Strzały",
    "Odporność na Miecze",
    "Odporność na Broń Dwuręczną",
    "Odporność na Sztylety",
    "Odporność na Dzwony",
    "Odporność na Wachlarze",
    "Odporność na Strzały",
    "Odporność na Ogień",
    "Odporność na Błyskawice",
    "Odporność na Magię",
    "Odporność na Wiatr",
    "Szansa na odbicie ataku",
    "",
    "",
    "Szansa na odzyskanie PE",
    "Exp-Bonus",
    "Yang-Drop",
    "Item-Drop",
    "",
    "Szansa na odzyskanie HP",
    "Odporny na omdlenia",
    "Odporny na spowolnienie",
    "",
    "",
    "",
    "Wartość Ataku",
    "Obrona",
    "",
    "",
    "",
    "Max Wytrzymałość",
    "Silny przeciwko Wojownikom",
    "Silny przeciwko Ninja",
    "Silny przeciwko Sura",
    "Silny przeciwko Szamanom",
    "Silny przeciwko Potworom",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "Obrażenia Umiejętności",
    "Średnie Obrażenia",
    "",
    "",
    "",
    "",
    "",
    "Odporność na Wojowników",
    "Odporność na Ninja",
    "Odporność na Sury",
    "Odporność na Shamanów",
    )
    
    BonusIDListe = {
    "" : 0,
    "MAX HP" : 1,
    "MAX PE" : 2,
    "Energia życiowa" : 3,
    "Inteligencja" : 4,
    "Siła" : 5,
    "Zręczność" : 6,
    "Szybkość Ataku" : 7,
    "Szybkość Ruchu" : 8,
    "Szybkość Zaklęcia" : 9,
    "Regeneracja PŻ" : 10,
    "Regeneracja PE" : 11,
    "Szansa na Otrucie" : 12,
    "Szansa na Omdlenie" : 13,
    "Szansa na Spowolnienie" : 14,
    "Szansa na krytyczne Uderzenie" : 15,
    "Szansa na przeszywające Uderzenie" : 16,
    "Silny przeciwko Ludziom" : 17,
    "Silny przeciwko Metinom" : 18,
    "Silny przeciwko Orkom" : 19,
    "Silny przeciwko Mistykom" : 20,
    "Silny przeciwko Nieumarłym" : 21,
    "Silny przeciwko Diabłom" : 22,
    "kradzież HP" : 23,
    "kradzież PE" : 24,
    "Szansa na kradzież PE" : 25,
    "Szansa na odzyskanie PE" : 26,
    "Szansa na blok ciosów" : 27,
    "Szansa na uniknięcie Strzały" : 28,
    "Odporność na Miecze" : 29,
    "Odporność na Broń Dwuręczną" : 30,
    "Odporność na Sztylety" : 31,
    "Odporność na Dzwony" : 32,
    "Odporność na Wachlarze" : 33,
    "Odporność na Strzały" : 34,
    "Odporność na Ogień" : 35,
    "Odporność na Błyskawice" : 36,
    "Odporność na Magię" : 37,
    "Odporność na Wiatr" : 38,
    "Szansa na odbicie ataku" : 39,
    "Szansa na odbicie Klątwy" : 40,
    "Odporność na Trucizny" : 41,
    "Szansa na odzyskanie PE" : 42,
    "Exp-Bonus" : 43,
    "Yang-Drop" : 44,
    "Item-Drop" : 45,
    "" : 46,
    "Szansa na odzyskanie HP" : 47,
    "Odporny na omdlenia" : 48,
    "Odporny na spowolnienie" : 49,
    "Niewrażliwy na Upadek" : 50,
    "" : 51,
    "" : 52,
    "Wartość Ataku" : 53,
    "Obrona" : 54,
    "" : 55,
    "" : 56,
    "" : 57,
    "Max Wytrzymałość" : 58,
    "Silny przeciwko Wojownikom" : 59,
    "Silny przeciwko Ninja" : 60,
    "Silny przeciwko Sura" : 61,
    "Silny przeciwko Szamanom" : 62,
    "Silny przeciwko Potworom" : 63,
    "" : 64,
    "" : 65,
    "" : 66,
    "" : 67,
    "" : 68,
    "" : 69,
    "" : 70,
    "Obrażenia Umiejętności" : 71,
    "Średnie Obrażenia" : 72,
    "" : 73,
    "" : 74,
    "" : 75,
    "" : 76,
    "" : 77,
    "Odporność na Wojowników" : 78,
    "Odporność na Ninja" : 79,
    "Odporność na Sury" : 80,
    "Odporność na Shamanów" : 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(170, 305)
    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(15, 50)
    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(15, 265)
    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(19, 265)
    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(89, 265)
    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("Wyjdź")
    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(50, 29)
    self.copyright.SetFeather()
    self.copyright.SetText("Wybierz bonus:")
    self.copyright.SetFontColor(0.2, 0.2, 1.0)
    self.copyright.SetOutline()
    self.copyright.Show()
    
    
    def LoadFuckingScrollBar(self):
    self.ScrollBar = ui.ScrollBar()
    self.ScrollBar.SetParent(self)
    self.ScrollBar.SetPosition(140, 40)
    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("-"))
    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 PRESSWISH0
    global PRESSWISH1
    global PRESSWISH2
    global PRESSWISH3
    global PRESSWISH4
    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 str(SelectedIndex) == "-" and str(SelectedIndex) != "":
    if PRESSWISH0 == 1:
    chat.AppendChat(chat.CHAT_TYPE_INFO, "1.Bonus został usunięty")
    Bonus0 = 0
    PRESSWISH0 = 0
    elif PRESSWISH1 == 1:
    chat.AppendChat(chat.CHAT_TYPE_INFO, "2.Bonus został usunięty")
    Bonus1 = 0
    PRESSWISH1 = 0
    elif PRESSWISH2 == 1:
    chat.AppendChat(chat.CHAT_TYPE_INFO, "3.Bonus został usunięty")
    Bonus2 = 0
    PRESSWISH2 = 0
    elif PRESSWISH3 == 1:
    chat.AppendChat(chat.CHAT_TYPE_INFO, "4.Bonus został usunięty")
    Bonus3 = 0
    PRESSWISH3 = 0
    elif PRESSWISH4 == 1:
    chat.AppendChat(chat.CHAT_TYPE_INFO, "5.Bonus został usunięty")
    Bonus4 = 0
    PRESSWISH4 = 0
    
    else:
    chat.AppendChat(chat.CHAT_TYPE_INFO, "Nie wybrano")
    self.Close()
    
    class WaitingDialog(ui.ScriptWindow):
    
    def __init__(self):
    ui.ScriptWindow.__init__(self)
    self.eventTimeOver = lambda *arg: None
    self.eventExit = lambda *arg: None
    
    def __del__(self):
    ui.ScriptWindow.__del__(self)
    
    def Open(self, waitTime):
    import time
    curTime = time.clock()
    self.endTime = curTime + waitTime
    
    self.Show()
    
    def Close(self):
    self.Hide()
    
    def Destroy(self):
    self.Hide()
    
    def SAFE_SetTimeOverEvent(self, event):
    self.eventTimeOver = ui.__mem_func__(event)
    
    def SAFE_SetExitEvent(self, event):
    self.eventExit = ui.__mem_func__(event)
    
    def OnUpdate(self):
    import time
    lastTime = max(0, self.endTime - time.clock())
    if 0 == 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__(self, fileName):
    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(self, width, height):
    ui.ListBoxEx.Item.SetSize(self, 6*len(self.textLine.GetText()) + 4, height)
    
    def __CreateTextLine(self, fileName):
    textLine=ui.TextLine()
    textLine.SetParent(self)
    textLine.SetPosition(0, 0)
    textLine.SetText(fileName)
    textLine.Show()
    return textLine
    [/spoiler]

     
    Gotowe.
     
    Efekt?
    Po kliknięciu F6:
     
    031923401_erwaqns.jpg

×
×
  • Create New...

Important Information

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