Jump to content

JeeX

Member
  • Posts

    100
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by JeeX

  1. 47 minutes ago, xP3NG3Rx said:

    Firts of all I think the section is wrong where you opened the topic.
    Secondly Pete's code for LocalPos is also wrong.

    Here is the right one:

      Hide contents
    // PythonWindowManagerModule.cpp
    PyObject * wndMgrGetSlotLocalPosition(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()))
    	{
    #ifdef _DEBUG
    		TraceError("wndMgr.GetSlotLocalPosition : not a slot window");
    #endif
    		return Py_BuildException();
    	}
    
    	int iX = 0, iY = 0;
    	UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin;
    	pSlotWin->GetSlotLocalPosition((DWORD)iSlotIndex, &iX, &iY);
    	return Py_BuildValue("ii", iX, iY);
    }
    
    // PythonSlotWindow.h
    		public:
    			bool GetSlotLocalPosition(DWORD dwIndex, int * iX, int * iY);
    
    // PythonSlotWindow.cpp
    bool CSlotWindow::GetSlotLocalPosition(DWORD dwIndex, int * iX, int * iY)
    {
    	TSlot * pSlot;
    	if (!GetSlotPointer(dwIndex, &pSlot))
    		return false;
    
    	*iX = pSlot->ixPosition;
    	*iY = pSlot->iyPosition;
    	return true;
    }

     

     

    Very nice, ty very much! 🙂

    do you maybe know something about "GetSlotGlobalPosition" ?

    I think this function is more difficult :S

    i just use it because of the minigame Rumi - i've started to reverse, its almost done, but i dont know the function (to reverse) as well...

     

    thanks for you help:)

  2. 8 hours ago, PetePeter said:
    
    PyObject* wndMgrGetSlotLocalPosition(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;
    
    	RECT& rRect = pSlotWin->GetRect();
    
    	return Py_BuildValue("ii", rRect.left, rRect.top);
    }
    
    PyObject* wndMgrGetSlotGlobalPosition(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;
    
    	int ix, iy;
    
    	pSlotWin->GetSlotGlobalPosition(iSlotIndex, &ix, &iy);
    	return Py_BuildValue("ii", ix, iy);
    }

    That's what you need ?

    yeah.

  3. Hey guys, im searching for someone who is able to "Reverse" these 2 functions for me.
    why i need? because i've started to reverse Mini-Game-Rumi and these 2 functions set the position of cards.
    but i wasn table to create it, so if someone is able, let me know, code and i will pay very very very good (high-price) for it!.

    here is the IDA code:

    GetSlotLocalPosition

    int __cdecl sub_6DA930(int a1, int a2)
    {
      int v3; // eax
      void *v4; // esi
      void *v5; // [esp+4h] [ebp-10h]
      int v6; // [esp+8h] [ebp-Ch]
      int v7; // [esp+Ch] [ebp-8h]
      int v8; // [esp+10h] [ebp-4h]
    
      if ( !(unsigned __int8)sub_6D8ED0(a2, 0, &v5) )
        return sub_6C29B0(0);
      if ( !(unsigned __int8)sub_6C28D0(a2, 1, &v6) )
        return sub_6C29B0(0);
      v3 = sub_6E07A0();
      v4 = v5;
      if ( !sub_6CBBC0(v5, v3) )
        return sub_6C29B0(0);
      sub_6E2A50(v4, v6, &v8, &v7);
      return Py_BuildValue(&unk_1BB7EA8);
    }
    
    int __thiscall sub_6E2A50(void *this, int a1, _DWORD *a2, _DWORD *a3)
    {
      int result; // eax
      int v5; // eax
    
      result = sub_6E1CE0((int)this, a1, a1, &a1);
      if ( result )
      {
        v5 = a1;
        *a2 = *(_DWORD *)(a1 + 48);
        result = *(_DWORD *)(v5 + 52);
        *a3 = result;
      }
      return result;
    }

     

    GetSlotGlobalPosition
     

    int __cdecl sub_6DA8A0(int a1, int a2)
    {
      int v3; // eax
      int v4; // esi
      int v5; // [esp+4h] [ebp-10h]
      int v6; // [esp+8h] [ebp-Ch]
      int v7; // [esp+Ch] [ebp-8h]
      int v8; // [esp+10h] [ebp-4h]
    
      if ( !(unsigned __int8)sub_6D8ED0(a2, 0, &v5) )
        return sub_6C29B0(0);
      if ( !(unsigned __int8)sub_6C28D0(a2, 1, &v6) )
        return sub_6C29B0(0);
      v3 = sub_6E07A0();
      v4 = v5;
      if ( !sub_6CBBC0(v5, v3) )
        return sub_6C29B0(0);
      sub_6E2A10(v4, (int)&v7, v6, &v8, &v7);
      return Py_BuildValue(&unk_1BB7EA8);
    }
    
    int *__fastcall sub_6E2A10(int a1, int a2, int a3, _DWORD *a4, int *a5)
    {
      int v5; // esi
      int *result; // eax
      int v7; // eax
      int v8; // edx
    
      v5 = a1;
      result = (int *)sub_6E1CE0(a1, a2, a3, &a3);
      if ( result )
      {
        v7 = a3;
        *a4 = *(_DWORD *)(v5 + 56) + *(_DWORD *)(a3 + 48);
        v8 = *(_DWORD *)(v5 + 60) + *(_DWORD *)(v7 + 52);
        result = a5;
        *a5 = v8;
      }
      return result;
    }

     

     

    i did myself like that:
    7c1b03481d99cf5d70a1571b97b1da86.png

    PyObject* wndMgrGetSlotLocalPosition(PyObject* poSelf, PyObject* poArgs)
    {
    	UI::CWindow* pWin;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWin))
    		return Py_BuildException();
    
    	int iIndex;
    	if (!PyTuple_GetInteger(poArgs, 1, &iIndex))
    		return Py_BuildException();
    
    	long lx, ly;
    	UI::CSlotWindow* pSlotWin = (UI::CSlotWindow*)pWin;
    	pSlotWin->GetMiniGamePosition(&lx, &ly);
    
    	return Py_BuildValue("ii", lx, ly);
    }
    
    void CWindow::GetMiniGamePosition(int index, long * plx, long * ply)
    {
    	*plx = mini_x[iIndex] + 48;
    	*ply = mini_y[iIndex] + 52;
    }
    
    
    
    
    PyObject* wndMgrGetSlotGlobalPosition(PyObject* poSelf, PyObject* poArgs)
    {
    	UI::CWindow* pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	int iIndex;
    	if (!PyTuple_GetInteger(poArgs, 1, &iIndex))
    		return Py_BuildException();
    
    	UI::CSlotWindow* pSlotWin = (UI::CSlotWindow*)pWindow;
    	RECT& rRect = pSlotWin->GetMiniRect();
    	return Py_BuildValue("ii", rRect.left, rRect.top);
    }
    
    RECT& GetMiniRect(int index)
    {
    	mini_rect[index].top += 48 + 56;
    	mini_rect[index].left += 52 + 60;
    	return mini_rect[index];
    }

    I know its wrong, but anyone is able? so please let me know!

  4. Good idea - but I think it would be a better way to show a extra tooltip like your way but in this tooltip if you hover the item in inventory should be visible in green the difference of values when it is better and in red when the values are bad than the equipped

    so the people don’t have to check them self - this could be useful

     

    Maybe you find the idea good.

  5. The code have not to be 1-1 like the offical one, but I usually wanted to use the Interface from offical with all the same functions :)

     

    that’s why I ask, if someone would recode it like his way and coding style and the Final system is like the offical one (same Interface and filters: (masktype/masksubtype, itemlevel, cheque&gold, and so on) and maybe the buy function in shopsearch - then this would be perfect ^^

  6. Hey, im looking for someone who is able to recode offical shop search

    i have the offical Python Files from Brazil root and uiscript

    i want to use the same like the Offi server

    im looking for someone, who is able to recode it only in c++

     

    in theory it should read the shops in gamesource out from sql and send with packets to binary -> then sends to python - but python is still exist, so only c++ is missing, I also have pseudo codes from Binary.


    why this? I wanted to work with masktypes too and I like the extended Filter to get items, maybe the function to buy from shopsearch is also nice - but the public one, are not well coded...

     

    hope someone is contact me and wanted the job, I pay good.

     

    best regards.

  7. vor 33 Minuten schrieb filipw1:

    Yep. Some time ago I managed to fix that but this system wasn't nessesary to me so I deleted it 

    Did you know, is the bug in existing code or is there something missing, if you remember?!

    and it is usually in db Src?

    That would help me a lot to fix that thing :)

    ty

  8. No aggro-pulling when the monster is poisoned and you're dead and want to stand up again.
    maybe someone need this.

    in char_battle.cpp

    void CHARACTER::UpdateAggrPointEx(LPCHARACTER pAttacker, EDamageType type, int dam, CHARACTER::TBattleInfo & info)
    
    //this (last line):
    ChangeVictimByAggro(info.iAggro, pAttacker);
    
    
    //Change with this:
    	if (type != DAMAGE_TYPE_POISON)
    		ChangeVictimByAggro(info.iAggro, pAttacker);

     

    • Love 3
  9. Very nice thank you!

    All other work fine, but there is something missing on "m_auraRefineEffect = m_GraphicThingInstance.AttachEffectByID(NULL, "Bip01 Spine2", pItemData->GetAuraEffectID(), NULL, 0, FALSE, pItemData->GetItemScale(byJob, bySex).z, &scalePos);"

    Could you maybe Paste AttachEffectByID changes there?
    Best regards!

    • Love 1
  10. Is there any possibility @p3ng3r bis Version to ignore at gamemaster?

    Because i changed some Line at cmd_general.cpp that gamemaster are possible to start here/start in City without waiting

    But now i have to wait...

    I tested with return 0 but i will get the negative time

     

    I hope, someone know a solution.

    Best regards

  11. vor 5 Stunden schrieb Koray:

    Just use your brain and follow the possible steps;

    Look for the error message you received and see why it made an error

      Unsichtbaren Inhalt anzeigen

    uVtNTW.png

    Look for references that use container's insert function

      Unsichtbaren Inhalt anzeigen

    HO8gUt.png

    Search for references with using the function found

      Inhalt unsichtbar machen

    qbI5tc.png

    And you have found whitelisted extensions and as you can see, ".mse" does not exist.

    I don't think anyone needs to show it, I guess it's not hard?

    ok ty, but why work all other "mse" in playersettingsmodule?
    like this:
    chrmgrm2g.RegisterCacheEffect(chrmgrm2g.EFFECT_STUN, "Bip01 Head", "d:/ymir work/effect/etc/stun/stun.mse")

    i added the new mse line, but now:
    0725 11:41:13880 :: CEffectManager::RegisterEffect - LoadScript(D:/ymir work/pc/common/effect/aura/aura_200_249_005.mse) Error
    0725 11:41:13880 :: CInstanceBase::RegisterEffect(eEftType=304, c_szEftAttachBone=Bip01, c_szEftName=D:/ymir work/pc/common/effect/aura/aura_200_249_005.mse, isCache=0) - Error

     

    i take a look at the file and looked at stun.mse - there is not much different only some lines are more in:
    TimeEventScaleX
    TimeEventScaleY
    TimeEventAlpha

    all other is like the stun.mse

    But in stun, no error? -> cause the error maybe that scalex and so on have some lines more?
    Best regards.

  12. hey guys,

    i wanted to add the new AURA, i used the new files from (p3ng3r, metin2team, martysama)
    Sourceside should be done, but i get clientside errors:
     

    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_01_49_001.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_01_49_001.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_50_99_002.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_50_99_002.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_100_149_003.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_100_149_003.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_150_199_004.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_150_199_004.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_200_249_005.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_200_249_005.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_250_006.mse
    0725 01:55:13101 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE d:\ymir work\pc\common\effect\aura\aura_250_006.mse

    Does anybody knows a soultion, what i have to change, that it should work?
    Best regards!

  13. vor 9 Stunden schrieb asdajdja:

    This is the hidden content, please

    do you mean this?

    edit: I don't quite understand what you looking for, the first ever source to be leaked was in like 2013 or something along the lines, before that they were server files that leaked on few occasions but I don't think there is a older source code than that.

    Nice thank you, when im home, im looking at this source!

     

    I usually look for the First source, which are untouched, fully clean of User changes or something else

    The reason why: i want to start a new project, i want to create Very old files like 2008 and want to use a source (not only serverfiles and sura.exe) i want to rework the source and back -Patch it (newer stuff delete) ->thats why im looking for clean untouched source which are released years ago

    So for the new project i need: serversource, binary, clientfiles (python) - which are very very old and untouched & they have to be compileable and compartible together.

     

    Thanks at First & i look your files.

    Best regards

  14. Hello, i Working years ago with marty source and created a good project with new stuff and so on...

    But im very interested in to create a full stock Server with realy old files, maybe i want to backpatch it. (Sever like 2008 but with backpatched source support)

     

    This is why i create this thread, because im looking for the First compile-able Source untouched, which are ever released.

    I need Serversource, binary(clientsource), clientside (root -> pythonfiles) which are compartible, untouched & clean. So i mean reay realy old stuff (since source is public)

     

    Could you maybe Help?,  because i already searched, but the mt2 Forums are full with modifyed stuff and i didnt know, which files are untouched and compartible together.

    Thank you very much!

    Best regards.

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