I am currently working an the Fashion Combination system and i want the success rate to be low. How ever if i change the
nFashionCombineChance = 10000 //100%
to
nFashionCombineChange = 100 //1%
It doesnt work every combination i do is an success.
Is there something inside the source that i have to change?
Cause i have also seen this
PHP Code:
if( xRandom( 10000 ) < 10000 )
{
int nResult = 0;
nResult = g_xRandomOptionProperty->MergeRandomOption( pItemElem[0], pItemElem[1] );
nResult += g_xRandomOptionProperty->MergeRandomOption( pItemElem[2], pItemElem[3] );
nResult += g_xRandomOptionProperty->MergeRandomOption( pItemElem[4], pItemElem[5] );
nResult += g_xRandomOptionProperty->MergeRandomOption( pItemElem[6], pItemElem[7] );
if( nResult > 0 )
{
Error( "packet editor detected. tried to combine more then 3 awakening on one item. User: %s", pUser->GetName() );
}
for( int i = 1; i < 8; i += 2 )
{
pUser->UpdateItem( (BYTE)pItemElem[i]->m_dwObjId, UI_NUM, 0 );
}
for( int i = 0; i < 8; i += 2 )
{
pUser->UpdateItemEx( (BYTE)( pItemElem[i]->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem[i]->GetRandomOptItemId() );
}
pUser->AddDefinedText( TID_COSTUME_COSTUMEMIXCOMPLETE );
}
else
{
//FAIL CODE
}
With kind regards