Hi and Hello, my apologies for this thread in advance if this post is already Posted somewhere.
Now back to the main Topic, i noticed that some of the Source's here has a different "/sro" commands. I compared the "Blessed Source" and the "Virtuos Source v19".
And here what i have'd noticed:
Blessed Source: /sro
BOOL TextCmd_SetRandomOption( CScanner & s )
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)s.dwValue;
CItemElem* pItemElem = pUser->m_Inventory.GetAt( 0 );
if( pItemElem )
{
int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind( pItemElem );
if( nRandomOptionKind >= 0 )
{
g_xRandomOptionProperty->InitializeRandomOption( pItemElem->GetRandomOptItemIdPtr() );
int nDst, nAdj;
int cb = 0;
nDst = s.GetNumber();
while( s.tok != FINISHED )
{
nAdj = s.GetNumber();
if( nDst == 48 ) // Broken attribute
break;
if ( nDst > 96 || nDst < 1 ) // v16 max/min dst attribute
break;
if ( nAdj > 512 || nAdj < -512 ) // Prevent integer overflows
break;
g_xRandomOptionProperty->SetParam( pItemElem->GetRandomOptItemIdPtr(), nDst, nAdj );
cb++;
if( cb >= MAX_RANDOM_OPTION )
break;
nDst = s.GetNumber();
}
pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId() );
}
}
#endif // __WORLDSERVER
return TRUE;
}
Virtous Source v19: /sro
BOOL TextCmd_SetRandomOption( CScanner & s )
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)s.dwValue;
CItemElem* pItemElem = pUser->m_Inventory.GetAt( 0 );
if( pItemElem )
{
int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind( pItemElem );
if( nRandomOptionKind >= 0 )
{
g_xRandomOptionProperty->InitializeRandomOption( pItemElem->GetRandomOptItemIdPtr() );
int nDst, nAdj;
int cb = 0;
nDst = s.GetNumber();
while( s.tok != FINISHED )
{
switch( nDst )
{
case 1:
case 2:
case 3:
case 4:
case 9:
case 11:
case 24:
case 26:
case 35:
case 36:
case 37:
case 75:
case 77:
case 83:
break;
default:
pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId() );
return TRUE;
}
nAdj = s.GetNumber();
if( s.tok == FINISHED )
break;
g_xRandomOptionProperty->SetParam( pItemElem->GetRandomOptItemIdPtr(), nDst, nAdj );
cb++;
if( cb >= MAX_RANDOM_OPTION )
break;
nDst = s.GetNumber();
}
pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId() );
}
}
#endif // __WORLDSERVER
return TRUE;
}
I think the one in "Virtous Source v19" has a overflaws in integers? If i'm correct.? Because when you use the command for example: /sro 36 16985 36 16985 36 16985 "this will give an awake to your item 3x511% inc HP"
But the "36" is not even the Right Number Command of awake when you look in DefineAttribute.h in your Resource. The #36 refers to "DST_MP_MAX" not the #52 for the Correct "DST_HP_MAX_RATE" for Increase HP.
Unlike the "Blessed Source" it does not have overflaws on it i think? Because i tried to use the code: /sro 52 511 52 511 52 511 "it gives me the Proper Awakening for (DST_HP_MAX_RATE)".
Edit it slightly to make it favorable for the v19 "DefineAttribute.h"
Once again i posted this thread just to let also other people who does not know about this knowledge. If i did something wrong with the code or what please correct me, and i will gladly learn from you.

Best regards and respect to all
