CSGO: Bot waypoints real time manipulation

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
khaimovmr
Junior Member
Posts: 27
Joined: Fri Aug 25, 2017 3:15 am
Contact:

CSGO: Bot waypoints real time manipulation

Postby khaimovmr » Tue Mar 26, 2019 12:43 am

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?
User avatar
Ayuto
Project Leader
Posts: 2029
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: CSGO: Bot waypoints real time manipulation

Postby Ayuto » Sat Mar 30, 2019 10:35 am

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:
qazuar
Junior Member
Posts: 16
Joined: Fri Jun 20, 2014 9:05 am

Re: CSGO: Bot waypoints real time manipulation

Postby qazuar » Mon Apr 29, 2019 4:18 pm

Would someone be able to help with a working example in cs:go?
User avatar
Ayuto
Project Leader
Posts: 2029
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: CSGO: Bot waypoints real time manipulation

Postby Ayuto » Mon Apr 29, 2019 8:27 pm

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.
qazuar
Junior Member
Posts: 16
Joined: Fri Jun 20, 2014 9:05 am

Re: CSGO: Bot waypoints real time manipulation

Postby qazuar » Wed May 01, 2019 3:00 pm

This is great, thanks.

Although, todays update apparently changed the signature on windows.
User avatar
Ayuto
Project Leader
Posts: 2029
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: CSGO: Bot waypoints real time manipulation

Postby Ayuto » Wed May 01, 2019 4:30 pm

I absolutely hate CS:GO and its updates...

Updated the snippet with more future proof signatures.
User avatar
khaimovmr
Junior Member
Posts: 27
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: CSGO: Bot waypoints real time manipulation

Postby khaimovmr » Sat May 04, 2019 2:48 pm

Ayuto, thank you so much, man!
User avatar
khaimovmr
Junior Member
Posts: 27
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: CSGO: Bot waypoints real time manipulation

Postby khaimovmr » Thu May 09, 2019 12:50 am

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?
User avatar
khaimovmr
Junior Member
Posts: 27
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: CSGO: Bot waypoints real time manipulation

Postby khaimovmr » Thu May 09, 2019 1:21 am

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!

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 2 guests