Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. MW3 Modding Releases & Resources
  3. [Release] QBots

[Release] QBots

Scheduled Pinned Locked Moved MW3 Modding Releases & Resources
9 Posts 8 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • quaKundefined Offline
    quaKundefined Offline
    quaK
    Contributor
    wrote on last edited by
    #1

    [QBots]

    This is a ChaiScript for doing knife lunges and what else in private with bot/bots.
    NOTE: Won't work with multiple people. ( at least ideally )

    Things possible with this script:
    {

    • Save Position | crouch & +reload
    • Load Position | crouch & +activate
    • Spawn Bot ( currently only via Console ) | +actionslot 3
    • Kick Bots ( Kick all bots from game ) | +actionslot 4
    • Move Bot To You ( Move the bot to your current position ) | +actionslot 1
    • Send Me To Heaven ( Sets your origin super high ) | +actionslot 6

    }
    Open the console to see what buttons to use ^^

    https://youtu.be/8QmM38KtPaw

    Download: qbots.chai
    or you can just make it manually at "...\AppData\Local\Plutonium\storage\iw5\scripts"
    and make a ChaiScript and put this code in it:

    
    gsc.setDvar("testClients_doAttack", 0);
    gsc.setDvar("testClients_doCrouch", 0);
    gsc.setDvar("testClients_doMove", 0);
    gsc.setDvar("testClients_doReload", 0);
    gsc.setDvar("testClients_doWatchKillcam", 0);
    
    global Bots = [];
    global sPos = [];
    global sAng = [];
    global stance = "crouch";
    
    level.onNotify("connected", fun(arguments) 
    {
    	var player = arguments[0];
    	if(player.getGuid().find("bot") != -1)
    	{
    		addBot(player);
    		return;
    	}
    	else
    	{
    		BotSystem(player);
    	}
    
    	player.onNotify("spawned_player", fun[player](arguments) 
    	{
    		
    	});
    
    	player.onNotify("SavePos", fun[player](arguments) 
    	{
    		if(correctStance(player))
    		{
    			SavePosition(player);
    		}
    	});
    	player.onNotify("LoadPos", fun[player](arguments) 
    	{
    		if(correctStance(player))
    		{
    			LoadPosition(player);
    		}
    	});
    	player.onNotify("KickBots", fun[player](arguments) 
    	{
    		kickBots();
    	});
    	player.onNotify("SpawnBot", fun[player](arguments) 
    	{
    		spawnBot();
    	});
    	player.onNotify("MoveBotToPlayer", fun[player](arguments) 
    	{
    		var bots = getBots();
    		if(bots.size() > 0)
    		{
    			var bot = bots[bots.size()-1];
    			MoveBotToPlayer(bot, player);
    		}
    	});
    	player.onNotify("SendMeToHeaven", fun[player](arguments) 
    	{
    		SendMeToHeaven(player);
    	});
    });
    
    def BotSystem(player)
    {
    	BotSystemMessages(player);
    
    	player.notifyOnPlayerCommand( "SavePos", "+reload" );
    	player.notifyOnPlayerCommand( "LoadPos", "+activate" );
    	player.notifyOnPlayerCommand( "KickBots", "+actionslot 4" );
    	player.notifyOnPlayerCommand( "SpawnBot", "+actionslot 3" );
    	player.notifyOnPlayerCommand( "MoveBotToPlayer", "+actionslot 1" );
    	player.notifyOnPlayerCommand( "SendMeToHeaven", "+actionslot 6" );
    }
    
    def BotSystemMessages(player)
    {
    	player.iPrintLnBold("\n");
    	player.iPrintLnBold("^9[QBots]^7 ^9Bot system activated!\n");
    	player.iPrintLnBold("\n");
    	player.iPrintLnBold("^9[QBots]^7 ^3Save Position:^2 Crouch + [{+reload}]\n");
    	player.iPrintLnBold("^9[QBots]^7 ^3Load Position:^2 Crouch + [{+activate}]\n");
    	player.iPrintLnBold("^9[QBots]^7 ^3Kick Bots:^2 [{+actionslot 4}]\n");
    	player.iPrintLnBold("^9[QBots]^7 ^3Spawn Bot:^2 [{+actionslot 3}]\n");
    	player.iPrintLnBold("^9[QBots]^7 ^3Move Bot To You:^2 [{+actionslot 1}]\n");
    	player.iPrintLnBold("^9[QBots]^7 ^3Send Me To Heaven:^2 [{+actionslot 6}]\n");
    	player.iPrintLnBold("\n");
    }
    
    def correctStance(player)
    {
    	if(player.getStance() == stance)
    	{
    		return true;
    	}
    	return false;
    }
    
    def SavePosition(player)
    {
    	sPos = player.getOrigin();
    	sAng = player.getPlayerAngles();
    	gsc.iPrintLnBold("Position Saved.");
    }
    
    def LoadPosition(player)
    {
    	if(sPos.empty() || sAng.empty())
    	{
    		gsc.iPrintLnBold("No Position Saved.");
    		return;
    	}
    
    	player.setVelocity(0);
    	player.setOrigin(sPos);
    	player.setPlayerAngles(sAng);
    	gsc.iPrintLnBold("Position Loaded.");
    }
    
    def addBot(bot)
    {
    	Bots.push_back_ref(bot);
    }
    
    def getBots()
    {
    	return Bots;
    }
    
    def clearBots()
    {
    	Bots.clear();
    }
    
    def spawnBot()
    {
    	gsc.iPrintLnBold("You have to manually spawn the bot via Console: /bot");
    }
    
    def kickBots()
    {
    	var bots = getBots();
    	for(var i = 0; i < bots.size(); ++i)
    	{
    		gsc.kick(bots[i].getEntityNumber());
    	}
    	clearBots();
    }
    
    def MoveBotToPlayer(bot, player)
    {
    	var pOrigin = player.getOrigin();
    	var pAngles = player.getPlayerAngles();
    
    	bot.setOrigin(pOrigin);
    	bot.setPlayerAngles(pAngles);
    }
    
    def SendMeToHeaven(player)
    {
    	var origin = player.getOrigin();
    	origin[2] += 2048;
    	player.setOrigin(origin);
    }
    
    A Former User? 1 Reply Last reply
    5
    • VERsingthegamezundefined Offline
      VERsingthegamezundefined Offline
      VERsingthegamez
      wrote on last edited by VERsingthegamez
      #2

      Have any plans to create way-points for them so they could move around the map?

      FragsAreUsundefined 1 Reply Last reply
      0
      • VERsingthegamezundefined VERsingthegamez

        Have any plans to create way-points for them so they could move around the map?

        FragsAreUsundefined Offline
        FragsAreUsundefined Offline
        FragsAreUs
        Plutonium Staff
        wrote on last edited by
        #3

        VERsingthegamez that is not the point of the chai script plz re read what it says, its only ment for knife lunges

        1 Reply Last reply
        0
        • VanillaPWNZundefined Offline
          VanillaPWNZundefined Offline
          VanillaPWNZ
          wrote on last edited by
          #4

          Thank you very much! I finally can do knife lunge use a bot script

          1 Reply Last reply
          0
          • telowsundefined Offline
            telowsundefined Offline
            telows
            wrote on last edited by
            #5

            I downloaded the file and put it into my scripts folder but nothing works when I am in-game. Does someone know why and can help me make it work? Thanks

            OxyAresundefined 1 Reply Last reply
            0
            • quaKundefined quaK

              [QBots]

              This is a ChaiScript for doing knife lunges and what else in private with bot/bots.
              NOTE: Won't work with multiple people. ( at least ideally )

              Things possible with this script:
              {

              • Save Position | crouch & +reload
              • Load Position | crouch & +activate
              • Spawn Bot ( currently only via Console ) | +actionslot 3
              • Kick Bots ( Kick all bots from game ) | +actionslot 4
              • Move Bot To You ( Move the bot to your current position ) | +actionslot 1
              • Send Me To Heaven ( Sets your origin super high ) | +actionslot 6

              }
              Open the console to see what buttons to use ^^

              https://youtu.be/8QmM38KtPaw

              Download: qbots.chai
              or you can just make it manually at "...\AppData\Local\Plutonium\storage\iw5\scripts"
              and make a ChaiScript and put this code in it:

              
              gsc.setDvar("testClients_doAttack", 0);
              gsc.setDvar("testClients_doCrouch", 0);
              gsc.setDvar("testClients_doMove", 0);
              gsc.setDvar("testClients_doReload", 0);
              gsc.setDvar("testClients_doWatchKillcam", 0);
              
              global Bots = [];
              global sPos = [];
              global sAng = [];
              global stance = "crouch";
              
              level.onNotify("connected", fun(arguments) 
              {
              	var player = arguments[0];
              	if(player.getGuid().find("bot") != -1)
              	{
              		addBot(player);
              		return;
              	}
              	else
              	{
              		BotSystem(player);
              	}
              
              	player.onNotify("spawned_player", fun[player](arguments) 
              	{
              		
              	});
              
              	player.onNotify("SavePos", fun[player](arguments) 
              	{
              		if(correctStance(player))
              		{
              			SavePosition(player);
              		}
              	});
              	player.onNotify("LoadPos", fun[player](arguments) 
              	{
              		if(correctStance(player))
              		{
              			LoadPosition(player);
              		}
              	});
              	player.onNotify("KickBots", fun[player](arguments) 
              	{
              		kickBots();
              	});
              	player.onNotify("SpawnBot", fun[player](arguments) 
              	{
              		spawnBot();
              	});
              	player.onNotify("MoveBotToPlayer", fun[player](arguments) 
              	{
              		var bots = getBots();
              		if(bots.size() > 0)
              		{
              			var bot = bots[bots.size()-1];
              			MoveBotToPlayer(bot, player);
              		}
              	});
              	player.onNotify("SendMeToHeaven", fun[player](arguments) 
              	{
              		SendMeToHeaven(player);
              	});
              });
              
              def BotSystem(player)
              {
              	BotSystemMessages(player);
              
              	player.notifyOnPlayerCommand( "SavePos", "+reload" );
              	player.notifyOnPlayerCommand( "LoadPos", "+activate" );
              	player.notifyOnPlayerCommand( "KickBots", "+actionslot 4" );
              	player.notifyOnPlayerCommand( "SpawnBot", "+actionslot 3" );
              	player.notifyOnPlayerCommand( "MoveBotToPlayer", "+actionslot 1" );
              	player.notifyOnPlayerCommand( "SendMeToHeaven", "+actionslot 6" );
              }
              
              def BotSystemMessages(player)
              {
              	player.iPrintLnBold("\n");
              	player.iPrintLnBold("^9[QBots]^7 ^9Bot system activated!\n");
              	player.iPrintLnBold("\n");
              	player.iPrintLnBold("^9[QBots]^7 ^3Save Position:^2 Crouch + [{+reload}]\n");
              	player.iPrintLnBold("^9[QBots]^7 ^3Load Position:^2 Crouch + [{+activate}]\n");
              	player.iPrintLnBold("^9[QBots]^7 ^3Kick Bots:^2 [{+actionslot 4}]\n");
              	player.iPrintLnBold("^9[QBots]^7 ^3Spawn Bot:^2 [{+actionslot 3}]\n");
              	player.iPrintLnBold("^9[QBots]^7 ^3Move Bot To You:^2 [{+actionslot 1}]\n");
              	player.iPrintLnBold("^9[QBots]^7 ^3Send Me To Heaven:^2 [{+actionslot 6}]\n");
              	player.iPrintLnBold("\n");
              }
              
              def correctStance(player)
              {
              	if(player.getStance() == stance)
              	{
              		return true;
              	}
              	return false;
              }
              
              def SavePosition(player)
              {
              	sPos = player.getOrigin();
              	sAng = player.getPlayerAngles();
              	gsc.iPrintLnBold("Position Saved.");
              }
              
              def LoadPosition(player)
              {
              	if(sPos.empty() || sAng.empty())
              	{
              		gsc.iPrintLnBold("No Position Saved.");
              		return;
              	}
              
              	player.setVelocity(0);
              	player.setOrigin(sPos);
              	player.setPlayerAngles(sAng);
              	gsc.iPrintLnBold("Position Loaded.");
              }
              
              def addBot(bot)
              {
              	Bots.push_back_ref(bot);
              }
              
              def getBots()
              {
              	return Bots;
              }
              
              def clearBots()
              {
              	Bots.clear();
              }
              
              def spawnBot()
              {
              	gsc.iPrintLnBold("You have to manually spawn the bot via Console: /bot");
              }
              
              def kickBots()
              {
              	var bots = getBots();
              	for(var i = 0; i < bots.size(); ++i)
              	{
              		gsc.kick(bots[i].getEntityNumber());
              	}
              	clearBots();
              }
              
              def MoveBotToPlayer(bot, player)
              {
              	var pOrigin = player.getOrigin();
              	var pAngles = player.getPlayerAngles();
              
              	bot.setOrigin(pOrigin);
              	bot.setPlayerAngles(pAngles);
              }
              
              def SendMeToHeaven(player)
              {
              	var origin = player.getOrigin();
              	origin[2] += 2048;
              	player.setOrigin(origin);
              }
              
              A Former User? Offline
              A Former User? Offline
              A Former User
              wrote on last edited by
              #6

              quaK said in [Release] QBots:

              +actionslot 1

              How to set the keys for all these actionslots?

              1 Reply Last reply
              0
              • telowsundefined telows

                I downloaded the file and put it into my scripts folder but nothing works when I am in-game. Does someone know why and can help me make it work? Thanks

                OxyAresundefined Offline
                OxyAresundefined Offline
                OxyAres
                wrote on last edited by
                #7

                telows Did you find out how to get it to work? I am having the same issue.

                1 Reply Last reply
                0
                • Xerxesundefined Offline
                  Xerxesundefined Offline
                  Xerxes
                  Plutonium Staff
                  wrote on last edited by
                  #8

                  You can't, there is no chai script anymore.

                  OxyAresundefined 1 Reply Last reply
                  0
                  • Xerxesundefined Xerxes

                    You can't, there is no chai script anymore.

                    OxyAresundefined Offline
                    OxyAresundefined Offline
                    OxyAres
                    wrote on last edited by
                    #9

                    Xerxes thanks for letting me know 😄

                    1 Reply Last reply
                    0
                    • JezuzLizardundefined JezuzLizard locked this topic on

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Donate