Quote:
Originally Posted by NoWay | Phoenix
Source -> Randomoption.cpp -> In Function
int CRandomOptionProperty::GetRandomOptionKind( CItemElem* pItemElem )
Replace the Function with this!
I hope that I could help you 
Best Regards~
H
|
He say's it's an error with the command and not the function, the original poster should also read the command to seeing its right in front of both you. Its quite simple of a fix but here we go anyways lol..... I wonder what happens if we remove the nerf :/
Code:
BOOL TextCmd_GenRandomOption( 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 ){
if( pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET ){
pUser->AddText( "Please deactivate your Pet/s." );
}else{
if( pItemElem->GetProp()->dwItemKind2 == IK2_CLOTH || pItemElem->GetProp()->dwItemKind2 == IK2_CLOTHETC || pItemElem->GetProp()->dwItemKind2 == IK2_CLOTHWIG ){
pUser->AddText( "No Cs is awakeable with /awake!");
}else{
if( pItemElem->GetProp()->dwID == II_SYS_SYS_SCR_BLESSEDNESS ){
return TRUE;
}else{
if( pUser->GetGold() >= 1000000 ){
g_xRandomOptionProperty->InitializeRandomOption( pItemElem->GetRandomOptItemIdPtr() );
g_xRandomOptionProperty->GenRandomOption( pItemElem->GetRandomOptItemIdPtr(), nRandomOptionKind, pItemElem->GetProp()->dwParts );
pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId() );
pUser->AddGold( -1000000 );
pUser->AddText( "Awakening: -1.000.000" );
}else{
pUser->AddText( "You must have 1.000.000 Penya to awake something." );
}
}
}else{
pUser->AddText ( "You have to put the item in first slot to awake it." );
}
}
#endif // __WORLDSERVER
return TRUE;
}