Jump to content

MrLibya

Premium
  • Posts

    378
  • Joined

  • Last visited

  • Days Won

    8
  • Feedback

    0%

Posts posted by MrLibya

  1. M2 Download Center

    This is the hidden content, please
    ( Advance Refine Systems )

    This is the hidden content, please
    ( Cheque System )

    This is the hidden content, please
    ( Soul Bind System )

    Hello everyone !
     

    I've been away from metin2 for about 6 months and i've get back from less then a month and made thoes systems , i've start selling them but i didn't sell it to anyone and i got bored from metin2 again so i'm going to release it and go off from metin2 for ever .

    about the Advance Refine System here some info:

     
    • You can select which npc vnum u want for the refien set , from db ( player.refine_proto).
    • Default npc vnum is the BLACKSMITH ( 20016 ).
    • Easily enable or disable and get back to normal mode.
    • Clean code.

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif[/IMG]


    https://youtu.be/tqoduF5g8x0
     

     


    so download and have fun https://metin2.download/picture/RTVjgZcThQUO4mkaqrmf1Qjg1uFGJ8zl/.gif

     

    • Metin2 Dev 59
    • Facepalm 1
    • Dislove 1
    • Not Good 1
    • Confused 1
    • Good 8
    • Love 5
    • Love 118
  2. 3 hours ago, markx202 said:

    I'm looking for someone capable of doing a professional autopatcher.
    I require:
    1. Integrate launcher in the patcher
    2. Download files
    3. Check files
    4. If you can, integrate client-side protections
    5. Customizable interface with my design
    6. Button for connect patcher with site / forum

    If you sell similar projects or better do not hesitate to comment.
    You can add me on skype contact: markx202

     

    Sorry for my bad english.

    Official patcher is the best solution

  3. Hello

    It's a minor bug but it's important , when u kill the devil tower boss and get ur reward and try to upgrade ur weapon or anything if u press yes and u haee money less then the cost u will lost the reward .

    so here even if u have no money u will not lost the reward

    to fix it :
    open input_main.cpp

    add : 
    #include "refine.h"
    // find this
        if (!item)
        {
            ch->ClearRefineMode();
            return;
        }
    // a new code block
        const TRefineTable * prt = CRefineManager::instance().GetRefineRecipe(item->GetRefineSet());
        if (!prt)
        {
            ch->ClearRefineMode();
            return;
        }  
    now search for : 
    if (ch->GetQuestFlag("deviltower_zone.can_refine"))
    replace the whole condition with this : 
    if (ch->GetQuestFlag("deviltower_zone.can_refine"))
                    {
                        if (ch->GetGold() >= prt->cost)
                        {
                            ch->DoRefine(item, true);
                            ch->SetQuestFlag("deviltower_zone.can_refine", 0);
                        }
                        else
                            ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("±¹°ي؟، µ·ہج ؛خء·اد°إ³ھ µ·ہ» °،ء®؟أ¼ِ ¾ّ´آ »َب²ہش´د´ظ"));
                    }

     


    sry 4 my english
     

     

    • Metin2 Dev 1
    • Love 4
  4. hallo all

    so If I want add new slot for new item type in inventory window it will be like that:

    type : ITEM_NEW , WEAR_NEW

    const DWORD c_Equipment_New  = c_New_Equipment_Start + 3;

    {"index":item.EQUIPMENT_NEW, "x":39, "y":106, "width":32, "height":32},

    the question is how this slot will define this type ?

    I check other slots like belt ..etc and there is no other define for it

     

     

     

  5. 3 hours ago, ImBacK said:

    This is full part for system

      Reveal hidden contents

    #?????

    Client bin:

    In EterPythonLib\PythonSlotWindow.cpp:
    Function OnRender:
    This:

            if (IS_SET(rSlot.dwState, SLOT_STATE_DISABLE))
            {
                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.ixCellSize,
                    m_rect.top + rSlot.iyPosition + rSlot.iyCellSize);
            }

    To:

            if (IS_SET(rSlot.dwState, SLOT_STATE_DISABLE))
            {
                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 YOU DONT HAVE THIS
    PyModule_AddIntConstant(poModule, "ANTIFLAG_SAFEBOX",            CItemData::ITEM_ANTIFLAG_SAFEBOX);
    In UserInterface/PythonItemModule.cpp add it under
    PyModule_AddIntConstant(poModule, "ANTIFLAG_MYSHOP",            CItemData::ITEM_ANTIFLAG_MYSHOP);

    Roots:
    In constinfo.py add this:
    avilable = 0

    In uiinventory replace this functions:
        def RefreshBagSlotWindow(self):
            getItemVNum=player.GetItemIndex
            getItemCount=player.GetItemCount
            setItemVNum=self.wndItem.SetItemSlot
            
            for i in xrange(player.INVENTORY_PAGE_SIZE):
                slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
                
                itemCount = getItemCount(slotNumber)
                # itemCount == 0이면 소켓을 비운다.
                if 0 == itemCount:
                    self.wndItem.ClearSlot(i)
                    continue
                elif 1 == itemCount:
                    itemCount = 0
                    
                itemVnum = getItemVNum(slotNumber)
                setItemVNum(i, itemVnum, itemCount)
                if constInfo.avilable > 0 and constInfo.avilable < 4:
                    self.RefreshBagSlotWindowOnAvilable()
                ## 자동물약 (HP: #72723 ~ #72726, SP: #72727 ~ #72730) 특수처리 - 아이템인데도 슬롯에 활성화/비활성화 표시를 위한 작업임 - [hyo]
                if constInfo.IS_AUTO_POTION(itemVnum):
                    # metinSocket - [0] : 활성화 여부, [1] : 사용한 양, [2] : 최대 용량
                    metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]    
                    
                    if slotNumber >= player.INVENTORY_PAGE_SIZE:
                        slotNumber -= player.INVENTORY_PAGE_SIZE
                        
                    isActivated = 0 != metinSocket[0]
                    
                    if isActivated:
                        self.wndItem.ActivateSlot(slotNumber)
                        potionType = 0;
                        if constInfo.IS_AUTO_POTION_HP(itemVnum):
                            potionType = player.AUTO_POTION_TYPE_HP
                        elif constInfo.IS_AUTO_POTION_SP(itemVnum):
                            potionType = player.AUTO_POTION_TYPE_SP                        
                        
                        usedAmount = int(metinSocket[1])
                        totalAmount = int(metinSocket[2])                    
                        player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i))
                        
                    else:
                        self.wndItem.DeactivateSlot(slotNumber)
            self.wndItem.RefreshSlot()
            
            
        def RefreshStatus(self):
            import systemSetting
            money = player.GetElk()
            self.wndMoney.SetText(localeInfo.NumberToMoneyString(money))
            if constInfo.avilable == 4:
                self.RefreshBagSlotWindow()
                constInfo.avilable = 0
                
    And add under it this functions:
        def RefreshBagSlotWindowOnAvilable(self):
            getItemVNum=player.GetItemIndex
            for i in xrange(player.INVENTORY_PAGE_SIZE):
                slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)

                itemVnum = getItemVNum(slotNumber)
                if constInfo.avilable == 1:
                    if 0 != itemVnum:
                        item.SelectItem(itemVnum)
                        if item.IsAntiFlag(item.ANTIFLAG_GIVE):
                            self.wndItem.DisableSlot(i)
                if constInfo.avilable == 2:
                    if 0 != itemVnum:
                        item.SelectItem(itemVnum)
                        if item.IsAntiFlag(item.ANTIFLAG_SAFEBOX):
                            self.wndItem.DisableSlot(i)
                if constInfo.avilable == 3:
                    if 0 != itemVnum:
                        item.SelectItem(itemVnum)
                        if item.IsAntiFlag(item.ANTIFLAG_MYSHOP):
                            self.wndItem.DisableSlot(i)
            self.wndItem.RefreshSlot()

            if self.wndBelt:
                self.wndBelt.RefreshSlot()

        def CheckAvilableExchange(self):
            constInfo.avilable = 1
            self.RefreshBagSlotWindowOnAvilable()
            self.RefreshBagSlotWindow()

        def CheckAvilableSafebox(self):
            constInfo.avilable = 2
            self.RefreshBagSlotWindowOnAvilable()

        def CheckAvilableShop(self):
            constInfo.avilable = 3
            self.RefreshBagSlotWindowOnAvilable()
            
        def DisturbCheckAvilable(self):
            constInfo.avilable = 0
            self.RefreshBagSlotWindow()
            
    In interfacemodule.py
    In function:
    def OpenPrivateShopBuilder(self):
    Under:
    self.ClosePrivateShopInputNameDialog()
    Add this:
    self.wndInventory.CheckAvilableShop()

    Replace this functions:
        def StartExchange(self):
            self.dlgExchange.OpenDialog()
            self.dlgExchange.Refresh()
            self.wndInventory.CheckAvilableExchange()
        def EndExchange(self):
            self.dlgExchange.CloseDialog()
            self.wndInventory.DisturbCheckAvilable()
        def OpenSafeboxWindow(self, size):
            self.dlgPassword.CloseDialog()
            self.wndSafebox.ShowWindow(size)
            self.wndInventory.CheckAvilableSafebox()
        def CommandCloseSafebox(self):
            self.wndSafebox.CommandCloseSafebox()
            self.wndInventory.DisturbCheckAvilable()

    Open uiprivateshopbuilder.py
    Under this:
    import grp
    Add this:
    import constInfo
    And replace that function:
        def OnClose(self):
            constInfo.avilable = 4
            self.Close()

     

    wtf ahah , just stop it u killing the python

     

    • Love 1
  6. 1 hour ago, Shang said:

    Look at your shit code bro. If the slotnumber isn't in the list and the slot have to be usable?

    If you delete this: and slotNumber in self.listUnusableSlot:  you'll see working anyway.

    yes I know it's going to work , but if u do that u will use the deactive function for all slot's !

     

  7. 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

     

    • Love 1
  8. 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)

     

  9. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hallo all

     
    .gif
     
    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 :)
     
     
     
     
     
     

     

    • Metin2 Dev 17
    • Good 1
    • Love 1
    • Love 20
  10. 4 hours ago, xP3NG3Rx said:

    That isn't image, c++ code.

     

    
    		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);
    		}

     

    i thought it's need some effect patch , thx :P

×
×
  • Create New...

Important Information

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