-
Posts
83 -
Joined
-
Last visited
-
Days Won
5 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Johnny69
-
-
Good job.
One sugestion: Use a BYTE for all filters or a 16 bits type (if it's not enough). You can easly set on every bit of the variable a flag value (0 = not set, 1 = set) and it's more optimized and easier to store in config.
- 1
-
The leader of the group shoud not be set with a role.
Create a new bool and set the leader with that.
- 2
-
I guess you disabled _IMPROVED_PACKET_ENCRYPTION_ and the bug appear after some days with the server online ?
-
Are you sure your db port is in written in firewall and can be accesed by localhost only ?
Those headers you wroted does not exist in game->db connection so my guess is that somebody is sending random packets in your db.
There is a fix in source code (CPeerBase::Accept) for the problem above but I recommend to add that port in firewall too.
-
Best fix ever. No memory leak for me.
Thanks.
- 1
-
Are you sure is a special inventory problem ?
What shop do you use ?
If you use Great offline shop there you have your answer to the problem.
Also, do you have items with owner_id 0 in player.item ?
-
That photo is clearly edited in photoshop or some software.
Also, doesn't 5%-50% means 100% ?
Also, can't you write 70% like 0%-70% ?
- 1
-
Why you reset the position in stack to 0 on game.py ?
This will reset the chat message to 32 messages back (if the stack is full, first message you typed anyway) and a user actualy need his last message, not 32 messages ago message.
- 1
-
In theory it can be done, but you need to create a tool to do that because if you try to do it manualy it will take a very long time for a big quest.
-
Chromium documentation and source are public and is not that hard to implement it, if I have time in the next day i will post a tutorial.
- 2
-
As I said in README file, align it wasn't done.
I had a little free time today and I did the align too: (sorry for gif inspiration)
https://metin2.download/picture/naEcD4QuxZVFb2AQM37Odaq5e07Lgds8/.gif
If something is wrong with the code please send me a private message or reply in this topic and I will fix it.
New link:
PS: Replace the whole code because it has small changes and they are necessarily.
- 15
- 1
- 1
- 7
-
Ymir developers are kind of stupid (or at least the ones that work with metin2).
I saw some code from the last months in root and binary and it's bad written, without logic.
If is that wrong in client side imagine how it's like on server side.
They only thing I think about those function splited is that they probably wanted to make the functions shorter
- 1
- 1
-
13 hours ago, xP3NG3Rx said:
If you place a text below of the textline from its height, where will it shown?
For example you have this text object:
self.text1.SetPosition(30, 36) self.text1.SetText("This is a\ntext just to\nbe sure it\nworks.") self.text1.SetLineHeight(20)
self.text1.SetPosition(30, 36) self.text1.SetText("This is a\ntext just to\nbe sure it\nworks.") self.text1.SetLineHeight(20)
And another one like this way:
self.text2.SetPosition(30, self.text1.GetPosition()[1]+5) self.text2.SetText("This one is good")
self.text2.SetPosition(30, self.text1.GetPosition()[1]+5) self.text2.SetText("This one is good")
I'm guesing you are talking about GetLocalPosition(). That function return rect left and top (left top corner).
The right code it will look like this:
setYPosition = self.text1.GetLocalPosition()[1] setYPosition += self.text1.GetLineHeight() * self.text1.GetTextLineCount() self.text2.SetPosition(20, setYPosition)
Or you can use GetTextSize() function like this:
self.text2.SetPosition(20, self.text1.GetLocalPosition()[1] + self.text1.GetTextSize()[1])
-
Before I start it I want to mention that this is an alternative for what @Mali61 posted. You can use either one.
SpoilerDownload link:
PS: Please read README file
- 78
- 2
- 1
- 3
- 9
- 1
- 31
-
If you split only by "\n" and not "\\n" you won't need to add that check for editline.
Also I know default open file function from python 2.7 escape \n automaticaly but you can fix the \n in two ways: (I'm talking about locale_game / locale_interface)
1. replace all "\\n" in line with "\n"
2. open the file with codecs.open and encoding "string_escape"
One ideea though for your code: split the code where the text is initialized and after this save only the positions where \n was in a vector, after that in Render function you can use the position vector to rearange the text y position. Something like this (https://metin2.download/picture/f9LxxwZljyoXvU1nuSq3rwgoHx7xQYov/.png)
PS: I don't know how official did it but they seem stupid
Good job
- 1
- 1
- 2
- 2
-
31 minutes ago, masodikbela said:
This is not a problem, because if GameWindow is not leaking (and also the button class itself is not leaking) the button will be deleted after the deletion of GameWindow, so there is no need to do xy = None or del xy in the __del__ method. Its generally not necessary at all, the reference number won't increase by setting parent of a window, it increases when you save them into a variable of a class or into a global var.
Here is an example from the python command line:>>> class stuff1(object): ... def __del__(self): ... print "del1" ... >>> class stuff2(object): ... def __del__(self): ... print "del2" ... def __init__(self): ... self.something = stuff1() ... >>> a = stuff2() >>> del a del2 del1 >>>
>>> class stuff1(object): ... def __del__(self): ... print "del1" ... >>> class stuff2(object): ... def __del__(self): ... print "del2" ... def __init__(self): ... self.something = stuff1() ... >>> a = stuff2() >>> del a del2 del1 >>>
Yeah, you are right. I saw that shit that I said with the buttons at some server and I thought they are created in game.py.
It was something like: "import test" in game.py
and test.py with this content like this:
-
Very usefull if you don't want memory leak (at least from python side).
Also you can mention that objects created with no parent need to be deleted manually. (I saw some people creating buttons and stuff directly from game.py and never setting a parent or deleting them).
Good job.
-
Your game have a lot of memory leak and when the ram reaches 4GB the core crashes with an error like: "bad_alloc".
You need to solve that memory leak or disable the system that cause it. (My guess is that shit offline shop Great)
If you want to remove 4GB ram cap compile the game on x64 (not that easy).
-
Well, maybe the value is ok but you print it with the wrong format (%d maybe).
Long long variables need to printed with %lld format.
- 1
-
Try it like this:
long long playerOfflineYang = 0; long long playerOfflineWon = 0; // Add LIMIT 1 SQLMsg * pkMsg(DBManager::instance().DirectQuery("SELECT collected_yang, collected_won")); SQLResult * pRes = pkMsg->Get(); if (pRes->uiNumRows > 0){ MYSQL_ROW row = mysql_fetch_row(pRes->pSQLResult); if(row) { str_to_number(playerOfflineYang, row[0]); str_to_number(playerOfflineWon, row[1]); } }
-
How do you convert data from MYSQL_ROW to long long in your code ?
-
55 minutes ago, Lariya said:
- It's not up to Clientside Files (I Testet with the last files from official)
Who said official servers fixed this "bug" ?
Is not a server source problem.
Hint: .msa
-
Oh, I don't think opening a file on actions like damage or get gold is very good for the game.
You better use a direct query if you don't know how to cache the data.
I think a direct query will be way less time consuming and better for the server.
-
In my opinion official search shop is ugly and bad written.
Why don't you search a developer that can create you a unique search shop and (maybe) well writen ?
Running the game on dedicated gpu
in Community Support - Questions & Answers
Posted
That's because your client have directx8 (it's an entire explanation somewhere on stackoverflow).
That server you saw that run directly on GPU have directx9 (you talking about wom probably).
I tried to force the metin on GPU some time ago but you simply can't do it without upgrading to directx9.