Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY!

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 05.12.2006, 20:41   #11
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

For debugging purposes or if you are just generally interested in outputting text to the server console, you can use this function:

Code:
void ConsoleMessage(WCHAR * pMessage)
{

	DWORD message = (DWORD)pMessage;
	__asm
	{
		push	message
		push	0		//Message colors: 0 for black, 2 for red
		push	18AA81D8h
		call	LOG_ADD		//DWORD * to address of log_add function
		add	esp, 0Ch	//fix stack pointer
	}

}
You'll need to create a pointer to the address of the log function elsewhere like in a header file. The address is 0x0053EEE0. That function will accept a WCHAR * for text you want to have displayed in l2Servers console.

Possible reasons for wanting to do this:

1. Just to look cool when loading ExUser lol

2. Debugging

3. Prompting admins when something bad happens or whatever your mind can think of
HongK is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:11.