Jump to content

SungmaHee Tower Official Servers (C++, Python)


Recommended Posts

  • Contributor
This is the hidden content, please

Alternative download links → 

This is the hidden content, please

 

Hi,

This is all interface about SungmaHee Tower Like official servers and the first floor like Official Servers, In this files we have 2k or 3k LOC, maybe more, I'm tired and I don't have information about all floor's tower, but if you want complete this system, you can contact with some-developer and providing the information about the floors or modifying all floors like your concept for Metin2, you'll be a nice dungeon. I already did the hardest part.

You can extract all visual part with the official patchs from this forum.

This dungeon is Full C++, Python and SQL.

 

.png

 

.png

 

.png

 

PLEASE: Not more messages for my person if you don't want to pay money, I only sell systems "not personal systems" you need understand about my time, my help, code or resolve some problem, needs time.

If you want something (not offlineshop, this world has different options with this system) you can contact me but, you will need understand that I will charge you.

I'm a nice person (I think), but this world needs money 😢 and if I  invest time in one project, I will cancel other projects and is overmoney.

  • Metin2 Dev 81
  • Good 13
  • muscle 1
  • Love 29
Link to comment
Share on other sites

  • Contributor
4 hours ago, envy said:

In my opinion, dungeons should remain on quest, the way the official thought of them. Instead of selecting the rewards with a directquery and sending a packet just for the rewards, you could've done a dictionary on clientside.
Also, what is this?

spacer.png

I like to avoid tragedies even if I have avoided them before. If you don't like C++ code, use Lua, but... since when is a high-level language better than a low-level?

2 hours ago, CantSt0p said:

Yoy @ Rakancito reupload last image. You are showing us your server IP 🤷🏻‍♂️ 

I'm not using the server, I don't have problems.

Link to comment
Share on other sites

  • Premium
54 minutes ago, Rakancito said:

I like to avoid tragedies even if I have avoided them before. If you don't like C++ code, use Lua, but... since when is a high-level language better than a low-level?

I'm not using the server, I don't have problems.

Checking the pointer from the beginning, but controlling it again before destroy and then using again. The guy meant this with the arrows.

I agree about the use of LUA for dungeons. It's much faster and already prepared for use, without risk of memory, at the end it's linking c++, you got less lines and more order/safety.

 

Obv it's good for pratice c++ doing as you did. 

Thanks for the share, will be very useful for my Yohara 🙏🙏

Link to comment
Share on other sites

  • Contributor
53 minutes ago, WeedHex said:

Checking the pointer from the beginning, but controlling it again before destroy and then using again. The guy meant this with the arrows.

I agree about the use of LUA for dungeons. It's much faster and already prepared for use, without risk of memory, at the end it's linking c++, you got less lines and more order/safety.

 

Obv it's good for pratice c++ doing as you did. 

Thanks for the share, will be very useful for my Yohara 🙏🙏

WTF??? YOU ARE WRONG!!

  • All languages has advantages and disadvantages.
  • C++ is faster than Lua.
  • Lua is easier than C++.
  • C++ has more good communication with the machine than Lua.
  • C++ has debug tools.
  • Lua is nice and good, but if you have bugs, you will need go to C++ if you want resolve the problem.
  • Memory problems are programming errors, not programming language errors, and are due to poor programming practice or lack of code review.
  • The order of the code does not equal the difficulty of understanding code (C++ is harder than Lua).
  • You can cause important errors in Lua and memory problems just like in C++

And I can continue with disadvantages or advantages.

If you have more Lua developers it's because Lua is more easier than C++, Lua has one syntax more easy. But if you have good practices and concepts of programming, you will have a good code and secure code.

In my personal think, C++ has advantages because it's more fast and has one more communication with the machine than Lua, but the project will be more expensive and complicated.It is simply to the client's liking. But C++ will always be better than Lua in many ways. Only Lua is easier to learn and anyone can be a Lua developer.

