View Single Post
Author Message
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 02-04-2021 , 14:46   The Specialists - 3rd Party Bots help
Reply With Quote #1

Hello, I'm trying to figure out how to make RCBot work for TS v3 Linux server. Now sadly the default TS v3 Bots WON'T work for Linux servers, so I thought I'd made RCBot work for TS v3. The problem is how to allow the bots to use "menuselect" and "respawn" commands. I've been adding a script for bot_start.cpp in order for bots to prepare and spawn into the map, but I am not sure how or what is required to be added. This is what I got which was copied from HPB for DMC Mod:-

Code:
   else if (mod_id == TS_DLL)
   {
	   FakeClientCommand(pEdict, "menuselect", "1", "respawn");
	   
	   pBot->not_started = 0;
   }
I've also tried this instead of this simple line above, but no joy:-

Code:
else if (mod_id == TS_DLL)
   {
      if (pBot->start_action == MSG_TS_SELECT)  // menu select
      {
         pBot->start_action = MSG_TS_IDLE;  // switch back to idle

         /*if ((pBot->bot_class < 1) || (pBot->bot_class > 8))
            pBot->bot_class = -1;  // use random if invalid

         if (pBot->bot_class == -1)
            pBot->bot_class = RANDOM_LONG(1, 8);*/

         // select the class the bot wishes to use...
         if (pBot->bot_class == 1)
            strcpy(c_class, "1");
         /*else if (pBot->bot_class == 2)
            strcpy(c_class, "2");
         else if (pBot->bot_class == 3)
            strcpy(c_class, "3");
         else if (pBot->bot_class == 4)
            strcpy(c_class, "4");
         else if (pBot->bot_class == 5)
            strcpy(c_class, "5");
         else if (pBot->bot_class == 6)
            strcpy(c_class, "6");
         else
            strcpy(c_class, "7");*/

         FakeClientCommand(pEdict, "menuselect", c_class, "respawn");

         // bot has now joined the game (doesn't need to be started)
         pBot->not_started = 0;

         return;
      }
   }
If anyone knows or has any clues or tips let me know please.
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster

Last edited by RoboCop; 02-05-2021 at 18:17. Reason: Additional Info
RoboCop is offline
Send a message via Skype™ to RoboCop