Old v15 source + Source addons

Source Fixxes

Hello,
I show you today how you can fix the
"onekill / invisible / summon / teleport" bug from Toms Hack

Copyright @ Yannickmama !!

1. You go first into the DPShttp://forum.ragezone.com/newthread.php?do=newthread&f=457rvr.cpp
2. You are looking for the following functions:


PHP:
CDPSrvr::OnModifyMode
CDPSrvr::OnSummonPlayer
CDPSrvr::OnTeleportPlayer

and change this :

PHP:
#ifdef __HACK_0516
		DPID dpid;
		ar >> dpid;
		if( pUser->m_Snapshot.dpidUser != dpid )
		{
			Error( "[%s] try to hack : PACKETTYPE_MODIFYMODE", pUser->GetName() );
			return;
		}
#endif	// __HACK_0516

to

PHP:
#ifdef __HACK_0516
		DPID dpid;
		ar >> dpid;
		if( pUser->m_Snapshot.dpidUser != dpid )
		{
			Error( "[%s] try to hack : PACKETTYPE_MODIFYMODE", pUser->GetName() );
			return;
		}
		if( !pUser->IsAuthHigher(AUTH_GAMEMASTER) )
		{
			Error( "[%s] try to hack with dpid : PACKETTYPE_MODIFYMODE", pUser->GetName() );
			return;
		}
#endif	// __HACK_0516

If you dont define __HACK_0516 go and define it :-*

for the Create Item fix from Toms Hack Programm go to :

CDPSrvr::OnBuyingInfo

and edit this acutually with you code

PHP:
void CDPSrvr::OnBuyingInfo( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
{/*
	BUYING_INFO2 bi2;
	ar.Read( (void*)&bi2, sizeof(BUYING_INFO2) );

	CWorld* pWorld;
	CUser* pUser	= g_UserMng.GetUser( dpidCache, dpidUser );

	SERIALNUMBER iSerialNumber	= 0;
	if( IsValidObj( pUser ) && ( pWorld = pUser->GetWorld() ) )
	{
		bi2.dwRetVal	= 0;
		CItemElem itemElem;
		itemElem.m_dwItemId		= bi2.dwItemId;
		itemElem.m_nItemNum		= (short)bi2.dwItemNum;
		itemElem.m_bCharged		= TRUE;
		BYTE nId;
		bi2.dwRetVal	= pUser->CreateItem( &itemElem, &nId );
#ifdef __LAYER_1015
		g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos(), pUser->GetLayer() );
#else	// __LAYER_1015
		g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos() );
#endif	// __LAYER_1015
		if( bi2.dwRetVal )
		{
			CItemElem* pItemElem	= pUser->m_Inventory.GetAtId( nId );
			if( pItemElem )
			{
				iSerialNumber	= pItemElem->GetSerialNumber();
				pItemElem->m_bCharged	= TRUE;
				if( bi2.dwSenderId > 0 )
				{
					// %s을 %s님으로부터 선물 받았습니다.
				}
			}
		}
	}
	g_dpDBClient.SendBuyingInfo( &bi2, iSerialNumber );
//	FILEOUT( "buyinginfo.txt", "dwServerIndex = %d\tdwPlayerId = %d\tdwItemId = %d\tdwItemNum = %d\n", 
	//	bi2.dwServerIndex, bi2.dwPlayerId, bi2.dwItemId, bi2.dwItemNum );
	static char lpOutputString[260]	= { 0, };
	sprintf( lpOutputString, "dwServerIndex = %d\tdwPlayerId = %d\tdwItemId = %d\tdwItemNum = %d",
		bi2.dwServerIndex, bi2.dwPlayerId, bi2.dwItemId, bi2.dwItemNum );		
	OutputDebugString( lpOutputString );
*/}

Then you have fixed allready the biggest problems

have fun and good luck <3​
 
Last edited:
Re: FlyFF v15 Source Code + Source Edits

Someone knows how to change that skils will be able to give 3 effects instaed of max 2?
 
Re: FlyFF v15 Source Code + Source Edits

Not sure if anyone is familiar with the Psykeeper glitch in which you can one hit pretty much anything but here's a fix for it. I will not explain this any further than simply giving the fix for it. You can figure out what to do with the snippet.
Code:
		if (nPercent > 100 )
		factor *= ((float)nPercent / 100) * 0.0f;
		else if(nPercent < 100 )
		factor *= ((float)nPercent / 100) * 2.0f;

The above snippet will make it so that instead of you hitting an outrageous number when in an attempt to do the glitch, you will hit 1 damage.

Note: This snippet can be useful if you understand basic c++ coding. It can be used to fix the Asal glitch as well. The one in which you swap gear in order to hit more damage.
 
Re: FlyFF v15 Source Code + Source Edits

anyone can give me an idea on how to edit GM authority, on what part in the source, i mean?
Thanks In Advance
 
Re: FlyFF v15 Source Code + Source Edits

If u want to change the authority for gm commands i think its in FuncTextCmd.cpp
 
Re: FlyFF v15 Source Code + Source Edits

Easy and Fail !
Learn more then Post.



~ Never Send a Sheep to Kill a Wolf ~

And by making a GM Character just go on MSSQL and loged and go on ACCOUNT_DBF and Then Programmability, Then Stored Procedures, dbo.usp_CreateNewAccount

Blaahhhhhh, Fail :)

