Jump to content

Three questions about some basic stuff that i wasn't able to find in internet and forums


Recommended Posts

Hey, basically I have some basic questions and problem, the first one would be that I can change/sell items that are equipped while trading, some mounts kick "normal characters" from game and also have time of 0 but I think I can fix the "time of costumes and mounts" in Navicat. The third questions not a problem would be about item description with a exact bonus, let's say a belt gives a character 500 Health points and If I change that in Navi to let's say 600 it won't change and I know that, so im not sure what should I change in order to change the 500hp to 600hp. 

Id be glad for the any help❤️ 

Link to comment
Share on other sites

  • Premium
Quote

the first one would be that I can change/sell items that are equipped while trading

I don't understand this, if it's like you asked on Discord, as I've already said, you cannot do this. Again, there's a reason why there are some checks in place (like, you can't warp if you just traded).

Quote

some mounts kick "normal characters" from game

You mean they get teleported back? It's caused by this peace of code (change the numbers accordingly, do some tests)

		if(((false == ch->IsRiding() && fDist > 60) || fDist > 125) && OXEVENT_MAP_INDEX != ch->GetMapIndex())
		{
			/*const PIXEL_POSITION & warpPos = ch->GetWarpPosition();

			if(warpPos.x == 0 && warpPos.y == 0)
				LogManager::instance().HackLog("Teleport", ch);*/ // It may be imprecise

			sys_log(0, "MOVE: %s trying to move too far (dist: %.1fm) Riding(%d)", ch->GetName(), fDist, ch->IsRiding());

			ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ());
			ch->Stop();
			return;
	}

Also, if the mount, in your mob_proto, has a folder (in the folder column), you need to add the msa files of that mount (from your client) copied into share/data/monster/mount_folder. EX:

spacer.png

Quote

im not sure what should I change in order to change the 500hp to 600hp. 

You've changed the item on the database, but you also need the item_proto of your client

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

On 8/17/2022 at 12:25 PM, xXIntelXx said:

I don't understand this, if it's like you asked on Discord, as I've already said, you cannot do this. Again, there's a reason why there are some checks in place (like, you can't warp if you just traded).

You mean they get teleported back? It's caused by this peace of code (change the numbers accordingly, do some tests)

		if(((false == ch->IsRiding() && fDist > 60) || fDist > 125) && OXEVENT_MAP_INDEX != ch->GetMapIndex())
		{
			/*const PIXEL_POSITION & warpPos = ch->GetWarpPosition();

			if(warpPos.x == 0 && warpPos.y == 0)
				LogManager::instance().HackLog("Teleport", ch);*/ // It may be imprecise

			sys_log(0, "MOVE: %s trying to move too far (dist: %.1fm) Riding(%d)", ch->GetName(), fDist, ch->IsRiding());

			ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ());
			ch->Stop();
			return;
	}

 

You've changed the item on the database, but you also need the item_proto of your client

The first one is about when u are trading lets say with an NPC, im able to to sell my equipment of, the problem is that i can do this and I want to block it so you cant sell items that you have on.

The second one is about mount literally kicking from the game but you sent me something about teleporting back which also appears, will use it thx❤️

and the third one, woah so basically I have to change also the item proto in txt form that is in client and thats it?

Thx you so much and bless you ❤️

/Edit I might ask some dumb question bout the item proto for the belt example

Just going to db and opening item proto txt then changing it is the fix or did I misunderstood it?

//edit I figured it out with the description, so happy im very thankfull ❤️ for all the fixes and help from you

Edited by Tuckii
Link to comment
Share on other sites

  • Premium
9 minutes ago, Tuckii said:

The first one is about when u are trading lets say with an NPC, im able to to sell my equipment of the problem is that i can do this and I want to block it so you cant sell items that you have on.

The second one is about mount kicking from the game but you send me something about teleporting back which also appears, will use it thx❤️

and the third one, woah so basically I have to change also the item proto in txt form that is in client and thats it?

Thx you so much and bless you ❤️

OH, that is a totally whole different problem LOL well, in that case, on exchange.cpp, on:

bool CHARACTER::ExchangeStart(LPCHARACTER victim)

there should be something like:

	//PREVENT_TRADE_WINDOW
	if( IsOpenSafebox() || GetShopOwner() || IsInteractingWithNpc())
	{
		ChatPacket( CHAT_TYPE_INFO, LC_TEXT("If the Trade Window is open, you cannot trade with others." ) );
		return false;
	}
		
	if( victim->IsOpenSafebox() || victim->GetShopOwner() || victim->IsInteractingWithNpc() ||  victim->GetOfflineShopGuest() || victim->GetAuctionGuest())
	{
		ChatPacket( CHAT_TYPE_INFO, LC_TEXT("The other player is already trading." ) );
		return false;
	}
	//END_PREVENT_TRADE_WINDOW

InteractingWithNpc is just a function on my files that checks stuff:

bool CHARACTER::IsInteractingWithNpc() const
{
	if(IsCubeOpen())		return true;
	if(IsRouletteOpen())	return true;
	if(IsAcceOpen())		return true;

	return false;
}

You might need maybe some other checks, and some don't exist (like GetOfflineShopGuest)

I forgot, on:

bool CHARACTER::EquipItem(LPITEM item, int iCandidateCell)

there should be:

	if(item->IsExchanging())
		return false;

this check should be also on:

bool CHARACTER::UseItem(TItemPos Cell, TItemPos DestCell, int nArgument)

 

bool CHARACTER::DropItem(TItemPos Cell, WORD wCount)

 

bool CHARACTER::MoveItem(TItemPos Cell, TItemPos DestCell, WORD wCount, bool bSaveTime)

 

Quote

Just going to db and opening item proto txt then changing it is the fix or did I misunderstood it?

Yes and no, I don't know how you edit the item_proto in your server, but if you have like a converter txt->item_proto client then yeah, you edit the txt, you upload it (and that's the server part), and for the visual stuff you dump the item_proto client side and change it in the locale folder of the client (and then pack the locale folder with the new item_proto)

Edited by xXIntelXx
  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 13

      Metin2 Closed Beta Content (2003-2004)

    2. 25

      [SRC] Metin2 on LINUX - The Old Metin2 Project

    3. 2

      United/Club/Midgard serverfiles?

    4. 13

      Metin2 Closed Beta Content (2003-2004)

    5. 13

      Metin2 Closed Beta Content (2003-2004)

    6. 0

      Football Ground

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.