Lua has nice helps for inexpert developers and good practices for codes with small size however C++ has advantages with big codes.

  • If you have a big new bug in Lua you go to C++.
  • C++ has great tools with debug for codes. If you use a good testing techniques you will have a super-tool.

In summary: Lua and C++ are good, but C++ is harder to learn. For this reason, although C++ is better for big code, because it's more faster and more advantages, it is avoided due to the cost it represents. Not everyone is a C++ developer.

 

  • Metin2 Dev 1
  • kekw 1
  • muscle 1
Link to comment
Share on other sites

4 hours ago, Rakancito said:

I like to avoid tragedies even if I have avoided them before. If you don't like C++ code, use Lua, but... since when is a high-level language better than a low-level?

I'm not using the server, I don't have problems.

you are checking the item pointer, even if you checked it in the first part and returned if it's not found, then proceed to remove the item, and after removing, you made checks on the item that doesn't exist anymore. You ain't avoiding crap.

  • Metin2 Dev 2

undefeated, money feeded

Link to comment
Share on other sites

  • Premium
9 hours ago, envy said:

In my opinion, dungeons should remain on quest, the way the official thought of them. Instead of selecting the rewards with a directquery and sending a packet just for the rewards, you could've done a dictionary on clientside.
Also, what is this?

spacer.png

That's definitely going to crash the server.
@ Rakancito, can you explain how you thought process of this code?

Edited by msnas
Link to comment
Share on other sites

  • Contributor
5 hours ago, msnas said:

That's definitely going to crash the server.
@ Rakancito, can you explain how you thought process of this code?

OK maybe you need more primary studies for understand... 🙂

REMEMBER: THIS IS CONTRIBUTION AND I SAID...

Quote

This is all interface about SungmaHee Tower Like official servers and the first floor like Official Servers, In this files we have 2k or 3k LOC, maybe more, I'm tired and I don't have information about all floor's tower, but if you want complete this system, you can contact with some-developer and providing the information about the floors or modifying all floors like your concept for Metin2, you'll be a nice dungeon. I already did the hardest part.

Maybe you need understand more about: "This is all interface about SungmaHee Tower Like official servers and the first floor like Official Servers" and the other part about " I'm tired and I don't have information about all floor's tower, but if you want complete this system, you can contact with some-developer". I commented that I didn't give them the whole dungeon because I'm tired and I had incomplete information I was without information about the dungeon.

Obiously I give you the more important part about interface... and you can complete this system with anydeveloper, you just need check all floors with the logic by the code. Just remove the problem lol.

The difference between those who want everything for free and those who take advantage of opportunities to do work is this. I just decided to share something and indicated that I am tired and I have no information about the floors, maybe if someone gives me information about the floors I will complete it or you can fill it out.

Edited by Rakancito
  • Facepalm 2
  • muscle 2
Link to comment
Share on other sites

  • Premium
On 2/23/2024 at 7:34 PM, Rakancito said:

WTF??? YOU ARE WRONG!!

  • All languages has advantages and disadvantages.
  • C++ is faster than Lua.
  • Lua is easier than C++.
  • C++ has more good communication with the machine than Lua.
  • C++ has debug tools.
  • Lua is nice and good, but if you have bugs, you will need go to C++ if you want resolve the problem.
  • Memory problems are programming errors, not programming language errors, and are due to poor programming practice or lack of code review.
  • The order of the code does not equal the difficulty of understanding code (C++ is harder than Lua).
  • You can cause important errors in Lua and memory problems just like in C++

And I can continue with disadvantages or advantages.

If you have more Lua developers it's because Lua is more easier than C++, Lua has one syntax more easy. But if you have good practices and concepts of programming, you will have a good code and secure code.

In my personal think, C++ has advantages because it's more fast and has one more communication with the machine than Lua, but the project will be more expensive and complicated.It is simply to the client's liking. But C++ will always be better than Lua in many ways. Only Lua is easier to learn and anyone can be a Lua developer.

