WorldArd Publicado 16 de Mayo del 2017 Reportar Compartir Publicado 16 de Mayo del 2017 [Cliente/Root] 1.Abrir archivo "cube.py" . 2.Buscar "class CubeResultWindow(ui.ScriptWindow)" y antes de esa linea agregar : SystemCube = 0 3.Buscar currentSlot.SetItemSlot(0, itemVnum, itemCount) y abajo agregar: if player.GetItemCountByVnum(itemVnum) >= itemCount: currentSlot.SetUsableSlot(0) currentSlot.SetUnusableWorldSlot(0) else: currentSlot.SetUnusableSlot(0) currentSlot.SetUsableWorldSlot(0) 4.Buscamos "(x, y, z) = player.GetMainCharacterPosition()" y arriba agregamos: if SystemCube == 1: self.Refresh() [binario/EterPythonLib] [PythonSlotWindow.cpp] 1.Buscar void CSlotWindow::SelectSlot(DWORD dwSelectingIndex) y arriba agregar: void CSlotWindow::SetUnusableSlot(DWORD dwIndex) { TSlot * pSlot; if (!GetSlotPointer(dwIndex, &pSlot)) return; SET_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE); } void CSlotWindow::SetUsableSlot(DWORD dwIndex) { TSlot * pSlot; if (!GetSlotPointer(dwIndex, &pSlot)) return; REMOVE_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE); } void CSlotWindow::SetUnusableWorldSlot(DWORD dwIndex) { TSlot * pSlot; if (!GetSlotPointer(dwIndex, &pSlot)) return; SET_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE_WORLD); } void CSlotWindow::SetUsableWorldSlot(DWORD dwIndex) { TSlot * pSlot; if (!GetSlotPointer(dwIndex, &pSlot)) return; REMOVE_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE_WORLD); } 2.Buscar if (rSlot.bActive) y arriba agregar: if (IS_SET(rSlot.dwState, SLOT_STATE_UNUSABLE)) { //CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 1.0f, 0.3f); CPythonGraphic::Instance().SetDiffuseColor(1.0f, 0.0f, 0.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); } if (IS_SET(rSlot.dwState, SLOT_STATE_UNUSABLE_WORLD)) { //CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 1.0f, 0.3f); CPythonGraphic::Instance().SetDiffuseColor(0.0f, 1.0f, 0.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); } [PythonSlotWindow.H] 1.Buscar SLOT_STATE_ALWAYS_RENDER_COVER = (1 << 3), y abajo agregar: SLOT_STATE_UNUSABLE = (1 << 4), SLOT_STATE_UNUSABLE_WORLD = (1 << 5), [PythonWindowManagerModule.cpp] 1.Buscamos PyObject * wndMgrShowSlotBaseImage(PyObject * poSelf, PyObject * poArgs) y arriba agregamos: 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(); } PyObject * wndMgrSetUnusableWorldSlot(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->SetUnusableWorldSlot(iSlotIndex); return Py_BuildNone(); } PyObject * wndMgrSetUsableWorldSlot(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->SetUsableWorldSlot(iSlotIndex); return Py_BuildNone(); } 2.Buscamos { "DisableSlot" y abajo agregamos: { "SetUnusableSlot", wndMgrSetUnusableSlot, METH_VARARGS }, { "SetUsableSlot", wndMgrSetUsableSlot, METH_VARARGS }, { "SetUnusableWorldSlot", wndMgrSetUnusableWorldSlot, METH_VARARGS }, { "SetUsableWorldSlot", wndMgrSetUsableWorldSlot, METH_VARARGS }, Imagen: Saludos! Üşengeç Adam, autodesk_metin2, Jaggerman y 1 mas reacciono a esto 4 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Jaggerman Publicado 16 de Mayo del 2017 Reportar Compartir Publicado 16 de Mayo del 2017 Buen aporte, gracias Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Dilong Publicado 18 de Mayo del 2017 Reportar Compartir Publicado 18 de Mayo del 2017 Debes iniciar sesión para ver el contenido del enlace en esta publicación. Debes iniciar sesión para ver el contenido del enlace en esta publicación. 𝗔𝗿𝗲𝘀, xOSCUROREYx, jkindly y 11 mas reacciono a esto 13 1 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
SoyComoSoyxD Publicado 18 de Mayo del 2017 Reportar Compartir Publicado 18 de Mayo del 2017 Gracias por el aporte. =) Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Jaggerman Publicado 18 de Mayo del 2017 Reportar Compartir Publicado 18 de Mayo del 2017 Debes iniciar sesión para ver el contenido del enlace en esta publicación. Debes iniciar sesión para ver el contenido del enlace en esta publicación. Minitutoriales by Dilong Pd: En Chrome la imagen se ve directamente Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
vilas69 Publicado 18 de Mayo del 2017 Reportar Compartir Publicado 18 de Mayo del 2017 print plz Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
WorldArd Publicado 19 de Mayo del 2017 Author Reportar Compartir Publicado 19 de Mayo del 2017 Imagen colocada! Saludos!! Michiite y Jaggerman reacciono a esto 2 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Akinox Publicado 19 de Mayo del 2017 Reportar Compartir Publicado 19 de Mayo del 2017 Buen aporte ^_^, viendo por encima, hacen falta cosas de declaración de funciones, pero cosas tontas. Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Mensajes recomendados
Unirse a la conversación
Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.