Nice and thx i will use it :D
This is a discussion on Old v15 source + Source addons within the Flyff Archive forums, part of the Flyff category; Hello, I show you today how you can fix the "onekill / invisible / summon / teleport" bug from Toms ...
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:
and change this :PHP Code:CDPSrvr::OnModifyMode
CDPSrvr::OnSummonPlayer
CDPSrvr::OnTeleportPlayer
toPHP Code:#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
If you dont define __HACK_0516 go and define it :-*PHP Code:#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
for the Create Item fix from Toms Hack Programm go to :
CDPSrvr::OnBuyingInfo
and edit this acutually with you code
Then you have fixed allready the biggest problemsPHP Code: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 );
*/}
have fun and good luck <3
Last edited by rad92; 23-05-11 at 02:48 AM.
Nice and thx i will use it :D
thanks for this my friend
Someone knows how to change that skils will be able to give 3 effects instaed of max 2?
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.
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.Code:if (nPercent > 100 ) factor *= ((float)nPercent / 100) * 0.0f; else if(nPercent < 100 ) factor *= ((float)nPercent / 100) * 2.0f;
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.
anyone can give me an idea on how to edit GM authority, on what part in the source, i mean?
Thanks In Advance
If u want to change the authority for gm commands i think its in FuncTextCmd.cpp
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 @_@
Last edited by Azriah; 19-07-11 at 01:34 PM.
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 by kingolo654; 19-07-11 at 01:58 PM.
I'm a Unicorn
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.
Nice release :)
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:
to upgrade your item put it in 1st slot of inventory and write for example /ResistItem 5 20 10Code: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; }
Hope it helps ;]
Last edited by Jomex; 29-07-11 at 07:19 PM.
Hi, do we really need the VC 2003 ? or can we take another version (like the 2010) ?