Lua has nice helps for inexpert developers and good practices for codes with small size however C++ has advantages with big codes.

  • If you have a big new bug in Lua you go to C++.
  • C++ has great tools with debug for codes. If you use a good testing techniques you will have a super-tool.

In summary: Lua and C++ are good, but C++ is harder to learn. For this reason, although C++ is better for big code, because it's more faster and more advantages, it is avoided due to the cost it represents. Not everyone is a C++ developer.

 

"Lua is nice and good, but if you have bugs, you might need C++ to resolve the problem"

It's true that certain complex bugs might require C++ work (They're so rare that the only example that comes to my mind over 10 years of development is this:)

But you just cannot use that as a matter of fact when such an occurrence is that rare. I literally cannot think of any other issue that can't be solved directly without C++ work.

 

"You can cause important errors in Lua and memory problems just like in C++"

No. Unless you override entire classes like pc.* by assigning them to global variables and giving them arbitrary values, that's simply not possible. And such a gigantic mistake that can STILL be fixed in the blink of an eye, you can't say the same about C++ core crashes/memory issues. We both know that solving a generic Lua error (which still lets the game run with no issues) is much simpler than solving a core crash caused by shit C++ code made by people like you who force themselves to use it when they can't just cause "C++ is cooler / harder to use".

 

"C++ is faster than Lua"

Yes, but that doesn't matter on Metin2, due to the game's limitations, speed is not a factor: Two dungeons written in these two languages with identical code functionality will run exactly the same way and at exactly the same pace. Thus, you're wrong, you can't apply generic logic in this case.

Also, while C++ is known for its speed, which again, is not a factor to take into account on Metin2, Lua offers remarkable flexibility, and C++ should be used to that end: To help assemble functions useable in Lua in order to write more complex stuff while maintaining Lua's ease to update/use; that's the whole point of scripting languages and it's the reason why YMIR adopted this design, why do you think they don't make dungeon in C++? The entire quest system has been made exactly to handle such things, and it's very much stable and safe to use, not to mention easy to use, as you said, but apparently for you "easy to use = bad" (?).

Lua's straightforward syntax and semantics allow developers to implement features quickly and with fewer lines of code -> faster development cycles -> more productivity.

Writing something in a harder way doesn't make it better at all. I don't know you but given the message I quoted, this doesn't seem a design choice/preference on your end to me, not as much as it seems a sorry attempt to flex and feel superior.. which you failed at miserably from what I see.

I've coded much more complex stuff than this in Lua for Metin2 during my lifetime, stuff that I'm sure you can't even fathom, (For example, do you even know what a coroutine is and how to apply it on a Metin2 quest?)

While this.. stuff that you made, once I remove the python UIs I get one of the most basic, boring and plain dungeons ever conceived.

Be humble, and try to learn rather than trying to put other people down when you can't even defend your own competences properly.

 

"Only Lua is easier to learn and anyone can be a Lua developer."

True, it's easier to learn. You might want to start learning it, given your show of C++ knowledge today.

Edited by Syreldar
  • Good 2
  • muscle 2
  • Love 2

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Contributor
16 hours ago, Rakancito said:

OK maybe you need more primary studies for understand... 🙂

REMEMBER: THIS IS CONTRIBUTION AND I SAID...

Maybe you need understand more about: "This is all interface about SungmaHee Tower Like official servers and the first floor like Official Servers" and the other part about " I'm tired and I don't have information about all floor's tower, but if you want complete this system, you can contact with some-developer". I commented that I didn't give them the whole dungeon because I'm tired and I had incomplete information I was without information about the dungeon.

Obiously I give you the more important part about interface... and you can complete this system with anydeveloper, you just need check all floors with the logic by the code. Just remove the problem lol.

The difference between those who want everything for free and those who take advantage of opportunities to do work is this. I just decided to share something and indicated that I am tired and I have no information about the floors, maybe if someone gives me information about the floors I will complete it or you can fill it out.

