-
Posts
84 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Evor
-
-
@Kronzu
Search for QuestionDialogItem2 and paste here ur py-class. (my guess is uicommon.py)
Detail:
Class QuestionDialogItem2 dosen't have dropType attribute. -
Hello.
Does anyone have clean database sql files?
Regards. -
Is it possible to extract new cython modules?
I'm curious if there is any nifty way of doing so. -
Hello folks.
I encountered a very strange problem with the itemtext. When i drop any item it is working for a while, but one moment and it become like this:How can i fix this issue?
I haven't any idea.
Regards. -
He want's to disable moving certain items (with antiflags) on taskbar, so players cannot use them by pressing hot keys.
For me, it's matter of client-side edit. -
Same here, maybe cyberghost permit only some countries to their offer?
-
Hello folks.
Today i will show you have to solve some more or less serious bugs.
P2P BASHPANEL:
First of all, well mentioned bashpanel.
The main cause of this bug is the fact, that game is opening the connection on the Public IP instead of Internal IP.
First of all, let's talk about what P2P connections are.
P2P is a way for all cores to communicate with each other.
The main problem is that, whenever core receives a P2P packet, it doesn't check, if the sender is another core. That's a problem, becouse u can spoof the packet (for ex. using Infinity BashPanel, or simply any packet forge).
The fix is really simple and already implemented, but was unnecessarliy commented out.Let's find: (in main.cpp)
if ((p2p_socket = socket_tcp_bind(g_szPublicIP, p2p_port)) == INVALID_SOCKET)
As we see, p2p is deafult for the PublicIP, but above that, we can see:
// if internal ip exists, p2p socket uses internal ip, if not use public ip //if ((p2p_socket = socket_tcp_bind(*g_szInternalIP ? g_szInternalIP : g_szPublicIP, p2p_port)) == INVALID_SOCKET)
and that's the way how it should look.
To apply it, simply make it look like this:// if internal ip exists, p2p socket uses internal ip, if not use public ip if ((p2p_socket = socket_tcp_bind(*g_szInternalIP ? g_szInternalIP : g_szPublicIP, p2p_port)) == INVALID_SOCKET) //if ((p2p_socket = socket_tcp_bind(g_szPublicIP, p2p_port)) == INVALID_SOCKET)
instead of:
// if internal ip exists, p2p socket uses internal ip, if not use public ip //if ((p2p_socket = socket_tcp_bind(*g_szInternalIP ? g_szInternalIP : g_szPublicIP, p2p_port)) == INVALID_SOCKET) if ((p2p_socket = socket_tcp_bind(g_szPublicIP, p2p_port)) == INVALID_SOCKET)
First bug fixed.
Another way (for older revisions) is to use IPFW or other PacketFilters managers to block WAN connection on P2P ports.
DB Account BUG:
Let's move on.
When DB port is Publicly available, user, which knows the account id, can simply use it.
To fix it, let's make a "brute" fix, another way (using older revisions) is to write:
BIND_IP: 127.0.0.1
in ur config file, but let's fix it more quietly.
Simply move to ClientManager.cpp in DB, and change it like so:
from:if (!CConfig::instance().GetValue("BIND_IP", szBindIP, 128)) strlcpy(szBindIP, "0", sizeof(szBindIP));
to:
if (!CConfig::instance().GetValue("BIND_IP", szBindIP, 128)) strlcpy(szBindIP, "127.0.0.1", sizeof(szBindIP));
That's it. Fixed.
Kind regards.
- 2
- 10
-
You didn't have to give the actual link to this kick hack.. now i have to make lib for 34k coz kids are playing around^
Having the information public is the fastest way to get people to take action against it and the fix is in the thread. If you're able to create libs then it should be no problem for you
Also having the hack we could test if the c++ fix works
give me the hack for test in my server? Thank you
password: metin2dev
only for testing purposes only and i don't know this works because i didn't use it
While reading source, i think that, it is an older version of kick hack, because of using WHISPER instead of MESSENGER (friend adding.).
Regards..
- 1
- 1
-
Hello.
Recently, my server is doing really strange things.
The main problem is that after several minutes players got randomly disconnected.I mean, they are logged in the first channel, in the first map of empire and randomly they got disconnected.
I'm unable to debug game core (more than 1000 players).
My syslog showed only that:
http://pastebin.com/Sj3ekt7w
I removed sequence checking:
if (m_pPacketInfo->IsSequence(bHeader)) { BYTE bSeq = lpDesc->GetSequence(); BYTE bSeqReceived = *(BYTE *) (c_pData + iPacketLen - sizeof(BYTE)); if (bSeq != bSeqReceived) { LPCHARACTER ch = lpDesc->GetCharacter(); if(!ch) { lpDesc->SetPhase(PHASE_CLOSE); return true; } } lpDesc->push_seq(bHeader, bSeq); lpDesc->SetNextSequence(); }
and i bump buffer size from 8192 to 9216.
I got really confused...
Kind regards,Evor.
-
Nova has an account here on nickname "Alpha". Ask him for further information.
-
Hello folks.
I don't know if it was "a feature" or not, but it was really annoying and it caused some bugs.
So, let's begin.
Firstly, we should go to the char.cpp (and we will stay here)
Now, let's find the ApplyPoint function and then certain cases..
case APPLY_MAX_HP: case APPLY_MAX_HP_PCT: { int i = GetMaxHP(); if(i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); float fRatio = (float)GetMaxHP() / (float)i; PointChange(POINT_HP, GetHP() * fRatio - GetHP()); } break; case APPLY_MAX_SP: case APPLY_MAX_SP_PCT: { int i = GetMaxSP(); if(i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); float fRatio = (float)GetMaxSP() / (float)i; PointChange(POINT_SP, GetSP() * fRatio - GetSP()); } break;
This part of code is written by Nova, which is used in novaline, but i know that some of you use it in other branches.
It is causing the main problem, we should change it to look like this:
case APPLY_MAX_HP: case APPLY_MAX_HP_PCT: { int i = GetMaxHP(); if(i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); } break; case APPLY_MAX_SP: case APPLY_MAX_SP_PCT: { int i = GetMaxSP(); if(i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); } break;
Done, now we should conern next problem, it will cause a disproportion between max_hp and current hp.
Moving on, we should find PointChange function (still in char.cpp).Then, find case POINT_MAX_HP and POINT_MAX_SP, and change it like that:
case POINT_MAX_HP: { SetPoint(type, GetPoint(type) + amount); int i = GetMaxHP(); int hp = GetRealPoint(POINT_MAX_HP); int add_hp = MIN(3500, hp * GetPoint(POINT_MAX_HP_PCT) / 100); add_hp += GetPoint(POINT_MAX_HP); add_hp += GetPoint(POINT_PARTY_TANKER_BONUS); SetMaxHP(hp + add_hp); float fRatio = (float)GetMaxHP() / (float)i; PointChange(POINT_HP, GetHP() * fRatio - GetHP()); val = GetMaxHP(); } break; case POINT_MAX_SP: { SetPoint(type, GetPoint(type) + amount); int i = GetMaxSP(); int sp = GetRealPoint(POINT_MAX_SP); int add_sp = MIN(800, sp * GetPoint(POINT_MAX_SP_PCT) / 100); add_sp += GetPoint(POINT_MAX_SP); add_sp += GetPoint(POINT_PARTY_SKILL_MASTER_BONUS); SetMaxSP(sp + add_sp); float fRatio = (float)GetMaxSP() / (float)i; PointChange(POINT_SP, GetSP() * fRatio - GetSP()); val = GetMaxSP(); } break;
Short description:
I'm using Nova method to calculate HP/SP ratio gain. It should prevent people from using it as a infinite source of hp (using affect.add(max_hp.. affect.add(hp... we would create another bug.)
Kind regards,
Evor.
@DISCLAIMERThis method was tested by me and my team. We find it fixing the whole problem, but whenever you find another bug, please report it.
Ratio calculation courtesy of Nova.- 1
- 10
-
Hello guys!
It is common that, whenever u want to use an old mob_proto, u need to rewrite mob_color column for every mob (serverside mob_proto dosen't include mob_color). I write this really simple python code to convert old mob_proto columns to a sql version of it. (Simply, insert that .sql file).
To do:
- Place your old mob_proto_dump.xml in a folder with converter.py- Remove first and last line of mob_proto_dump.xml
- Make sure that u have python installed. (no matter which version)
- Run it and save time
Spoiler## oldMobProto to sqlMobProto Converter ## Created by Evor. ## For personal use oldProto = open("mob_proto_dump.xml", "r+") newProto = open("mob_proto_color.sql", "w+") newProto.write("/* Converter by Evor */n") for line in oldProto: vnum = line.split("vnum=")[1].split(" name=")[0].replace(""", "") mobColor = line.split("mob_color=")[1].split(" />")[0].replace(""", "") if not int(mobColor) == 0: newProto.write("UPDATE mob_proto SET mob_color='%s' WHERE vnum='%s' ;n" % ## there is a space between end of mysql syntax and semicolom, becouse without it navicat has some troubles in inserting that. (mobColor, vnum)) oldProto.close() newProto.close()
Kind regards.
@Update.
Smaller code.- 9
- 3
- 5
-
Hm i see, so it is an error with setting variable.
By the way, did somebody rise the yang limit in exchange / private shop menu?
-
Hello.
Did somebody find out how to convert str (input) to a long long value?
Kind regards.In c++ afaik it is atoll, but i don't know if it is something for python.
In the worst scenario i should write a c++ func which converts it. -
Hello guys.
Did somebody already successfully migrate qc to new lua 5.2?
I have some problems with lexer, becouse it has changed a lot since lua 5.0.
I don't know have the lexer works now.
Help appreciated.
Kind regards. -
Hello.
I'm thinking about usage of matrix card.
For what it was initially designed?Kind regards.
-
Resolved.
- 1
-
After u prepered preprocessor.exe you simply make a .bat with command:
preprocessor.exe ReplaceTextureName "model_name.gr2" -output "model_name.gr2" -replace "string_to_replace" -to "string_after_replace"
Courtesy of Terenzo.
Removed.
Regards
- 1
-
That what's up.
Guys, keep up with such a good work.
Regards.
- 2
-
Vanilla, if u make a decision about publishing ur core, you should put it on some kind of git. I suppose github or bitbucket would be the Best.
Nevertheless we appreciated ur work.
-
No matter.
I simply have to recompile whole input_db.
-
Try to use mainline_sg instead of novaline.
This binary file was meant to use on mainline_sg server.Regards.
PS.
Novaline was already edited, mainline_sg is a clear revision same as mainline.
-
You should copy whole libmysql and libdevil from novaline to mainline.
After that it should compile easily.Regards
- 1
-
It was published long time ago on a polish forum too
- 1
TextureRender
in Community Support - Questions & Answers
Posted · Edited by Metin2 Dev
Core X - External 2 Internal
Hello,
stuck with proper UV maps caluclation.... (yeah, rectangle too complicated figure)
So, all in all i've got something like this:
with that:
On the other hand, i've got this:
with that:
I'm missing something, but this direct api makes me crazy.
All help gladly appreciated.
Regards!