-
Posts
232 -
Joined
-
Last visited
-
Days Won
7 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Cataclismo
-
-
1) First part, Client Binary. UserInterface folder:
In InstanceBase.cpp add
const char * CInstanceBase::GetLevelString() { char * str = new char[3]; sprintf(str,"%d",m_dwLevel); return str; }
in InstanceBase.h addconst char * GetLevelString();
Next in PythonNetworkStreamPhaseGame.cpp add inif (pCharacterInstance) { ... }
CPythonExchange::Instance().SetTargetLevel(pCharacterInstance->GetLevelString());
Open PythonExchange.cpp and addvoid CPythonExchange::SetTargetLevel(const char *name) { strncpy(m_victim.level, name, 3); } char * CPythonExchange::GetLevelFromTarget() { return m_victim.level; }
In PythonExchange.h insidetypedef struct trade { ... }
afterchar name[CHARACTER_NAME_MAX_LEN + 1];
add:char level[3];
elsewhere in PythonExchange.h after:void SetElkMode(bool value);
add this:void SetTargetLevel(const char *name); char *GetLevelFromTarget();
In PythonExchangeModule.cpp after:{"isTrading", exchangeisTrading, METH_VARARGS},
put:{"GetLevelFromTarget", exchangeGetLevelFromTarget, METH_VARARGS},
After:PyObject * exchangeGetElkMode(PyObject * poTarget, PyObject * poArgs) { return Py_BuildValue("b", CPythonExchange::Instance().GetElkMode()); }
add:PyObject * exchangeGetLevelFromTarget(PyObject * poTarget, PyObject * poArgs) { return Py_BuildValue("s", CPythonExchange::Instance().GetLevelFromTarget()); }
Binary part is ready.2) Python part now.
Decrypt root with EterNexus or anything else you want and in:
uiexchange.py, find this:
def OpenDialog(self):
and replace all what's in there and put this:def OpenDialog(self): self.TitleName.SetText(localeInfo.EXCHANGE_TITLE % (exchange.GetNameFromTarget() + " " + "(" + (exchange.GetLevelFromTarget() + ")"))) self.AcceptButton.Enable() self.AcceptButton.SetUp() self.Show()
3) Ready. Now you have level in trade. An example:https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif/
Consider using [ code ] tag next time.
Care to Python tabulation.
Nice tutorial, anyway.
-
There's no such function. You can't do it. You can only teleport players. I guess you want something like MOBA's auto-pathing system?
-
There are suposed to be spaced blocked I am saying about this
The item 18009 is suposed to allow only 6 but you can use the bloched too.
That does my function. Allows any belt to be moved anywhere because I though that this is what you want. Revert to the original code if you want them blocked.
- 1
-
You did it wrong. Replace whole function with mine.
Replace
static bool IsAvailableCell(WORD cell, int beltGrade /*int beltLevel*/) { //const TGradeUnit beltGrade = GetBeltGradeByRefineLevel(beltLevel); const TGradeUnit* ruleTable = GetAvailableRuleTableByGrade(); return ruleTable[cell] <= beltGrade; }
with
static bool IsAvailableCell(WORD cell, int beltGrade /*int beltLevel*/) { return true; }
Ok now it works but how i block the spaces he cant use I make a picture too see.
My function allow the belts to be moved anywhere. The player can put any belt anywhere and at any level. There's no limit. You wanted to make with limits? Explain exactly what you want.
- 1
-
You did it wrong. Replace whole function with mine.
Replace
static bool IsAvailableCell(WORD cell, int beltGrade /*int beltLevel*/) { //const TGradeUnit beltGrade = GetBeltGradeByRefineLevel(beltLevel); const TGradeUnit* ruleTable = GetAvailableRuleTableByGrade(); return ruleTable[cell] <= beltGrade; }
with
static bool IsAvailableCell(WORD cell, int beltGrade /*int beltLevel*/) { return true; }
- 1
-
edit;
In belt_inventory_helper.h find
static bool IsAvailableCell(WORD cell, int beltGrade /*int beltLevel*/)
and edit the function like this:
static bool IsAvailableCell(WORD cell, int beltGrade /*int beltLevel*/) { return true; }
I think this will solve your problem.
- 1
-
thanks
So the car can only have values 1 and 0 , we understand Yes I saw that in some file is found and return false return true ... Can you explain to that?
You could better read a book.
There's two types of return:
int add(int a, int { return a + b; }
The above return an int value, as specified in the declaration. You CAN'T return other types.
void test(int a, int { int c = a + b; return; int d = c + a; }
The above return will not return anything and will stop the execution of function. That means that
int d = c + a;
will not be executed. It will stop at return;
Note: Returning a value also stops the function execution.
Returning true or false is the same thing, but the declaration of your function is of type bool:
bool function(int val) { if (val == 2) return false; else return true; }
or simplier
bool function(int val) { return (val == 2); }
- 1
-
I need help over here
Screen 1:
https://metin2.download/picture/sHfmayp69Q9iOFrM8OwO22Eo0yt7S8rb/.png
Screen 2:
https://metin2.download/picture/1JOksIv8PIt7WVNOOXW4k5T4dgMsmAK9/.png
Thanks in advance.
Right click TorrentPatch project, go to Properties and here click on Build Events and delete everything that you find in Command Line.
Thanks worked i have a last error i think
screen: https://metin2.download/picture/6K7X9V569oc0eIOF4VQVloQ6tguMjtdi/.png
On TorrentPatch project, in Patch folder you will find TorrentPatch.cpp. Go to line 234 and make a print screen with the code around that line.
-
I need help over here
Screen 1:
https://metin2.download/picture/sHfmayp69Q9iOFrM8OwO22Eo0yt7S8rb/.png
Screen 2:
https://metin2.download/picture/1JOksIv8PIt7WVNOOXW4k5T4dgMsmAK9/.png
Thanks in advance.
Right click TorrentPatch project, go to Properties and here click on Build Events and delete everything that you find in Command Line.
- 1
-
Nope.
-
0413 00:21:02685 :: introLogin.py(line:566) introLogin.LoginWindow.__LoadScript (introLogin.c:11073) ui.py(line:2792) ui.PythonScriptLoader.LoadScriptFile (ui.c:67759) LoginWindow.__LoadScript.LoadObject - <type 'exceptions.KeyError'>:'window' 0413 00:21:02685 :: ============================================================================================================ 0413 00:21:02685 :: Abort!!!!
some error im sure about this introLogin.py(line:566) look at what you have there you should at least know what is the reason if the bug (btw the smallest error might cz the client to crush so be carefull)
introLogin.py
def __LoadScript(self, fileName): import dbg try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, fileName) except: import exception exception.Abort("LoginWindow.__LoadScript.LoadObject")
ui.py
def LoadScriptFile(self, window, FileName):
Body = self.ScriptDictionary["window"] self.CheckKeyList("window", Body, self.BODY_KEY_LIST) window.ClearDictionary() self.InsertFunction = window.InsertChild
-
0413 00:21:02685 :: introLogin.py(line:566) introLogin.LoginWindow.__LoadScript (introLogin.c:11073) ui.py(line:2792) ui.PythonScriptLoader.LoadScriptFile (ui.c:67759) LoginWindow.__LoadScript.LoadObject - <type 'exceptions.KeyError'>:'window' 0413 00:21:02685 :: ============================================================================================================ 0413 00:21:02685 :: Abort!!!!
-
Yes, it's ok I guess.
-
I am building my game file using -g flag, but when I am trying to run the game using gdb I get the message: no debugging symbols found.
Also, if I am trying to use game.core it says that this file does not exists.
I am building the game under 32-bit machine and running it on a 64-bit machine. I don't have -s flag.
You need to read the core as i386 (x86). You can use:
set gnutarget i386-marcel-freebsd file game core game.core [...]
I've tried under the same machine where I compiled the core and I got same messages.
-
I am building my game file using -g flag, but when I am trying to run the game using gdb I get the message: no debugging symbols found.
Also, if I am trying to use game.core it says that this file does not exists.
I am building the game under 32-bit machine and running it on a 64-bit machine. I don't have -s flag.
-
Type in the console
find /usr -name '*.cnf'
U will see location of mysql config files
Copy my-small.cnf to /var/db/mysql
Add to it
slow_query_log = ON slow_query_log_file = "/location/slow_query.log
and next restart mysql
Istny, atm this is my "my.cnf" what you think about? Could we improve it for a better performance with Metin2 and MariaDB 10?
PS: I use the large instead of the small
PS2: I will can apply this file only tomorrow after run the SMART test.
Hm... one of my friends have this issue too with mysql and the cause is the website. It has about 10kkk items on the database (or more) and about half million characters and when the ranking is loading (the web page) mysql server start using a lot of CPU and RAM.
Or maybe you're DDoS'ed. I don't know for sure. Change your MySQL port and see what happens. Also, change your website for a while with a simple one or another site which you know is good.
- 1
- 1
-
Oh, wow. I tought maybe my quests are the problems, but I think that's the reason for my server crash...
Thank you, Think.
Not going to get into how its performed for obvious reasons.std::out_of_range?
-
Please help me.
exchange.cpp:429: error: expected unqualified-id before 'for'exchange.cpp:429: error: expected constructor, destructor, or type conversion before '<' tokenexchange.cpp:429: error: expected unqualified-id before '++' token429= for (i = 0; i < EXCHANGE_ITEM_MAX_NUM; ++i)What is that "429="? Remove it o.O
-
extern void BroadcastNotice(const char * c_pszBuf, bool IsBig = true);
Why aren't you setting IsBig to true ??
Because if you do that then all notices will be sent as big, even the notices sent with /n. We need the default value to be false, and only when we send notices with /b to tell the function that we want a big one.
- 2
-
Your HDD maybe. It happened to me. Check the space, available space and usage. Also, MySQL server can cause lag. I am not sure.
-
The function from the CHorseRider class tells you how it gets the horse level o.O
-
I don't understand the thing with "overflow".
Also, what's your nationality, Timasu?
-
Ofc you dont have it you fixed it with that xD
Mine is just a refined version of the one CBaran didnt provide in his first edit.
He now edited his post and provided the "ugly" version with the nested if / else conditions and multiple for loops which i wanted to avoid.
Very ugly xD
-
I have 4 inventory page, but I've modified some things, I don't know if I have this bug or not
Then check your code.
@Think, Oh. That's nice.
Drop items from inventory
in Community Support - Questions & Answers
Posted
In char_battle.cpp find this:
and after
add this code:
Replace YOUR_MAPINDEX with the mapindex where you want items to drop. In switch replace the numbers with your items code.
Also, the items will be dropped only if the killer is another player.