Jump to content

Ikarus_

Developer
  • Posts

    402
  • Joined

  • Last visited

  • Days Won

    20
  • Feedback

    0%

Everything posted by Ikarus_

  1. It works yeah, but it is really slow. I would suggest you something much faster. int number(int v1, int v2) { thread_local std::default_random_engine _Generator; thread_local bool _Init = false; if (!_Init) { _Init = true; std::random_device dev; _Generator.seed(dev()); } std::uniform_int_distribution<int> distribution(v1, v2); return distribution(_Generator); } It can totally replace the old "number" function from libthrecore (you have to remove the macro defined inside libthrecore/inlude/utils.h) Here's a small test showing how my function is faster: [Hidden Content] Execution time in seconds (1.000.000 function calls): number time : 0.0718687 random_drop time : 17.9117
  2. If you really want helps you have to show some code. for example by picking in game/src you have to show us char.cpp char.h packet.h and by picking from Client/UserInterface you have to show us PythonTextTail.cpp PythonTextTail.h InstanceBase.h InstanceBase.cpp Packet.h without reading code we don't get any way to help you
  3. For example? I used it for a long time and i can affirm that is stable, so if you got problems about this fix probably you got some change that is conflicting with it. If you need you can post your problems and we could search for a solution.
  4. Added an important disclaimer at the beginning!
  5. The #else part is the original one inserted between #else and #endif to make it work as it was before apply the fix in case of for some reason you need to disable the fix. Honestly i don't think it make any difference since it was disabled by the fact the macro __ENABLE_SHAMAN_ATTACK_FIX__ was defined. In short i don't think the fact you removed the #else is the reason why now it is working for you. You can check it by adding again the removed part and test if the fix is still working.
  6. check well the define arrives everywhere. try adding this at the beginning of "EterBase/Stdafx.h" #include "../UserInterface/Locale_inc.h"
  7. I m stopping the sales for 1 month (or few more) to give me time to complete the long queue of installations, and to work on some new product and complete the stuffs i m going (metin2 unrelated stuffs). The service is not closing, the support is still available for any kind of problem you can text me on my socials (skype, discord, telegram, or metin2 forums). See you next month!
  8. Yeah so if you want an help i think you should post the code... otherwise i can't check nothing xd
  9. Did u notice this piece of code? def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration): print "BINARY_NEW_AddAffect", type, pointIdx, value, duration if type < 500: #<<-- return #<<-- Check if the type of the affect you are not seeing is over 500..
  10. It looks like it is getting "false" as an int somehow. I ve no idea why it is happening only to you. A dirty solution may be define a spaceship operator with bool and int at the beginning of AsyncSQL.h (before the includes). Since i can't reproduce the error i m not able to check if my propose is valid (and i neither tried to compile the code tbh). inline constexpr auto operator<=>(const bool x, const int y) { return x <=> bool(y); } to be honest i don't like it, i hate it, and i ve many doubts that it will work. Another ugly way would be to use bool(false) instead of false where is getting the error.... but i don't really like to modify std files.. A test that i think i may try to suggest you use to move the standard files included in AsyncSQL.h to the beginning of the file (move them above the other includes, i ve seen your files in stackoverflow question you made) EDIT: I ve found the cause of the error, it is a macro in libthrecore/stdafx.h and following my suggestion of move up the standard headers and move down the user defined headers you will solve your error. here the macro is destroying the standard code: #ifndef false #define false 0 #define true (!false) #endif
  11. Sorry for the squat, but what do you want others to know about what you have in that source?
  12. did u think to look at the expand button you already got? xd i guess it would be a good idea
  13. It depend where you need to add it... e.g. add button in inventory -> uiinventory.py add button in taskbar -> uitaskbar.py add button in minimap -> uiminimap.py etc etc
  14. Dangling pointer, it may be due to the special storage/inventory if you got it
  15. ScriptWindow (as the name suggests) are window created using scriptfiles (you can find a lot of them in uiscript and in locale/xx/ui). These script files are (in short) a dictionary of items with settings of certain keys used by PythonScriptLoader class to assign to the elements the properties linked with the keys. Let's show here an example: All the scripts have local variable named window (the dictionary that contains all the settings). The first dictionary's (window) keys describe the scriptwindow properties, the window name, the height/width, the x/y where the window spawn, the style of the window (in this case moveable mean the window can be moved with the mouse and float mean the window has an order how the children are show and they can be moved over other children using SetTop). the window usually has a "children" key that describe a tuple of dictionaries. The tuple start with "(" and end with ")," and it contains other dictionaries that describe the children properties. and example is the "Board" child that is a "board_with_titlebar" element (so a board with a titlebar and a close button on the top side). the "type" key is really important, it describe what kind of element is going to be create. You can read all types available and all keys you can use to assign properties to the elements in the class PythonScriptLoader (especially in def LoadChildren) in ui.py. The self.GetChild you mentioned is used to obtain the element using its "name" property. The script window are a really clever way to make a window, but it has some limit. The window made by using the script window can contain in the script only the "static" elements, the elements that are always created with the board. To create dynamically the elements you have to code them and to assign the properties using the class methods defined in ui.py An example on how you can create a button would be: import ui ... ... ... class MyBoardExample(ui.Window): ... ... ... ... def LoadDynamicElements(self): race = player.GetRace() race_image_default = "d:/ymir work/ui/game/race_%d_default.sub"%race race_image_down = "d:/ymir work/ui/game/race_%d_down.sub"%race race_image_over = "d:/ymir work/ui/game/race_%d_over.sub"%race self.MainCharRaceButton = ui.Button() self.MainCharRaceButton.SetParent(self) #giving the parent to link the button the main board self.MainCharRaceButton.SetPosition(105, 456) #giving position using local coordinates self.MainCharRaceButton.SetUpVisual(race_image_default) #setting up visual (the image shown when button is in default state) self.MainCharRaceButton.SetDownVisual(race_image_down) #setting down visual (the image show when button is pressed) self.MainCharRaceButton.SetOverVisual(race_image_over) #setting over visual (the image shown when mouse come over the button) self.MainCharRaceButton.SAFE_SetEvent(self.__OnClickMainCharRaceButton) #setting an event to the button defined above self.MainCharRaceButton.Show() #the show is necessary to see the button In the e.g. i created a button that change its visual based on the player character race. WARNING: the code above wont work since the images and the event are invented and they don't exist
  16. Doest it happen only with players? I think you should show here some code.. if it happen only with players you should show all the ActorInstance class files and the InstanceBase files.
  17. Fix updated with one more check in input_main.cpp
  18. It is missing the initializing of these two values added in char.h. They got a random value if you don't set it when CHARACTER object is instancied i suggest to add something like : //SEARCH void CHARACTER::Initialize() { //ADD UNDER analyze_protect = 0; analize_protect_count = 0;
  19. I m available on discord for who want help IkarusDeveloper#3677
  20. Hi guys, There's a guy that is blackmailing all servers that are using my offlineshop. Not just my clients, but also those who downloaded it from some idiot's leak. I'm sharing the fix here as 60/70% of the servers currently open use my shop. Fix: Random User : Why are u sharing it using metin2dev? Answer: I m bored to see this guy make money by blackmailing. Random User part2: Is it right to share this fix even with those who are not your customer? Answer: I honestly think that anyone who uses the shop without permission, taking it from sources different from me, is not worthy of help from me, however I can't even allow so many people to be fooled by this idiot boy. Random User part3: Do you know who is blackmailing the p.server founders? Answer: Yes, i know his discord account : Mădălin#2332 I recommend to don't pay him at all. I would like to know other accounts of this guy, if anyone know some please report to me. I also have the proofs about what i m talking. BIG DISCLAIMER: Test the code on a test-sever before to move it on a live-server. Thanks to @VegaS™ for the tip about cooldown
  21. The first numbers are used when your level is 15 (or more) levels higher than monster level (the number 1 means that the basic chance is reduced by a factor 1/100 ). The last numbers are used when your level is 15 (or more) levels lower than monster level (the number 1 means that the basic chance is increased by a factor 180/100) the numbers in the center (100) is the neutral value (doesn't affect the basic chance to drop the item)
  22. using : #pragma comment(lib, <library-name>.lib ) add it to userinterface.cpp (replace <library-name> with the name of your libjpeg obv)
  23. You could download cryptopp library code from the official website. You will find the .sln file (Solution) which is to be open with visual studio. Once You open it You can compile it. Take care to check the Code mode generation to be set on MT for Release and MTd for Debug. You can find it by clicking right click on cryptlib project > properties > C++ > Code generation > runtime library After compiled the library move it in your extern/lib and move all .h files (aka headers) on your extern/include/cryptopp (headers and libs are always to be used from the identical version of the library source code) Hope i ve explained enoght clearly but for a short recap: Download the library source code from the official website. Open the file .sln with visual studio. Check the code generation mode as explained above. Compile the library and move it on extern/lib. Move the headers from the library's source code on your extern/include/cryptopp. Compiler your game again and enjoy.
×
×
  • 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.