[Code]Most productive thing i made that works for a while.

Posts 115 of 31 · Page 1 of 3
[Code]Most productive thing i made that works for a while.
you can comment about more efficient means of doing things, i wont listen.

I already know it's dirty and inneficient as possible, and i know how to make it more efficient.

if you want it, just c+p the source, im too lazy(and tired) to upload and get vscans

ill add 16:10 Support later NYA~

[php]
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
int xMax, yMax, ratio, ratioTest;
int x = 0;
int y = 0;
cout << "Ratio:\n1.(4:3)\n2.(16:9)\n";
cin >> ratio;

if(ratio == 1)
{
cout << "Ratio set for 4:3\n";
cout << "Enter the max X and Y for your monitor\n";
cin >> xMax >> yMax;
ratioTest = xMax * 0.75f;
if(yMax != ratioTest)
{
cout << "Wrong x and y values for your monitor, exiting.\n";
Sleep(3000);
return 0;
}
if(yMax == ratioTest)
{
cout << "The x and y match the aspect ratio.\nNow Set the velocity(anything above 20 is insanely fast.)\n";
int vel;
cin >> vel;
cout << "velocity set for " << vel << ". Commencing possestion in 3 seconds\n";
Sleep(3000);

while(true)
{
possess: //press thx now!
SetCursorPos(x,y);
x = vel+x;
y = x * 0.75f;
Sleep(15);
if((x==xMax)&&(y==yMax))
{
x=0;
y=0;
goto possess;
}
if(GetAsyncKeyState(VK_END))
{
return 0;
}
}
}
}



if(ratio == 2)
{
cout << "Ratio set for 16:9\n";
cout << "Enter the max X and Y for your monitor\n";
cin >> xMax >> yMax;
ratioTest = xMax * 0.5625f;
if(yMax != ratioTest)
{
cout << "Wrong x and y values for your monitor, exiting.\n";
Sleep(3000);
return 0;
}
if(yMax == ratioTest)
{
cout << "The x and y match the aspect ratio.\nNow Set the velocity(anything above 20 is insanely fast.)\n";
int vel;
cin >> vel;
cout << "velocity set for " << vel << ". Commencing possestion in 3 seconds\n";
Sleep(3000);

while(true)
{
possess1: //press thx, get bacon, eat bacon
SetCursorPos(x,y);
x = vel+x;
y = x * 0.5625f;
Sleep(15);
if((x==xMax)&&(y==yMax))
{
x=0;
y=0;
goto possess1;
}
if(GetAsyncKeyState(VK_END))
{
return 0;
}
}
}
}
}


[/php]
And what does it do?
Quote Originally Posted by Gab View Post
And what does it do?
Read the code and find out
Quote Originally Posted by Gab View Post
And what does it do?

simple afk bot thing it just moves your mouse in the monitor


@Kallisti: You could use this to get the screen settings then the user don't have to enter it:

Code:
x = GetSystemMetrics(SM_CXSCREEN);
y = GetSystemMetrics(SM_CYSCREEN);
Quote Originally Posted by doofbla View Post
simple afk bot thing it just moves your mouse in the monitor


@Kallisti: You could use this to get the screen settings then the user don't have to enter it:

Code:
x = GetSystemMetrics(SM_CXSCREEN);
y = GetSystemMetrics(SM_CYSCREEN);
Actually, mouse possesser

I want the user to enter it, because if they make a mistake they have to try again
seems that u where abit high: //press thx, get bacon, eat bacon
k my bases are full of crap too, nvm.

dururuMAIN
SMECKSYTHREADHOOK
ect.

this is unconventional but most of the time not patched by some game =3
I made a more "efficient" version, this time with autodetect.

[php]#include <iostream>
#include <Windows.h>
using namespace std;


//------------------------------------------Globals----------------------------------------------//
//----------------------------------------------------------------------------------------------//
int x = 0;
int y = 0;
int xMax = GetSystemMetrics(SM_CXSCREEN);
int yMax = GetSystemMetrics(SM_CYSCREEN);
int xFin = 0;
int yFin = 0;
int vel = 0;
int i = 0;

bool __43;
bool __1610;
bool __169;
//---------------------------------------Functions-------------------------------------------------//
//------------------------------------------------------------------------------------------------//
void ret()
{
while(i != 6)
{
// just to look cool
cout << "Retrieving your screen resolution and ratio.\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio..\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio...\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio.\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio..\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio...\n";
Sleep(1000);
i++;
system("cls");
}

cout << "Retrieved!\n";
cout << "Resolution is " << xMax << " by " << yMax << '\n';
xFin = xMax;
yFin = yMax;

if((xMax * 0.75f) == yMax)
{
cout << "Ratio is 4:3\n";
__43 = true;

}
else if((xMax * 0.625f) == yMax)
{
cout << "Ratio is 16:10\n";
__1610 = true;

}
else
{
cout << "Ratio is 16:9\n";
__169 = true;

}
}



