Jump to content
Maintenance : Final step ×

[C++/PY]Guild system's


Recommended Posts

  • Active+ Member
Posted (edited)

Hello everyone, in this post, I intend to share the guild systems that I have not managed to see or that nobody sells (which is probably because I have not searched well), I want to clarify, as I said in the other post about the effect of mobs, I am not an expert in c++ or lua, in fact I have started now after several years to take it seriously although I do not have much time to invest, but I have always liked to share what little I know. Sometimes I enjoy tinkering and experimenting on my own, sometimes I see a system and try to do it my way, sometimes I do as ‘Mali’ says I take out the reversed system and test it thoroughly, but it is probably not enough for my knowledge or well, I might forget some things but I like to do this kind of things and people like Owsap, Mali, Vegas among others I admire them for their level. Leaving this aside, today I will share 2 simple systems that I liked and as I say, I will try in the future to bring more systems related to the guild. For now I will post 2; 1.Increase guild level to 40 and 2.A small function to remove lands for inactivity. Let's go.

[NEW LEVEL FOR GUILD]

Spoiler

4ebd483bea4e14c4b7595db1866652c5.png

1. Open your Locale_inc.h or CommonDefines.h from common in src game and add:

#define ENABLE_EXTENDED_GUILD_LEVEL //Level 40 for guilds

##UPDATE SRC_GAME:

1.2. Open tables.h from common in src game and find & replace:

typedef struct SPacketGuildExpUpdate
{
	DWORD guild_id;
#if defined(ENABLE_EXTENDED_GUILD_LEVEL)
	DWORD amount; //Fix
#else
	int amount; //Original
#endif
} TPacketGuildExpUpdate;

2. Now open length.h from common too and add this:

#include "service.h" or #include "CommonDefine.h"

2.1. Now search this and replace:

//2.1. Now Search this and replace:

GUILD_MAX_LEVEL			= 20,

//with:

#if defined(ENABLE_EXTENDED_GUILD_LEVEL)
	GUILD_MAX_LEVEL			= 40, //Lv 40 for guilds
#else
	GUILD_MAX_LEVEL			= 20, //Original Level
#endif

3. Now, open constants.cpp in game src folder and search:

// INTERNATIONAL_VERSION ±æµå°æÇèÄ¡
const DWORD guild_exp_table2[GUILD_MAX_LEVEL+1] =
{
	0,
	[...]
	16800000UL
};
// END_OF_INTERNATIONAL_VERSION ±æµå°æÇèÄ¡

3.1.Now, before 16800000UL add this:

#Update Fix problem with exp, when you put lv20 and give exp, if you give exp again sometimes guild have bug and pass from lv20 to 30 or 40, i adapted the exp values. replace all function with:

//Fix Exp
// INTERNATIONAL_VERSION ±æµå°æÇèÄ¡
const DWORD guild_exp_table2[GUILD_MAX_LEVEL+1] =
{
	0,			//0
	6000UL,		//1
	18000UL,	//2
	36000UL,	//3
	64000UL,	//4
	94000UL,	//5
	130000UL,	//6
	172000UL,	//7
	220000UL,	//8
	274000UL,	//9
	334000UL,	//10
	400000UL,	//11
	600000UL,	//12
	840000UL,	//13
	1120000UL,	//14
	1440000UL,	//15
	1800000UL,	//16
	2600000UL,	//17
	3200000UL,	//18
	4000000UL,	//19
#ifdef ENABLE_EXTENDED_GUILD_LEVEL
	4200000UL,	//21
	4400000UL,	//22
	4600000UL,	//23
	4800000UL,	//24
	5000000UL,	//25
	5200000UL,	//26
	5400000UL,	//27
	5600000UL,	//28
	5800000UL,	//29
	6000000UL,	//30
	6200000UL,	//31
	6400000UL,	//32
	6800000UL,	//33
	7000000UL,	//34
	7200000UL,	//35
	7400000UL,	//36
	7600000UL,	//37
	7800000UL,	//38
	8000000UL,	//39
	9000000UL, 	//40
#endif
	16800000UL	//del 20 al 21 + 45000UL
};

#UPDATE 2 SRC_GAME

4.Add 3 points after create guild (optional), open guild.cpp and find & replace:

//In this function:
CGuild::CGuild(TGuildCreateParameter & cp)
{
      Initialize();
      [...]
//Find and replace:
 [...]
      ComputeGuildPoints();
      m_data.power	= m_data.max_power;
      m_data.ladder_point	= 0;
      db_clientdesc->DBPacket(HEADER_GD_GUILD_CREATE, 0, &m_data.guild_id, sizeof(DWORD));

      TPacketGuildSkillUpdate guild_skill;
      guild_skill.guild_id = m_data.guild_id;
      guild_skill.amount = 0;
#if defined(ENABLE_EXTENDED_GUILD_LEVEL)
      guild_skill.skill_point = 3; //Start with 3 pints after create guild.
#else
      guild_skill.skill_point = 0; //Original
#endif
      memset(guild_skill.skill_levels, 0, GUILD_SKILL_COUNT);

4.1.You can compile Game and DB (because you edit length.h)

5.Now open Locale_Inc.h in source binary and add:

#define ENABLE_EXTENDED_GUILD_LEVEL //Level 40 for guilds.

##UPDATE SRC_BINARY:

6.Now, open in UserInterface -> Locale.cpp and search and replace:

unsigned LocaleService_GetLastExp(int level)
{
#if defined(ENABLE_EXTENDED_GUILD_LEVEL)
	static const int GUILD_LEVEL_MAX = 40;
#else
	static const int GUILD_LEVEL_MAX = 20;
#endif
	if (LocaleService_IsCHEONMA())
	{
		static DWORD CHEONMA_GUILDEXP_LIST[GUILD_LEVEL_MAX + 1] =
		{
			0,			// 0
			15000ul,	// 1
			45000ul,	// 2
			90000ul,	// 3
			160000ul,	// 4
			235000ul,	// 5
			325000ul,	// 6
			430000ul,	// 7
			550000ul,	// 8
			685000ul,	// 9
			835000ul,	// 10
			1000000ul,	// 11
			1500000ul,	// 12
			2100000ul,	// 13
			2800000ul,	// 14
			3600000ul,	// 15
			4500000ul,	// 16
			6500000ul,	// 17
			8000000ul,	// 18
			10000000ul,	// 19			
			42000000UL	// 20+21
		};
		if (level < 0 && level >= GUILD_LEVEL_MAX)
			return 0;
		
		return CHEONMA_GUILDEXP_LIST[level];
	}
	
	static DWORD INTERNATIONAL_GUILDEXP_LIST[GUILD_LEVEL_MAX+1] = 
	{
		0,			// 0
		6000UL,		// 1
		18000UL,	// 2
		36000UL,	// 3
		64000UL,	// 4
		94000UL,	// 5
		130000UL,	// 6
		172000UL,	// 7
		220000UL,	// 8
		274000UL,	// 9
		334000UL,	// 10
		400000UL,	// 11
		600000UL,	// 12
		840000UL,	// 13
		1120000UL,	// 14
		1440000UL,	// 15
		1800000UL,	// 16
		2600000UL,	// 17
		3200000UL,	// 18
		4000000UL,	// 19			
#if defined(ENABLE_EXTENDED_GUILD_LEVEL)
		4200000ul,	//21
		4400000ul,	//22
		4600000ul,	//23
		4800000ul,	//24
		5000000ul,	//25
		5200000ul,	//26
		5400000ul,	//27
		5600000ul,	//28
		5800000ul,	//29
		6000000ul,	//30
		6200000ul,	//31
		6400000ul,	//32
		6800000ul,	//33
		7000000ul,	//34
		7200000ul,	//35
		7400000ul,	//36
		7600000ul,	//37
		7800000ul,	//38
		8000000ul,	//39
		9000000ul, 	//40
#endif
		16800000UL	// 20	
	};

#ifdef ENABLE_EXTENDED_GUILD_LEVEL
	if (level < 0 || level >= GUILD_LEVEL_MAX)
		return 0;
#else
	if (level < 0 && level >= GUILD_LEVEL_MAX)
		return 0;
#endif
	
	return INTERNATIONAL_GUILDEXP_LIST[level];	
}

//I was change the bad function, now work

7.Open PythonGuild.cpp and search and replace in function:

PyObject * guildGetGuildExperience(PyObject * poSelf, PyObject * poArgs)
[....]
//in this function replace:

#if defined(ENABLE_EXTENDED_GUILD_LEVEL)
	int GULID_MAX_LEVEL = 40; //New
#else
	int GULID_MAX_LEVEL = 20; //old
#endif

8.Now compile binary, replace .exe and enjoy 😃

Note 1:
Currently, I'm looking for a way to add the remaining 3 skill points, so that they can all be level 7, so far I haven't received any errors when leveling up the guild. //Fixed Update 2

Note 2:
If you use a GM and lower the guild level in the database again, to test it, it will give you more skill points (obviously this has not happened to me with a normal player).

 

[END NEW LEVEL FOR GUILD]

[REMOVE LAND WITH TIME]

Spoiler

 

1.Open Service.h or CommonDefine.h from Source_game (optional) and add:

#define ENABLE_GUILDLAND_INACTIVITY_DELETE //Remove Guild Land

2.Open ClientManagerBoot.cpp from db source and add:

#include "../../common/service.h" or #include "../../common/CommonDefines.h"

2.1.Now search this and add after:

bool CClientManager::InitializeLandTable()
{
	using namespace building;

#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
	// Update guild_id to 0 for inactive guilds.
	CDBManager::Instance().DirectQuery("UPDATE player.land " //Update land from player->land.sql
		"INNER JOIN player.guild ON land.guild_id = guild.id " //search guild_id 
		"INNER JOIN player.player ON guild.master = player.id " //Search guild_master id to check leader.
		"INNER JOIN account.account ON player.account_id = account.id " //Check if the same id in player and account
		"SET land.guild_id = 0 " //Put land guild in 0
		"WHERE land.guild_id > 0 "
		"AND DATE_SUB(NOW(), INTERVAL 5 MINUTE) > account.last_play;"); //This check the last_play from account, check your innactive account.
		//"AND DATE_SUB(NOW(), INTERVAL 5 SECONDS) > account.last_play;"); //If u want Seconds
  		//"AND DATE_SUB(NOW(), INTERVAL 5 MONTH) > account.last_play;"); //If u want month
  		//"AND DATE_SUB(NOW(), INTERVAL 5 YEAR) > account.last_play;"); //if u want year

	// Remove object if guild_id is = 0,
	CDBManager::Instance().DirectQuery("DELETE object "
		"FROM player.object "
		"INNER JOIN player.land ON land.id = object.land_id "
		"WHERE land.guild_id = 0;");
#endif

3.Now you can compile game and db (if you don't add macro, compile only db) and enjoy 😃

//Note:
-You have to have the FreeBSD time updated if you use local server, if you use a dedicated one you will not have this concern. 
-If you modify the last_play table for testing, you can use the /reload p command.
-When you enter the game, you will still see the terrains because the function that loads the land has not been updated, but i try something after ask few friends to give me any idea, but i don't work for me, but i'm try working in that fix, this is the code i try:

///OnlyForTest
1.ClientManager.h add:
#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
public:
	void		CleanInactiveLands();
#endif

2.Replace in ClientManagerBoot.cpp -> bool CClientManager::InitializeLandTable() with:
void CClientManager::CleanInactiveLands()
{
#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
	CDBManager::Instance().DirectQuery("UPDATE player.land "
		"INNER JOIN player.guild ON land.guild_id = guild.id "
		"INNER JOIN player.player ON guild.master = player.id "
		"INNER JOIN account.account ON player.account_id = account.id "
		"SET land.guild_id = 0 "
		"WHERE land.guild_id > 0 "
		"AND DATE_SUB(NOW(), INTERVAL 1 MONTH) > account.last_play;"); //1 Month

	CDBManager::Instance().DirectQuery("DELETE object "
		"FROM player.object "
		"INNER JOIN player.land ON land.id = object.land_id "
		"WHERE land.guild_id = 0;");
#endif
}

bool CClientManager::InitializeLandTable()
{
	using namespace building;
#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
	CleanInactiveLands();
#endif
  
3.In main.cpp add:
#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
void OnTimer()
{
	CClientManager::instance().CleanInactiveLands();
	sys_err("Cleaning inactive lands failed.");
}
int inactiveLandCleanInterval = 60; // 1Minute for test
#endif

//now search and add in function:
int main()
{
  [...]
#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
	signal_timer_enable(g_iLogoutSeconds);
	unsigned long lastCallTime = 0;
#endif
	sys_log(0, "Metin2DBCacheServer Start\n");

//Same function below:
	while (1)
	{
		iCount = 0;

		iCount += CDBManager::instance().CountReturnQuery(SQL_PLAYER);
		iCount += CDBManager::instance().CountAsyncQuery(SQL_PLAYER);

#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
		unsigned long currentTime = time(nullptr);
		if (currentTime - lastCallTime >= inactiveLandCleanInterval) 
		{
			OnTimer();
			lastCallTime = currentTime;
		}
#endif
//before:
 }
void SetTablePostfix(const char* c_pszTablePostfix)
//add:
[...]
#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
	if (CConfig::instance().GetValue("INACTIVE_LAND_CLEAN_INTERVAL", &inactiveLandCleanInterval))
	{
		sys_log(0, "INACTIVE_LAND_CLEAN_INTERVAL set to %d seconds", inactiveLandCleanInterval);
	}
#endif
	sys_log(0, "   OK");

	if (!PlayerHB::instance().Initialize())
	{
		sys_err("cannot initialize player hotbackup");
		return false;
	}

#ifndef __WIN32__
	signal(SIGUSR1, emergency_sig);
#endif
	signal(SIGSEGV, emergency_sig);
#ifdef ENABLE_GUILDLAND_INACTIVITY_DELETE
	signal_timer_enable(inactiveLandCleanInterval);
#endif
	return true;
}
  
4.Now in your conf.txt on db add:
  INACTIVE_LAND_CLEAN_INTERVAL = 60
///EndOnlyForTest

//Note 3: Actually this code don't work and i don't know if this can create null pointer or something, i'm working in that, but if you can
//give me any idea i appreciate <3.
    
//Note3: you can check last_play using this query:

SELECT player.id, player.account_id, account.last_play
FROM player.player
INNER JOIN account.account ON player.account_id = account.id
WHERE DATE_SUB(NOW(), INTERVAL 1 MONTH) > account.last_play;

 

[END REMOVE LAND WITH TIME]

[GUI PYTHON LIKE OFICIAL]

Spoiler

-Well this is the gui like oficial , you need add for future functions so let's go :v

1.Download and replace :V

This is the hidden content, please

4ebd483bea4e14c4b7595db1866652c5.png

Note: At the moment, all tabs are working except the one for acquiring land. For now :V.

 

[END GUI PYTHON LIKE OFICIAL]

The truth, I would appreciate if you give me some advice to improve and learn no matter how critical you are, I am to learn, also if someone is encouraged to improve the code or something please let me know (as long as you want to share the code of course), regards.

 

##Updates:

//Level Guild
-Fixed a bug, where experience would sometimes level up from 21 to 40 or 30 randomly (this was due to a large difference in exp required to go from level 20 to 21).
-Fixed a bug where when leveling up from level 21 to 40, experience would appear negative and not be the exp required.
-Fixed 3 points when you create guild, you receive 3 skill points, after that you only receive 1 level point per level (this is because you receive 39 points in total from level 1 to 40, and 3 extra points are required to be able to have all skills at maximum which is 7).

//Remove Land

 

Edited by Nazox
Fixes
  • Metin2 Dev 25
  • Flame 1
  • Think 1
  • Good 5
  • muscle 1
  • Love 2
  • Love 6

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member

Hello people, actually i'm working in fix for land, checking and testing the others systems i'm working, but i put here new update:

#I created the Book of Forgetfulness for guilds, the idea came to me while I was checking the official server forum looking for how some guild features worked and I said, it's a good idea and I haven't seen it, so I based it on the skill forgetting book, it practically does the same, it throws random books with all the guild skills and you can level down as normal, I'm currently fixing it so the name appears in the inventory, but I'll leave you a preview.

 

  • Metin2 Dev 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member

#UPDATE

Hello people, currently I'm still working on this, but it's taking me some time because I don't have much availability and because I'm studying the code as I ‘reversed’, I'm working in parallel on 2 fixes for the guild books, that for the moment I won't release yet, I want to do more tests and a fix for guild lands, which (is related to this last picture), also as you can see I have reworked the guild donations and I'm working on the guild lands tab, where here will be the future fix for the guild lands, remember that I'm not an expert and I'm still working and there may be errors, so if you want to help me it will be a pleasure, greetings. 😃

_NL7iKJ_TqCO41FtlFI_Jg.png

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 1
  • Scream 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member

#UPDATE;

#The interface has been corrected by 95% (I'm working on the rights management tab and the guild land tab).

#1º Tab Guild Info:

-Guild list button has been added(Coming soon).
-Rewards for participation (Coming soon (War of Kingdoms)).
-Gui re adapted as the official one.
-Guild wars can now be made by both the Leader and the General, the latter can only start a war when the leader is not online(The server already checks that the leader is not online, if so, it will skip a LC and will not let you start wars).
-Fixed a bug that didn't discount the item properly.
-Increased both the yang you ask to donate and the exp the guild receives.
-Fixed a bug that gave you the item as a reward.
-New LC lines for better understanding of the text.
-Planned to use an extra item to donate to the guild (Medals of Honor-Leader Points).

#2º Tab Guild Notes:

-A new ParameterSlot has been created, as the previous one was too short for the new version.
-Enlarged the capacity of the text you can type to 50 (original 35, that's why we saw the ‘....’ to continue reading the message).
-Corrected the position of the ‘refresh, delete, and send’ button.
-Fixed a bug in the GUI, now it's like the official one.

#3º Tab Members

-Reduced the number of boxes from 13 to 11 in order to display the new buttons (when you exceed x members a scrollbar pops up).
-Added the function to select a member to be able to use the new functions.
-Added the function to remove members (left button) and select a new guild leader (this action can only be initiated by the Leader, and needs a succession ring, I'm working on a 3rd option which is that members can vote).

#4º Tab Guild Lands

-Although I have 90% of the feature I still can't get it to work, but when I do I will bring more information.
#UPDATE:
-Actually i fix this and now working for the moment (i'm working in bank guild, so maybe this make few time).
#UPDATE2:
-Guild lands have been corrected, now, the window is now working. Lands are deleted (and the tab is cleared when the server is restarted).
-Added the function to delete lands (only the leader can do this and it is not linked to the leader absence system).
-Added the functions for the future Bank system.

#5º Tab Skill Guild:

-The GUI has been corrected , for the moment I have not added more skills whether they are passive-active or whatever.

#6º Tab Guild Powers - Autorithy

-Fixed the GUI (not visible in the video - picture as it is later).
-A slot has been left for the future guild bank.


#Currently, I'm still working on:

-Guild lands.
-New guild ranking.
-Guild bank.
-New functions for the General.
-Medals of Honour (new item for guild, battlepoints system required).
-New guild wars (rounds, points, etc).
-Fix in the name of the guild skill reset books.
-Others.

RbCYQLl4QAOhyAg2-lynew.png

#Update3  Skill Page , Grade page and Land page:

99be4b16ce687153e488130278bae1bd.pngce31dbdf3bd4f9c4c5accd77c6739d5b.png

uJqlVdRgSCe4CTxNsl2IAg.png

#Video From New Update Guild land - Remove lands

 

If anyone still wants to try to help me or contribute something, you are welcome, greetings and good day to all.

 

Edited by Nazox
Core X - External 2 Internal
  • Metin2 Dev 1
  • Flame 1
  • Love 3

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member

#UPDATE

-Fixed a crashing issue (an issue in Safebox related to the guild store).
-Guild Store has been implemented (a new item for guild lands has been included).
-Created a Logs section for the Bank - Guild Storehouse.
-Fixed guild experience leveling, from Level 1 to 20, normal experience is required, from 20 to 40, ‘donations’ are used (I plan to make these items available only to the guild leader).
-Reworked the Bank Logs - Guild Storehouse (expansion).
-Created a function (enabled - disabled), so you can create your lands only with money that is available in the guild store, ie you can only buy with the money that you enter the guild coffers you or your members.
-Fixed various texts and bugs in the system in general.
-Fixed a bug, in which the guild did not appear when restarting the server (problem of a space in the ‘’).
-Fixed the Bank box in the Rights Management section, the checked box will now be displayed properly.
-Fixed a bug that did not allow Dragon Force (SP) to be reset.
-Reworked the Leader - General system so that it counts their grade properly ( 1 Leader ; 2 General) and the latter can be used with the Co-Leader system.
-I have deactivated the medal of honour system, for the moment I am not interested in it, but if you need it I can provide it (not adapted/finished), so I have rewritten the functions so that you don't use this system for donations.
-I have decided not to implement the voting system to vote out - change leader, as I feel that this way the leader loses part of his function so I have removed those functions (not adapted/completed).
#UPDATE
-Fixed kick after remove member from guild (the problem was come from GUILD_SUBHEADER_CG_REMOVE_MEMBER).
-Fixed the problem you can't remove gold from storage guild. (I'm working in add gold).

#WORKING:

-New Guild Wars (Rounds, points, etc).
-Command/Quest to delete lands for the inactivity system.
-Guild Ranking (Guilds available in the whole server).
-Guild bonus.
-Group Dungeons (Rankings, functions, etc).
-Guild Storage Levels, this would allow to expand the storage capacity (I have adapted the system to my needs and systems, but if you use other systems you will have to adapt it).
-I plan to implement some guild passive skill and add a skill that I have seen that is not used for some reason that already comes by default.

#UPDATE New photo:

3pjFHX_BSMClY1gglkywZg.png

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 1
  • Flame 1
  • Love 2

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active Member

Amazing work on this, doing it from scratch / reversing it's not an easy feat so props!

Looks like my last message was removed, but to double down - I'm also interested in reversing the following functions which are related to the new guild attendance / donation system for Medals of Honour:

- net.SendGuildDonatePacket() -> I think this is used for daily donations for Medals of Honour once guild is lv 20 or more.

Some data that might allude to the possible arguments for the function above ([int] value), found in the root meta:

{name: '_GuildDonateDialog__GUILD_DONATE_TYPE_HIGH', type: 'int', value: 2}
{name: '_GuildDonateDialog__GUILD_DONATE_TYPE_MIDDLE', type: 'int', value: 1}
{name: '_GuildDonateDialog__GUILD_DONATE_TYPE_NORMAL', type: 'int', value: 0}

- net.SendGuildDonateOpenPacket()

- net.SendGuildDonateClosePacket()

The two methods mentioned above I assume are used to enable / disable guild donation once guild is lv 20 or more. We can see this on GF servers say for GUILD_DONATE_TYPE_NORMAL you can only donate 3 times a day, so they may take as arguments the donation type and some other.

- net.SendGuildOfferPacket() -> this is the donation method between guild lv 1 and 20, which we know the

This is the hidden content, please
of.

I just started to grasp the theory of reversing and I'm looking to reverse the functions mentioned above, so I'd be willing to help you with reversing if you could share what tools you're using and how you do it - from there I'll be able to self-improve.

Note: I'm coming from a background of coding (javascript / typescript, working with react / react native) and I've been working on metin2 python / source related things for a while, learning the ropes.

  • Metin2 Dev 9
  • Love 2

Life rips

__________________________

Link to comment
Share on other sites

  • Active+ Member
19 minutes ago, kevin said:

¡Excelente trabajo el tuyo! Hacerlo desde cero y revertirlo no es una tarea fácil, así que ¡felicitaciones!

Parece que mi último mensaje fue eliminado, pero para redoblar los esfuerzos, también me interesa revertir las siguientes funciones que están relacionadas con el nuevo sistema de asistencia/donación del gremio para las Medallas de Honor:

- net. SendGuildDonatePacket() -> Creo que esto se usa para donaciones diarias de Medallas de Honor una vez que el gremio alcanza el nivel 20 o más.

Algunos datos que podrían hacer referencia a los posibles argumentos de la función anterior ( [int] value ), que se encuentran en la meta raíz:

   
   
   

- red. SendGuildDonateOpenPacket()

- net. SendGuildDonateClosePacket()

Supongo que los dos métodos mencionados anteriormente se utilizan para habilitar o deshabilitar la donación del gremio una vez que el gremio alcanza el nivel 20 o más. Podemos ver esto en los servidores de GF, por ejemplo, para  GUILD_DONATE_TYPE_NORMAL  solo puedes donar 3 veces al día, por lo que pueden tomar como argumentos el tipo de donación y algunos otros.

- net.SendGuildOfferPacket () -> este es el método de donación entre los niveles de gremio 1 y 20, del cual conocemos la

This is the hidden content, please
.

Acabo de comenzar a comprender la teoría de la inversión y estoy buscando invertir las funciones mencionadas anteriormente, por lo que estaría dispuesto a ayudarlo con la inversión si pudiera compartir qué herramientas está usando y cómo lo hace; a partir de ahí, podré mejorar por mí mismo.

Nota: Vengo de un entorno de codificación (javascript/typescript, trabajando con react/react native) y he estado trabajando en cosas relacionadas con metin2 python/source por un tiempo, aprendiendo los conceptos básicos.

Hello, thanks for your message!! the truth as I mentioned here and in another post of mine, I have started this year to take more seriously the language c++, python, lua, etc because I've had many years and although I've barely had time due to work and laziness, now I have found motivation in this and stop ‘defend myself’ to learn something, so I will surely make many mistakes. When I was referring to ‘Reversed’ I simply dedicated myself to study the code of several servefiles that were passed to me by acquaintances and kept remains of this system and I have simply been re-elaborating it trying to be faithful enough. I don't use programs or other methods like other devs around here, I simply wanted to do this because I never saw these systems in the market and it is one of the few things I consider that the official did well (although late as always), so don't think I'm good, but I'm happy with the achievement I've made. 

About what you were commenting, it is interesting, in all the files that I have collected, none used something like “ GUILD_DONATE_TYPE_NORMAL ” neither for the medal mode nor for the daily limit, in fact, I run it from tables.h and then pass it through guild. cpp and ClientManager (DB) where with more code (I simplify to save text) run a query and check the tables limit_donate etc, also through the python on the client side, I limit the amount of clicks, which can be done to 3 in this way

[...] if donate_count_max == 3:
self.CheckCountLimit().

# Block the Buttons if max donations per day reached
def CheckCountLimit(self):
donate_count_left, donate_count_max = guild.GetGuildDonateCount()

if donate_count_left >= 3:
self.typeButtonList[0].Down().
self.typeButtonList[1].Down()
self.typeButtonList[2].Down()
self.state = False

For example this is mi tables.h:

typedef struct SPacketGuildChangeMemberData
{
	uint32_t guild_id;
	uint32_t pid;
	uint32_t offer;
	uint8_t level;
	uint8_t grade;
#ifdef ENABLE_GUILD_DONATE_ATTENDANCE
	uint32_t join_date;
	uint8_t donate_limit;
	uint32_t last_donation;
	uint8_t daily_donate_count;
	uint32_t last_daily_donate;
#endif
} TPacketGuildChangeMemberData;

&
typedef struct SPacketDGGuildMember
{
	uint32_t dwPID;
	uint32_t dwGuild;
	uint8_t bGrade;
	uint8_t isGeneral;
	uint8_t bJob;
	uint8_t bLevel;
	uint32_t dwOffer;
	char szName[CHARACTER_NAME_MAX_LEN + 1];
#ifdef ENABLE_GUILD_DONATE_ATTENDANCE
	uint32_t dwJoinDate;
	uint8_t bDonateLimit;
	uint32_t dwLastDonation;
	uint8_t bDailyDonateCount;
	uint32_t dwLastDailyDonate;
#endif
} TPacketDGGuildMember;

What I want to say, that in this version the medal system is not limited, but the donations, as in all versions that have been extracting it, the medals are used as points and not as a donation, but anything I can provide or need tell me, and sorry for my English if I did not understand well, greetings.

  • Metin2 Dev 3
  • Love 2

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member

#UPDATE

-The guild store has been implemented, although I am working on some bugs.
-Guild store level has been added (I don't know how it works, so if someone can give me some knowledge better).
-Fixed some bugs with texts (I'm working with the Mali shared version).
-Updated binary functions, and added a function I didn't use at startup as SLOT_TYPE_GUILDBANK (I'm testing if this fixes the bug).
-Added a scrollable bar for logs.

#UPDATE:
-Fixed unexpected closures and random errors with the guild bank, I still have the problem that it does not save in item as ‘GUILDBANK’ but I have managed that if you do it manually, the items are kept both when closing and opening the bank (which has allowed me to verify that the system works correctly).
-Fixed a bug that the yang was not being discounted when building objects (restructured the WithdrawMoney function).

Notes/// I have tried adding GuildBank and extending the ‘ or windows = %d’ etc in ClientManagerPlayer.cpp , I am sure that the problem is in the source game, but for the moment my head is not enough.

#Problems

-I don't quite know how to create a ‘new inventory’ yet, although I am checking other systems, so when you close the warehouse the items disappear, but if you don't close the warehouse you can put them in and take them out and it will be logged successfully.
-I don't know about questing either, so I wouldn't know how to quest properly so it's not a simple warehouse that doesn't ‘store’ things properly or doesn't log it properly in the database, so if any questmaster can give me a hand that would be helpful.
-As for the rest, I'm still working on the same thing, when I start with something until it doesn't work properly I don't move on to the next one, but I leave you a new image.

#WORKING:

-New Guild Wars (Rounds, points, etc). (0%)
-Command/Quest to delete lands for the inactivity system. (50%)
-Guild Ranking (Guilds available in the whole server). (0%)
-Guild bonus. (0%)
-Group Dungeons (Rankings, functions, etc). (0%)
-Guild Storage Levels (0%) (idk how to work this)
-Fix GuildStorage slots item (0%)

4DEeDuqOSA-M-NSLVgZWtA.png

ybSSovXVSNuBYq36vuRv-w.png

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member

#UPDATE

-Wars section has been corrected, now it shows the points and their ranking.
-Wars have been implemented with ; Rounds, points & time.
-Implemented in the [TAB] key a bar to see the score in a war.
-Added new interface for the new Guild Wars.
-Fixed several functions that collided with the war system.
-Field Battle, Arena Fighting, Flag Fighting, Destruction Fighting, Time Attack and Shield Fighting.
-You can put 3 to 5 rounds, 30 to 100 points and 10 to 60 minutes of PvP between guilds!.

#UPDATE
-Implemented Guild bonus like Official:
    -LV 5  = %5+ exp for donate to guild.
    -LV 10 = Increase capacity for members (Altar of Power).
    -Lv 15 = Better price for purchase Dragon SP.
    -Lv 20 = All members don't have pay 3% tax when remove or add gold to guild.
 
 -Fix Check box for Autorithy in "Warr/Warrior" in last page.

WORKING:

#UPDATE

-New Guild Wars (Rounds, points, etc) (99%) (1% Testing).
-Command/Quest to delete lands for the inactivity system (85%).
-Guild Ranking (Guilds available in the whole server) (65%).
-Guild bonus. (99%) (1% Test all working well).
-Group Dungeons (Rankings, functions, etc) (0%).
-Guild Storage Levels (99%) (This working like Alter of Power but i need create quest(1%)).
-Fix GuildStorage slots item (55%).

r72uwb_rR12JTnlvq3Ws2g.png

#UPDATE

1Va2xBuOTDeIFg0cL8zKmQ.png

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Love 2

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member
10 minutes ago, Mithras01 said:

Instead of "working" you should put "copy pasting", because those functions are already in a public source.spacer.png

Yeah! 

At no time I have said that I have developed it, I have said that I have been taking it from sources and adapting it, because it is one of the few systems that I like, and I have not seen anyone selling it!  and as I say it serves me to learn, and in some parts if I have modified the coding and I have changed things, but still I have not said that it is mine or I have created it, anyway as you see in the picture and well you mention, it is unfinished, and I am finishing them, as well as the guild book system I have also created it from 0, logically other devs have already done it, thanks for your comment! Regards 🙂

#edit:

In case you hadn't read the excerpt properly, (I know my English sucks)

I am not an expert in c++ or lua, in fact I have started now after several years to take it
seriously although I do not have much time to invest, but I have always liked to share what little I know. 
Sometimes I enjoy tinkering and experimenting on my own, sometimes I see a system and try to do it my way,
sometimes I do as ‘Mali’ says I take out the reversed system and test it thoroughly,
but it is probably not enough for my knowledge or well

 

Edited by Nazox
  • Love 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member

#UPDATE

-Fixed a packet issue in guild wars (Kick you from the game after create new guilds/remove).
-Removed functions and fixed other functions related to guild wars (Buttons, img, etc).
-Added guild stats, (Other coding not the incomplete one), (I'm fixing some visual things but it's functional).
	-Now you can see all guilds in all empires.
	-Send a request to join a guild in your empire.
	-Cancel the guild request.
	-Top Guild's and rank Guild's.
	-Guild leaders can decline invitations request.
	-Detect if you already belong to a guild or are from another empire.

-Guild Warehouse quest has been reworked (I'm still working on the slot issue).
	-You can now expand your inventory to Level 3 (3 Tabs).
	-Will now ask for materials and yang (guild account) to upgrade the warehouse.
	-Verify that players have permissions.
	-Only the Leader can open a storehouse or upgrade it.

#WORKING

-New Guild Wars (Rounds, points, etc) (99%) (1% Testing).
-Command/Quest to delete lands for the inactivity system (85%).
-Guild Ranking (Guilds available in the whole server) (99%) (1% Testing).
-Guild bonus. (100%)
-Group Dungeons (Rankings, functions, etc) (0%).
-Guild Storage Levels (100%).
-Fix GuildStorage slots item (55%).

-Global Guild Systems (65%).

LbReHaUwQmS7VJ_5yfoQlg.png

0XlUmFZ6Tsuz7yf3EkfcBg.png

PNJs1AzKT3-rTFqxk-1gXg.png

Edited by Nazox
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 2

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member
31 minutes ago, WebElbir said:

Why download link?

There is no link because I'm working on them, correcting, testing and it takes me a lot of time to prepare all the guides, I just comment how the project is going for the moment, and later when I have everything I will try to publish it properly, actually i'm busy and  i don't have much time for the moment it's only published: 

-Increase the level of the guild
-The new guild interface
-Guild land removal.

 

Edited by Nazox
  • Love 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member

#UPDATE

-GuildStorage:
	-Fixed the problem, that the database did not save in window ‘GUILDBANK’ mode.
	-Removed unnecessary code and fixed other functions.
	-Fixed Log table (forgot to add a space :v).

-Guild Ranking:
	-Fixed functions in the Guild Ranking system.
	-Fixed problem, that didn't register the realm in the database, always showed ‘empire ->0’.
	-Fixed bug, that showed your guild in all windows (related to python + empire issue).
	-Fixed an issue that didn't allow to accept invitation through this system.

//Note: 
I'm finishing testing the guild store and the other systems well for all kinds of problems, I want to check that it doesn't cause problems with each other, but it's a step forward, I plan to make some extra improvements to the guild store.

#WORKING

-New donatios for Guild's (100%) (without medal system).
-New max level for Guild's (100%).
-New Interface for Guild (100%).
-Remove Guild Land for inactivity (3 months default) (100%).
-Guild Ranking (Guilds available in the whole server) (100%).
-Guild bonus. (100%)
-Guild Storage Levels (100%).
-New Guild Wars (Rounds, points, etc) (99%) (1% Testing).
-Fix GuildStorage slots item (99%) (1% Testing).
-Command/Quest to delete lands for the inactivity system (85%).
-Group Dungeons (Rankings, functions, etc) (0%).

#GUILD STORAGE:

o8wN5aNtQ_eZpy1bGNrE3g.png

#GUILD RANKING:

#Ignore the bug screen record :V

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Love 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

what the hell, i know that guy which made the guild stuff, a friend of mine and the old files of him got leaked around 3 years ago.
i've checked and alot of them are just a copy.

so this section should be closed because the owner of that systems are still offering it. so the main part of that is just a copy and you dont have the rights to share it.
You just reworked it a bit.

i've checked, exactly same guildstorage log table structure, same on guild sqls.
Here some examples:
https://metin2.download/picture/vNonR3TX8K36obD98K5bSaRWj2lI4epR/.png
https://metin2.download/picture/RrPAO74I5ADt37N7doVP6By4vI4ld9g8/.png

You're a little rat lol
Whats this thread to used? just pushing "updates" (you mean just installing things correctly from leaked source to your files and rework a bit and if you "completed" you will start creating an offering thead? 😄 be

#close request
 

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

  • Active+ Member
1 hour ago, Deso said:

Qué demonios, conozco a ese tipo que hizo las cosas del gremio, un amigo mío y los archivos viejos de él se filtraron hace unos 3 años.
He comprobado y muchos de ellos son solo una copia.

Así que esta sección debería estar cerrada porque el propietario de esos sistemas todavía los ofrece. Así que la parte principal de eso es solo una copia y no tienes los derechos para compartirla.
Simplemente lo reelaboraste un poco.

He comprobado, exactamente la misma estructura de la tabla de registro de almacenamiento del gremio, lo mismo en los sqls del gremio.
Aquí algunos ejemplos:
https://metin2.download/picture/vNonR3TX8K36obD98K5bSaRWj2lI4epR/.png
https://metin2.download/picture/RrPAO74I5ADt37N7doVP6By4vI4ld9g8/.png

Eres una pequeña rata jajaja
¿Para qué se usa este hilo? solo enviando "actualizaciones" (¿te refieres a simplemente instalar las cosas correctamente desde la fuente filtrada a tus archivos y volver a trabajar un poco y si estás "completas" comenzarás a crear una oferta? 😄 ser

#cerrar solicitud
 

Hi!!! thanks for your message!!! first of all I'm sorry, I didn't know they were sold, I just mentioned it at the beginning, I haven't seen anyone selling it and I'm getting it from various sources I've found, obviously, if I knew it had a seller I wouldn't have posted it, as you know I don't know what people filter things and what not, so I'm not aware, at no time if you read at the beginning, I have given myself the credit to say that it's mine, or that I have made the code, I simply mentioned as I said that I have been taking it from several bases and as it is a system that I like I wanted to contribute here, about the updates is to indicate how is the process of getting these systems and fix incomplete or failed things, so when I share it you know how it is, not that you see some bug or problem, so I also mentioned that if there are people who know about the subject and want to help I would do it.
I don't want any credit or even gain anything with this and I'm not interested, the idea of the update is that when I have 100% there is not much left to publish it, but I repeat, I was not aware of this being sold, because I'm not a fan of leaking things, so I think you have skated a little bit calling me a rat and more if you don't know me. 2 all people are rats, we are all in favour of using a filtered base, anyway, I ask the mods, if this is the case, apologise to the seller and close the topic as it is not my intention to spoil your sales. Anyway, I attach a bit of the main post, where I already answer this, and sorry for my English, and I repeat, if any mod sees this and it is so, close the post and I am sorry.

I intend to share the guild systems that I have not managed to see or that nobody sells (which is probably because I have not searched well)
Sometimes I enjoy tinkering and experimenting on my own, sometimes I see a system and try to do it my way, sometimes I do as ‘Mali’ says I take out the reversed system and test it thoroughly

Thanks for letting me know that there is a seller with these systems, I will still leave the first 3 contributions because the guild level seems silly to me to sell it and the gui is public. Regards

PD: Sorry my english

PD2: Summary: It's a system that I wanted to share free when I finished it, not sell it because I haven't seen it anywhere.

Edited by Nazox
  • Good 3
  • muscle 2

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active+ Member
2 hours ago, .SoNiiC. said:

reseller, reported

🤣🤣🤣🤣 I don't sell nothing lol, because people don't  read ?. But You're right, I'm a re seller, please donate me likes for wanting to share it for free I need feedback (for any case,   is joke, maybe someone think im reseller  xD)😡😡.

How I say before, I'm not reselling nothing and I'm waiting a mods tell me if I can work again in this or not, I don't buy sell nothing , I only working in this systems because I don't see seller, and I like this systems this is all.

Edited by Nazox
  • Metin2 Dev 1
  • muscle 1
  • Love 2

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Management

If there is a problem, you should open a ticket on the Discord server.
Reports without evidence will be ignored.

Sending me a private message on Discord is not considered a ticket. This is my personal message box and not a message box for reports related to communities I own.
So when you contact me in private message for this, don't be surprised if I ignore you.

  • Good 2
  • Love 1
Link to comment
Share on other sites

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