- 0
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Activity
-
0
Navicat Premium 16.1.1 x64
Sup bois and grils Most recent update from Navicat. For people that use foreign keys, this new version has it fixed. [Hidden Content] Download: [Hidden Content] (Can't upload to metin2.download, above 100MB allowed by Cloudflare)- 4
-
-
5
problem Dargon Soul Changre Attribute
[Hidden Content] You need c++11. If you are still using C++03/C++98 you can't use: for (auto lpItem : setItems) Instead: std::set<LPITEMS>::iterator itr; for (itr = setItems.begin(); itr != setItems.end(); itr++) and wherever lpItem in the loop is used, in this case needs to be replaced with *itr -
5
problem Dargon Soul Changre Attribute
I did what you asked of me I also replaced > nullptr I replaced it > NULL who is in DragonSoul.cpp questlua_dragonsoul.cpp char_dragonsoul.cpp [Hidden Content] But the problem is still there wait here Download -
1
-
41
Global Chat
Ok. The system is good but i had an issue on 40k source. The kingdom's color are not working, only for blue kingdom. To solve this, if you use the first post you need to change the colors i don t know really why, like those from xP3NG3Rx. So: Replace this: const char* kingdoms[3] = {"|cFFff000|h|h[Shinsoo]|cFFA7FFD4|H|h","|CFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h","|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h"}; With this: const char* kingdoms[3] = {"|cFFFF0000[Shinsoo]|r", "|cFFFFFF00[Chunjo]|r", "|cFF0080FF[Jinno]|r"}; I checked a while, maybe it will help others. Good luck! -
5
problem Dargon Soul Changre Attribute
item_length.h search this: enum EMaterialSubTypes { MATERIAL_LEATHER, MATERIAL_BLOOD, MATERIAL_ROOT, MATERIAL_NEEDLE, MATERIAL_JEWEL, MATERIAL_DS_REFINE_NORMAL, MATERIAL_DS_REFINE_BLESSED, MATERIAL_DS_REFINE_HOLLY, }; extend with this: enum EMaterialSubTypes { MATERIAL_LEATHER, MATERIAL_BLOOD, MATERIAL_ROOT, MATERIAL_NEEDLE, MATERIAL_JEWEL, MATERIAL_DS_REFINE_NORMAL, MATERIAL_DS_REFINE_BLESSED, MATERIAL_DS_REFINE_HOLLY, #if defined(__DS_CHANGE_ATTR__) MATERIAL_DS_CHANGE_ATTR, #endif }; DragonSoul.cpp nullptr change to: NULL -
2
Startup Loading Window Library
Updated project: Now it opens at the center of the screen Set some defines for a window flag, open at the center and the testing of the application Better testing of the progress bar (with define, now only the change of the configuration type is needed) Changed optimization settings (it fucks with the linking, didn't notice since VisualStudio sets this option by default) -
-
28
Ludus2: metin2 fan project
I will update main server soon, with the latest updates https://gyazo.com/ccbe5e845477fd716803553dd5601a99
-
Question
danio475 4
Hi devs how are you? ;p
I have a question to somebody who know something about Python, so I've got a channel changer with GUI started by clicking F7 key in keyboard, but I really don't know what to do to make this GUI start by clicking button in player inventory. Can somebody help me with this? I'll be really happy
onPressKeyDict[app.DIK_F7] = lambda : self.__switch_channel() def __switch_channel(self): import uichannel a = uichannel.ChannelChanger() a.Show() #function in game.py
#uichannel.py import ui import net import app import chat import math import wndMgr import serverInfo import background import ServerStateChecker class ChannelChanger(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.__MakeWindow() self.__MakeBoard() self.__Fill_Up_ChannelList() def __del__(self): ui.ScriptWindow.__del__(self) def Destroy(self): self.Hide() return TRUE def __MakeWindow(self): ServerStateChecker.Create(self) self.SetSize(150, 175) self.SetPosition( (wndMgr.GetScreenWidth() / 2) - int(math.floor(self.GetWidth() / 2.)), (wndMgr.GetScreenHeight() / 2) - int(math.floor(self.GetHeight() / 2.)) ) #self.AddFlag("movable") self.AddFlag("float") self.Show() def __MakeBoard(self): self.Board = ui.Board() self.Board.SetParent(self) self.Board.SetSize(self.GetWidth(), self.GetHeight()) self.Board.SetPosition(0, 0) #self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.Show() self.TitleBar = ui.TitleBar() self.TitleBar.SetParent(self.Board) self.TitleBar.SetPosition(7, 7) self.TitleBar.MakeTitleBar(self.GetWidth() - 2 * 7, 'red') self.TitleBar.SetCloseEvent(self.Close) self.TitleBar.Show() self.RefreshButton = ui.Button() self.RefreshButton.SetParent(self.TitleBar) self.RefreshButton.SetPosition(3, 3) self.RefreshButton.SetUpVisual("d:/ymir work/ui/game/guild/refresh_button_01.sub") self.RefreshButton.SetOverVisual("d:/ymir work/ui/game/guild/refresh_button_02.sub") self.RefreshButton.SetDownVisual("d:/ymir work/ui/game/guild/refresh_button_03.sub") self.RefreshButton.SetToolTipText("Refresh", 0, - 23) self.RefreshButton.SetEvent(lambda : self.__Fill_Up_ChannelList()) self.RefreshButton.Show() self.TitleText = ui.TextLine() self.TitleText.SetParent(self.TitleBar) self.TitleText.SetPosition(0, 4) self.TitleText.SetText("Zmiana Kanalu") self.TitleText.SetWindowHorizontalAlignCenter() self.TitleText.SetHorizontalAlignCenter() self.TitleText.Show() self.ServerName = ui.TextLine() self.ServerName.SetParent(self.TitleBar) self.ServerName.SetPosition(0, self.TitleBar.GetHeight()) self.ServerName.SetText(str(net.GetServerInfo()).split(",")[0]) self.ServerName.SetWindowHorizontalAlignCenter() self.ServerName.SetHorizontalAlignCenter() self.ServerName.Show() self.ChannelListBase = ui.SlotBar() self.ChannelListBase.SetParent(self.Board) self.ChannelListBase.SetSize(self.Board.GetWidth() - 2 * 16, 5 * 18 - 4) self.ChannelListBase.SetPosition(16 , 7 + self.TitleBar.GetHeight() + 6 + 10) self.ChannelListBase.Show() self.ChannelList = ui.ListBox() self.ChannelList.SetParent(self.ChannelListBase) self.ChannelList.SetSize(self.ChannelListBase.GetWidth()- 20, self.ChannelListBase.GetHeight()) self.ChannelList.SetPosition(0, 0) self.ChannelList.SetEvent(ui.__mem_func__(self.__OnSelectChannel)) self.ChannelList.Show() self.ChangeButton = ui.Button() self.ChangeButton.SetParent(self.Board) self.ChangeButton.SetPosition(self.Board.GetWidth() / 2 - 44, self.Board.GetHeight() - 35) self.ChangeButton.SetUpVisual('d:/ymir work/ui/public/Large_button_01.sub') self.ChangeButton.SetOverVisual('d:/ymir work/ui/public/Large_button_02.sub') self.ChangeButton.SetDownVisual('d:/ymir work/ui/public/Large_button_03.sub') self.ChangeButton.SetEvent(lambda : self.__OnClickConnectButton()) self.ChangeButton.SetText("Zmien CH") self.ChangeButton.Show() self.DisableChangeButton() self.ChannelListScrollBar = ui.ScrollBar() self.ChannelListScrollBar.SetParent(self.ChannelListBase) self.ChannelListScrollBar.SetPosition(18, 3) self.ChannelListScrollBar.SetScrollBarSize(83) self.ChannelListScrollBar.SetWindowHorizontalAlignRight() self.ChannelListScrollBar.SetScrollEvent(ui.__mem_func__(self.__OnScrollChannelList)) self.ChannelListScrollBar.Show() def DisableChangeButton(self): self.ChangeButton.Disable() self.ChangeButton.Down() self.ChangeButton.ButtonText.SetFontColor(0.4, 0.4, 0.4) def EnableChangeButton(self): self.ChangeButton.Enable() self.ChangeButton.SetUp() self.ChangeButton.ButtonText.SetFontColor(1, 1, 1) def __GetRegionID(self): return 0 def __GetServerID(self): regionID = self.__GetRegionID() for i in serverInfo.REGION_DICT[regionID].keys(): if serverInfo.REGION_DICT[regionID][i]["name"] == net.GetServerInfo().split(",")[0]: serverID = int(i) break return serverID def __Fill_Up_ChannelList(self): self.__RequestServerStateList() self.__RefreshServerStateList() #self.ChannelList.SelectItem(0) def __RequestServerStateList(self): regionID = self.__GetRegionID() serverID = self.__GetServerID() try: channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"] except: return ServerStateChecker.Initialize(self) for id, channelDataDict in channelDict.items(): key=channelDataDict["key"] ip=channelDataDict["ip"] udp_port=channelDataDict["udp_port"] ServerStateChecker.AddChannel(key, ip, udp_port) ServerStateChecker.Request() def __RefreshServerStateList(self): regionID = self.__GetRegionID() serverID = self.__GetServerID() bakChannelID = self.ChannelList.GetSelectedItem() self.ChannelList.ClearItem() try: channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"] except: return for channelID, channelDataDict in channelDict.items(): channelName = channelDataDict["name"] channelState = channelDataDict["state"] self.ChannelList.InsertItem(channelID, "%s %s" % (channelName, channelState)) self.ChannelList.SelectItem(bakChannelID-1) def NotifyChannelState(self, addrKey, state): try: stateName = serverInfo.STATE_DICT[state] except: stateName = serverInfo.STATE_NONE regionID = int(addrKey / 1000) serverID = int(addrKey / 10) % 100 channelID = addrKey % 10 try: serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["state"] = stateName self.__RefreshChannelStateList() except: pass def __IsSpecialMap(self): dis_maps = [ "season1/metin2_map_oxevent", "season2/metin2_map_guild_inside01", "season2/metin2_map_empirewar01", "season2/metin2_map_empirewar02", "season2/metin2_map_empirewar03", "metin2_map_dragon_timeattack_01", "metin2_map_dragon_timeattack_02", "metin2_map_dragon_timeattack_03", "metin2_map_skipia_dungeon_boss", "metin2_map_skipia_dungeon_boss2", "metin2_map_devilsCatacomb", "metin2_map_deviltower1", "metin2_map_t1", "metin2_map_t2", "metin2_map_t3", "metin2_map_t4", "metin2_map_t5", "metin2_map_wedding_01", "metin2_map_duel", "metin2_map_orclabyrinth", "metin2_map_n_flame_dungeon_01", "metin2_map_n_snow_dungeon_01" ] if str(background.GetCurrentMapName()) in dis_maps: return TRUE return FALSE def __OnSelectChannel(self): if self.ChangeButton.IsDown(): self.EnableChangeButton() def __OnScrollChannelList(self): viewItemCount = self.ChannelList.GetViewItemCount() itemCount = self.ChannelList.GetItemCount() pos = self.ChannelListScrollBar.GetPos() * (itemCount - viewItemCount) self.ChannelList.SetBasePos(int(pos)) def __OnClickConnectButton(self): ServerStateChecker.Update() channelID = self.ChannelList.GetSelectedItem() if not channelID: return elif self.__IsSpecialMap(): chat.AppendChat(1, "Na mapie specjalnej nie wolno zmieniac ch!") return net.SetServerInfo(net.GetServerInfo()[:-1] + str(channelID)) self.Close() net.SendChatPacket("/channel "+str(channelID)) def DirectConnect(self, ChannelIP, ChannelPort, AuthServerIP, AuthServerPort): net.SetLoginInfo(decode_string(net.ACCOUNT_ID), decode_string(net.ACCOUNT_PW)) net.ConnectToAccountServer(ChannelIP, ChannelPort, AuthServerIP, AuthServerPort) net.DirectEnter(0) net.SendSelectCharacterPacket(0) net.SendEnterGamePacket() def Show(self): ui.ScriptWindow.Show(self) def Close(self): ServerStateChecker.Initialize(self) self.Hide() def OnPressEscapeKey(self): self.Close() return TRUE def OnUpdate(self): ServerStateChecker.Update()
https://zapodaj.net/a641b44e27fc3.png.html < here I explain what i mean
1* - by this button I want to open this window (2*)
Any ideas, sugestions?
Anyway thanks for reading this post and have a nice day
Link to comment
Share on other sites
Top Posters For This Question
3
2
Popular Days
Apr 14
4
Apr 13
1
Top Posters For This Question
danio475 3 posts
Domniq 2 posts
Popular Days
Apr 14 2017
4 posts
Apr 13 2017
1 post
Popular Posts
Domniq
Find in your uiinventory.py your button name and assign to this function. self.yourbuttonname.SetEvent(ui.__mem_func__(self.__switch_channel)) then add above def ClickMallButton(self):
Domniq
uiinventory: def Bonus(self): import uiBonus self.wndBonus = uiBonus.BonusWindow() self.wndBonus.Show()
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now