Premium MrLibya 554 Posted June 30, 2016 Premium Share Posted June 30, 2016 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hallo all c++ : open EterPythonLib/PythonSlotWindow.cpp Spoiler find void CSlotWindow::DisableSlot(DWORD dwIndex) after this function add : void CSlotWindow::SetUnusableSlot(DWORD dwIndex) { TSlot * pSlot; if (!GetSlotPointer(dwIndex, &pSlot)) return; SET_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE); //pSlot->dwState |= SLOT_STATE_UNUSABLE; } void CSlotWindow::SetUsableSlot(DWORD dwIndex) { TSlot * pSlot; if (!GetSlotPointer(dwIndex, &pSlot)) return; REMOVE_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE); //pSlot->dwState ^= SLOT_STATE_UNUSABLE; } now find : if (rSlot.pFinishCoolTimeEffect) after this block add ( this part by xP3NG3Rx if (IS_SET(rSlot.dwState, SLOT_STATE_UNUSABLE)) { CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 1.0f, 0.3f); CPythonGraphic::Instance().RenderBar2d(m_rect.left + rSlot.ixPosition, m_rect.top + rSlot.iyPosition, m_rect.left + rSlot.ixPosition + rSlot.byxPlacedItemSize * ITEM_WIDTH, m_rect.top + rSlot.iyPosition + rSlot.byyPlacedItemSize * ITEM_HEIGHT); } now open EterPythonLib/PythonSlotWindow.h Spoiler find : SLOT_STATE_ALWAYS_RENDER_COVER = (1 << 3) add after it : SLOT_STATE_UNUSABLE = (1 << 4), now find : BOOL IsEnableSlot(DWORD dwIndex); add after it : void SetUnusableSlot(DWORD dwIndex); void SetUsableSlot(DWORD dwIndex); now open : /EterPythonLib/PythonWindowManagerModule.cpp Spoiler find : PyObject * wndMgrDisableSlot(PyObject * poSelf, PyObject * poArgs) after this function add : PyObject * wndMgrSetUnusableSlot(PyObject * poSelf, PyObject * poArgs) { UI::CWindow * pWin; if (!PyTuple_GetWindow(poArgs, 0, &pWin)) return Py_BuildException(); int iSlotIndex; if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex)) return Py_BuildException(); if (!pWin->IsType(UI::CSlotWindow::Type())) return Py_BuildException(); UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin; pSlotWin->SetUnusableSlot(iSlotIndex); return Py_BuildNone(); } PyObject * wndMgrSetUsableSlot(PyObject * poSelf, PyObject * poArgs) { UI::CWindow * pWin; if (!PyTuple_GetWindow(poArgs, 0, &pWin)) return Py_BuildException(); int iSlotIndex; if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex)) return Py_BuildException(); if (!pWin->IsType(UI::CSlotWindow::Type())) return Py_BuildException(); UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin; pSlotWin->SetUsableSlot(iSlotIndex); return Py_BuildNone(); } now find : { "DisableSlot", wndMgrDisableSlot, METH_VARARGS }, add : { "SetUnusableSlot", wndMgrSetUnusableSlot, METH_VARARGS }, { "SetUsableSlot", wndMgrSetUsableSlot, METH_VARARGS }, now open: /UserInterface/PythonNetworkStreamPhaseGame.cpp Spoiler ( thx to martysama0134 ) find : PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "StartExchange", Py_BuildValue("()")); add after it : __RefreshInventoryWindow(); now python part Spoiler open :root/ui.py find : def EnableSlot(self, slotIndex): after this def add : def SetUnusableSlot(self, slotIndex): wndMgr.SetUnusableSlot(self.hWnd, slotIndex) def SetUsableSlot(self, slotIndex): wndMgr.SetUsableSlot(self.hWnd, slotIndex) open : root/uiinventory.py Spoiler add import exchange find : self.wndCostume = None add : self.listUnusableSlot = [] find : setItemVNum(i, itemVnum, itemCount) add : if exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE): self.wndItem.SetUnusableSlot(i) self.listUnusableSlot.append(i) elif not exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE) and slotNumber in self.listUnusableSlot: self.wndItem.SetUsableSlot(i) self.listUnusableSlot.remove(i) ok that's it , have a nice day 18 1 1 20 If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Premium finaltorment 53 Posted June 30, 2016 Premium Share Posted June 30, 2016 seems work only on 1 page of inventory Link to comment Share on other sites More sharing options...
Asdator 13 Posted June 30, 2016 Share Posted June 30, 2016 Shit code. Link to comment Share on other sites More sharing options...
OceanusPT 2 Posted June 30, 2016 Share Posted June 30, 2016 i dont use TXT. i only work with sql, so this dont do nothing Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19657 Posted June 30, 2016 Honorable Member Share Posted June 30, 2016 Watafak are you talking about, txt-sql? xD Anyway this system is a part of the full system. Spoiler Coming soon... 1 Link to comment Share on other sites More sharing options...
OceanusPT 2 Posted June 30, 2016 Share Posted June 30, 2016 Just now, xP3NG3Rx said: Watafak are you talking about, txt-sql? xD Anyway this system is a part of the full system. Hide contents Coming soon... i belive this will work with txt. Cuz there u can mark itens with ANTIFLAG_GIVE but its complicate do set this in mysql, right? Link to comment Share on other sites More sharing options...
Berke58 97 Posted June 30, 2016 Share Posted June 30, 2016 thx working Link to comment Share on other sites More sharing options...
Shang 369 Posted June 30, 2016 Share Posted June 30, 2016 36 minutes ago, OceanusPT said: i belive this will work with txt. Cuz there u can mark itens with ANTIFLAG_GIVE but its complicate do set this in mysql, right? Man, when server loads the txt it converts string to numbers (like mysql) ANTIFLAG_GIVE is an antiflag number. Link to comment Share on other sites More sharing options...
.Devil. 28 Posted June 30, 2016 Share Posted June 30, 2016 1 hour ago, OceanusPT said: i belive this will work with txt. Cuz there u can mark itens with ANTIFLAG_GIVE but its complicate do set this in mysql, right? I wrote this for you: http://sandbox.onlinephpfunctions.com/code/9194d1bac0985bcc9a35834ba6dd95e20651ef8d (it's easy to understand, find "$current_antiflag" and set your item's antiflag, after use the set_bit function to set a new flag). Link to comment Share on other sites More sharing options...
OceanusPT 2 Posted June 30, 2016 Share Posted June 30, 2016 2 hours ago, Shang said: Man, when server loads the txt it converts string to numbers (like mysql) ANTIFLAG_GIVE is an antiflag number. hum... i dont know that! Ty for the info 2 hours ago, .Devil. said: I wrote this for you: http://sandbox.onlinephpfunctions.com/code/9194d1bac0985bcc9a35834ba6dd95e20651ef8d (it's easy to understand, find "$current_antiflag" and set your item's antiflag, after use the set_bit function to set a new flag). taks Devil. I get it yes. Ty for this tutorial. Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted June 30, 2016 Author Premium Share Posted June 30, 2016 ok thx for the notice thix fix will make the system work on all pages change: Spoiler self.wndItem.SetUnusableSlot(slotNumber) self.listUnusableSlot.append(slotNumber) for : Spoiler self.wndItem.SetUnusableSlot(i) self.listUnusableSlot.append(i) and : Spoiler self.wndItem.SetUsableSlot(slotNumber) self.listUnusableSlot.remove(slotNumber) for : Spoiler self.wndItem.SetUsableSlot(i) self.listUnusableSlot.remove(i) If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Premium finaltorment 53 Posted June 30, 2016 Premium Share Posted June 30, 2016 another problem now, seems he don't refresh well the pages now. Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted June 30, 2016 Author Premium Share Posted June 30, 2016 20 minutes ago, finaltorment said: another problem now, seems he don't refresh well the pages now. Explain more ok edit this self.listUnusableSlot.remove(I) self.listUnusableSlot.append(I) to self.listUnusableSlot.remove(i) self.listUnusableSlot.append(i) If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Chris90909090909090 50 Posted June 30, 2016 Share Posted June 30, 2016 @ penger what do you mean with is not this complet system? Link to comment Share on other sites More sharing options...
Premium finaltorment 53 Posted June 30, 2016 Premium Share Posted June 30, 2016 EDIT sorry my fault all work fine, the problem was you write:self.listUnusableSlot.remove(I) but it must be: self.listUnusableSlot.remove(i) 9 minutes ago, Chris90909090909090 said: @ penger what do you mean with is not this complet system? he mean that shop and safebox part is missed. Link to comment Share on other sites More sharing options...
Chris90909090909090 50 Posted June 30, 2016 Share Posted June 30, 2016 ohh okay and this part in right or? Link to comment Share on other sites More sharing options...
Premium finaltorment 53 Posted June 30, 2016 Premium Share Posted June 30, 2016 this part is only for exchange and all work fine. Link to comment Share on other sites More sharing options...
VegaS 1086 Posted June 30, 2016 Share Posted June 30, 2016 10 minutes ago, finaltorment said: he mean that shop and safebox part is missed. He means, like official Link to comment Share on other sites More sharing options...
Chris90909090909090 50 Posted June 30, 2016 Share Posted June 30, 2016 fixed Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted June 30, 2016 Author Premium Share Posted June 30, 2016 I only make it for exchange like official but if u want it for safebox I think it's easy to make ! use same python uiinventory code and just change few things If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Seby. 6 Posted June 30, 2016 Share Posted June 30, 2016 Work thanks ! 1 Link to comment Share on other sites More sharing options...
veilles 0 Posted July 1, 2016 Share Posted July 1, 2016 Can someone help how to add this for safebox ? I can't find function which checking is that safebox is opened. I need something like this: "exchange.isTrading()" Link to comment Share on other sites More sharing options...
Shang 369 Posted July 1, 2016 Share Posted July 1, 2016 Why are you appending the slots in a list if you don't use the list? Link to comment Share on other sites More sharing options...
ImTweet 0 Posted July 1, 2016 Share Posted July 1, 2016 Same for shops ? Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted July 1, 2016 Author Premium Share Posted July 1, 2016 3 hours ago, veilles said: Can someone help how to add this for safebox ? I can't find function which checking is that safebox is opened. I need something like this: "exchange.isTrading()" try to make one , it's not hard 1 hour ago, Shang said: Why are you appending the slots in a list if you don't use the list? open your eyes and slotNumber in self.listUnusableSlot: 1 hour ago, ImTweet said: Same for shops ? player.IsOpenPrivateShop() and item.IsAntiFlag(item.ANTIFLAG_MYSHOP 1 If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Recommended Posts