Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Lahap Dupe Protection

Retired Old Man
Member
Joined
Jun 9, 2008
Messages
761
Reaction score
706
thought this might come handy for the mu coders who are out there, since i left myself and have all kinds of stuff lying around useless guess dont mind releasing some, after all sharing is caring :):

Structs
Code:
struct tagInterfaceState 
{
/*<bitfield this+0x0>*/ /*|0x4|*/ unsigned long use:2;
/*<bitfield this+0x0>*/ /*|0x4|*/ unsigned long state:4;
/*<bitfield this+0x0>*/ /*|0x4|*/ unsigned long type:0xA;
};

[COLOR="Red"]THE CODE BELOW GOES TO OBJECTSTRUCT[/COLOR]

/*<thisrel this+0xe74>*/ /*|0x4|*/ struct tagInterfaceState m_IfState;

Lahap Protection
Code:
case 0xBC:
if(ObjTable[aIndex].m_IfState.use > 0 && ObjTable[aIndex].m_IfState.type != 12)
return false;
break;

this piece of code checks the states, and if someone tries to dupe, gs returns a false and breaks the action. yet simple but effective.

in addition you can implement a logger and/or an individual system, some kind of punishment system for example.

Example 1
Code:
case 0xBC:
if(ObjTable[aIndex].m_IfState.use > 0 && ObjTable[aIndex].m_IfState.type != 12)
LogAddFunc(2,"[Anti-Hack][Trade Dupe] [Lahap] (%s)(%s)",gObj->AccountID,gObj->Name);
return false;
break;

Example 2
Code:
case 0xBC:
if(ObjTable[aIndex].m_IfState.use > 0 && ObjTable[aIndex].m_IfState.type != 12)
LogAddFunc(2,"[Anti-Hack][Trade Dupe] [Lahap] (%s)(%s)",gObj->AccountID,gObj->Name);
DupeProtection(aIndex);
return false;
break;

-----

void DupeProtection(aIndex)
{
if (DupePunishmentSystem = 0)
{
return;
}
if (PunishmentType = 1)
{
GCServerMsgStringSend("Kiss My butt Nawb",aIndex,1);
}
if (PunishmentType = 2)
{
GCServerMsgStringSend("Hai, You Just Got BANNED",aIndex,1);
SQL.Execute(UPDATE MuOnline.dbo.MEMB_INFO SET ctl1_code = '1' WHERE memb___id = '%s'",gObj->AccountID);
}
else
{
do nothing
}
}

Definitions
Code:
#define LogAddFunc ((void(*) (unsigned char cor,char* Texto,...)) 0x00403CC9) [COLOR="Red"]<- For 1.00.18 GS[/COLOR]

This is useful only up to .18 gs since it has been fixed by webzen on .66 and later versions.


Have Fun, Shatter :rolleyes:
 
iNewLegend , Leo123
Joined
Apr 26, 2006
Messages
296
Reaction score
81
first time fixed by me and drakelv ;)
 
Experienced Elementalist
Joined
Aug 26, 2009
Messages
278
Reaction score
6
so who care if that wasn t released for community ?

Thanks shatter
 
Junior Spellweaver
Joined
Mar 5, 2009
Messages
171
Reaction score
71
so who care if that wasn t released for community ?

Thanks shatter

uhm, i think leo or drakelv release it, on coderzfactory forums, i dont know if was there today

Edit: i think was on his S3 EP1 Project, no?
Edit2: the source are differents but the idea is the same
 
Last edited:
Experienced Elementalist
Joined
Aug 26, 2009
Messages
278
Reaction score
6
was smth included in his files, not something usefull for others who use other versions
 
Back
Top