Forum
CS2D General Bot spectatorBot spectator
10 replies 1
Quote
Change the AI scripts. And/or use cs2d cmd makespec on the bot. It doesn't make much sense though. You could simply remove the bot from the server. It would basically lead to the same result.
http://prntscr.com/367c58
My purpose of making a bot to spectator is for advertisement to my forum. And I don't know what i shall edit in the AI scripts. The code look very difficult to edit.
make spec <bot id> and setname <bot id> <name>
But the problem is, My server automaticly changes map for each 2 hours. that will be a problem i think.
If you just need one bot to advert your website, then just add one, set its name, and make it a spectator.
If you don't want to see the bot changing it's name, you can also set the bot names in Bots/names.txt I believe.
--
This kinda sounds like an XY problem.
Anyways, if it's just one bot that's always a spectator, you could try this lua script:
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
addhook("team", "_team") oneBot = 0 function _team(id, team) if oneBot == 0 then if player(id, "bot") then oneBot = id parse("makespec "..oneBot) return 1 end end end
If you want all bots to be spectators, then you can also try this script instead:
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("team", "_team") function _team(id, team) if player(id, "bot") then return 1 end end
I guess the question on my mind is -- why would you want a bot that is a spectator?
If you just want to limit the amount of players joining, just set the maxplayers to a lower amount.
If you want your server to not be filtered by the amount of players playing, don't do that. It's seriously annoying when I see a server with 1/32 and it's just a bot. (And there's also the option of filtering servers with just bots too)
edited 1×, last 02.04.14 09:45:38 am
(oh and as you can see on this shot: the next version will display the bot counts as yellow number behind the player counts and servers with free slots and at least 1 human player will have a green player count. I made these changes because I noticed myself that bots-only servers are quite annoying)
parse('add_bot_ct')
parse('makespec 1') --wich is your bot id
parse('setname 1 www.random.com')
Easy... Nothing Hard
Admin/mod comment
§2.4 - Use tags sparingly and only when they add value 1