Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    855
  • Joined

  • Days Won

    402
  • Feedback

    100%

Everything posted by xP3NG3Rx

  1. ## uiShop.py def Open(self, vid): import chr isPrivateShop = chr.IsNPC(vid) == 0 if player.IsMainCharacterIndex(vid): isMainPlayerPrivateShop = True self.btnBuy.Hide() self.btnSell.Hide() self.btnClose.Show() else: isMainPlayerPrivateShop = False if isPrivateShop: self.vid = vid self.btnBuy.SetPosition(0, 295) self.btnBuy.SetWindowHorizontalAlignCenter() self.btnBuy.Show() self.btnSell.Hide() self.btnClose.Hide() This depends on your shop system too. The actortype of your shops are cannot be NPC type. Otherwise you need to change the value of the isPrivateShop variable.
  2. Due the loss of backup or whatever is happened, here are the last patches: GF v20.4.9 Whole client (Metin2 Download) GF v20.4.9 Metadata (Metin2 Download) GF v20.4.10 Patch (Metin2 Download)
  3. I have found a reference long time ago. PythonPlayerSkill.cpp > CPythonPlayer::__ProcessEnemySkillTargetRange:
  4. ? Btw, whom have more sockets they should know if they use an external addon that is different and doesn't compatible with their codes, so they need to change it. This is a rule on every each addon.
  5. Useless or not I don't mind, the code is there in the public source as in the official binary still, as you can see on the picture so I just put it there too. Btw the metin2 private server owners or devs are not rocket scientists, so they don't really know which packet is in used neither which is not, oh yeah they don't even care them .
  6. Hello, Small performance snippet from the official binary after some reverse engineering. I did not make huge tests, but it seems just fine for me, if you have any problem, let me know in comment below. 1.) Get rid of every __LoadMap function + calls from the introLoading.py file. Also you can completly remove the function net.Warp as well. 2.) Modify the following functions in the CPythonNetworkStreamPhaseLoading.cpp this way: bool CPythonNetworkStream::RecvMainCharacter() { // [..] Add to the bottom the Warp function Warp(MainChrPacket.lX, MainChrPacket.lY); SendClientVersionPacket(); return true; } bool CPythonNetworkStream::RecvMainCharacter2_EMPIRE() { // [..] Add to the bottom the Warp function Warp(mainChrPacket.lX, mainChrPacket.lY); SendClientVersionPacket(); return true; } bool CPythonNetworkStream::RecvMainCharacter3_BGM() { // [..] Add to the bottom the Warp function Warp(mainChrPacket.lX, mainChrPacket.lY); SendClientVersionPacket(); return true; } bool CPythonNetworkStream::RecvMainCharacter4_BGM_VOL() { // [..] Add to the bottom the Warp function Warp(mainChrPacket.lX, mainChrPacket.lY); SendClientVersionPacket(); return true; }
  7. Start with the basics to learn the logic behind of programming, exercise a lot, without basics you can do nothing. Don't jump into the deep water if you can't swim.
  8. Revert the codes back and don't do what you don't understand.
  9. M2 Download Center Download Here ( Internal ) Yo' folks! Here is a small gui extension from the official v20.4.0 binary, which is kinda trash, but can be useful for some guis to point out some stuffs. Webzen finally started to use their old codes, this is one of they have never used before. Preview: Animation is not binary sided, it's via python, the testScript.py is attached, the injection is on you, there are many examples how to test a script, there are also many loaders to it. Have fun, Download
  10. BR v20.4.0 whole client (Metin2 Download) Contents/news: root+meta, locale+protos, useless dumped binary for RE/debug Battle Royale assets. Challenge Minigame assets - Stone, Paper, Scissors game ps.: I just wanted to put the patches only, but the patcher rewrote the attributes of the new files(dates and so on) so I didn't know which files have been updated. edit:
  11. It depends how you want to do it, mixed with items you want to place for sale and some items for showcase only, or all the items are just for showcase. Both ways are possible, but you can wait until 2038 that somebody will code it for you especially for free ?. The principle of operation can be simple or complex, depends how you code it. Basically the best option is when you set an extra variable for every each item, that it is sellable or not, then block the buy function on those items where that flag has been set. Also you can mark those items on clientside, to let the players see those items are not for sale. For a last word, hire a dev if you can't code this for yourself.
  12. I would recommend to extend the function with a hint as well then when the problem is fixed revert the codes back to the original. By the way this SelectItem sometimes messes up some codes, as you can see in the official codes about the sashes, you need to select an another item(the drained) to query some informations about that, then to not mess up the rest of the codes what comes after the external function call, you need to select the original vnum back after you are done. This is just an example about the weakness of the SelectItem function, highly possible none of you are using this except me ?. Also might be the problem is not because of these kind of codes, I just wanted to let you know about this. And the hint I started to talk about: #define BULLSEYE PyObject * itemSelectItem(PyObject * poSelf, PyObject * poArgs) { DWORD dwItemIndex; if (!PyTuple_GetUnsignedLong(poArgs, 0, &dwItemIndex)) return Py_BadArgument(); #ifdef BULLSEYE char* szHint; if (2 == PyTuple_Size(poArgs)) { if (!PyTuple_GetString(poArgs, 1, &szHint)) return Py_BadArgument(); } #endif if (!CItemManager::Instance().SelectItemData(dwItemIndex)) { #ifdef BULLSEYE TraceError("Cannot find item by %lu hint: %s", dwItemIndex, szHint); #else TraceError("Cannot find item by %lu", dwItemIndex); #endif CItemManager::Instance().SelectItemData(60001); return Py_BuildValue("i", FALSE); } return Py_BuildValue("i", TRUE); } You might have some syntax errors, my function looks a bit different then the public ones, after I reversed this from the official and built my own pythoncore with fixxed errors about the unsigned long stuffs. But you can see in the macro the hint stuff. PS: Totally unnecesary the PythonChat, it will write to the syserr anyways. After this you just start replacing all of your calls in your python files like: def GetRefineSuccessPercentage(self, scrollSlotIndex, itemSlotIndex): if -1 != scrollSlotIndex: if player.IsRefineGradeScroll(scrollSlotIndex): curGrade = player.GetItemGrade(itemSlotIndex) itemIndex = player.GetItemIndex(itemSlotIndex) item.SelectItem(itemIndex) def GetRefineSuccessPercentage(self, scrollSlotIndex, itemSlotIndex): if -1 != scrollSlotIndex: if player.IsRefineGradeScroll(scrollSlotIndex): curGrade = player.GetItemGrade(itemSlotIndex) itemIndex = player.GetItemIndex(itemSlotIndex) item.SelectItem(itemIndex, "uiRefine.GetRefineSuccessPercentage") Or also you can discover it via this: # utils.py import inspect def getLineInfo(): stack = inspect.stack() return "%s.%s at line %d" % (stack[1][1], stack[1][3], stack[1][2]) This requires the inspect module which also requires the following modules: dis opcode string token tokenize So with this you just need to call the utils.getLineInfo() as the 2nd argument of the item.SelectItem function item.SelectItem(itemVnum, utils.getLineInfo()) and also the utils has to be imported to the file where you use the item modul for selecting an item during the debugging. DID NOT TESTED ON CYTHONIZED CODES, AND NEVER WILL, cython is not for debugging anyways
  13. GF v20.3.4 patch (Metin2 Download) Contents: root+dump, locales+protos, useless dumped binary for debug/RE only Reworked FindM event implemented Other unknown modifications
  14. On a well managed server this cannot happen. Players are not able to get polymorph item with empty sockets. Anyways, better to make sure about it, thanks for your comment.
  15. Can we see the quest-file which cause the problem?
  16. GF v20.3.3 patch (Metin2 Download) Contents: Some re-exported, new mob models. Simple GUI for WorldBoss event, Flower event. Removed FindM event perhaps by mistake. New skill icon for wolfman(?) Probably soon the new skills are coming too. root+dump, locales+protos
  17. Probably he messed up the dump_proto/protoreader.
  18. I know you are good at this mapping stuff, but one thing doesn't leave me calm. Don't get me wrong but I will never understand this behavior to a free release.. Download the downloadlink which is password-protected. Then the link is a shortened link which downloads another file with another password. Why do you waste your time on this ? To hide your website? - It can't be true, because literally readable where the file came from in any download manager. Just for fun?
  19. Is there any item in your item table which has no value in the window column?
  20. Just remove the call of SetScale function and change the arguments of the SetDiffuseColor, to SetDiffuseColor(m_Color.r, m_Color.g, m_Color.b, m_Color.a);
  21. Pick one from the last two: To everyone: If you are running a server and this(color argument) is a big deal to figure out what to do with it, it's time to learn some programming basics, is not terrifying neither biting you
  22. SetDiffuseColor(float fr, float fg, float fb, float fa); Just unpack the color into 4 variables if you don't have the function which supports the packed color. The scale is not important unless you have implemented for every each class. I have them, this why I put there just for "in case".
  23. Select the main folder. Hold down the left shift button, then with a sudden movement press the delete button and click yes. 100% works.
  24. Nice one, but there is nothing better for python files than cythonizing them. Even tho that xrange could be replaceable with N * chr(9)
×
×
  • 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.