How to add coordinate display?

10/30/2011 14:08 shevechco#1
How in the game the upper right above the small map added that coordinates... ?
10/30/2011 14:11 .Monster#2
If i understood it, you have to look for the functions were if you press 9 the coordinates are written into a .txt file, now take it and let it continously show your coordinates via i think sprintf function, above the mini map.
10/30/2011 14:58 Reavern#3
You can write /position in the Chat, then you can see your coordinates.

But I don't know, how to display the coordinates over the Mini Map.
10/30/2011 15:04 Yakuzai.#4
Do it like this :

WndField.cpp
Search for
Code:
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), rectRoot.top );
	Move( point );
After this, add this:
Code:
#ifdef __MINIMAP_COORDINATES
	CString StrCoordinates;					//CString Variable erstellen
    D3DXVECTOR3 vPos = g_pPlayer->GetPos();	//Position in 3D Vector speichern
	StrCoordinates.Format( prj.GetText(TID_GAME_NOWPOSITION), vPos.x, vPos.y, vPos.z ); //Koordinaten in CString schreiben

	CWndStatic* pSkillNameStatic;
		pSkillNameStatic = (CWndStatic*) GetDlgItem( WIDC_STATIC2 );	
		pSkillNameStatic->SetTitle(StrCoordinates);						//Koordinaten auf dem Bildschirm ausgeben
#endif //__MINIMAP_COORDINATES
Now define __MINIMAP_COORDINATES in the VersionCommon.h of the Neuz.

Finaly, bring up a StaticControl namend WIDC_STATIC2 in Daisy were you want.

Finish
10/30/2011 15:30 Pumbaaa#5
Code:
	char sMsg[256] = { 0 };
	D3DXVECTOR3 pPos = g_pPlayer->GetPos();

	sprintf( sMsg, "( %i, %i, %i )",pPos.x,pPos.y,pPos.z);
	CRect rectWindow = GetClientRect();
	p2DRender->TextOut(rectWindow.left + 18, rectWindow.bottom - 18, sMsg, 0xff000000);
Without Static.

EDIT: void CWndNavigator::OnDraw(C2DRender* p2DRender) is the function.
10/30/2011 17:20 shevechco#6
I want this effect

[Only registered and activated users can see links. Click Here To Register...]
10/30/2011 17:48 killerooo#7
i can give you the code later.
10/30/2011 17:50 shevechco#8
Quote:
Originally Posted by killerooo View Post
i can give you the code later.
Thank you, hope you can guide me to complete, I do not understand C + +
10/30/2011 17:59 Pumbaaa#9
Use
Code:
#ifdef __SHOW_POS_ON_NAVIGATER
	if( g_pPlayer == NULL ) {
		SetTitle( "Navigater" );
		return;
	}
	char szMsg[256] = { 0 };
	D3DXVECTOR3 pPos = g_pPlayer->GetPos();

	sprintf( szMsg, "Pos: (%i , %i, %i)",pPos.x,pPos.y,pPos.z);

	SetTitle( szMsg );
#endif
10/30/2011 18:14 shevechco#10
Quote:
Originally Posted by Pumbaaa View Post
Use
Code:
#ifdef __SHOW_POS_ON_NAVIGATER
	if( g_pPlayer == NULL ) {
		SetTitle( "Navigater" );
		return;
	}
	char szMsg[256] = { 0 };
	D3DXVECTOR3 pPos = g_pPlayer->GetPos();

	sprintf( szMsg, "Pos: (%d , %d, %d)",pPos.x,pPos.y,pPos.z);

	SetTitle( szMsg );
#endif
The code to put where?
10/30/2011 18:39 Pumbaaa#11
After
Code:
void CWndNavigator::OnDraw(C2DRender* p2DRender)
{
#if __VER >= 13 // __RAINBOW_RACE
	// Rainbow Race Time Ãâ·Â
	DWORD dwRainbowRaceTime = CRainbowRace::GetInstance()->m_dwRemainTime;
	if(dwRainbowRaceTime > 0)
	{
		char szMsg[256] = { 0 };
		CTimeSpan ct( (dwRainbowRaceTime -  GetTickCount()) / 1000 );
		sprintf( szMsg, "%.2d:%.2d:%.2d", ct.GetHours(), ct.GetMinutes(), ct.GetSeconds() );
		CRect rectWindow = GetClientRect();
		p2DRender->TextOut(rectWindow.right - 50, rectWindow.bottom - 16, szMsg, 0xffffff00);
	}
#endif //__RAINBOW_RACE
10/30/2011 18:49 killerooo#12
Pumbaa wieso gibst du den Leuten alles ?
#closerequest
10/30/2011 18:51 .Monster#13
Weil er es kann :)
10/30/2011 18:53 killerooo#14
Monster dich hab ich nicht gefragt Pumbaaa hat das nicht gecodet ;)
er hat paar koreanische Zeichen zu "Pos" gemacht und nen fehlendes %d rangehängt.
Ausserdem die Variablen sNavPos und sPos hättest ja wohl nutzen können ;)
Man muss eine Variable für y x z erstellen und den char auf die ersten 3 Werte beschränken da ansonsten die Zahlen das Fenster sprengen.
Desweiteren würde ich die Refreshtime der Position auf 1ne Sekunde beschränken da das ansonsten ziemlich unschön aussieht ;)
10/30/2011 19:02 Pumbaaa#15
Quote:
Originally Posted by killerooo View Post
Monster dich hab ich nicht gefragt Pumbaaa hat das nicht gecodet ;)
er hat paar koreanische Zeichen zu "Pos" gemacht und nen fehlendes %d rangehängt.
Ausserdem die Variablen sNavPos,Get2DPos und sPos hättest ja wohl nutzen können ;)
Omg,
1.) der Code stammt aus dem Chinesischen Source
2.) sollte es für niemanden mit halbwegs Ahnung von dem Flyff Source ein Problem darstellen, sowas zu coden.

Es ist nichts besonderes, nur den Titel von einem Fenster auf ein paar Integerwerte zu ändern, sowas solltest sogar du hinbekommen...

PS: Get2DPos ist keine Variable, du Held -.-