Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Last Chaos
You last visited: Today at 05:02

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



DMG Hack Fix (APet)

Discussion on DMG Hack Fix (APet) within the Last Chaos forum part of the MMORPGs category.

Reply
 
Old   #1

 
theDJ-scripts's Avatar
 
elite*gold: 319
Join Date: May 2011
Posts: 147
Received Thanks: 31
DMG Hack Fix (APet)

​Too many people already know it... for those who didn't know the dmg hack (with apets)*before:

doFuncItem.cpp

in this function

Code:
void do_ItemWear(CPC* ch, CNetMsg::SP& msg)
right after

Code:
CItem* item = ch->m_inventory.getItem(packet->tab, packet->invenIndex);
insert

Quote:
Originally Posted by LiQuiD View Post
If you are not removing the wearpos from the packet a fix just checking for pets is not the best idea so you can still put other items on places where they should never be.

rather do:
Code:
if (packet->wearPos != item->m_itemProto->getItemWearing())
{
	CNetMsg::SP rmsg(new CNetMsg);
	ResponseClient::ItemWearMsg(rmsg, ResponseClient::WEAR_ERR_INVALID_POS);
	SEND_Q(rmsg, ch->m_desc);
	return;
}
theDJ-scripts is offline  
Old 06/13/2021, 18:32   #2


 
Veni/Marius's Avatar
 
elite*gold: 36
Join Date: May 2014
Posts: 1,606
Received Thanks: 1,044
better way is to first remove the wear position from the packet itself. the client does not need to send that info to the server, the server should check and determine that itself.

so in the end you should do something like this:

Code:
CItem* item = ch->m_inventory.getItem(packet->tab, packet->invenIndex);

int wearPos;
wearPos = item->m_itemProto->getItemWearing()

// change all packet->wearPos to the varaible like this

	if (wearPos < 0 || wearPos >= MAX_WEARING)
	{
		CNetMsg::SP rmsg(new CNetMsg);
		ResponseClient::ItemWearMsg(rmsg, ResponseClient::WEAR_ERR_INVALID_POS);
		SEND_Q(rmsg, ch->m_desc);
		return ;
	}
Sure, you check if it's an "APet", but you dont check if its a normal pet. With this you also dont check if the item is an experience booster.

If you see code like this you should fix it properly and not just half of it
Veni/Marius is offline  
Thanks
2 Users
Old 06/13/2021, 19:16   #3

 
LiQuiD's Avatar
 
elite*gold: 80
Join Date: Oct 2012
Posts: 524
Received Thanks: 760
If you are not removing the wearpos from the packet a fix just checking for pets is not the best idea so you can still put other items on places where they should never be.

rather do:
Code:
if (packet->wearPos != item->m_itemProto->getItemWearing())
{
	CNetMsg::SP rmsg(new CNetMsg);
	ResponseClient::ItemWearMsg(rmsg, ResponseClient::WEAR_ERR_INVALID_POS);
	SEND_Q(rmsg, ch->m_desc);
	return;
}
LiQuiD is offline  
Thanks
6 Users
Old 06/22/2021, 14:06   #4

 
LiQuiD's Avatar
 
elite*gold: 80
Join Date: Oct 2012
Posts: 524
Received Thanks: 760
Quote:
Originally Posted by LiQuiD View Post
If you are not removing the wearpos from the packet a fix just checking for pets is not the best idea so you can still put other items on places where they should never be.

rather do:
Code:
if (packet->wearPos != item->m_itemProto->getItemWearing())
{
	CNetMsg::SP rmsg(new CNetMsg);
	ResponseClient::ItemWearMsg(rmsg, ResponseClient::WEAR_ERR_INVALID_POS);
	SEND_Q(rmsg, ch->m_desc);
	return;
}
There is a problem with the fix i wrote. If you try to wear more than one accessory the packet->wearpos will increase by 1 but the serverside accessory wearing will remain 7.

So this should solve the problem:
Code:
	if (packet->wearPos != item->m_itemProto->getItemWearing())
	{
		if (item->IsAccessary())
		{
			if (packet->wearPos < WEARING_ACCESSORY1 || packet->wearPos > WEARING_ACCESSORY3)
			{
				CNetMsg::SP rmsg(new CNetMsg);
				ResponseClient::ItemWearMsg(rmsg, ResponseClient::WEAR_ERR_INVALID_POS);
				SEND_Q(rmsg, ch->m_desc);
				return;
			}
		}
		else
		{
			CNetMsg::SP rmsg(new CNetMsg);
			ResponseClient::ItemWearMsg(rmsg, ResponseClient::WEAR_ERR_INVALID_POS);
			SEND_Q(rmsg, ch->m_desc);
			return;
		}
	}
LiQuiD is offline  
Reply


Similar Threads Similar Threads
[Release] APet Tiger Guardian Spirit
04/03/2021 - SRO PServer Guides & Releases - 3 Replies
#Delete
[04.09.13] GigaByte v2.6 [FIX, FIX, FIX, FIX AND FIX]
09/11/2013 - WarRock Hacks, Bots, Cheats & Exploits - 79 Replies
http://www.elitepvpers.com/forum/warrock-hacks-bot s-cheats-exploits/2843300-11-09-gigabyte-public-v2 -7-a.html
WTT sw2+516silk,pet,apet
06/04/2010 - Silkroad Online Trading - 8 Replies
it has 2 low lvl chars :P silk: 516,pick pet (27days), lvl55genie and another dead pick pet, 90+reverses, some instant re scrolls,19m d like to get: a cool char at sw1 noob offers will be ignored



All times are GMT +1. The time now is 05:04.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.