---------- Post added at 12:40 PM ---------- Previous post was at 12:32 PM ----------

If u want to change the authority for gm commands i think its in FuncTextCmd.cpp

If u want to have comands and be able to use it then make ur account gm lol

How ?
do the steps i said @_@
 
Last edited:
Re: FlyFF v15 Source Code + Source Edits

Easy and Fail !
Learn more then Post.



~ Never Send a Sheep to Kill a Wolf ~

And by making a GM Character just go on MSSQL and loged and go on ACCOUNT_DBF and Then Programmability, Then Stored Procedures, dbo.usp_CreateNewAccount

Blaahhhhhh, Fail :)

---------- Post added at 12:40 PM ---------- Previous post was at 12:32 PM ----------



If u want to have comands and be able to use it then make ur account gm lol

How ?
do the steps i said @_@

LOL, I think you're the one who is FAILING.

Most of the GM commands are declare in FuncTextCmd.cpp (Search for BEGINE_TEXTCMDFUNC_MAP then change those AUTH_GENERAL to the authority you want). If you want to disable GM's from doing stuff then I believe DPSrvr.cpp will work best (Add function you're own)
 
Last edited:
Re: FlyFF v15 Source Code + Source Edits

hey Azriah, i am talking with the source not SQL. Please read before you comment like that!

Anyway i got it already, thanks kingolo654,xHeinrich and Legiit for help.
 
Re: FlyFF v15 Source Code + Source Edits

Ay, stop commenting with stuff like "Nice release". It's not constructive at all.


Sorry had to make my 20th post to let one guy know i helped him ;]

@EDIT:
I will post in 5 mins how to make /ResistItem work like /RefineAccessory so you don't have to put it in that window which helps in tests :)

Go to FuncTextCmd.cpp and search for Resistitem...

