Results 1 to 13 of 13

Threaded View

  1. #1
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,168
    My Mood
    Psychedelic

    How To : Spawning Bots in IW5M

    Rather simple...
    Just include this code in your project:
    Code:
    
                PlayerConnected += new Action<Entity>(entity =>
                {
                    entity.Call("notifyOnPlayerCommand", "ohnoes", "+actionslot 4");
    
                    entity.OnNotify("ohnoes", player =>
                    {
                        var testClient = Utilities.AddTestClient();
    
                        if (testClient == null)
                        {
                            return;
                        }
    
                        testClient.OnNotify("joined_spectators", tc =>
                        {
                            tc.Notify("menuresponse", "team_marinesopfor", "autoassign");
    
                            tc.AfterDelay(500, meh =>
                            {
                                meh.Notify("menuresponse", "changeclass", "class1");
                            });
                        });
                    });
                });
    
    And to activate you click your key assigned to the forth killstreak slot.

    Or if you have the Infinity Script's source, you can uncomment out that part in the TestScript.cs file.


    Here's that file for you lazy people:

    Code:
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    namespace InfinityScript
    {
        public class TestScript : BaseScript
        {
            public TestScript() : base()
            {
                /*OnNotify("weapon_fired", weaponName =>
                {
                    GameInterface.Script_PushString((string)weaponName);
                    GameInterface.Script_Call(362, 0, 1);
                });*/
    
                /*OnNotify("connected", player =>
                {
                    Log.Write(LogLevel.Trace, "connected {0}", player);
                    
                    player.As<Entity>().Notified += (type, paras) =>
                    {
                        Log.Write(LogLevel.Trace, "tyep {0}", type);
                    };
    
                    player.As<Entity>().OnNotify("spawned_player", playerEnt =>
                    {
                        Log.Write(LogLevel.Trace, "spawned {0}", playerEnt);
    
                        Call("iprintlnbold", "0mgSniPeZZ by xXxNTAxXx");
    
                        playerEnt.Call("takeallweapons");
                        playerEnt.Call("giveweapon", "iw5_l96a1_mp_l96a1scope");
                        playerEnt.Call("setperk", "specialty_quickdraw");
    
                        Log.Write(LogLevel.Trace, "endSpawned {0}", playerEnt);
                    });
                });*/
    
                /*PlayerConnected += new Action<Entity>(entity =>
                {
                    Log.Write(LogLevel.Trace, "connected {0}", entity);
    
                    entity.SpawnedPlayer += new Action(() =>
                    {
                        Log.Write(LogLevel.Trace, "spawned {0} {1} {2} {3}", entity, entity.GetField<string>("classname"), entity.GetField<string>("sessionteam"), entity.GetField<Vector3>("origin"));
    
                        entity.TakeAllWeapons();
                        //entity.GiveWeapon("iw5_l96a1_mp_l96a1scope");
                        //entity.SwitchToWeaponImmediate("iw5_l96a1_mp_l96a1scope");
                        //entity.Call("givemaxammo", "iw5_l96a1_mp_l96a1scope");
                        entity.GiveWeapon("iw5_mp7_mp");
                        entity.SwitchToWeaponImmediate("iw5_mp7_mp");
                        entity.Call("givemaxammo", "iw5_mp7_mp");
    
                        entity.Call("iprintlnbold", "0mgMP7 by xXxNTAxXx");
                        entity.Call("setperk", "specialty_quickdraw", true, false);
                        entity.Call("setperk", "specialty_fastreload", true, false);
                    });
    
                    //var elem = HudElem.CreateFontString(entity, "default", 1.2f);
                    //elem.X = 200;
                    //elem.Y = 20;
                    //elem.SetText("stuff. just ^2stuff^7.");
                });*/
    
                PlayerConnected += new Action<Entity>(entity =>
                {
                    entity.Call("notifyOnPlayerCommand", "ohnoes", "+actionslot 4");
    
                    entity.OnNotify("ohnoes", player =>
                    {
                        var testClient = Utilities.AddTestClient();
    
                        if (testClient == null)
                        {
                            return;
                        }
    
                        testClient.OnNotify("joined_spectators", tc =>
                        {
                            tc.Notify("menuresponse", "team_marinesopfor", "autoassign");
    
                            tc.AfterDelay(500, meh =>
                            {
                                meh.Notify("menuresponse", "changeclass", "class1");
                            });
                        });
                    });
                });
    
                //Notified += TestScript_Notified;
                Tick += new Action(TestScript_Tick);
            }
    
            int _lastTime;
    
            void TestScript_Tick()
            {
                /*var time = Function.Call<int>(283);
    
                if ((time - _lastTime) > 10)
                {
                    Function.Call(363, time);
                    _lastTime = time;
                }*/
            }
    
            void TestScript_Notified(string arg1, Parameter[] arg2)
            {
                if (arg1 == "trigger" || arg1 == "weapon_fired" || arg1 == "touch")
                {
                    return;
                }
    
                GameInterface.Script_PushString(arg1);
                GameInterface.Script_Call(363, 0, 1);
            }
        }
    }
    

  2. The Following User Says Thank You to Kenshin13 For This Useful Post:

    Instrumental (11-02-2012)

Similar Threads

  1. How Do I Bot Runescape? 8o...
    By newport111 in forum Runescape Help
    Replies: 14
    Last Post: 04-28-2011, 10:23 AM
  2. [Release] VMware [How to make bots]
    By skulhead in forum CrossFire Tutorials
    Replies: 69
    Last Post: 04-27-2011, 02:42 PM
  3. [Tutorial] How to add bots to RSBOT
    By zazack in forum Runescape Hacks / Bots
    Replies: 4
    Last Post: 11-08-2010, 04:52 PM
  4. How to add bots to mods
    By Elmoisabeast in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 7
    Last Post: 11-04-2010, 12:49 AM
  5. How to make bots on browsergames
    By takahuja in forum General
    Replies: 1
    Last Post: 06-29-2007, 08:33 PM