Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 15:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Sending text to Nostale chat

Discussion on Sending text to Nostale chat within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2015
Posts: 7
Received Thanks: 0
Sending text to Nostale chat

Hi.
Does anyone know how to send text or single characters to opened chat window (preferable WinApi function)?
I tried SendMessage, PostMessage, keybd_event (works fine in loging screen but not in chat).
I'd be grateful for any help or hint.

EDIT:

Actually keybd_event works in this case (probably SendInput also).
Problem occured because of different behaviour of WinApi function in Delphi and C#.
IsThisMyName is offline  
Old 07/22/2015, 13:38   #2
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
Send packet "say" to server.
WalrossGreat is offline  
Old 07/22/2015, 13:51   #3
 
elite*gold: 0
Join Date: Feb 2012
Posts: 28
Received Thanks: 9
But when you send "say", other players see it, but you not. You also have to emulate "msg" packet
k4r3r is offline  
Old 07/22/2015, 14:20   #4

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Whats the problem
It´s important that other players see it.

I dont think that he know, how to send packets.
BladeTiger12 is offline  
Old 07/22/2015, 14:30   #5

 
FI0w's Avatar
 
elite*gold: 50
Join Date: Jul 2014
Posts: 1,700
Received Thanks: 1,165
Do it like Spam bot? xD Send Text like a bot to Nostale and after that the key "Enter"
FI0w is offline  
Old 07/22/2015, 23:42   #6
 
elite*gold: 0
Join Date: Feb 2012
Posts: 28
Received Thanks: 9
Quote:
Originally Posted by BladeTiger12 View Post
Whats the problem
It´s important that other players see it.

I dont think that he know, how to send packets.
There are too many tutorials on e*pvp...
k4r3r is offline  
Old 07/23/2015, 00:03   #7
 
elite*gold: 0
Join Date: Feb 2015
Posts: 7
Received Thanks: 0
It's not an issue of knowing how to send packets - just don't want to interfere in game.
Only reading memory and responding by simulating player with WinApi keyboard and mouse functions.
IsThisMyName is offline  
Old 07/23/2015, 11:57   #8
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
@k4r3r
Where? I saw only sources without any comments to copy&paste

@topic
You should do function that changes char in byte key code, then sending it for example with PostMessage.
WalrossGreat is offline  
Old 07/23/2015, 17:28   #9
 
elite*gold: 0
Join Date: Feb 2015
Posts: 7
Received Thanks: 0
@WalrossGreat
I'm using WinApi's VkKeyScan to get the numeric code of a character with combination of PostMessage or keybd_event (SendInput is too complicated for now :P )

PostMessage and SendMessage function can send keycodes to nt window but not the focused element like chat or login edit boxes - probably something to do with directX and openGL in game interface. Maybe just finding handle to speific controll would do the trick but this is too much work :P
By PostMessage or SendMessage and keycodes I use ingame keyboardcontroled features like opening specific windows, using skills etc.

keybd_event and SendInput send key to active focused controll instead of entire window, so they can be used to send text (char by char from string as a char table).
Downside of this method is that the nt window must be visible and focused during sending text - for me not an issue, I don't require it to work on minimized window.
IsThisMyName is offline  
Old 07/23/2015, 20:18   #10
 
elite*gold: 0
Join Date: Feb 2012
Posts: 28
Received Thanks: 9
Code:
void SimulateKey(char key)
{
	short val = VkKeyScanA(tolower(key));

	SendMessage(hWnd, WM_KEYDOWN, val, NULL);
	SendMessage(hWnd, WM_KEYUP, val, NULL);
}

SimulateKey('1');
Just get hWnd of the window and you can send keys in background, enjoy ;d
k4r3r is offline  
Old 07/23/2015, 21:07   #11
 
elite*gold: 0
Join Date: Oct 2011
Posts: 814
Received Thanks: 675
If you know how to call asm functions, i can attach you the chat function. :-)
Trollface- is offline  
Old 07/24/2015, 12:14   #12
 
ernilos's Avatar
 
elite*gold: 20
Join Date: Jan 2012
Posts: 766
Received Thanks: 645
Quote:
Originally Posted by Trollface- View Post
If you know how to call asm functions, i can attach you the chat function. :-)
Wow, I'm interested on this, could you post them? ^~^
ernilos is offline  
Old 07/24/2015, 14:05   #13

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
@ernilos this function is easy to find & to implement, here:
Code:
#include <iostream>
#include <string>

struct NosWChar {
private:
	int m_len;
	wchar_t m_msg[256];

public:
	NosWChar(const std::string &str) {
		m_len = str.length() * 2;

		for (unsigned int i = 0; i < str.length(); i++)
			m_msg[i] = str[i];

		m_msg[str.length()] = 0x00;
	}

	wchar_t *msg() {
		return m_msg;
	}
	int length() {
		return m_len;
	}
};

void main() {
	NosWChar nosStr("Message in chat");

	DWORD callSendChat = 0x00626904;
	wchar_t *pMsg = nosStr.msg();

	__asm {
		MOV EDX, pMsg
		MOV EAX, DWORD PTR DS : [0x678AD8]
		MOV EAX, [EAX]
		CALL callSendChat
	}
}
@Thread Creator: If you can call functions use this.
BladeTiger12 is offline  
Thanks
2 Users
Old 07/24/2015, 14:39   #14
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
@BladeTiger12
Nice, but just send "say" is easier, isn't it?
WalrossGreat is offline  
Old 07/24/2015, 15:40   #15

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Ye, you're right, but if you use the function, you'll see own message in chat.
(And it's just easier if you write a function like sendPacket("say MESSAGE"))
BladeTiger12 is offline  
Reply


Similar Threads Similar Threads
Text in Color for the Chat !
03/20/2014 - CO2 Private Server - 8 Replies
Hi everyone, I want to know how to color text chat? Thank you to you :)
Classic [4267] client crashes after sending chat packet
09/19/2013 - CO2 Private Server - 5 Replies
#Request Close fixed
PWI - Guide for SENDING Chat messages [C# and AutoIt examples included]
09/16/2013 - PW Hacks, Bots, Cheats, Exploits - 32 Replies
Ok, so some time ago I posted a guide for finding the offsets to read chat messages from within the game, which sparked some interest and seems to have proved useful in a couple of bots for PM detection. Around the time I figured that stuff out, I had tried a few times to work out how to send messages too, but never quite got there. Well, it seems taking a short break has helped because I've finally figured it out http://www.elitepvpers.com/forum/images/smilies/bi ggrin.gif Sure,...
Chat in Farbigen Text
09/17/2012 - Metin2 Private Server - 0 Replies
Hey Ich wollt hier mal nachfragen, wie füge ich die Quest ein dass ich im Chat farbig schreiben kann ? Wo Glas der einsicht benötigt wird? Wenn ich SuFu benutze kommt nur was wo es was mit auftragsquests zu tuen hat<.< Hoffe dass mir jemand ein release davon postet :D
[Question] Sending text to CO's chat lines
09/13/2008 - Conquer Online 2 - 2 Replies
How would I send text to the chat or to the red system text in the upper left corner of the screen? Would I have to send my own packet? Basically I want to: Hit a hotkey Read in the number of kills I have for demon exterminator. Have the number of kills left displayed in the chat. This way, rather than click "Items" and put my mouse over it, (which requires stopping and blocking half your screen) I can just hit Alt-A or something convinient for where I place my hand to show my...



All times are GMT +1. The time now is 15:09.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.