Code:
signed __int64 __fastcall Script_GetPVPRankProgress(__int64 L)
{
__int64 active_player; // rax
sub_170C10(L);
if ( active_player )
lua_pushnumber(
L,
(float)((float)*(unsigned __int8 *)(*(_QWORD *)(active_player + 0xB190) + 0x3A15i64) * 0.0039215689));
else
lua_pushnumber(L, 0.0);
return 1i64;
}
Obviously active_player + 0xB190 is a pointer to the active player's descriptors.
psudo-code would be something like
Code:
int Script_GetPVPRankProgress(lua_State* L)
{
CGActivePlayer* player = GetActivePlayer(L);
if (player)
lua_pushnumber(L, player->Descriptors.PVPRankProgress * 0.0039215689);
else
lua_pushnumber(L, 0.0);
return 1;
}