![]() |
Question about bot chatting
Hey KWo! :clap::clap:
It's been a long time since I came here. I have a question on how your bots detect keywords in their chats. I am referring to the source code. Also, can you tell me how you detect which player said what. can you give me the c++ code for this or tell me how to do this? Thanks |
Re: Question about bot chatting
The podbot mm sources are here.
In the file bot_client.cpp there is a function BotClient_CS_SayText. It intercepts who (ucEntIndex) and what (pBot->SaytextBuffer.szSayText) is saying and puts it to the buffer, then answer with some delay (pBot->SaytextBuffer.fTimeNextChat) after recognizing the keywords in the function BotCheckKeywords in the file bot_chat.cpp. In that file there is a function called BotPrepareChatMessage, which You should take a look at, too. In the BotCreate function in the file bot.cpp there are also such line: Code:
// Assign how talkative this Bot will be |
Re: Question about bot chatting
what is the void *p? I see that ucEntIndex = *(unsigned char *) p;
I don't understand what you did very well. Can you explain it to me in C++ how it intercepts who is talking and what he is saying? do you need to hook saymsg or textmsg? What is the hlsdk thing for intercepting chat messages? |
Re: Question about bot chatting
Quote:
Quote:
Text/say message? Find in engine.cpp the call for BotClient_CS_SayText - then You will see what kind of message it is... BTW - why exactly do You need to know that bot chating function? Is there something You want to fix (not working correctly)? Or You are trying to make Your own bot? |
All times are GMT +2. The time now is 21:02. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.