//---------------------------------------Entry Point---------------------------------------------//
//----------------------------------------------------------------------------------------------//
int main()
{
ret();
cout << "Now set the velocity (1-15)\n";
cin >> vel;
cout << "Velocity set for " << vel << '\n';
//----------------------------------------------------------
//----------------------------------------------------------
if(__43 == true)
{
cout << "Possessing with velocity of " << vel << " in 3 seconds\n";
Sleep(3000);
while(true)
{
p1:
SetCursorPos(x,y);
x = vel+x;
y = x * 0.75f;
Sleep(15);

if((x==xFin)&&(y==yFin))
{
x=xFin;
y=0;
goto p1;
}

if(GetAsyncKeyState(VK_END))
{
exit(0);
}
}
}
////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
else if(__1610 == true)
{
cout << "Possessing with velocity of " << vel << " in 3 seconds\n";
Sleep(3000);
while(true)
{
p2:
SetCursorPos(x,y);
x = vel+x;
y = x * 0.625f;
Sleep(15);

if((x==xFin)&&(y==yFin))
{
x=0;
y=0;
goto p2;
}

if(GetAsyncKeyState(VK_END))
{
exit(0);
}
}
}
/////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
else
{
cout << "Possessing with velocity of " << vel << " in 3 seconds\n";
Sleep(3000);
while(true)
{
p3:
SetCursorPos(x,y);
x = vel+x;
y = x * 0.5625f;
Sleep(15);

if((x==xFin)&&(y==yFin))
{
x=0;
y=0;
goto p3;
}

if(GetAsyncKeyState(VK_END))
{
exit(0);
}
}
}
//-----------------------------------------------------------
//-----------------------------------------------------------
return 0;
}
[/php]
Quote Originally Posted by Kallisti View Post
I made a more "efficient" version, this time with autodetect.

[php]#include <iostream>
#include <Windows.h>
using namespace std;


//------------------------------------------Globals----------------------------------------------//
//----------------------------------------------------------------------------------------------//
int x = 0;
int y = 0;
int xMax = GetSystemMetrics(SM_CXSCREEN);
int yMax = GetSystemMetrics(SM_CYSCREEN);
int xFin = 0;
int yFin = 0;
int vel = 0;
int i = 0;

bool __43;
bool __1610;
bool __169;
//---------------------------------------Functions-------------------------------------------------//
//------------------------------------------------------------------------------------------------//
void ret()
{
while(i != 6)
{
// just to look cool
cout << "Retrieving your screen resolution and ratio.\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio..\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio...\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio.\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio..\n";
Sleep(1000);
i++;
system("cls");
cout << "Retrieving your screen resolution and ratio...\n";
Sleep(1000);
i++;
system("cls");
}

cout << "Retrieved!\n";
cout << "Resolution is " << xMax << " by " << yMax << '\n';
xFin = xMax;
yFin = yMax;

if((xMax * 0.75f) == yMax)
{
cout << "Ratio is 4:3\n";
__43 = true;

}
else if((xMax * 0.625f) == yMax)
{
cout << "Ratio is 16:10\n";
__1610 = true;

}
else
{
cout << "Ratio is 16:9\n";
__169 = true;

}
}



//---------------------------------------Entry Point---------------------------------------------//
//----------------------------------------------------------------------------------------------//
int main()
{
ret();
cout << "Now set the velocity (1-15)\n";
cin >> vel;
cout << "Velocity set for " << vel << '\n';
//----------------------------------------------------------
//----------------------------------------------------------
if(__43 = true)
{
cout << "Possessing with velocity of " << vel << " in 3 seconds\n";
Sleep(3000);
while(true)
{
p1:
SetCursorPos(x,y);
x = vel+x;
y = x * 0.75f;
Sleep(15);

if((x==xFin)&&(y==yFin))
{
x=xFin;
y=0;
goto p1;
}

if(GetAsyncKeyState(VK_END))
{
exit(0);
}
}
}
////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
else if(__1610 = true)
{
cout << "Possessing with velocity of " << vel << " in 3 seconds\n";
Sleep(3000);
while(true)
{
p2:
SetCursorPos(x,y);
x = vel+x;
y = x * 0.625f;
Sleep(15);

if((x==xFin)&&(y==yFin))
{
x=0;
y=0;
goto p2;
}

if(GetAsyncKeyState(VK_END))
{
exit(0);
}
}
}
/////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
else
{
cout << "Possessing with velocity of " << vel << " in 3 seconds\n";
Sleep(3000);
while(true)
{
p3:
SetCursorPos(x,y);
x = vel+x;
y = x * 0.5625f;
Sleep(15);

if((x==xFin)&&(y==yFin))
{
x=0;
y=0;
goto p3;
}

if(GetAsyncKeyState(VK_END))
{
exit(0);
}
}
}
//-----------------------------------------------------------
//-----------------------------------------------------------
return 0;
}
[/php]
remote those goto's or not worth reading
Quote Originally Posted by 'Bruno View Post
remote those goto's or not worth reading
Gotos aren't all that bad. D:
Quote Originally Posted by 'Bruno View Post
remote those goto's or not worth reading
then tell an asm programmer not to use jmps
Quote Originally Posted by Kallisti View Post


then tell an asm programmer not to use jmps
It's possible, just call instead of jumping. |:
Quote Originally Posted by Void View Post
It's possible, just call instead of jumping. |:
I'm sure jumps are easier.
Quote Originally Posted by Kallisti View Post


I'm sure jumps are easier.
Yes but you said not to use them. |:
Quote Originally Posted by Void View Post
Yes but you said not to use them. |:
I said if he's got something against my gotos he should also have something against jmps
Quote Originally Posted by Kallisti View Post


I said if he's got something against my gotos he should also have something against jmps
I swear we resolved the goto business ages ago Patrick
Posts 115 of 31 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?