Experienced Elementalist
- Joined
- Sep 8, 2009
- Messages
- 296
- Reaction score
- 78
Re: FlyFF v15 Source Code + Source Edits
I've just come across what appears to be how to edit where you can PK in the arena. According to the math that i've done it's 100% accurate and if edited should change where you can attack.
The equation, judging by where you're standing in the arena actually works. I was standing just outside the arena and after the equation i got the number 1246.627537, which is JUST over 1246 hence it returns as false.
I've just come across what appears to be how to edit where you can PK in the arena. According to the math that i've done it's 100% accurate and if edited should change where you can attack.
Code:
#ifdef __JEFF_11_4
BOOL CMover::IsArenaTarget( CMover* pMover )
{
CWorld* pWorld = GetWorld();
if( pWorld && pWorld->IsArena() )
{
int dx = (int)( pMover->GetPos().x - 490 );
int dy = (int)( pMover->GetPos().z - 507 );
int d = dx * dx + dy * dy;
if( d > 1246 )
return FALSE;
dx = (int)( GetPos().x - 490 );
dy = (int)( GetPos().z - 507 );
d = dx * dx + dy * dy;
if( d > 1246 )
return FALSE;
return TRUE;
}
return FALSE;
The equation, judging by where you're standing in the arena actually works. I was standing just outside the arena and after the equation i got the number 1246.627537, which is JUST over 1246 hence it returns as false.