C# Triggerbot Help

Posts 1–12 of 12 · Page 1 of 1
C# Triggerbot Help
Hello,

i have written in c# an small triggerbot its working good but not perfect.

Code:
while (true)
            {
                for (int i = 0; i < 16; i++)
                {

                    int EntityInCrossID = Memory.rdInt(Base + m_iCrossHairID);
                    if (EntityInCrossID > 0 && EntityInCrossID <= 16)

                    {

                        int EntityBase = Memory.rdInt(ClientPointer + m_dwEntityList + (EntityInCrossID - 1) * 0x10);
                        int EntityTeam = Memory.rdInt(EntityBase + m_iTeamNum);


                        if (EntityTeam != Team)
                        {
                            mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, new UIntPtr());
                            Thread.Sleep(6);
                            mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, new UIntPtr());
                            Thread.Sleep(50);

                        }
                    }
                }
                Thread.Sleep(1);
            }
First Problem is Dust2 Mid Doors from t/ct Spawn Trigger not working idk why with the AWP.
Sometimes he shoots too early or not at all.

Any ideas ?
The way your checking if there is a person in front of cursor is using the in game "name show check" (for when you aim at an enemy it shows there name.) this name show check has a limited range( less than the distance from t to ct on dust). If you want to be able to use trigger from that far you ether have to go internal or use vector math. (Checking your aim angle relative to enemy position.

Also change
for (int i = 0; i < 16; i++)

To
for (int i = 0; i < 64; i++)

Or
for (int i = 0; i < 30; i++) for slow pc



And change the last thread sleep (the one at the end)
from
Thread.Sleep(1);

into
Thread.Sleep(25);
An External in cross trigger bot is simply not reliable enough to work all the way down dust2 mid like that.
Quote Originally Posted by HexMurder View Post
An External in cross trigger bot is simply not reliable enough to work all the way down dust2 mid like that.
What?? yes it is..... the in game function he is checking crosshair with has a limited range..........
Quote Originally Posted by Foxxy Boxxy View Post
What?? yes it is..... the in game function he is checking crosshair with has a limited range..........
Thanks,

can you maybe link me an Vector Math in c# for this or write an simple function fast maybe?
You must be new to this, Im not going to be rude to you like most people would when a newby comes on the forum asking for copy and paste. Im just going to say that vector math is very hard for beginners. And it can not be completed in one simple function.

My advice for the situation, wait until you are a little more experienced before attempting cheats with any real math.

Just jump into suicide right at the beginning at the round run toward mid your trigger bot should be in range.
Quote Originally Posted by Foxxy Boxxy View Post
What?? yes it is..... the in game function he is checking crosshair with has a limited range..........
What?? You literally just rephrased what i just said.
Code:
            while (true)
            {
		    int EntityInCrossID = Memory.rdInt(Base + m_iCrossHairID);
                    if (EntityInCrossID != 0)
                    {
                        int EntityBase = Memory.rdInt(ClientPointer + m_dwEntityList + (EntityInCrossID - 1) * 0x10);
                        int EntityTeam = Memory.rdInt(EntityBase + m_iTeamNum);

			int MyTeam = Memory.rdInt(Base + m_iTeamNum);
                        if (EntityTeam != MyTeam)
                        {
                            mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, new UIntPtr());
                            Thread.Sleep(10);
                            mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, new UIntPtr());
                            Thread.Sleep(50);
                        }
                    }
					
                Thread.Sleep(10);
            }
This code should work fine.
You don't need to loop through the entities.
Also triggerbot it not working on long distance.
You have to do raytrace but it's a next level stuff
Quote Originally Posted by Zaczero View Post
Code:
            while (true)
            {
		    int EntityInCrossID = Memory.rdInt(Base + m_iCrossHairID);
                    if (EntityInCrossID != 0)
                    {
                        int EntityBase = Memory.rdInt(ClientPointer + m_dwEntityList + (EntityInCrossID - 1) * 0x10);
                        int EntityTeam = Memory.rdInt(EntityBase + m_iTeamNum);

			int MyTeam = Memory.rdInt(Base + m_iTeamNum);
                        if (EntityTeam != MyTeam)
                        {
                            mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, new UIntPtr());
                            Thread.Sleep(10);
                            mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, new UIntPtr());
                            Thread.Sleep(50);
                        }
                    }
					
                Thread.Sleep(10);
            }
This code should work fine.
You don't need to loop through the entities.
Also triggerbot it not working on long distance.
You have to do raytrace but it's a next level stuff
Is raytrace possible external?
Quote Originally Posted by KappaMang View Post
Is raytrace possible external?
Yep .
Quote Originally Posted by Zaczero View Post


Yep .
That gives me a nice project for tonight, thanks. So I'm assuming that requires vector math as mentioned before? Because I just did some trig review today at a club meeting.
It won't work at that range because of the dormant flag.
Posts 1–12 of 12 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us