Mf, they just pointed out an error, you don't need to act like a 15yo fucking princess with daddy issues.

 

	void SmhTMap::OnSetItemMonster(LPCHARACTER pkChar, LPITEM pkItem, LPCHARACTER pkMonster)
	{
		if (!pkChar)
			return;

		if (!pkItem)
			return;

		if (!pkMonster)
			return;

		// if (pkItem)// this is fucking useless
		ITEM_MANAGER::instance().RemoveItem(pkItem);

      	// [heap-use-after-free]
      	// assuming that the previous branch gets executed, this could cause a crash, since you're trying to read from that deleted item
		if (pkItem->GetVnum() == KEY_LEVEL1_SUNGMAHEE && GetDungeonStep() == 1)

 

And all of it could be changed to:

	void SmhTMap::OnSetItemMonster(LPCHARACTER pkChar, LPITEM pkItem, LPCHARACTER pkMonster)
	{
		if (!pkChar)
			return;

		if (!pkItem)
			return;

		if (!pkMonster)
			return;

		uint32_t itemVnum = pkItem->GetVnum();
		ITEM_MANAGER::instance().RemoveItem(pkItem);

		if (itemVnum != KEY_LEVEL1_SUNGMAHEE || GetDungeonStep() != 1)
			return;

		if (GetSeal1())
		{
			if (GetSeal1()->GetVID() == pkMonster->GetVID())
			{
				char szNotice[512];
				snprintf(szNotice, sizeof(szNotice), LC_TEXT("[Sung Mahi Tower] Break the seal with Sung Mahi's Sealstone!"));

				FChatMap f(szNotice, GetMapIndex());
				GetMapSectree()->for_each(f);

				GetSeal1()->Dead();
				SetSeal1(NULL);
			}
		}
      
      // [...] // add the rest of them
    }

I'm following the same logic, didn't read the rest of it. Idk what this does or why it removes the item on each call, but I assume there's a reason since sr rankacito, the person with primary studies, made it this way.

 

The level of delusion on some people is fucking unbelievable, istg.

  • Eyes 1
Link to comment
Share on other sites

  • Developer

Every time this guy releases something he gets slapped in the face, I'm sorry for that.

When you release something it has to be ready to use, unfortunately.
In another context that would be fine, but in a forum where 10/10 releases are ready to install/use, people WANT THIS.

Dungeons should clearly be done in Lua, doing them in c++ just complicates your life, there is no real pattern, you use *10 lines of code and throw 15 years of hard tested lua dungeons pratices in the trash. But it's a release and plus it's not the first time you've released a dungeon in c++, clearly you can do whatever the fuck you want!

ff: Since I've been on metin I've only known 3 developers who did only lua, all 3 swore they were the best in the world.

503953077003354113.png

Link to comment
Share on other sites

  • Honorable Member

I gave a quick glance to your system, and I found a potential issue I reported some time ago to another c++ dungeon:

Directly storing the character ptr in the dungeon instance is one of the main reasons for instability.

You should use a function like this:

LPCHARACTER FindValidCharacter(const VID & vid)
{
	if (!vid.GetID())
		return nullptr;
	const auto ch = CHARACTER_MANAGER::instance().Find(vid.GetID());
	return (ch && !ch->IsDead()) ? ch : nullptr;
}

 

-------------------------------------------------------------------------

The reason why I write dungeons in LUA, and functionality in C++ is because:

  • The whole lua environment works fine out of the box
  • I can delegate quick edits to other people who have little to no knowledge
  • It's incredibly easy to crash the whole process in a c++ dungeon, in comparison to lua
  • People don't know how to correctly manage memory in c++, so it would have been better if they sticked to a simpler already-managed environment
  • The maintenance of a c++ dungeon gets incredibly tiresome, in comparison to lua

-------------------------------------------------------------------------

I also suggest you to never use magic numbers like [8][2], and to stick with std::array & an enumeration list to prevent repeated code like this:

image.png

 

-------------------------------------------------------------------------

Thanks for sharing.

 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 1
  • Good 2
  • Love 3
Link to comment
Share on other sites

  • Active Member
On 2/23/2024 at 2:07 PM, envy said:

In my opinion, dungeons should remain on quest, the way the official thought of them. Instead of selecting the rewards with a directquery and sending a packet just for the rewards, you could've done a dictionary on clientside.
Also, what is this?

spacer.png

It's probably cool to refer to something that is no longer there. 🤣
Good NPE bro 👌

  • Love 1
Link to comment
Share on other sites

  • Contributor

I apologize to the guys above if I took the comments too personally, I was a little tired from the amount of messages I received that day, it wasn't good and I understand that I may have had a logic error in the code. I honestly hadn't looked at it before months and as I mentioned I was a little tired. But I suppose that more than one person will find what I shared useful to complete their Yohara.

Regarding the contribution, if anyone gives me information about the floors of the tower I can finish it without any problem, correct the errors that were mentioned to me in the forum and share it. I have no problem with the tower being complete.

.png

 

On 2/24/2024 at 5:02 PM, PACI said:

No one here is criticizing the completion level of the content you released. They are simply pointing out incorrect logic in your code. Why are you getting defensive about it?

I was not in the mood.

I'm going to steal your way of replying.

On 2/24/2024 at 5:23 PM, Syreldar said:

[...]

I am going to respond to you because you told me things that made me cry...

Do you know the difference between doing what @ martysama0134 or @ Amun did and what they did? They came with everything,

And about humility, maybe I don't have it, but it's horrible that I came with the best intentions to share and they only attacked when I myself indicated that it wasn't finished and that they could finish it without any problem. Just take the important parts and delete the bad parts, it's not that hard.

And about the coroutines, I don't think it's right that you're trying to tell me that I don't know such basic programming concepts, I can ask about encapsulation, polymorphism or overloading and I'm sure that with at least one you will search what I'm talking about.

  • I said repeatedly that C++ will always be faster than Lua and that each of the languages has its advantages and disadvantages.
  • I even commented that Lua has simpler syntax and is easier to learn than C++.
  • I also mentioned that it is not bad to program in Lua or C++ with good programming practices, that is fine, it is up to personal taste "in this case". It depends on the cost you want to suffer between each development and the lyfe cycle.
  • I repeat, in Lua you can still cause serious memory errors if you don't follow good programming practices. I have no problems doing things in Lua, I still program in Lua and do things in Lua.
  • I repeat: In both Lua and C++ you can cause problems, in reality this focuses on good programming practices.

I have already received corrections before and I receive them with kindness as long as they are corrections and not attacks because they want everything for free and in many cases they do not have basic programming concepts.

No developer is exempt from making code errors, "many around here should understand", it is a human quality and that is why concepts such as Software development lifecycle (SDLC) have been introduced. I have them, you have them, we all have them and the larger the code, the greater the number of errors. For this reason, there are techniques to reduce the number of code errors.

It just happened, just as this time I had a logic error that I honestly didn't review, I have had many other contributions in this forum that I suppose many have used. So don't talk to me about humility when I'm only trying to collaborate and the only thing I receive is two or three people with problems and they don't provide arguments with a code correction that I don't mind receiving.

NOTE: I don't believe I'm superior to people, but it is always better to say that something can be optimized and provide feedback than to come and attack with new accounts and have others take things personally.

 

On 2/24/2024 at 8:22 PM, Amun said:

[...]

I was not in the mood.

  

9 hours ago, martysama0134 said:

[...]

Thank you ❤️ .  I'm going to review the issue of repeated code and the rest that you told me, you're right.

 

  • Love 2
Link to comment
Share on other sites

1 hour ago, Rakancito said:

I apologize to the guys above if I took the comments too personally, I was a little tired from the amount of messages I received that day, it wasn't good and I understand that I may have had a logic error in the code. I honestly hadn't looked at it before months and as I mentioned I was a little tired. But I suppose that more than one person will find what I shared useful to complete their Yohara.

Regarding the contribution, if anyone gives me information about the floors of the tower I can finish it without any problem, correct the errors that were mentioned to me in the forum and share it. I have no problem with the tower being complete.

.png

 

I was not in the mood.

I'm going to steal your way of replying.

I am going to respond to you because you told me things that made me cry...

Do you know the difference between doing what @ martysama0134 or @ Amun did and what they did? They came with everything,

And about humility, maybe I don't have it, but it's horrible that I came with the best intentions to share and they only attacked when I myself indicated that it wasn't finished and that they could finish it without any problem. Just take the important parts and delete the bad parts, it's not that hard.

And about the coroutines, I don't think it's right that you're trying to tell me that I don't know such basic programming concepts, I can ask about encapsulation, polymorphism or overloading and I'm sure that with at least one you will search what I'm talking about.

  • I said repeatedly that C++ will always be faster than Lua and that each of the languages has its advantages and disadvantages.
  • I even commented that Lua has simpler syntax and is easier to learn than C++.
  • I also mentioned that it is not bad to program in Lua or C++ with good programming practices, that is fine, it is up to personal taste "in this case". It depends on the cost you want to suffer between each development and the lyfe cycle.
  • I repeat, in Lua you can still cause serious memory errors if you don't follow good programming practices. I have no problems doing things in Lua, I still program in Lua and do things in Lua.
  • I repeat: In both Lua and C++ you can cause problems, in reality this focuses on good programming practices.

I have already received corrections before and I receive them with kindness as long as they are corrections and not attacks because they want everything for free and in many cases they do not have basic programming concepts.

No developer is exempt from making code errors, "many around here should understand", it is a human quality and that is why concepts such as Software development lifecycle (SDLC) have been introduced. I have them, you have them, we all have them and the larger the code, the greater the number of errors. For this reason, there are techniques to reduce the number of code errors.

It just happened, just as this time I had a logic error that I honestly didn't review, I have had many other contributions in this forum that I suppose many have used. So don't talk to me about humility when I'm only trying to collaborate and the only thing I receive is two or three people with problems and they don't provide arguments with a code correction that I don't mind receiving.

NOTE: I don't believe I'm superior to people, but it is always better to say that something can be optimized and provide feedback than to come and attack with new accounts and have others take things personally.

 

I was not in the mood.

 

 

Your "mood" is not an excuse anyway. Use this link to get all informations: https://it-wiki.metin2.gameforge.com/index.php/Inferna_Sung_Mahi

Link to comment
Share on other sites

On 2/23/2024 at 9:56 PM, msnas said:

That's definitely going to crash the server.
@ Rakancito, can you explain how you thought process of this code?

LUA is just a wrapper for C++ and it hardly makes it slower. And like we can see here, some people should stick with what's the most effective and that is LUA which was literally made for video game scripting and that's what official uses for the most part.

It's not slow. If it was then official wouldn't run well while having thousands of quests running for thousands of players simultaneously. 

0u8PXhpe2DnzKDDqJPQU0fhRQ4znUhKHEzllElUD

LUA is on the upper left of this triangle while C++ is high performance and high versatility BUT it carries greater responsibility. This mentioned bit would probably cause core crash 🙂 That's why you should be humble and not reject the best solution.

btw. metin2 scene is already too cluttered with mediocre developers so I'd recommend against paying someone who has questionable skills and makes too many mistakes in his paid work...

Edited by b6d4a82c15
Link to comment
Share on other sites

  • Active Member

@ Rakancito

 

Hey, calm down. Take things easy.

Look, I did the Tower of Sung Ma dungeon with Lua.
Specifically, I did it on April 4 and 5 of last year.

If you want to continue with that project we could do something together. Write me.

My language is Spanish but I can translate in English.

  • Scream 1
  • muscle 3
Link to comment
Share on other sites

Announcements



×
×
  • 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.