-
Posts
838 -
Joined
-
Days Won
392 -
Feedback
100%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by xP3NG3Rx
-
-
Spoiler
- 2
-
I don't think so that this will help you, but here it is what you asked for.
SpoilerPyObject * playerGetElementByVID(PyObject* poSelf, PyObject* poArgs) { DWORD dwVID = 0; if (!PyTuple_GetUnsignedLong(poArgs, 0, &dwVID)) return Py_BadArgument(); CInstanceBase * pTargetInstance = CPythonCharacterManager::Instance().GetInstancePtr(dwVID); if (!pTargetInstance) return Py_BuildValue("i", 0); CItemData * pPendantItem = NULL; const DWORD dwItemVnum = pTargetInstance->GetPart(CRaceData::PART_PENDANT); if (CItemManager::Instance().GetItemDataPointer(dwItemVnum, &pPendantItem)) { for (BYTE i = 0; i < CItemData::ITEM_APPLY_MAX_NUM; ++i) { CItemData::TItemApply ItemApply; if (!pPendantItem->GetApply(i, &ItemApply)) return Py_BuildException(); switch (ItemApply.wType) { case CItemData::APPLY_ENCHANT_ELECT: return Py_BuildValue("i", CPythonNonPlayer::RACE_FLAG_ATT_ELEC); break; case CItemData::APPLY_ENCHANT_FIRE: return Py_BuildValue("i", CPythonNonPlayer::RACE_FLAG_ATT_FIRE); break; case CItemData::APPLY_ENCHANT_ICE: return Py_BuildValue("i", CPythonNonPlayer::RACE_FLAG_ATT_ICE); break; case CItemData::APPLY_ENCHANT_WIND: return Py_BuildValue("i", CPythonNonPlayer::RACE_FLAG_ATT_WIND); break; case CItemData::APPLY_ENCHANT_EARTH: return Py_BuildValue("i", CPythonNonPlayer::RACE_FLAG_ATT_EARTH); break; case CItemData::APPLY_ENCHANT_DARK: return Py_BuildValue("i", CPythonNonPlayer::RACE_FLAG_ATT_DARK); break; default: continue; } } } return Py_BuildValue("i", 0); }
Spoilerint __cdecl playerGetElementByVID(int a1, int a2) { int result; // eax char v3; // al __int16 v4[4]; // [esp+8h] [ebp-1Ch] BYREF int i; // [esp+10h] [ebp-14h] int v6; // [esp+14h] [ebp-10h] BYREF _WORD *v7; // [esp+18h] [ebp-Ch] BYREF int v9; // [esp+20h] [ebp-4h] if ( !PyTuple_GetUnsignedLong(a2, 0, &v6) ) return Py_BadArgument(); v9 = CPythonCharacterManager; if ( !(*(int (__thiscall **)(int, int))(*(_DWORD *)(CPythonCharacterManager + 4) + 8))( CPythonCharacterManager + 4, v6) ) return Py_BuildValue("i", 0); v3 = CInstanceBase::GetPart(6); if ( CItemManager::GetItemDataPointer(v3, &v7) ) { for ( i = 0; i < 4; ++i ) { if ( CItemData::GetApply(v7, i, (int)v4) ) { switch ( v4[0] ) { case 99: result = Py_BuildValue("i", 2048); break; case 100: result = Py_BuildValue("i", 4096); break; case 101: result = Py_BuildValue("i", 8192); break; case 102: result = Py_BuildValue("i", 16384); break; case 103: result = Py_BuildValue("i", 32768); break; case 104: result = Py_BuildValue("i", 65536); break; default: continue; } return result; } } } return Py_BuildValue("i", 0); }
Btw this code has been completely removed after the renewal of the pendant system. They changed the way of the system, for monsters the values are inside the mob_proto, and for players: the second parameter of the CPythonNetworkStream::SendTargetPacket function requests the data which will be loaded from the server through packet (CPythonNetworkStreamPhaseGame.cpp[CPythonNetworkStream::RecvTargetPacket] --> game.py[ShowTargetElementEnchant] --> uitarget.py[ShowElementImg]).
- 2
-
or (
)
Contains:- root-meta, dumped binary.
- Every each files in a folder.
Edit: Whole pack folder in a folder here:
)
or (Edit2: or (
)- 215
- 1
- 1
- 5
- 3
- 1
- 5
- 2
- 2
- 3
- 2
- 1
- 65
- 9
- 119
-
(
)(
)(
)Contains:
- root-meta, dumped binary, protos
- Every each files are in a folder.
- 186
- 1
- 1
- 4
- 4
- 3
- 4
- 1
- 2
- 6
- 5
- 2
- 80
- 7
- 103
-
-
v1.1.0 | A small extension has been added. | [Mega link]
- 12
- 1
- 1
- 6
- 2
- 10
-
I would like to mention here a minor bugfix about the update packets which cause the lags on changing attributes (maybe with manual mouse drag only? dunno).
I hope it is visible on the video, if not just test it by yourself.
What you need to do with these microlags is easy, just open the interfaceModule.py and there inside the Interface class you will find a function which is the RefreshInventory.
Every different window which has refreshable item grid, it runs down from there even if the windows isn't opened. This cause the fps drop which is visible even with human eyes.
The solution is, you have to put an (IsShow) if statement before they run down like the way how it looks like on my side:def RefreshInventory(self): self.wndTaskBar.RefreshQuickSlot() if self.wndInventory and self.wndInventory.IsShow(): self.wndInventory.RefreshItemSlot() if app.ENABLE_DRAGON_SOUL_SYSTEM: if self.wndDragonSoul and self.wndDragonSoul.IsShow(): self.wndDragonSoul.RefreshItemSlot() if app.ENABLE_EXTEND_INVEN_SYSTEM and app.ENABLE_SEPARATED_EXTEND_INVEN_WINDOW: if self.wndInventoryEx and self.wndInventoryEx.IsShow(): self.wndInventoryEx.RefreshItemSlot() if app.ENABLE_MOVE_COSTUME_ATTR or app.ENABLE_MOVE_SASH_ATTR: if app.GetMoveAttrWindowOpen(): if self.wndItemCombination and self.wndItemCombination.IsShow(): self.wndItemCombination.RefreshCombSlotWindow() if app.ENABLE_SHOULDER_SASH_SYSTEM: if player.GetAcceRefineWindowOpen(): if self.wndAcce and self.wndAcce.IsShow(): self.wndAcce.RefreshAcceWindow() if app.ENABLE_CHANGE_LOOK_SYSTEM: if player.GetChangeLookWindowOpen(): if self.wndChangeLook and self.wndChangeLook.IsShow(): self.wndChangeLook.RefreshChangeLookWindow() if self.wndAttr67Add and self.wndAttr67Add.IsShow(): self.wndAttr67Add.RefreshAttr67Window() if app.ENABLE_AURA_SYSTEM: if player.IsAuraRefineWindowOpen(): if self.wndAura and self.wndAura.IsShow(): self.wndAura.RefreshAuraWindow()
- 46
- 1
- 1
- 1
- 13
- 1
- 7
-
- 193
- 2
- 2
- 1
- 2
- 1
- 2
- 3
- 4
- 1
- 90
- 10
- 130
-
It depends. Shall we need the functionality of the ALT in the game to change the quickslot page and show the names around our character when the window is opened or not? Due the fact the keydown process is not executing during the change, I think the best solution is to block the keyup function too when the board is opened. Ofc it need some checks too, although the keychange processed with the OnKeyDown function.
-
I just discovered a small bug with the OnKeyDown function in python which is there even on the official servers too.
It will never execute the binary side OnKeyDown with the ALT key when the KeySettingBoard is opened.
Howover the OnKeyUp always executes. So the quickslot paging will be decreased all the time when you hit the ALT key. -
@Draveniou1 Apparently you have no clue what I was talking about neither how this process works, and how it can be exploited.
As I can see @TMP4 was faster to answer, and explained my point of view.
- 1
-
Basically it just blocks the clientside popup message, right?
So if I send the packet anyway, the players whom are showing the items going to get screwed up. -
-
-
On the official there are no differences between left and right shift, alt nor ctrl. All of them are bound to left+key.
In your code I've seen you made it for both, but in the locale files there are no reference to them.Spoiler- 9
- 4
- 4
-
Nice .
If I know well (not sure, but) on the official it stores the attributes when the player get kicked or warped or whatever, on the next login the window will show up again like the luckybox.
I've done it like that way, even when shutdown or reboot happens.Even if this isn't the official way, it's a player friendly feature.
Spoiler- 2
-
-
It's a very nice feature, I've done this as well couple of years ago. Keep it up
Spoiler- 2
-
-
Thanks for share, here are some missing ones.
Ship Defense (Hydra)
Spoilerlogin.jpg
Spoilerloading0.jpg
Spoilerloading1.jpg
Spoilerloading2.jpg
SpoilerChinese Zodiac Temple (12zi)
Spoilerlogin.jpg
Spoilerloading0.jpg
Spoilerloading1.jpg
Spoilerloading2.jpg
Spoilerloading3.jpg
Spoilerloading4.jpg
Spoilerloading5.jpg
Spoilerloading6.jpg
Spoilerloading7.jpg
Spoilerloading8.jpg
Spoilerloading9.jpg
Spoilerloading10.jpg
Spoilerloading11.jpg
SpoilerElemental Realm
Spoilerlogin.jpg
Spoilerloading0.jpg
Spoilerloading1.jpg
Spoilerloading2.jpg
SpoilerPlateau of Illusions
Spoilerlogin.jpg
Spoilerloading0.jpg
Spoilerloading1.jpg
Spoilerloading2.jpg
Spoilerloading3.jpg
SpoilerConquerors of Yohara
Spoilerlogin.jpg
Spoilerloading0.jpg
Spoilerloading1.jpg
Spoilerloading2.jpg
Spoilerloading3.jpg
SpoilerCurse of the Serpent Queen
Spoilerlogin.jpg
Spoilerloading0.jpg
Spoilerloading1.jpg
Spoilerloading2.jpg
Spoilerloading3.jpg
SpoilerLegend of the White Dragon
Spoilerlogin.jpg
Spoilerloading0.jpg
Spoilerloading1.jpg
Spoilerloading2.jpg
Spoilerloading3.jpg
SpoilerDawn of the Lycans
Spoilerloading0.jpg
Spoilerloading1.jpg
Spoilerloading2.jpg
Spoilerloading3.jpg
Spoilerloading4.jpg
Spoilerloading5.jpg
Spoiler- 8
- 2
- 1
- 1
- 9
- 3
- 10
-
( )
Contents:- root-meta, dumped binary, protos(out of date, types/values will be checked later)
- New map with dungeon and monsters, npcs, objects.
- New weapons, pet(2x textures), new mount.
- All files are unpacked in a folder.
Demo.
Spoiler- 177
- 3
- 8
- 3
- 3
- 3
- 2
- 1
- 5
- 1
- 93
- 20
- 183
-
Hello everyone.
I've got this request long time ago to extend the OutLine coloring feature for the TextLines to make beautiful texts via Python.
As you might know there is the ConquerorLevel text which also uses this feature just binary sided.
With this small code you will be able to recolor the OutLine of the textlines from python scripts.Demo:
SpoilerImages:
SpoilerVideo:
SpoilerGuide:
Spoiler1.) EterPythonLib/PythonWindowManagerModule.cpp >> Declare the following function and add to the method list:
PyObject * wndTextSetOutLineColor(PyObject * poSelf, PyObject * poArgs) { UI::CWindow * pWindow; if (!PyTuple_GetWindow(poArgs, 0, &pWindow)) return Py_BuildException(); if (2 == PyTuple_Size(poArgs)) { DWORD dwColor; // <!> PyTuple_GetUnsignedLong might cause some problems, change it if you need <!> if (!PyTuple_GetUnsignedLong(poArgs, 1, &dwColor)) return Py_BuildException(); ((UI::CTextLine*)pWindow)->SetOutLineColor(dwColor); } else if (5 == PyTuple_Size(poArgs)) { float fr; if (!PyTuple_GetFloat(poArgs, 1, &fr)) return Py_BuildException(); float fg; if (!PyTuple_GetFloat(poArgs, 2, &fg)) return Py_BuildException(); float fb; if (!PyTuple_GetFloat(poArgs, 3, &fb)) return Py_BuildException(); float fa; if (!PyTuple_GetFloat(poArgs, 4, &fa)) return Py_BuildException(); ((UI::CTextLine*)pWindow)->SetOutLineColor(fr, fg, fb, fa); } else { return Py_BuildException(); } return Py_BuildNone(); } //// { "SetOutLineColor", wndTextSetOutLineColor, METH_VARARGS },
2.) EterPythonLib/PythonWindow.h >> Add the following lines into the CTextLine class as 'public' (recommended below of the SetFontColor):
void SetOutLineColor(DWORD dwColor); void SetOutLineColor(float fR, float fG, float fB, float fA);
3.) EterPythonLib/PythonWindow.cpp >> Declare the new functions (recommended below of the CTextLine::SetFontColor):
void CTextLine::SetOutLineColor(DWORD dwColor) { m_TextInstance.SetOutLineColor(dwColor); } void CTextLine::SetOutLineColor(float fR, float fG, float fB, float fA) { m_TextInstance.SetOutLineColor(fR, fG, fB, fA); }
4.) root/ui.py >> Add these functions into the TextLine class (recommended below of the SetPackedFontColor):
def SetOutLineColor(self, red, green, blue, alpha): wndMgr.SetOutLineColor(self.hWnd, red, green, blue, alpha) def SetPackedOutLineColor(self, color): wndMgr.SetOutLineColor(self.hWnd, color)
Test Script:
SpoilerAny problem --> Comment below
Greetz- 38
- 1
- 1
- 11
- 5
- 37
-
-
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:
Spoiler// 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); } 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())) { #ifdef _DEBUG TraceError("wndMgr.GetSlotGlobalPosition : not a slot window"); #endif return Py_BuildException(); } int iX = 0, iY = 0; UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin; pSlotWin->GetSlotGlobalPosition((DWORD)iSlotIndex, &iX, &iY); return Py_BuildValue("ii", iX, iY); } // PythonSlotWindow.h public: bool GetSlotLocalPosition(DWORD dwIndex, int * iX, int * iY); bool GetSlotGlobalPosition(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; } bool CSlotWindow::GetSlotGlobalPosition(DWORD dwIndex, int * iX, int * iY) { TSlot * pSlot; if (!GetSlotPointer(dwIndex, &pSlot)) return false; *iX = m_rect.left + pSlot->ixPosition; *iY = m_rect.top + pSlot->iyPosition; return true; }
- 1
- 3
Official Unpacked Updates Metin2 🚫 No Spam 🚫
in Guides & HowTo
Posted
For someone who might need