Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Search the Community

Showing results for tags 'c++/python' in content posted in C++ / Python / Server.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Forum board
    • M2Zone.tech
    • M2Zone.tech Serverfiles
  • Strefa gracza
    • Server presentations
    • Discussions, Questions and Problems
  • Create private server
    • Problems and Questions
    • Cooperation
    • Tutorials / Video
    • C++ / Python / Server
    • Sources / Serverfiles / Clients
    • Homepage / Board
    • Quests
    • 2D Graphics
    • 3D Graphics
    • Programs
  • Marketplace
    • Sell
    • Buy
  • Hydepark
    • About all
    • Introduce yourself
    • My Creativity / Media
  • Others
    • Blokady i Ostrzeżenia
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Sex


Country


Facebook


Discord


Telegram


Gadu-Gadu

Found 69 results

  1. Dekoracje/Wyszukiwarka/Sklepy Offline kupione za penge od alchemika aka złodzieja. Polecam sie na przyszłość. Jak to określił że wszystko co moje wystartuje to zostanie rozjebane także elko *Nie pomagam z implementacją *Nigdy nie dodane na serwer iż jeba* alchemika DOWNLOAD: Archiwum-MVPJ9.7z SKAN
  2. Dzięki tej modyfikacji możemy najpierw zaznaczyć przedmioty na sprzedaż, policzyć ich łączną wartość i sprzedać je jednym kliknięciem. Extended-Sell.zip Hasło: metin2zone.pl
  3. Siemanko. Nasi brudni przyjaciele wrzucili ostatnio poradnik. Trochę go przerobiłem bo tamten tylko na C++ 11 śmigał. Działa oczywiście ze sklepami offline i każdymi innymi. Kod jest w porządku, nie trzeba nic poprawiać. System oblicza średnią wartość rynkową przedmiotu na podstawie wystawionych itemów we wszystkich sklepach. Przyjdźmy do sedna sprawy, system prezentuje się następująco: POBIERZ PACZKĘ SKAN PACZKI Hasło do paczki: m2zone.pl Pozdrawiam, Shaggy
  4. strefa walki czyli zdobywanie punktów poprzez PvP System strefy walki (oficjalny Webzen 16.4).rar [Hidden Content]
  5. Metin2-IntroLogo-master.zip
  6. 1. Otwórz plik UserInterface/PythonNetworkStreamModule.cpp i znajdź w nim: #include "StdAfx.h" #include "PythonNetworkStream.h" //#include "PythonNetworkDatagram.h" #include "AccountConnector.h" #include "PythonGuild.h" #include "Test.h" #include "AbstractPlayer.h" static std::string gs_stServerInfo; extern BOOL gs_bEmpireLanuageEnable; std::list<std::string> g_kList_strCommand; Pod dodaj: static const char* ServerIPVName[2][2] = { {"10.10.143.100", "Metin2"}, // IP I NAZWA SERWERA {"192.168.43.7", "Metin2 Beta"} }; static unsigned int ServerPORT[] = {{13001},{13011},{13021},{13031},{13041},{13051},{11000},{13001}}; // PORTY PyObject* netGetServer_IPNAME(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("ssss", ServerIPVName[0][0], ServerIPVName[0][1], ServerIPVName[1][0], ServerIPVName[1][1] ); } PyObject* netGetServer_PORT(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("iiiiiiii", ServerPORT[0],ServerPORT[1],ServerPORT[2],ServerPORT[3],ServerPORT[4],ServerPORT[5],ServerPORT[6],ServerPORT[7]); } Znajdź: { "SendOnClickPacket", netOnClickPacket, METH_VARARGS }, { "SendMail", netSendMail, METH_VARARGS }, Pod dodaj: { "GetServer_IPNAME", netGetServer_IPNAME, METH_VARARGS }, { "GetServer_PORT", netGetServer_PORT, METH_VARARGS }, 2. Przykładowe serverinfo.py: import os import app import localeInfo import debugInfo import net (sv1_ip, sv1_name, sv2_ip, sv2_name) = net.GetServer_IPNAME() (ch1_port, ch2_port, ch3_port, ch4_port, ch5_port, ch6_port, auth_port, mark_port) = net.GetServer_PORT() CH_1_NAME = "CH1" CH_2_NAME = "CH2" CH_3_NAME = "CH3" CH_4_NAME = "CH4" CH_5_NAME = "CH5" CH_6_NAME = "CH6" STATE_NONE = localeInfo.SERVER_OFF STATE_DICT = { 0 : "|cFFFF0000|h...", 1 : "|cff00ff00|hNORM", 2 : "|cffFF6800|hBUSY", 3 : "|cffFF8300|hFULL" } SERVER01_CHANNEL_DICT = { 1:{"key":11,"name":CH_1_NAME,"ip":sv1_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,}, 2:{"key":12,"name":CH_2_NAME,"ip":sv1_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,}, 3:{"key":13,"name":CH_3_NAME,"ip":sv1_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,}, 4:{"key":14,"name":CH_4_NAME,"ip":sv1_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,}, 5:{"key":15,"name":CH_5_NAME,"ip":sv1_ip,"tcp_port":ch5_port,"udp_port":ch5_port,"state":STATE_NONE,}, 6:{"key":16,"name":CH_6_NAME,"ip":sv1_ip,"tcp_port":ch6_port,"udp_port":ch6_port,"state":STATE_NONE,}, } SERVER02_CHANNEL_DICT = { 1:{"key":11,"name":CH_1_NAME,"ip":sv2_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,}, 2:{"key":12,"name":CH_2_NAME,"ip":sv2_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,}, 3:{"key":13,"name":CH_3_NAME,"ip":sv2_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,}, 4:{"key":14,"name":CH_4_NAME,"ip":sv2_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,}, 5:{"key":15,"name":CH_5_NAME,"ip":sv2_ip,"tcp_port":ch5_port,"udp_port":ch5_port,"state":STATE_NONE,}, 6:{"key":16,"name":CH_6_NAME,"ip":sv2_ip,"tcp_port":ch6_port,"udp_port":ch6_port,"state":STATE_NONE,}, } REGION_NAME_DICT = { 0 : "", } REGION_AUTH_SERVER_DICT = { 0 : { 1 : { "ip":sv1_ip, "port":auth_port, }, 2 : { "ip":sv2_ip, "port":auth_port, }, } } REGION_DICT = { 0 : { 1 : { "name" :sv1_name, "channel" : SERVER01_CHANNEL_DICT, }, 2 : { "name" :sv2_name, "channel" : SERVER02_CHANNEL_DICT, }, }, } MARKADDR_DICT = { 10 : { "ip" : sv1_ip, "tcp_port" : mark_port, "mark" : "mark_0.tga", "symbol_path" : "10", }, 20 : { "ip" : sv2_ip, "tcp_port" : mark_port, "mark" : "mark_0.tga", "symbol_path" : "20", }, }
  7. ClientSide 1.0. Dołącz do root 2 następujące pliki: uikeyboard.py uikeyboardsettings.py 1.1. Dołącz do uiscript następujący plik: keychange_window.py 1.2. Dołącz do ETC: ymir work.zip 1.3. Dołącz do clienta następujący plik: keysave.txt 1.4. Otwórz plik game.py w root i wykonaj w nim następujące czynności: Dodaj import: if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: import uikeyboardsettings Znajdź: self.endTime = 0 self.achievement = None Dodaj nad: if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: self.dlgKeyboardSettings = None Znajdź: self.mapNameShower = uiMapNameShower.MapNameShower() self.affectShower = uiAffectShower.AffectShower() Dodaj pod: if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: self.dlgKeyboardSettings = uikeyboardsettings.KeyChangeWindow(self) Znajdź: self.__BuildKeyDict() Dodaj nad: if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: self.dlgKeyboardSettings.BuildKeyDict() Znajdź: def __NotifyError(self, msg): chat.AppendChat(chat.CHAT_TYPE_INFO, msg) Dodaj pod: if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: def PressNumberKey(self, key): self.pressNumber(key) def PressQuickSlot(self, key): player.RequestUseLocalQuickSlot(key) def SelectQuickPage(self, key): if app.IsPressed(app.DIK_LSHIFT): self.quickSlotPageIndex = key player.SetQuickPage(key) def SetEmoticon(self, key): if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): if (chrmgr.IsPossibleEmoticon(-1)): chrmgr.SetEmoticon(-1, key) net.SendEmoticon(key) def ShowNameNew(self): self.ShowNameFlag = True self.playerGauge.EnableShowAlways() def HideNameNew(self): self.ShowNameFlag = False self.playerGauge.DisableShowAlways() def PressExtraKey(self, key): if key == "RIDE_HORSE": if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): net.SendChatPacket("/user_horse_ride") elif key == "RIDE_PEED": if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): net.SendChatPacket("/user_horse_feed") elif key == "RIDE": if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): if player.IsMountingHorse(): net.SendChatPacket("/unmount") else: if not uiPrivateShopBuilder.IsBuildingPrivateShop(): if app.ENABLE_MOUNT_SYSTEM: for i in xrange(180): index = player.GetItemIndex(i) if index: item.SelectItem(index) subType = item.GetItemSubType() if subType == item.USE_MOUNT: net.SendItemUsePacket(i) break else: return elif key == "RIDE_J": if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): if player.IsMountingHorse(): net.SendChatPacket("/unmount") else: if not uiPrivateShopBuilder.IsBuildingPrivateShop(): if app.ENABLE_MOUNT_SYSTEM: for i in xrange(180): index = player.GetItemIndex(i) if index: item.SelectItem(index) subType = item.GetItemSubType() if subType == item.USE_MOUNT: net.SendItemUsePacket(i) break else: return elif key == "RIDE_BYE": net.SendChatPacket("/user_horse_back") elif key == "QUEST_SCROLL_ONOFF": if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): if 0 == interfaceModule.IsQBHide: interfaceModule.IsQBHide = 1 self.interface.HideAllQuestButton() else: interfaceModule.IsQBHide = 0 self.interface.ShowAllQuestButton() elif key == "GUILD_WINDOW": if app.IsPressed(app.DIK_LALT): self.interface.ToggleGuildWindow() elif key == "MESSENGER_WINDOW": if app.IsPressed(app.DIK_LCONTROL): self.interface.ToggleMessenger() elif key == "SHOW_MINIMAP": if app.IsPressed(app.DIK_LSHIFT): if False == self.interface.wndMiniMap.isShowMiniMap(): self.interface.wndMiniMap.ShowMiniMap() self.interface.wndMiniMap.SetTop() else: self.interface.wndMiniMap.HideMiniMap() elif key == "HIDE_PM": if 0 == interfaceModule.IsWisperHide: interfaceModule.IsWisperHide = 1 self.interface.HideAllWhisperButton() else: interfaceModule.IsWisperHide = 0 self.interface.ShowAllWhisperButton() elif key == "OPEN_WHISPER": self.interface.OpenWhisperDialogWithoutTarget() Znajdź: def OnKeyDown(self, key): Zamień na: def OnKeyDown(self, key): if self.interface.wndWeb and self.interface.wndWeb.IsShow(): return if key == app.DIK_ESC: constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0) if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: if self.interface: self.dlgKeyboardSettings.OnKeyDown(key) try: if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: pass else: self.onPressKeyDict[key]() except KeyError: pass except: raise return TRUE Znajdź: def OnKeyUp(self, key): Zamień na: def OnKeyUp(self, key): if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: if self.interface: self.dlgKeyboardSettings.OnKeyUp(key) try: if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: pass else: self.onClickKeyDict[key]() except KeyError: pass except: raise return TRUE 1.5. Otwórz plik ui.py w root i wykonaj w nim następujące czynności: Znajdź: def GetParentProxy(self): return self.parentWindow def SetPickAlways(self): wndMgr.SetPickAlways(self.hWnd) Dodaj pod: if app.ENABLE_KEYBOARD_SETTINGS_SYSTEM: def DelPickAlways(self): wndMgr.DelPickAlways(self.hWnd) 1.6. Przycisk: # Dodaj import uikeyboardsettings # Znajdź: def __init__(self, stream): # Dodaj: self.keyboardsettings = uikeyboardsettings.KeyChangeWindow() self.keyboardsettings.Hide() # Znajdź: self.GetChild("cancel_button").SAFE_SetEvent(self.Close) # Dodaj: self.GetChild("keyboard_button").SetEvent(self.__ClickKeyBoardButton) # Znajdź: def Close(self): # Dodaj: def __ClickKeyBoardButton(self): self.Close() player.OpenKeychangeWindow() # Dodaj: def BINARY_OpenKeyboardSettings(self): if self.dlgKeyboardSettings.IsShow(): self.dlgKeyboardSettings.Close() else: self.dlgKeyboardSettings.Open() # Dodaj: { "name" : "keyboard_button", "type" : "button", "x" : 10, "y" : 57, "text" : uiScriptLocale.SYSTEM_KEYBOARD, "text_color" : 0xffF8BF24, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, 1.7. Dodaj tłumaczenie do locale_interface.txt: KEYCHANGE_ACTION_WINDOW Eylemler KEYCHANGE_ATTACK Saldır KEYCHANGE_AUTORUN Otomatik yürü KEYCHANGE_AUTO_WINDOW Otomatik Av KEYCHANGE_BASEACTION Temel Ayarlar KEYCHANGE_CAM_DOWN1 Kamera (aşağı) KEYCHANGE_CAM_DOWN2 Kamera (aşağı) KEYCHANGE_CAM_LEFT1 Kamera (sol) KEYCHANGE_CAM_LEFT2 Kamera (sol) KEYCHANGE_CAM_RIGHT1 Kamera (sağ) KEYCHANGE_CAM_RIGHT2 Kamera (sağ) KEYCHANGE_CAM_UP1 Kamera (yukarı) KEYCHANGE_CAM_UP2 Kamera (yukarı) KEYCHANGE_CAM_ZOOM_IN1 Kamera (büyüteç +) KEYCHANGE_CAM_ZOOM_IN2 Kamera (büyüteç +) KEYCHANGE_CAM_ZOOM_OUT1 Kamera (büyüteç -) KEYCHANGE_CAM_ZOOM_OUT2 Kamera (büyüteç -) KEYCHANGE_CANCLE İptal KEYCHANGE_CHAT_WINDOW Sohbet Protokolü KEYCHANGE_CLEAR Standart KEYCHANGE_DDS_WINDOW DSS KEYCHANGE_DOWN1 Geri KEYCHANGE_DOWN2 Geri KEYCHANGE_DSS1 DS [Gökyüzü] KEYCHANGE_DSS2 DS [Dünya] KEYCHANGE_EMOTION1 Duygu (üzgün) KEYCHANGE_EMOTION2 Duygu (Yang) KEYCHANGE_EMOTION3 Duygu (müzik) KEYCHANGE_EMOTION4 Duygu (kalp) KEYCHANGE_EMOTION5 Duygu (kalp) KEYCHANGE_EMOTION6 Duygu (bomba) KEYCHANGE_EMOTION7 Duygu (fikir) KEYCHANGE_EMOTION8 Duygu (fırtına) KEYCHANGE_EMOTION9 Duygu (özür) KEYCHANGE_GUILD_WINDOW Lonca KEYCHANGE_HELP_WINDOW Yardım KEYCHANGE_IMPOSSIBLE_CHANGE [CTRL], [ALT], [SHIFT] burada kullanılamaz! KEYCHANGE_IMPOSSIBLE_CHANGE2 Bu tuş ana tuşlarda kullanılmakta! KEYCHANGE_IMPOSSIBLE_CHANGE3 Değiştirmek için bir tuş seç! KEYCHANGE_INTERFACE Pencere KEYCHANGE_INVENTORY_WINDOW Envanter KEYCHANGE_KEY_SETTING Klavye Ayarları KEYCHANGE_LEFT1 Sol KEYCHANGE_LEFT2 Sol KEYCHANGE_MESSENGER_WINDOW Arkadaşlar KEYCHANGE_MINIMAP_MINER Mini Harita (-) KEYCHANGE_MINIMAP_PLUS Mini Harita (+) KEYCHANGE_MINIMAP_WINDOW Genel Görünüm Haritası KEYCHANGE_MONSTER_CARD_WINDOW Canavar Kartı KEYCHANGE_NEXT_TARGET Sonraki hedef KEYCHANGE_PARTY_MATCH_WINDOW Grup araması KEYCHANGE_PET_WINDOW Pet KEYCHANGE_QUEST_SCROLL_ONOFF Görev göstergesi KEYCHANGE_QUEST_WINDOW Görevler KEYCHANGE_QUICKSLOT1 1. kat KEYCHANGE_QUICKSLOT2 2. kat KEYCHANGE_QUICKSLOT3 3. kat KEYCHANGE_QUICKSLOT4 4. kat KEYCHANGE_RIDE Biniş KEYCHANGE_RIDE_BYE Atı gönder KEYCHANGE_RIDE_HORSE Biniş KEYCHANGE_RIDE_PEED Atı yemle KEYCHANGE_RIGHT1 Sağ KEYCHANGE_RIGHT2 Sağ KEYCHANGE_ROOT1 Kaldır KEYCHANGE_ROOT2 Kaldır KEYCHANGE_SAVE Kaydet KEYCHANGE_SCREENSHOT Şipşak KEYCHANGE_SHOW_NAME İsmi göster KEYCHANGE_SKILL_WINDOW Beceriler KEYCHANGE_SLOT1 Boşluk 1 KEYCHANGE_SLOT2 Boşluk 2 KEYCHANGE_SLOT3 Boşluk 3 KEYCHANGE_SLOT4 Boşluk 4 KEYCHANGE_SLOT5 Boşluk 5 KEYCHANGE_SLOT6 Boşluk 6 KEYCHANGE_SLOT7 Boşluk 7 KEYCHANGE_SLOT8 Boşluk 8 KEYCHANGE_SLOT_KET Hızlı Erişim KEYCHANGE_STATUS_WINDOW Karakter KEYCHANGE_UP1 İleri KEYCHANGE_UP2 İleri KEYCHANGE_SUPPORT_GUI Destek Karakteri KEYCHANGE_SPECIAL_INVENTORY Yardımcı Çanta KEYCHANGE_ATLASMAP_WINDOW Büyük Harita KEYCHANGE_SHOW_MINIMAP Küçük Harita KEYCHANGE_SHOW_CHAT Sohbet Penceresi KEYCHANGE_EXIT_AND_SAVE Kaydet ve çık KEYCHANGE_EXIT_WITHOUT_SAVE Kaydetmeden çık BinarySide 2.0. Otwórz plik Locale_inc.h w UserInterface i wykonaj w nim następujące czynności: Dodaj: #define ENABLE_KEYBOARD_SETTINGS_SYSTEM 2.1. Otwórz plik PythonApplicationModule.cpp w UserInterface i wykonaj w nim następujące czynności: Znajdź: #ifdef ENABLE_COSTUME_SYSTEM PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 0); #endif Dodaj nad: #ifdef ENABLE_KEYBOARD_SETTINGS_SYSTEM PyModule_AddIntConstant(poModule, "ENABLE_KEYBOARD_SETTINGS_SYSTEM", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_KEYBOARD_SETTINGS_SYSTEM", 0); #endif 2.2. Otwórz plik PythonPlayer.cpp w UserInterface i wykonaj w nim następujące czynności: Znajdź: void CPythonPlayer::SPlayerStatus::SetPoint(UINT ePoint, long lPoint) { m_alPoint[ePoint]=lPoint ^ POINT_MAGIC_NUMBER; } Dodaj pod: #ifdef ENABLE_KEYBOARD_SETTINGS_SYSTEM void CPythonPlayer::OpenKeychangeWindow() { PyCallClassMemberFunc(m_ppyGameWindow, "BINARY_OpenKeyboardSettings", Py_BuildValue("()")); } #endif 2.3. Otwórz plik PythonPlayer.h w UserInterface i wykonaj w nim następujące czynności: Znajdź: DWORD GetTargetVID(); Dodaj pod: #ifdef ENABLE_KEYBOARD_SETTINGS_SYSTEM void OpenKeychangeWindow(); #endif 2.4. Otwórz plik PythonPlayerModule.cpp w UserInterface i wykonaj w nim następujące czynności: Znajdź: void initPlayer() { static PyMethodDef s_methods[] = { Dodaj nad: #ifdef ENABLE_KEYBOARD_SETTINGS_SYSTEM PyObject * playerOpenKeychangeWindow(PyObject * poSelf, PyObject* poArgs) { CPythonPlayer::instance().OpenKeychangeWindow(); return Py_BuildNone(); } #endif Znajdź: { "RegisterEmotionIcon", playerRegisterEmotionIcon, METH_VARARGS }, Dodaj pod: #ifdef ENABLE_KEYBOARD_SETTINGS_SYSTEM {"OpenKeychangeWindow",playerOpenKeychangeWindow, METH_VARARGS}, #endif 2.5. Otwórz plik PythonWindowManager.cpp w EterPythonLib i wykonaj w nim następujące czynności: Znajdź: void CWindowManager::SetPickAlways(CWindow * pWindow) { m_PickAlwaysWindowList.push_back(pWindow); } Dodaj pod: void CWindowManager::DelPickAlways(CWindow * pWindow) { m_PickAlwaysWindowList.remove(pWindow); } 2.6. Otwórz plik PythonWindowManager.h w EterPythonLib i wykonaj w nim następujące czynności: Znajdź: void SetPickAlways(CWindow * pWindow); Dodaj pod: void DelPickAlways(CWindow * pWindow); 2.7. Otwórz plik PythonWindowManagerModule.cpp w EterPythonLib i wykonaj w nim następujące czynności: Znajdź: PyObject * wndMgrSetPickAlways(PyObject * poSelf, PyObject * poArgs) { UI::CWindow * pWin; if (!PyTuple_GetWindow(poArgs, 0, &pWin)) return Py_BuildException(); UI::CWindowManager::Instance().SetPickAlways(pWin); return Py_BuildNone(); } Dodaj pod: PyObject * wndMgrDelPickAlways(PyObject * poSelf, PyObject * poArgs) { UI::CWindow * pWin; if (!PyTuple_GetWindow(poArgs, 0, &pWin)) return Py_BuildException(); UI::CWindowManager::Instance().DelPickAlways(pWin); return Py_BuildNone(); } Znajdź: { "SetPickAlways", wndMgrSetPickAlways, METH_VARARGS }, Dodaj pod: { "DelPickAlways", wndMgrDelPickAlways, METH_VARARGS }, 2.8. Gotowe!
  8. Szarfy jak szarfy co tu więcej mówić. Autor: LennT Pochodzenie? A ja wiem? Jak ktoś doda niech wrzuci SS. ShoulderSash-System with Scale Function by LeNnT (1).7z SKAN Już pobrałeś? Dej yangi XDD
  9. Witam daje wam system RenderTarget [Hidden Content] SKAN [Hidden Content] U mnie działa f1529844682e872a6c580c27b2daa289.mp4
  10. Skoro i tak już wypłynął na Turka, a brudasy mają tendencję upłynniania nam zawartości forum to trzymajcie. Own window and slots Items are placed in a new window_type just for switchbot Items can be moved from slot to slot Right click on Items in switchbot are putting it back to inventory ALT + LMOUSE is pasting the item-string to chat Changer or Yang Easy to configure if Changer-Items or Yang should be used for each change Amount of Changer or Yang configurable easily Able to use more than one vnum as changer Attribute-Table and Selection Server is sending all Attribute-Sets to the client While selection of an attribute the maximum value is already preselected The list of attributes is filtered for the selected item-type. it’s only possible to select attributes you can get Double selection of attributes isn’t possible Inserting value of attribute can’t exceed it’s max value and will be reset to its max value while typing Searchbar for quick search of desired attribute Searching can be directly accepted by pressing Enter-key when result is one attribute Alternative-Attributes Each slot has multiple alternatives configurable Amount of alternatives easily configurable (Enum: SWITCHBOT_ALTERNATIVE_COUNT) UI is auto adapting itself to specified amount in source Notifications Silent – No ChatPackets are send! If the process if finished successfully it’s sending a private message to the player Networking- & Refresh-Optimizations Own UpdateItem-Packet Only containing needed informations (Slot, Vnum, Attributes, Sockets) Directly passed to switchbot window, when it’s open. ChangeAttribute-Methode optimized: CItem.ChangeAttribute was executing “SetAttribute” for each attribute the item contains. That was always sending an UpdatePacket, which results into about 7 refreshes per single change process. If ChangeAttribute is executed now and the item is placed in window_type “SWITCHBOT” the original update packet is blocked/not send. Switchbot is now setting all attributes and sending ONE packet afterwards to refresh/update the item informations. Tooltip is not shrinking/growing while the process because the amount of attributes will always stay the same. (Much smoother behaviour) Speed-Configuration Since the new update packet is much lighter , only sending once per process and it’s checked serverside it can reach much faster speed configurations. The delays between each change-process can be adjusted in a constant value on top of the new switchbot-class in server source. P2P When warping to another core the switchbot informations are transfered to your target core and will always continue changing even when warping. (Logout clears those informations and stops the bot!) C_Sanii_Switchbot (1).rar
  11. Kolejny System kupiony dawno temu od Shanga testowane na moich udostępnionych pliczkach Download: [Hidden Content] Skan: Spolszczenie uiitemshop.py [Hidden Content] Spolszczenie itemshopwindow.py [Hidden Content] spolszczenie itemshop_discountcategorybox [Hidden Content] spolszczenie itemshop_discountitembox [Hidden Content] Spolszczenie ITEMSHOP_CONFIG [Hidden Content] To chyba wszystko jak coś przeoczyłem to pisac
  12. Hej, pokażę Wam jak dodać własny zestaw bonusów jaki może wejść do nowo utworzonego przedmiotu + stworzenie dedykowanego dodania/zmianki dla tego przedmiotu. Dla przykładu wykorzystam pierścień, item o typie ITEM_RING Source - serwer service.h dodajecie na końcu pliku: #define ENABLE_NEW_ATTR_SET item_length.h w enum EUseSubTypes dodaj na końcu: #ifdef ENABLE_NEW_ATTR_SET USE_ADD_NEW_ATTR, USE_CHANGE_NEW_ATTR, #endif length.h w enum EAttributeSet dodajecie nad ATTRIBUTE_SET_MAX_NUM: #ifdef ENABLE_NEW_ATTR_SET ATTRIBUTE_SET_RING, #endif item_attribute.cpp szukacie: int CItem::GetAttributeSetIndex() { dodajecie pod: #ifdef ENABLE_NEW_ATTR_SET if (GetType() == ITEM_RING) return ATTRIBUTE_SET_RING; #endif char_item.cpp szukacie: // END_OF_ACCESSORY_REFINE & END_OF_ADD_ATTRIBUTES & END_OF_CHANGE_ATTRIBUTES dodajecie pod: #ifdef ENABLE_NEW_ATTR_SET case USE_ADD_NEW_ATTR: case USE_CHANGE_NEW_ATTR: { LPITEM item2; if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell))) return false; if (item2->IsEquipped()) { BuffOnAttr_RemoveBuffsFromItem(item2); } if (ITEM_RING != item2->GetType()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ĽÓĽşŔ» şŻ°ćÇŇ Ľö ľř´Â ľĆŔĚĹŰŔÔ´Ď´Ů.")); return false; } if (item2->IsExchanging() || item2->IsEquipped()) return false; switch (item->GetSubType()) { case USE_ADD_NEW_ATTR: { if (item2->GetAttributeCount() < 3) // MAKS ILOŚC BONUSÓW { item2->AddAttribute(); char buf[21]; snprintf(buf, sizeof(buf), "%u", item2->GetID()); LogManager::instance().ItemLog(this, item, "ADD_RING_ATTR", buf); item->SetCount(item->GetCount() - 1); } else { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("MAKS_BONUSOW")); return false; } break; } case USE_CHANGE_NEW_ATTR: { if (item2->GetAttributeCount() == 0) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("şŻ°ćÇŇ ĽÓĽşŔĚ ľř˝Ŕ´Ď´Ů.")); return false; } const int prob[5] = { 20, 40, 20, 20, 0 }; // SZANSA NA WBICIE DANEJ WARTOŚCI BONUSU Z BAZY (lvl1, lvl2...) item2->ChangeAttribute(prob); { char buf[21]; snprintf(buf, sizeof(buf), "%u", item2->GetID()); LogManager::instance().ItemLog(this, item, "CHANGE_RING_ATTR", buf); item->SetCount(item->GetCount() - 1); } ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ĽÓĽşŔ» şŻ°ćÇĎż´˝Ŕ´Ď´Ů.")); break; } } } break; #endif szukacie: case USE_ADD_ATTRIBUTE: case USE_ADD_ATTRIBUTE2: tutaj, kilka linijek niżej szukacie: if (ITEM_COSTUME == item2->GetType()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ĽÓĽşŔ» şŻ°ćÇŇ Ľö ľř´Â ľĆŔĚĹŰŔÔ´Ď´Ů.")); return false; } zamieniacie na: if (ITEM_COSTUME == item2->GetType() || ITEM_RING == item2->GetType()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ĽÓĽşŔ» şŻ°ćÇŇ Ľö ľř´Â ľĆŔĚĹŰŔÔ´Ď´Ů.")); return false; } ClientManagerBoot.cpp szukacie w bool CClientManager::InitializeItemAttrTable(): "SELECT apply, apply+0, prob, lv1, lv2, lv3, lv4, lv5, weapon, body, wrist, foots, neck, head, shield, ear " dodajecie pod: #ifdef ENABLE_NEW_ATTR_SET ", ring" #endif w tej samej funkcji szukacie: str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_EAR], data[col++]); dodajecie pod: #ifdef ENABLE_NEW_ATTR_SET str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_RING], data[col++]); #endif w tej samej funkcji szukacie: sys_log(0, "ITEM_ATTR: %-20s %4lu { %3d %3d %3d %3d %3d } { %d %d %d %d %d %d %d" dodajecie pod: #ifdef ENABLE_NEW_ATTR_SET " %d" #endif w tej samej funkcji szukacie: t.bMaxLevelBySet[ATTRIBUTE_SET_EAR] dodajecie pod: #ifdef ENABLE_NEW_ATTR_SET , t.bMaxLevelBySet[ATTRIBUTE_SET_RING] #endif Source - klient Locale_inc.h dodajecie na końcu: #define ENABLE_NEW_ATTR_SET ItemData.cpp szukacie: case USE_PUT_INTO_RING_SOCKET: return DEF_STR(USE_PUT_INTO_RING_SOCKET); dodajecie pod: #ifdef ENABLE_NEW_ATTR_SET case USE_ADD_NEW_ATTR: return DEF_STR(USE_ADD_NEW_ATTR); case USE_CHANGE_NEW_ATTR: return DEF_STR(USE_CHANGE_NEW_ATTR); #endif ItemData.h szukacie: USE_PUT_INTO_RING_SOCKET, dodajecie pod: #ifdef ENABLE_NEW_ATTR_SET USE_ADD_NEW_ATTR, USE_CHANGE_NEW_ATTR, #endif Python uiinventory.py szukacie: USE_TYPE_TUPLE = ("USE_CLEAN_SOCKET", "USE_CHANGE_ATTRIBUTE" ... dodajecie pod: if app.ENABLE_NEW_ATTR_SET: USE_TYPE_TUPLE = tuple(list(USE_TYPE_TUPLE) + ["USE_ADD_NEW_ATTR", "USE_CHANGE_NEW_ATTR"]) MySQL MySQL -> item_attr dodajecie sobie nową kolumnę: ALTER TABLE player.item_attr ADD ring int(11) UNSIGNED NOT NULL DEFAULT 0 AFTER ear; teraz ustawiacie sobie w tabelce jakie bonusy mogą wejść poprzez wpisanie w kolumnie "ring" do jakiego "lv.." (czyli maks wartość) mogą wejść, np.: dodatkowo w locale_string.txt w locale/poland dodajecie sobie: "MAKS_BONUSOW"; "Przedmiot posiada maksymalną ilość bonusów!"; Naturalnie aby wszystko działało: - kompilujecie DB & GAME - kompilujecie BINKE - pakujecie ROOT - ustawiacie odpowiedni Type i Subtype w bazie dla nowego dodania, zmianki (type = 3, subtype pobieracie z item_length.h) - ustawiacie type przedmiotu, który chcecie miksować na wartość ITEM_RING z item_length.h Poradnik pisałem z ręki bez większego przygotowania, wydaje mi się, że o niczym nie zapomniałem, jakby były jakieś problemy dajcie znać to poprawię.
  13. Cześć mianowicie system był udostępniony dawniej przez @Ups... ale miałem z nim trochę magicznych problemów np. ikonka pojawiała się tylko przez sekundę po czym znikała w magiczną otchłań więc poszperałem nad inną krótszą wersją. System jest inny niż ten udostępniony dawniej oraz działa tylko na czacie bez wiadomości prywatnych a głównie gdzie pracujemy aby działały ikony to plik .py bez użycia binki (Ofc. przed działaniem trzeba dodać oddzielny system który jest również w paczce) SS: Download: [Hidden Content] Skan: [Hidden Content]
  14. Siema dawno temu kupiłem to od Shanga jeśli kiedykolwiek to było lub gdzieś jest juz udostępnione to wywalcie Nie mam screenów system testowany na moich plikach Verti które udostępniłem i działa 1000% [Hidden Content] Skan: Spolszczenie locale_game.txt TICKET_PRIORITY_HIGH Wysoki TICKET_PRIORITY_MEDIUM Średni TICKET_PRIORITY_LOW Niski TICKET_STATE_ON_HOLD W procesie TICKET_STATE_CLOSED Zamknięte TICKET_STATE_SOLVED Rozwiązany TICKET_ADD_NAME Nazwa: TICKET_ADD_TITLE Dodaćj członka TICKET_ADD_ACCEPT Akceptuj TICKET_SEND Wyślij TICKET_TITLE System Zgłoszeń TICKET_MY_TICKETS Moje Zgłoszenia TICKET_ADMINISTRATION Administrator TICKET_SORT_BY Sortuj według: TICKET_ID ID TICKET_TITLE_T Tytuł TICKET_PRIORITY Priorytet TICKET_DATE Data TICKET_STATE Stan TICKET_CREATE_NEW Utwórz nowe zgłoszenie TICKET_SEARCH Szukaj ID: TICKET_SEARCH_BUTTON Szukaj TICKET_NAME Nazwa TICKET_ANSWER Odpowiedź TICKET_DELETE Usuń członka TICKET_CHANGE_PERMISIONS Modyfikowania Uprawnień TICKET_ADD_MEMBER Dodaj nowego członka TICKET_REFRESH Odśwież TICKET_CATEGORY Kategorie TICKET_CATEGORY_0 Wszystko Spolszczenie uiticket.txt import ui import grp import chat import constInfo import event import localeInfo import pythonApi player = __import__(pythonApi.GetModuleName("player")) app = __import__(pythonApi.GetModuleName("app")) from _weakref import proxy CATEGORIES = [ localeInfo.TICKET_CATEGORY_0, 'Sugestie', 'Bugi', 'Hacki', 'Inne', ] class TicketWindow(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.isLoaded = FALSE def __del__(self): ui.ScriptWindow.__del__(self) def __LoadWindow(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "uiscript/TicketWindow.py") except: import exception exception.Abort("TicketWindow.__LoadWindow.LoadObject") self.pages = ['MY_TICKETS', 'ADMINISTRATOR'] self.priority_levels = [localeInfo.TICKET_PRIORITY_LOW, localeInfo.TICKET_PRIORITY_MEDIUM, localeInfo.TICKET_PRIORITY_HIGH] self.sort = [localeInfo.TICKET_DATE, localeInfo.TICKET_STATE, localeInfo.TICKET_PRIORITY] self.tmpID = '' self.myticketsPos = 0 self.globalticketsPos = 0 self.permisionsPos = 0 self.priority = 0 self.category = 0 self.curPage = self.pages[0] self.curCategory = 0 self.lastSort = 0 self.isGM = FALSE self.lastSaw = '' self.sortedList = [] self.isSorting = FALSE self.__BindObjects() self.__BindEvents() self.isLoaded = TRUE def __BindObjects(self): self.board = self.GetChild('board') for i in xrange(2): self.GetChild('btnpage%d' % (i+1)).SetEvent(ui.__mem_func__(self.SelectPage), self.pages[i]) self.elements = { 'listboxes' : {'my_tickets' : self.GetChild('my_tickets_listbox'), 'admin' : self.GetChild('admin_listbox')}, 'scrollbars' : {'my_tickets' : self.GetChild('my_tickets_scrollbar'), 'admin' : self.GetChild('admin_scrollbar'), 'permisions' : self.GetChild('permisions_scrollbar')}, 'editlines' : {'create_ticket' : {'title' : self.GetChild('create_ticket_title_value'), 'msg' : self.GetChild('create_ticket_msg')}, 'search' : self.GetChild('search_value')}, 'comboboxes' : {'create_ticket' : 0, 'sort' : 0}, 'buttons' : {'create_ticket' : 0, 'add_member' : self.GetChild('permisions_add_member'), 'search' : self.GetChild('search_button')}, 'priorities' : {}, 'unique_ticket' : TicketManage(), 'add_member' : AddMember(), } for i in xrange(7): self.elements.update({'permision_%d' % i: PermisionManage()}) self.elements['comboboxes']['create_ticket'] = ui.ComboBox() self.elements['comboboxes']['create_ticket'].SetParent(self.GetChild('create_ticket_bg')) self.elements['comboboxes']['create_ticket'].SetSize(55, 15) self.elements['comboboxes']['create_ticket'].SetPosition(78, 46) self.elements['comboboxes']['create_ticket'].SetWindowHorizontalAlignRight() self.elements['comboboxes']['create_ticket'].SetEvent(self.SelectPriority) self.elements['comboboxes']['create_ticket'].Show() self.elements['comboboxes']['create_ticket_category'] = ui.ComboBox() self.elements['comboboxes']['create_ticket_category'].SetParent(self.GetChild('create_ticket_bg')) self.elements['comboboxes']['create_ticket_category'].SetSize(90, 15) self.elements['comboboxes']['create_ticket_category'].SetPosition(245, 46) self.elements['comboboxes']['create_ticket_category'].SetWindowHorizontalAlignRight() self.elements['comboboxes']['create_ticket_category'].SetEvent(self.SelectCategorySend) self.elements['comboboxes']['create_ticket_category'].Show() self.elements['comboboxes']['sort'] = ui.ComboBox() self.elements['comboboxes']['sort'].SetParent(self.GetChild('board')) self.elements['comboboxes']['sort'].SetSize(65, 18) self.elements['comboboxes']['sort'].SetPosition(34+55, 35) self.elements['comboboxes']['sort'].SetWindowHorizontalAlignRight() self.elements['comboboxes']['sort'].SetEvent(self.SelectSort) self.elements['comboboxes']['sort'].Show() self.elements['comboboxes']['categories'] = ui.ComboBox() self.elements['comboboxes']['categories'].SetParent(self.GetChild('board')) self.elements['comboboxes']['categories'].SetSize(100, 18) self.elements['comboboxes']['categories'].SetPosition(180+68+14, 35) self.elements['comboboxes']['categories'].SetWindowHorizontalAlignRight() self.elements['comboboxes']['categories'].SetEvent(self.SelectCategory) self.elements['comboboxes']['categories'].Show() self.elements['buttons']['create_ticket'] = ui.CoolButton() self.elements['buttons']['create_ticket'].SetParent(self.GetChild('create_ticket_bg_msg2')) self.elements['buttons']['create_ticket'].SetSize(95, 50) self.elements['buttons']['create_ticket'].SetPosition(102, 0) self.elements['buttons']['create_ticket'].SetWindowHorizontalAlignRight() self.elements['buttons']['create_ticket'].SetWindowVerticalAlignCenter() self.elements['buttons']['create_ticket'].SetEvent(ui.__mem_func__(self.SendTicket)) self.elements['buttons']['create_ticket'].SetText(localeInfo.TICKET_SEND) self.elements['buttons']['create_ticket'].Show() idx = 0 for prty in self.priority_levels: self.elements['comboboxes']['create_ticket'].InsertItem(idx, prty) idx += 1 idx = 0 for obj in self.sort: self.elements['comboboxes']['sort'].InsertItem(idx, obj) idx += 1 idx = 0 for cat in CATEGORIES: self.elements['comboboxes']['categories'].InsertItem(idx, cat) idx += 1 for i in xrange(len(CATEGORIES)-1): self.elements['comboboxes']['create_ticket_category'].InsertItem(i, CATEGORIES[i+1]) def __BindEvents(self): self.board.SetCloseEvent(ui.__mem_func__(self.Close)) self.elements['comboboxes']['create_ticket'].SelectItem(0) self.elements['comboboxes']['create_ticket_category'].SelectItem(0) self.elements['editlines']['create_ticket']['title'].SetReturnEvent(ui.__mem_func__(self.elements['editlines']['create_ticket']['msg'].SetFocus)) self.elements['editlines']['create_ticket']['title'].SetTabEvent(ui.__mem_func__(self.elements['editlines']['create_ticket']['msg'].SetFocus)) self.elements['editlines']['create_ticket']['msg'].SetTabEvent(ui.__mem_func__(self.elements['editlines']['create_ticket']['title'].SetFocus)) self.elements['editlines']['create_ticket']['title'].SetEscapeEvent(ui.__mem_func__(self.Close)) self.elements['editlines']['create_ticket']['msg'].SetEscapeEvent(ui.__mem_func__(self.Close)) self.elements['editlines']['search'].SetEscapeEvent(ui.__mem_func__(self.Close)) self.elements['unique_ticket'].Open(self.GetChild('window3'), 1, 5) self.elements['unique_ticket'].SetCloseEvent(self.Close) self.elements['listboxes']['my_tickets'].SetSelectEvent(self.SelectMyTicket) self.elements['scrollbars']['my_tickets'].SetScrollEvent(self.__OnScrollMyTickets) self.elements['listboxes']['admin'].SetSelectEvent(self.SelectGlobalTicket) self.elements['scrollbars']['admin'].SetScrollEvent(self.__OnScrollGlobalTickets) self.elements['scrollbars']['permisions'].SetScrollEvent(self.__OnScrollPermisions) for i in xrange(7): self.elements['permision_%d' % i].Open(self.GetChild('permisions_bg'), 0, 10+20*i) self.elements['permision_%d' % i].SetWindowHorizontalAlignCenter() self.elements['buttons']['add_member'].SetEvent(ui.__mem_func__(self.__OnClickAddMember)) self.elements['add_member'].Open(self.board, 0, -20) self.elements['add_member'].SetWindowHorizontalAlignCenter() self.elements['add_member'].SetWindowVerticalAlignCenter() self.elements['add_member'].Hide() self.elements['buttons']['search'].SetEvent(ui.__mem_func__(self.SelectFoundTicket)) self.elements['comboboxes']['sort'].SelectItem(0) def Close(self): constInfo.Tickets['QCMD'] = 'CLOSE#' event.QuestButtonClick(constInfo.Tickets['QID']) self.Hide() def Destroy(self): self.Close() self.ClearDictionary() def OnPressEscapeKey(self): self.Close() return TRUE def RequestOpen(self): constInfo.Tickets['QCMD'] = 'OPEN#' event.QuestButtonClick(constInfo.Tickets['QID']) def Open(self, mode): if not self.isLoaded: self.__LoadWindow() if mode == 1: self.SetGmMode() else: self.SetPlayerMode() self.RefreshMode() self.SelectPage('MY_TICKETS') self.SetCenterPosition() self.SetTop() self.Show() def SetPlayerMode(self): self.isGM = FALSE self.GetChild('btnpage2').Hide() def SetGmMode(self): self.isGM = TRUE self.GetChild('btnpage2').Show() def RefreshMode(self): if self.IsMember(): self.SetGmMode() else: self.SetPlayerMode() self.elements['unique_ticket'].SetGMLevel(self.isGM) def IsMember(self): for i in xrange(len(constInfo.Tickets['PERMISIONS'])): if constInfo.Tickets['PERMISIONS'][i][0] == player.GetName(): return TRUE return FALSE def SelectPage(self, pageName): for i in xrange(2): self.GetChild('btnpage%d' % (i+1)).SetUp() for i in xrange(3): self.GetChild('window%d' % (i+1)).Hide() self.curPage = pageName self.elements['add_member'].Hide() self.isSorting = FALSE idx = 1 if pageName == 'MY_TICKETS': self.myticketsPos = 0 self.SelectSort(0) self.elements['comboboxes']['sort'].SelectItem(self.lastSort) self.RefreshMyTickets() self.ResetTicket() self.elements['comboboxes']['categories'].Hide() idx = 1 elif pageName == 'ADMINISTRATOR': self.globalticketsPos = 0 self.elements['editlines']['search'].SetText('') self.elements['comboboxes']['categories'].Show() self.elements['comboboxes']['categories'].Enable() self.SelectCategory(self.curCategory) self.RefreshPermisions() idx = 2 elif pageName == 'SHOW_TICKET': idx = 3 self.GetChild('window%d' % idx).Show() return self.GetChild('btnpage%d' % idx).Down() self.GetChild('window%d' % idx).Show() def RefreshPage(self): self.RefreshMode() if self.curPage == 'SHOW_TICKET': self.RefreshSelectedTicket() return if self.curPage == 'ADMINISTRATOR' and not self.isGM: self.SelectPage('MY_TICKETS') return self.SelectPage(self.curPage) def RefreshMyTickets(self): self.elements['listboxes']['my_tickets'].RemoveAllItems() for i in xrange(min(len(constInfo.Tickets['MY_TICKETS']), 11)): if self.isSorting: curTicket = self.sortedList[self.myticketsPos + i] else: curTicket = constInfo.Tickets['MY_TICKETS'][self.myticketsPos + i] self.elements['listboxes']['my_tickets'].AppendItem(TicketInfo(curTicket[0], curTicket[1], curTicket[2], curTicket[3], curTicket[5])) if len(constInfo.Tickets['MY_TICKETS']) <= 11: self.elements['scrollbars']['my_tickets'].Hide() else: self.elements['scrollbars']['my_tickets'].SetMiddleBarSize(float(11)/float(len(constInfo.Tickets['MY_TICKETS']))) self.elements['scrollbars']['my_tickets'].Show() def __OnScrollMyTickets(self): myticketslen = len(constInfo.Tickets['MY_TICKETS']) self.myticketsPos = int(self.elements['scrollbars']['my_tickets'].GetPos() * (myticketslen-11)) self.RefreshMyTickets() def __OnScrollGlobalTickets(self): globalticketslen = len(constInfo.Tickets['GLOBAL_TICKETS']) self.globalticketsPos = int(self.elements['scrollbars']['admin'].GetPos() * (globalticketslen-10)) self.RefreshGlobalTickets() def __OnScrollPermisions(self): permisionslen = len(constInfo.Tickets['PERMISIONS']) self.permisionsPos = int(self.elements['scrollbars']['permisions'].GetPos() * (permisionslen-7)) self.RefreshPermisions() def RefreshGlobalTickets(self): self.elements['listboxes']['admin'].RemoveAllItems() if self.isSorting: TicketList = self.sortedList else: TicketList = self.GetCategoryTickets(self.curCategory) for i in xrange(min(len(TicketList), 10)): curTicket = TicketList[self.globalticketsPos + i] self.elements['listboxes']['admin'].AppendItem(TicketInfo(curTicket[0], curTicket[1], curTicket[2], curTicket[3], curTicket[5])) if len(TicketList) <= 10: self.elements['scrollbars']['admin'].Hide() else: self.elements['scrollbars']['admin'].SetMiddleBarSize(float(10)/float(len(TicketList))) self.elements['scrollbars']['admin'].Show() def RefreshPermisions(self): for i in xrange(7): self.elements['permision_%d' % i].Hide() try: for i in xrange(min(len(constInfo.Tickets['PERMISIONS']), 7)): curPermision = constInfo.Tickets['PERMISIONS'][i + self.permisionsPos] self.elements['permision_%d' % i].SetPermisionName(curPermision[0]) if curPermision[1] == 0: self.elements['permision_%d' % i].AnswerCheckBox.SetCheck(FALSE) else: self.elements['permision_%d' % i].AnswerCheckBox.SetCheck(TRUE) if curPermision[2] == 0: self.elements['permision_%d' % i].DeleteCheckBox.SetCheck(FALSE) else: self.elements['permision_%d' % i].DeleteCheckBox.SetCheck(TRUE) if curPermision[3] == 0: self.elements['permision_%d' % i].AddCheckBox.SetCheck(FALSE) else: self.elements['permision_%d' % i].AddCheckBox.SetCheck(TRUE) if i + self.permisionsPos == 0: self.elements['permision_%d' % i].AddCheckBox.Disable() self.elements['permision_%d' % i].DeleteCheckBox.Disable() self.elements['permision_%d' % i].AnswerCheckBox.Disable() self.elements['permision_%d' % i].Show() except: self.elements['scrollbars']['permisions'].Hide() return if len(constInfo.Tickets['PERMISIONS']) <= 7: self.elements['scrollbars']['permisions'].Hide() else: self.elements['scrollbars']['permisions'].SetMiddleBarSize(float(7)/float(len(constInfo.Tickets['PERMISIONS']))) self.elements['scrollbars']['permisions'].Show() def SelectMyTicket(self, idx): if self.isSorting: curTicket = self.sortedList[self.elements['listboxes']['my_tickets'].GetItemIndex(idx) + self.myticketsPos] else: curTicket = constInfo.Tickets['MY_TICKETS'][self.elements['listboxes']['my_tickets'].GetItemIndex(idx) + self.myticketsPos] self.tmpID = curTicket[0] self.elements['unique_ticket'].SetContent(curTicket[0], curTicket[1], curTicket[2], curTicket[3], curTicket[4], curTicket[5], curTicket[6], curTicket[7]) self.elements['comboboxes']['categories'].Show() self.elements['comboboxes']['categories'].Disable() self.elements['comboboxes']['categories'].SetCurrentItem(CATEGORIES[curTicket[8]]) self.SelectPage('SHOW_TICKET') def SelectGlobalTicket(self, idx): if self.isSorting: curTicket = self.sortedList[self.elements['listboxes']['admin'].GetItemIndex(idx) + self.globalticketsPos] else: curTicket = self.GetCategoryTickets(self.curCategory)[self.elements['listboxes']['admin'].GetItemIndex(idx) + self.globalticketsPos] self.tmpID = curTicket[0] self.elements['unique_ticket'].SetContent(curTicket[0], curTicket[1], curTicket[2], curTicket[3], curTicket[4], curTicket[5], curTicket[6], curTicket[7]) self.SelectPage('SHOW_TICKET') def SelectFoundTicket(self, tid = ''): id = self.elements['editlines']['search'].GetText() if tid == '' else tid selected = -1 for i in xrange(len(constInfo.Tickets['GLOBAL_TICKETS'])): if constInfo.Tickets['GLOBAL_TICKETS'][i][0] == id: selected = i break if selected == -1: chat.AppendChat(chat.CHAT_TYPE_INFO, '[System Zgłoszeń] Nie znaleziono żadnego bilet z identyfikatorem %s.' % id) return curTicket = constInfo.Tickets['GLOBAL_TICKETS'][selected] self.tmpID = curTicket[0] self.elements['unique_ticket'].SetContent(curTicket[0], curTicket[1], curTicket[2], curTicket[3], curTicket[4], curTicket[5], curTicket[6], curTicket[7]) self.elements['comboboxes']['categories'].Show() self.elements['comboboxes']['categories'].Disable() self.elements['comboboxes']['categories'].SetCurrentItem(CATEGORIES[curTicket[8]]) self.SelectPage('SHOW_TICKET') def RefreshSelectedTicket(self): self.SelectFoundTicket(self.tmpID) def SelectPriority(self, priority): self.elements['comboboxes']['create_ticket'].SetCurrentItem(self.priority_levels[priority]) self.priority = priority def SelectCategorySend(self, category): self.elements['comboboxes']['create_ticket_category'].SetCurrentItem(CATEGORIES[category+1]) self.category = category+1 def SendTicket(self): self.elements['editlines']['create_ticket']['title'].KillFocus() self.elements['editlines']['create_ticket']['msg'].KillFocus() title = self.elements['editlines']['create_ticket']['title'].GetText() msg = self.elements['editlines']['create_ticket']['msg'].GetText() priority = self.priority+1 if msg == '' or title == '': chat.AppendChat(chat.CHAT_TYPE_INFO, '[System Zgłoszeń] Musisz wypełnić pola poprawnie.') return constInfo.Tickets['QCMD'] = 'CREATE_TICKET#%s#%s#%d#%d' % (title.replace(' ', '[_]'), msg.replace(' ', '[_]'), priority, self.category) event.QuestButtonClick(constInfo.Tickets['QID']) def ResetTicket(self): self.elements['editlines']['create_ticket']['title'].SetText('') self.elements['editlines']['create_ticket']['msg'].SetText('') self.SelectPriority(0) self.elements['comboboxes']['create_ticket'].SelectItem(0) def __OnClickAddMember(self): self.elements['add_member'].ResetValues() self.elements['add_member'].Show() def SelectSort(self, idx): self.elements['comboboxes']['sort'].SetCurrentItem(self.sort[idx]) self.isSorting = TRUE self.lastSort = idx self.sortedList = [] if self.curPage == 'MY_TICKETS': self.sortedList += constInfo.Tickets['MY_TICKETS'] self.sortedList.sort(key=lambda x: x[(3,5,2)[idx]], reverse=(TRUE,FALSE,TRUE)[idx]) self.RefreshMyTickets() elif self.curPage == 'ADMINISTRATOR': self.sortedList += self.GetCategoryTickets(self.curCategory) self.sortedList.sort(key=lambda x: x[(3,5,2)[idx]], reverse=(TRUE,FALSE,TRUE)[idx]) self.RefreshGlobalTickets() def SelectCategory(self, cat_id): self.elements['comboboxes']['categories'].SetCurrentItem(CATEGORIES[cat_id]) self.curCategory = cat_id self.SelectSort(self.lastSort) self.elements['comboboxes']['sort'].SelectItem(self.lastSort) def GetCategoryTickets(self, category): if category == 0: return constInfo.Tickets['GLOBAL_TICKETS'] else: retList = [] for i in xrange(len(constInfo.Tickets['GLOBAL_TICKETS'])): if constInfo.Tickets['GLOBAL_TICKETS'][i][8] == category: retList.append(constInfo.Tickets['GLOBAL_TICKETS'][i]) return retList class TicketInfo(ui.ListBoxEx.Item): def __init__(self, tID, tTitle, priority, tDate, state): ui.ListBoxEx.Item.__init__(self) self.canLoad = 0 if len(tTitle) > 40: self.textLine = self.__CreateTextLine(tID, tTitle[:37]+"...", priority, tDate, state) else: self.textLine = self.__CreateTextLine(tID, tTitle[:40], priority, tDate, state) def __del__(self): ui.ListBoxEx.Item.__del__(self) def SetSize(self, width, height): ui.ListBoxEx.Item.SetSize(self, 375+55, height) def __CreateTextLine(self, tID, tTitle, priority, tDate, state): textID = ui.TextLine() textID.SetParent(self) textID.SetPosition(-186, 0) textID.SetWindowVerticalAlignCenter() textID.SetVerticalAlignCenter() textID.SetWindowHorizontalAlignCenter() textID.SetHorizontalAlignCenter() textID.SetText(tID) textID.Show() textTitle = ui.TextLine() textTitle.SetParent(self) textTitle.SetPosition(-63, 0) textTitle.SetWindowVerticalAlignCenter() textTitle.SetVerticalAlignCenter() textTitle.SetWindowHorizontalAlignCenter() textTitle.SetHorizontalAlignCenter() textTitle.SetText(tTitle) textTitle.Show() textPriority = ui.TextLine() textPriority.SetParent(self) textPriority.SetPosition(54, 0) textPriority.SetWindowVerticalAlignCenter() textPriority.SetVerticalAlignCenter() textPriority.SetWindowHorizontalAlignCenter() textPriority.SetHorizontalAlignCenter() textPriority.SetText((localeInfo.TICKET_PRIORITY_LOW,localeInfo.TICKET_PRIORITY_MEDIUM,localeInfo.TICKET_PRIORITY_HIGH)[priority-1]) textPriority.SetPackedFontColor((grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0),0xffD87A00,0xffD80000)[priority-1]) textPriority.Show() textDate = ui.TextLine() textDate.SetParent(self) textDate.SetPosition(124, 0) textDate.SetWindowVerticalAlignCenter() textDate.SetVerticalAlignCenter() textDate.SetWindowHorizontalAlignCenter() textDate.SetHorizontalAlignCenter() textDate.SetText(tDate) textDate.Show() imgState = ui.Button() imgState.SetParent(self) imgState.SetPosition(189, 0) imgState.SetWindowHorizontalAlignCenter() imgState.SetWindowVerticalAlignCenter() imgState.SetUpVisual(app.GetLocalePath()+"/ui/tickets/%s.tga" % ('onhold','closed','solved')[state-1]) imgState.SetOverVisual(app.GetLocalePath()+"/ui/tickets/%s.tga" % ('onhold','closed','solved')[state-1]) imgState.SetDownVisual(app.GetLocalePath()+"/ui/tickets/%s.tga" % ('onhold','closed','solved')[state-1]) imgState.SetToolTipText((localeInfo.TICKET_STATE_ON_HOLD,localeInfo.TICKET_STATE_CLOSED,localeInfo.TICKET_STATE_SOLVED)[state-1]) imgState.Show() return textID, textTitle, textPriority, textDate, imgState class PermisionManage(ui.ScriptWindow): class CheckBox(ui.ImageBox): class MouseReflector(ui.Window): def __init__(self, parent): ui.Window.__init__(self) self.SetParent(parent) self.AddFlag("not_pick") self.width = self.height = 0 self.isDown = FALSE def Down(self): self.isDown = TRUE def Up(self): self.isDown = FALSE def OnRender(self): import grp if self.isDown: grp.SetColor(ui.WHITE_COLOR) else: grp.SetColor(ui.HALF_WHITE_COLOR) x, y = self.GetGlobalPosition() grp.RenderBar(x+2, y+2, self.GetWidth()-4, self.GetHeight()-4) def __init__(self, parent, x, y, event, filename = "d:/ymir work/ui/public/Parameter_Slot_01.sub"): ui.ImageBox.__init__(self) self.SetParent(parent) self.SetPosition(x, y) self.LoadImage(filename) self.mouseReflector = self.MouseReflector(self) self.mouseReflector.SetSize(self.GetWidth(), self.GetHeight()) image = ui.MakeImageBox(self, "d:/ymir work/ui/public/check_image.sub", 0, 0) image.AddFlag("not_pick") image.SetWindowHorizontalAlignCenter() image.SetWindowVerticalAlignCenter() image.Hide() self.Enable = TRUE self.Checked = FALSE self.image = image self.event = event self.Show() self.mouseReflector.UpdateRect() def __del__(self): ui.ImageBox.__del__(self) def SetCheck(self, flag): if flag: self.image.Show() self.Checked = TRUE else: self.image.Hide() self.Checked = FALSE def GetCheck(self): return self.Checked def Disable(self): self.Enable = FALSE def OnMouseOverIn(self): if not self.Enable: return self.mouseReflector.Show() def OnMouseOverOut(self): if not self.Enable: return self.mouseReflector.Hide() def OnMouseLeftButtonDown(self): if not self.Enable: return self.mouseReflector.Down() def OnMouseLeftButtonUp(self): if not self.Enable: return self.mouseReflector.Up() self.event() def __init__(self): ui.ScriptWindow.__init__(self) try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/Ticket_Permision.py") except: import exception exception.Abort("Ticket_Permision.LoadWindow.LoadObject") self.memberName = self.GetChild('name_value') self.deleteMember = self.GetChild('delete_member') event = lambda argSelf=proxy(self), argIndex=0, argPermision='answer': apply(argSelf.OnCheckPriority, (argIndex, argPermision)) self.AnswerCheckBox = self.CheckBox(self, 140, 0, event) event = lambda argSelf=proxy(self), argIndex=1, argPermision='delete': apply(argSelf.OnCheckPriority, (argIndex, argPermision)) self.DeleteCheckBox = self.CheckBox(self, 140+75, 0, event) event = lambda argSelf=proxy(self), argIndex=2, argPermision='add': apply(argSelf.OnCheckPriority, (argIndex, argPermision)) self.AddCheckBox = self.CheckBox(self, 140+75*2, 0, event) self.deleteMember.SetEvent(ui.__mem_func__(self.DeleteMember)) def __del__(self): ui.ScriptWindow.__del__(self) def OnCheckPriority(self, argIndex, argPermision): permision = 0 if argPermision == 'answer': if self.AnswerCheckBox.GetCheck(): self.AnswerCheckBox.SetCheck(FALSE) else: self.AnswerCheckBox.SetCheck(TRUE) permision = 1 elif argPermision == 'delete': if self.DeleteCheckBox.GetCheck(): self.DeleteCheckBox.SetCheck(FALSE) else: self.DeleteCheckBox.SetCheck(TRUE) permision = 1 elif argPermision == 'add': if self.AddCheckBox.GetCheck(): self.AddCheckBox.SetCheck(FALSE) else: self.AddCheckBox.SetCheck(TRUE) permision = 1 constInfo.Tickets['QCMD'] = 'UPDATE_PERMISIONS#%s#%s#%d' % (self.memberName.GetText(), argPermision, permision) event.QuestButtonClick(constInfo.Tickets['QID']) def SetPermisionName(self, name): self.memberName.SetText(name) def DeleteMember(self): name = self.memberName.GetText() if name == '': return constInfo.Tickets['QCMD'] = 'DELETE_MEMBER#%s' % name event.QuestButtonClick(constInfo.Tickets['QID']) def Open(self, parent, x, y): self.SetParent(parent) self.SetPosition(x, y) self.Show() class TicketManage(ui.ScriptWindow): class TicketManageTop(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/Ticket_Manage_Top.py") except: import exception exception.Abort("Ticket_Manage_Top.LoadWindow.LoadObject") self.title = self.GetChild('title_value') self.stateBoard = self.GetChild('state_bar') self.state = self.GetChild('state_value') self.id = self.GetChild('ticket_id_value') self.priority = self.GetChild('ticket_priority_value') self.date = self.GetChild('ticket_date_value') self.answers = self.GetChild('ticket_answers_value') self.stateColours = [grp.GenerateColor(1.0, 0.6, 0.1, 0.4),grp.GenerateColor(1.0, 0.0, 0.0, 0.4),grp.GenerateColor(0.0, 1.0, 0.0, 0.4)] def __del__(self): ui.ScriptWindow.__del__(self) def SetContent(self, id, title, date, priority): self.id.SetText(id) self.title.SetText(title) self.priority.SetText((localeInfo.TICKET_PRIORITY_LOW,localeInfo.TICKET_PRIORITY_MEDIUM,localeInfo.TICKET_PRIORITY_HIGH)[priority-1]) self.date.SetText(date) try: self.answers.SetText('%d' % len(constInfo.Tickets['ANSWERS'][id])) except: self.answers.SetText('0') def SetState(self, state): self.stateBoard.SetColor(self.stateColours[state-1]) self.state.SetText((localeInfo.TICKET_STATE_ON_HOLD,localeInfo.TICKET_STATE_CLOSED,localeInfo.TICKET_STATE_SOLVED)[state-1]) class TicketManageMiddle(ui.ScriptWindow): class Answer(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/Ticket_Manage_Answer.py") except: import exception exception.Abort("Ticket_Manage_Answer.LoadWindow.LoadObject") self.msg = self.GetChild('msg') self.msg.CanEdit(FALSE) def __del__(self): ui.ScriptWindow.__del__(self) def SetContent(self, creator, date, hour, msg): self.GetChild('creator_date_value').SetText('Gracz: %s o godzinie: %s %s' % (creator, date, hour)) self.GetChild('h_line').SetSize(self.GetChild('creator_date_value').GetTextSize()[0]+12, 0) self.msg.SetText(msg) def __init__(self): ui.ScriptWindow.__init__(self) self.id = '' self.ticketsPos = 0 try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/Ticket_Manage_Middle.py") except: import exception exception.Abort("Ticket_Manage_Middle.LoadWindow.LoadObject") self.msg = self.GetChild('msg') self.msg.CanEdit(FALSE) self.scrollbar = self.GetChild('scrollbar') self.scrollbar.SetScrollEvent(self.__OnScroll) self.answers = {'0' : self.Answer(), '1' : self.Answer()} for i in xrange(2): self.answers['%d' % i].SetParent(self) self.answers['%d' % i].SetPosition(-5, 80+78*i) self.answers['%d' % i].SetWindowHorizontalAlignCenter() self.answers['%d' % i].Hide() def __del__(self): ui.ScriptWindow.__del__(self) def SetContent(self, id, creator, date, hour, msg): self.id = id self.GetChild('creator_date_value').SetText('Gracz: %s o godzinie: %s %s' % (creator, date, hour)) self.GetChild('h_line').SetSize(self.GetChild('creator_date_value').GetTextSize()[0]+12, 0) self.msg.SetText(msg) self.ticketsPos = 0 self.RefreshAnswers() def RefreshAnswers(self): for i in xrange(2): self.answers['%d' % i].Hide() try: for i in xrange(2): curTicket = constInfo.Tickets['ANSWERS'][self.id][self.ticketsPos + i] self.answers['%d' % i].SetContent(curTicket[0], curTicket[1], curTicket[2], curTicket[3]) self.answers['%d' % i].Show() except: self.scrollbar.Hide() return if len(constInfo.Tickets['ANSWERS'][self.id]) <= 2: self.scrollbar.Hide() else: self.scrollbar.SetMiddleBarSize(float(2)/float(len(constInfo.Tickets['ANSWERS'][self.id]))) self.scrollbar.Show() def __OnScroll(self): ticketslen = len(constInfo.Tickets['ANSWERS'][self.id]) self.ticketsPos = int(self.scrollbar.GetPos() * (ticketslen-2)) self.RefreshAnswers() class TicketManageBottom(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.id = '' self.state = 1 try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/Ticket_Manage_Bottom.py") except: import exception exception.Abort("Ticket_Manage_Bottom.LoadWindow.LoadObject") self.msg = self.GetChild('msg') self.send = self.GetChild('send_button') for i in xrange(3): self.GetChild('state_%d_button' % (i+1)).SetEvent(ui.__mem_func__(self.SetState), (i+1)) self.GetChild('state_%d_button' % (i+1)).Hide() self.send.SetEvent(ui.__mem_func__(self.SendTicket)) def __del__(self): ui.ScriptWindow.__del__(self) def SetContent(self, id, state): self.id = id self.SetState(state) def SetState(self, state): for i in xrange(3): self.GetChild('state_%d_button' % (i+1)).SetUp() self.state = state self.GetChild('state_%d_button' % state).Down() def SetGMAction(self, level): if level: for i in xrange(3): self.GetChild('state_%d_button' % (i+1)).Show() else: for i in xrange(3): self.GetChild('state_%d_button' % (i+1)).Hide() def SendTicket(self): constInfo.Tickets['QCMD'] = 'ANSWER_TICKET#%s#%d#%s' % (self.id, self.state, self.msg.GetText().replace(' ', '[_]')) event.QuestButtonClick(constInfo.Tickets['QID']) self.msg.SetText('') def SetCloseEvent(self, func): self.msg.SetEscapeEvent(func) def __init__(self): ui.Window.__init__(self) self.Top = self.TicketManageTop() self.Top.SetParent(self) self.Top.SetPosition(0, 0) self.Top.Show() self.Middle = self.TicketManageMiddle() self.Middle.SetParent(self) self.Middle.SetPosition(0, self.Top.GetHeight()+1) self.Middle.Show() self.Bottom = self.TicketManageBottom() self.Bottom.SetParent(self) self.Bottom.SetPosition(0, self.Top.GetHeight()+1+self.Middle.GetHeight()+1) self.Bottom.Show() self.SetSize(self.Top.GetWidth(), self.Top.GetHeight()+self.Middle.GetHeight()+self.Bottom.GetHeight()+2) def __del__(self): ui.Window.__del__(self) def SetCloseEvent(self, func): self.Bottom.SetCloseEvent(func) def SetContent(self, id, title, priority, date, hour, state, creator, msg): self.Top.SetContent(id, title, date, priority) self.Top.SetState(state) self.Middle.SetContent(id, creator, date, hour, msg) self.Bottom.SetContent(id, state) def SetGMLevel(self, level): self.Bottom.SetGMAction(level) def Open(self, parent, x, y): self.SetParent(parent) self.SetPosition(x, y) self.SetTop() self.Show() class AddMember(ui.Window): def __init__(self): ui.Window.__init__(self) self.board = ui.BoardWithTitleBar() self.board.SetParent(self) self.board.SetSize(185, 100) self.board.SetPosition(0, 0) self.board.SetTitleName(localeInfo.TICKET_ADD_TITLE) self.board.SetCloseEvent(ui.__mem_func__(self.Hide)) self.board.Show() self.nameSlot = ui.MakeSlotBar(self.board, 23, 40, 100, 18) self.nameSlot.SetWindowHorizontalAlignCenter() self.nameText = ui.TextLine() self.nameText.SetParent(self.nameSlot) self.nameText.SetPosition(105, 3) self.nameText.SetWindowHorizontalAlignRight() self.nameText.SetHorizontalAlignRight() self.nameText.SetText(localeInfo.TICKET_ADD_NAME) self.nameText.Show() self.nameValue = ui.EditLine() self.nameValue.SetParent(self.nameSlot) self.nameValue.SetSize(100, 18) self.nameValue.SetPosition(3, 3) self.nameValue.SetMax(16) self.nameValue.SetEscapeEvent(ui.__mem_func__(self.Hide)) self.nameValue.Show() self.acceptButton = ui.MakeButton(self.board, 0, self.board.GetHeight() - 32, '', 'd:/ymir work/ui/public/', 'large_button_01.sub', 'large_button_02.sub', 'large_button_03.sub') self.acceptButton.SetWindowHorizontalAlignCenter() self.acceptButton.SetText(localeInfo.TICKET_ADD_ACCEPT) self.acceptButton.SetEvent(ui.__mem_func__(self.SendMember)) self.SetSize(185, 100) def __del__(self): ui.Window.__del__(self) def ResetValues(self): self.nameValue.SetText('') self.nameValue.SetFocus() def SendMember(self): self.nameValue.KillFocus() name = self.nameValue.GetText() if name == '': return constInfo.Tickets['QCMD'] = 'ADD_MEMBER#%s' % name event.QuestButtonClick(constInfo.Tickets['QID']) self.Hide() def Open(self, parent, x, y): self.SetParent(parent) self.SetPosition(x, y) self.Show() # Shang ~ Ticketsystem spolszczenie ticket_manage_bottom.txt import grp import pythonApi app = __import__(pythonApi.GetModuleName("app")) BOARD_WIDTH = 448 BOARD_HEIGHT = 102 TICKET_PATH = app.GetLocalePath() + "/ui/tickets/" window = { "name" : "TicketManageMiddle", "x" : 0, "y" : 0, "width" : BOARD_WIDTH, "height" : BOARD_HEIGHT, "children" : ( { "name" : "board", "type" : "bar", "x" : 0, "y" : 0, "width" : BOARD_WIDTH, "height" : BOARD_HEIGHT, "color" : grp.GenerateColor(0.0, 0.0, 0.0, 0.6), "children" : ( { "name" : "msg_bar", "type" : "bar", "horizontal_align" : "center", "x" : 0, "y" : 5, "width" : BOARD_WIDTH - 10, "height" : BOARD_HEIGHT - 32, "color" : grp.GenerateColor(0.0, 0.0, 0.0, 1.0), "children" : ( { "name" : "msg", "type" : "editline", "x" : 3, "y" : 3, "width" : BOARD_WIDTH - 10, "height" : BOARD_HEIGHT - 6, "input_limit" : 300, "multi_line" : 1, "limit_width" : BOARD_WIDTH - 10, }, ), }, { "name" : "send_button", "type" : "button", "x" : BOARD_WIDTH - 95, "y" : BOARD_HEIGHT - 24, "text" : "Odpowiedź ", "default_image" : "d:/ymir work/ui/public/large_button_01.sub", "over_image" : "d:/ymir work/ui/public/large_button_02.sub", "down_image" : "d:/ymir work/ui/public/large_button_03.sub", }, { "name" : "state_1_button", "type" : "radio_button", "x" : 5, "y" : BOARD_HEIGHT - 22, "default_image" : TICKET_PATH + "icon_exp_empty.tga", "over_image" : TICKET_PATH + "icon_exp_full.tga", "down_image" : TICKET_PATH + "icon_exp_full.tga", "children" : ( { "name" : "state_1_text", "type" : "text", "x" : 20, "y" : 2, "text" : "W procesie", }, ), }, { "name" : "state_2_button", "type" : "radio_button", "x" : 85, "y" : BOARD_HEIGHT - 22, "default_image" : TICKET_PATH + "icon_exp_empty.tga", "over_image" : TICKET_PATH + "icon_exp_full.tga", "down_image" : TICKET_PATH + "icon_exp_full.tga", "children" : ( { "name" : "state_2_text", "type" : "text", "x" : 20, "y" : 2, "text" : "Zamknięty", }, ), }, { "name" : "state_3_button", "type" : "radio_button", "x" : 85+66, "y" : BOARD_HEIGHT - 22, "default_image" : TICKET_PATH + "icon_exp_empty.tga", "over_image" : TICKET_PATH + "icon_exp_full.tga", "down_image" : TICKET_PATH + "icon_exp_full.tga", "children" : ( { "name" : "state_3_text", "type" : "text", "x" : 20, "y" : 2, "text" : "Rozwiązany", }, ), }, ), }, ), } Spolszczenie TICKET_CONFIG PLAYER_DB_TABLE: player.player TICKETS_DB_TABLE: account.tickets ANSWERS_DB_TABLE: account.tickets_answers PERMISIONS_DB_TABLE: account.tickets_permisions MAIN_MEMBER: 7857 TXT_CANNOT_CHANGE_STATE_NOGM: Nie można zmienić status biletu, jeśli nie jesteś GM. TXT_NO_ANSWER_PERMISION: Nie masz wystarczających uprawnień, aby odebrać bilety. TXT_SUCCESSFUL_ANSWERED: Odpowiedź wysłana poprawnie. TXT_SUCCESSFUL_TICKET: Masz poprawnie wysłany bilet. TXT_CANNOT_SET_PERMISION_NAME: Nie ma znaków o tej nazwie. TXT_CANNOT_CREATE_TICKET: Błąd podczas tworzenia biletu. Spróbuj ponownie później. TXT_NO_PERMISIONS: Nie masz uprawnień do tego. TXT_SUCCESSFUL_MEMBER_ADDED: Użytkownik %s pomyślnie dodany. TXT_SUCCESSFUL_MEMBER_DELETED: Użytkownik %s pomyślnie usunięty. TXT_CANNOT_ANSWER_STATE: Nie można odebrać bilet, jeśli jest on zamknięty lub rozwiązane. to chyba tyle ze spolszczen plików jakby coś brakowało pisać
  15. Wybór skilli w okienku, 90% w C++ elko Profeszional wiżualiszation Proste okienko z 2 buttonami SkillChoose.rar SKAN
  16. Achievementsystem v1.1 ~ Shang.rar [Hidden Content]
  17. Siemanko! Łapcie, nie chce żadnych like bo mnie to pierdoli. Zapraszam na Anastia2.pl Download: [Hidden Content] Scan: [Hidden Content] Pozdrawiam Shaggy i Zapraszam na Anastia2.pl
  18. Jako, że dawno nic nie wrzucałem i troszkę mnie @ Ups... podpuścił no to łapcie. System jest bardzo prosty w edycji, okno samo dostosowuje rozmiar do elementów tablicy. Paczka zawiera dwie wersje okienka (tak jak na ss) SS: NORMAL SCROLLBAR Download: stats gui by Intern (two versions)(qf).rar Skan: (link) [Hidden Content]
  19. System efektów na bronie oraz zbroje. @ boooooo udostępnił coś podobnego. Nie wiem skąd to mam ale wiem że działa bo było chyba na arianea czy jak to sie tam pisze XD Jak ktoś może niech wrzuci skan, jak nikt nie da to do 24h wrzuce :3 Działa to tak że zakładamy efekt na bron/zbroje. Logiczne chyba co XD effekt.mp4 Shinning PRoELO.rar SKAN
  20. System dodaje * dla mobów agresywnych oraz ich poziom xd mozna to wyłączyć w opcjach Configurable Monster Informations2.7z [Hidden Content]
  21. Zdecydowanie za dobry dla was jestem NIE POMAGAM Z SYSTEMEM NA PW, PROSZĘ PISAĆ POD TEMATEM. DL: (link) HP_GaugeBar affects V2.3.rar Skan: (link) [Hidden Content] changelog: v2.3 [25.04.2020] (uitaskbar.py) - removed one not necessary TAB - added missing condition - replaced wrong RecoveryGaugeBar.hide() with good one v2.2 [22.04.2020] - small animation fix after change target (ui.py) - disabled effects on metin stones (PythonCharacterManagerModule.cpp) @ Tatsumaru pozdrawiam
  22. char_item.cpp i szukamy for (int i = 0; i < prt->material_count; ++i) RemoveSpecifyItem(prt->materials[i].vnum, prt->materials[i].count); int prob = number(1, 100); int success_prob = prt->prob Zamieniamy na : for (int i = 0; i < prt->material_count; ++i) RemoveSpecifyItem(prt->materials[i].vnum, prt->materials[i].count); int prob = number(1, 100); int success_prob = (prt->prob + GetSkillLevel(133)); Szukamy : p.prob = prt->prob; if (bType == REFINE_TYPE_MONEY_ONLY) { p.material_count = 0; memset(p.materials, 0, sizeof(p.materials)); Zamieniamy na : p.prob = (prt->prob + GetSkillLevel(133)); if (bType == REFINE_TYPE_MONEY_ONLY) { p.material_count = 0; memset(p.materials, 0, sizeof(p.materials)); Dodajemy sobie jako szkolenie przez ksiązki wzorując się na tutoriale od paszki id skila to 133 [Hidden Content] Lub robimy przykładowy quest u kowala quest kowal_nauka_kowalstwa begin state start begin when login begin for del_cegi = 1, 9 do pc.remove_item(100100+(del_cegi-1), pc.countitem(100100+(del_cegi-1))) end end when 20016.chat."Nauka Kowalstwa" begin snn() say() if pc.get_skill_level(133) >= 10 then say("Posiadasz już maksymalny poziom!") elseif pc.getqf("kowalstwo_time") > get_time() then say("Nie minęło jeszcze 6 godzin") say("od poprzedniego Twojego szkolenia.") elseif pc.countitem(71025) < 3 then say("Nie posiadasz przy sobie wymaganych przedmiotów.") say("Aby przeprowadzić z Tobą szkolenie") say("potrzebuję 3x Kamień Kowala") say_item_vnum2(71025, "Wymagane Przedmioty") else local kTable = { ['count'] = {3, 3, 2, 2, 3, 3, 2, 2, 1, 2}, ['item1'] = {100100, 100101, 100102, 100103, 100104, 100105, 100106, 100107, 100108, 100108}, ['item2'] = {100101, 100102, 100103, 100104, 100105, 100106, 100107, 100108, 100109, 100109}, } say("Za chwile otrzymasz ode mnie specjalne przedmioty,") say("które będziesz musiał ulepszyć u mnie.") say("Aby wyszkolić swoją umiejętność na Poziom wyżej,") say("musisz pomyślnie ulepszyć je na wyższy poziom.") say("W przypadku, gdy ulepszanie jakiegokolwiek z nich") say("się nie uda, misja zostanie zakończona niepowodzeniem.") say() say_reward("Twoim zadaniem na tym będzie ulepszenie "..kTable['count'][pc.get_skill_level(133)+1].." przedmiotów z +"..pc.get_skill_level(133).." na +"..(pc.get_skill_level(133)+1)..".") local s = select("Zaczynajmy!", "Wrócę później...") if s == 1 then if pc.countitem(71025) < 3 then snn() say() say("Nie posiadasz przy sobie wymaganych przedmiotów.") say("Aby przeprowadzić z Tobą szkolenie") say("potrzebuję 3x Kamień Kowala") say_item_vnum2(71025, "Wymagane Przedmioty") else pc.remove_item(71025, 3) pc.delqf("kowalstwo_items_count") pc.setqf("kowalstwo_items_count_up", kTable['count'][pc.get_skill_level(133)+1]) pc.setqf("kowalstwo_to_upgrade", kTable['item1'][pc.get_skill_level(133)+1]) pc.setqf("kowalstwo_time", get_time()+60*60*6) for del = 0, 9 do pc.remove_item(100100+del, pc.countitem(100100+del)) end for i = 1, kTable['count'][pc.get_skill_level(133)+1] do pc.give_item2(kTable['item1'][pc.get_skill_level(133)+1], 1) end end end end end end end
  23. System emotikonek. Do jego działania potrzebujemy tego systemu. emoji chat-whisper.rar
  24. Moduły net, chr, chrmgr, app, pack i player przybierają nowe generowane nazwy przy każdorazowym uruchomieniu clienta. API działa tylko na rooty. Dynamic+module+name.7z
×
×
  • Create New...