Replace whole command with:
Code:
BOOL TextCmd_ResistItem( CScanner& scanner )
{
#ifdef __WORLDSERVER
	CUser* pUser	= (CUser*)scanner.dwValue;

	BYTE bItemResist = scanner.GetNumber();
	int nResistAbilityOption = scanner.GetNumber();
	int nAbilityOption	= scanner.GetNumber();

	if( bItemResist < 0 || 5 < bItemResist )
	{
		return FALSE;
	}
#if __VER >= 13 // __EXT_ENCHANT
	if( nResistAbilityOption < 0 || CItemUpgrade::GetInstance()->GetMaxAttributeEnchantSize() < nResistAbilityOption 
		|| nAbilityOption < 0 || CItemUpgrade::GetInstance()->GetMaxGeneralEnchantSize() < nAbilityOption )
#else // __EXT_ENCHANT
	if( nResistAbilityOption < 0 || 10 < nResistAbilityOption || nAbilityOption < 0 || 10 < nAbilityOption )
#endif // __EXT_ENCHANT
	{
		return FALSE;
	}

	if( bItemResist == 0 )
	{
		nResistAbilityOption = 0;
	}

	CItemElem* pItemElem0	= pUser->m_Inventory.GetAt( 0 );
	if( NULL == pItemElem0 )
		return FALSE;
	
	pUser->UpdateItem( (BYTE)( pItemElem0->m_dwObjId ), UI_IR,  bItemResist );
	pUser->UpdateItem( (BYTE)( pItemElem0->m_dwObjId ), UI_RAO,  nResistAbilityOption );
	pUser->UpdateItem( (BYTE)( pItemElem0->m_dwObjId ), UI_AO,  nAbilityOption );
#if __VER >= 9 // __ULTIMATE
	if( nAbilityOption > 5 && pItemElem0->GetProp()->dwReferStat1 == WEAPON_ULTIMATE )
#if __VER >= 12 // __EXT_PIERCING
		pUser->UpdateItem( (BYTE)pItemElem0->m_dwObjId, UI_ULTIMATE_PIERCING_SIZE, nAbilityOption - 5 );
#else // __EXT_PIERCING
		pUser->UpdateItem( (BYTE)pItemElem0->m_dwObjId, UI_PIERCING_SIZE, nAbilityOption - 5 );
#endif // __EXT_PIERCING
#endif //__ULTIMATE

#endif // __WORLDSERVER
	return TRUE;
}

to upgrade your item put it in 1st slot of inventory and write for example /ResistItem 5 20 10

Hope it helps ;]
 
Last edited:
Re: FlyFF v15 Source Code + Source Edits

Hi, do we really need the VC 2003 ? or can we take another version (like the 2010) ?
 
Re: FlyFF v15 Source Code + Source Edits

Hi, do we really need the VC 2003 ? or can we take another version (like the 2010) ?

the coding was written in 2003, trying to open it in a higher version, would require converting and unless you know what you're doing, it would probably mess up your source.
 
Re: FlyFF v15 Source Code + Source Edits

Well, i understand, but to find the version 2003 it's hard.

And i agree the version 2010 converted my files. Also i get the error with the file afxwin.h.

EDIT: Well i find it, can i take any version ?
 
Last edited:
Re: FlyFF v15 Source Code + Source Edits

Well, i got an error again.

It missing an include files, but i don't know where find it.

EDIT: Well i tried with some sources of V15, and i always get some error, atm i got an error with a link (d3dx9dt.lib).

The headers files need to be edited ?
 
Last edited:
Re: FlyFF v15 Source Code + Source Edits

Not sure if anyone is familiar with the Psykeeper glitch in which you can one hit pretty much anything but here's a fix for it. I will not explain this any further than simply giving the fix for it. You can figure out what to do with the snippet.
Code:
		if (nPercent > 100 )
		factor *= ((float)nPercent / 100) * 0.0f;
		else if(nPercent < 100 )
		factor *= ((float)nPercent / 100) * 2.0f;

The above snippet will make it so that instead of you hitting an outrageous number when in an attempt to do the glitch, you will hit 1 damage.

Note: This snippet can be useful if you understand basic c++ coding. It can be used to fix the Asal glitch as well. The one in which you swap gear in order to hit more damage.

I just read that code snippet a little closer, and there's one slight problem. If you used that, someone at 100% MP would have some sort of error, cause there's no formula for it. idk if it'd be 0 damage or a client crash, but something would happen. You'd have to change the else if to: else if(nPercent <= 100 )
 
Back