Page 1 of 1

CSGO: Bot waypoints real time manipulation

Posted: Tue Mar 26, 2019 12:43 am
by khaimovmr
Hi, guys!

I have a goal to make bot run into the specific variable point of existent official map (de_dust2, for example).
Does anybody have any clues where to start digging for info on this?

Re: CSGO: Bot waypoints real time manipulation

Posted: Sat Mar 30, 2019 10:35 am
by Ayuto
There is CCSBot::MoveTo, which forces a bot to run to a specific point using either the fastest route or safest route.

I have some old code on my pastebin, which was working fine for CS:S:

Re: CSGO: Bot waypoints real time manipulation

Posted: Mon Apr 29, 2019 4:18 pm
by qazuar
Would someone be able to help with a working example in cs:go?

Re: CSGO: Bot waypoints real time manipulation

Posted: Mon Apr 29, 2019 8:27 pm
by Ayuto
I have updated the code above to work with the latest SP version and added signatures for CS:S and CS:GO for Windows and Linux.

Re: CSGO: Bot waypoints real time manipulation

Posted: Wed May 01, 2019 3:00 pm
by qazuar
This is great, thanks.

Although, todays update apparently changed the signature on windows.

Re: CSGO: Bot waypoints real time manipulation

Posted: Wed May 01, 2019 4:30 pm
by Ayuto
I absolutely hate CS:GO and its updates...

Updated the snippet with more future proof signatures.

Re: CSGO: Bot waypoints real time manipulation

Posted: Sat May 04, 2019 2:48 pm
by khaimovmr
Ayuto, thank you so much, man!

Re: CSGO: Bot waypoints real time manipulation

Posted: Thu May 09, 2019 12:50 am
by khaimovmr
Trying your solution right now, Ayuto - seems like it can not find "server_srv.so" on find_binary method execution:
```
L 05/09/2019 - 00:36:27: - sp.hooks.exceptions - EXCEPTION

[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 194, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "../addons/source-python/plugins/field_training/field_training.py", line 39, in <module>
srv = memory.find_binary('server')

OSError: Unable to find ../bin/server_srv.so
```

I didn't find such file in the csgo installation directory.

Can you give some advice - where to dig on this matter?

Re: CSGO: Bot waypoints real time manipulation

Posted: Thu May 09, 2019 1:21 am
by khaimovmr
I've found the file `<csgo-install-folder>/csgo/server.so` and made a symlink for it `<csgo-install-folder>/csgo/server_srv.so`.
Got it working. Thanks again!

Re: CSGO: Bot waypoints real time manipulation

Posted: Thu Aug 03, 2023 4:05 pm
by khaimovmr
Hey, guys, can someone help me out with this thing?
I believe the game identifier have changed (at least for Linux).
I used this code from Ayuto's example above.

Syntax: Select all

IDENTIFIER = b'\x55\x89\xE5\x8B\x55\x0C\x8B\x45\x08\x8B\x0A\x89\x88\x2A\x2A\x2A\x2A\x8B\x4A\x04\x89\x88\x2A\x2A\x2A\x2A\x8B\x52\x08\x89\x90\x2A\x2A\x2A\x2A\x8B\x55\x10\x89\x90'
MoveTo = SRV[IDENTIFIER].make_function(
Convention.THISCALL,
[DataType.POINTER, DataType.POINTER, DataType.INT],
DataType.VOID
)


This code is giving me the exception:

Syntax: Select all

Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 164, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 209, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "../addons/source-python/plugins/field_training/field_training.py", line 9, in <module>
import field_training.ft_command_handlers
File "../addons/source-python/plugins/field_training/ft_command_handlers.py", line 17, in <module>
import field_training.ft_utils as ftu
File "../addons/source-python/plugins/field_training/ft_utils.py", line 81, in <module>
MoveTo = SRV[IDENTIFIER].make_function(

ValueError: Could not find signature: 5589e58b550c8b45088b0a89882a2a2a2a8b4a0489882a2a2a2a8b520889902a2a2a2a8b55108990

Re: CSGO: Bot waypoints real time manipulation

Posted: Thu Aug 03, 2023 4:13 pm
by cssbestrpg
khaimovmr wrote:Hey, guys, can someone help me out with this thing?
I believe the game identifier have changed (at least for Linux).
I used this code from Ayuto's example above.

Syntax: Select all

IDENTIFIER = b'\x55\x89\xE5\x8B\x55\x0C\x8B\x45\x08\x8B\x0A\x89\x88\x2A\x2A\x2A\x2A\x8B\x4A\x04\x89\x88\x2A\x2A\x2A\x2A\x8B\x52\x08\x89\x90\x2A\x2A\x2A\x2A\x8B\x55\x10\x89\x90'
MoveTo = SRV[IDENTIFIER].make_function(
Convention.THISCALL,
[DataType.POINTER, DataType.POINTER, DataType.INT],
DataType.VOID
)


This code is giving me the exception:

Syntax: Select all

Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 164, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 209, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "../addons/source-python/plugins/field_training/field_training.py", line 9, in <module>
import field_training.ft_command_handlers
File "../addons/source-python/plugins/field_training/ft_command_handlers.py", line 17, in <module>
import field_training.ft_utils as ftu
File "../addons/source-python/plugins/field_training/ft_utils.py", line 81, in <module>
MoveTo = SRV[IDENTIFIER].make_function(

ValueError: Could not find signature: 5589e58b550c8b45088b0a89882a2a2a2a8b4a0489882a2a2a2a8b520889902a2a2a2a8b55108990


Hi, it shows the signature is outdated, but unfortunaly i have co clue how get signature

Re: CSGO: Bot waypoints real time manipulation

Posted: Thu Aug 03, 2023 6:14 pm
by L'In20Cible

Code: Select all

// CCSBot::MoveTo (CSGO/Linux)

\x55\x89\xE5\x8B\x55\x0C\x8B\x45\x08\xF3\x0F\x10\x02\xF3\x0F\x11\x80\x2A\x2A\x2A\x2A\xF3\x0F\x10\x42\x04\xF3\x0F\x11\x80\x2A\x2A\x2A\x2A\xF3\x0F\x10\x42\x08\x8B\x55\x10\xF3\x0F\x11\x80\x2A\x2A\x2A\x2A\x89\x90\x2A\x2A\x2A\x2A\x8D\x90\x2A\x2A\x2A\x2A\x89\x55\x0C\x5D\xE9\x2A\x2A\x2A\x2A
For future reference, it's the first call above the following string:

Image

Code: Select all

.text:00DD0770                                                 sub_DD0770      proc near               ; CODE XREF: sub_DB3F00+2CE↑p
.text:00DD0770                                                                                         ; sub_DB3F00+86D↑p ...
.text:00DD0770
.text:00DD0770                                                 arg_0           = dword ptr  8
.text:00DD0770                                                 arg_4           = dword ptr  0Ch
.text:00DD0770                                                 arg_8           = dword ptr  10h
.text:00DD0770
.text:00DD0770                                                 ; __unwind {
.text:00DD0770 55                                                              push    ebp
.text:00DD0771 89 E5                                                           mov     ebp, esp
.text:00DD0773 8B 55 0C                                                        mov     edx, [ebp+arg_4]
.text:00DD0776 8B 45 08                                                        mov     eax, [ebp+arg_0]
.text:00DD0779 F3 0F 10 02                                                     movss   xmm0, dword ptr [edx]
.text:00DD077D F3 0F 11 80 50 3D 00 00                                         movss   dword ptr [eax+3D50h], xmm0
.text:00DD0785 F3 0F 10 42 04                                                  movss   xmm0, dword ptr [edx+4]
.text:00DD078A F3 0F 11 80 54 3D 00 00                                         movss   dword ptr [eax+3D54h], xmm0
.text:00DD0792 F3 0F 10 42 08                                                  movss   xmm0, dword ptr [edx+8]
.text:00DD0797 8B 55 10                                                        mov     edx, [ebp+arg_8]
.text:00DD079A F3 0F 11 80 58 3D 00 00                                         movss   dword ptr [eax+3D58h], xmm0
.text:00DD07A2 89 90 5C 3D 00 00                                               mov     [eax+3D5Ch], edx
.text:00DD07A8 8D 90 4C 3D 00 00                                               lea     edx, [eax+3D4Ch]
.text:00DD07AE 89 55 0C                                                        mov     [ebp+arg_4], edx
.text:00DD07B1 5D                                                              pop     ebp
.text:00DD07B2 E9 A9 F2 FF FF                                                  jmp     sub_DCFA60
.text:00DD07B2                                                 ; } // starts at DD0770
.text:00DD07B2                                                 sub_DD0770      endp