Sauerbraten Hacks (Source Code)
OK so since Cube 2: Sauerbraten was updated, most of the Source Code was changed also, I will be showing you a few hacks that I use most of the time, These hacks are:
1. Triggerbot
2. Wallhack (see flag through walls)
3. Nospread
4. Norecoil
5. Jump hack
Code for triggerbot,
Go to: Sourcecode/fpsgame and find fps.cpp and go down to line 885 where it says:
crosshair = 1;
r = g = 0;
}
Now make a line right underneath that and insert the following. This should go from line 888-895
// MY CODE BEGIN
else if(o && o->type==ENT_PLAYER && !isteam(((fpsent *)o)->team, d->team))
{
d->attacking = true;
}
else {
d->attacking = false;
//END
}
Now for the Wallhack (see flag through walls)
Go to Sourcecode/fpsgame and find ctf.h, go to line 610 where it says:
if(m_hold)
and change it to:
//if(m_hold)
You can find the Norecoil and Nospread in the same place.
Go to Sourecode/fpsgame and find game.h, go to line 347-360 which should look like this:
static const struct guninfo { int sound, attackdelay, damage, spread, projspeed, kickamount, range, rays, hitpush, exprad, ttl; const char *name, *file; short part; } guns[NUMGUNS] =
{
{ S_PUNCH1, 250, 50, 0, 0, 0, 14, 1, 80, 0, 0, "fist", "fist", 0 },
{ S_SG, 1400, 10, 400, 0, 20, 1024, 20, 80, 0, 0, "shotgun", "shotg", 0 },
{ S_CG, 100, 30, 100, 0, 7, 1024, 1, 80, 0, 0, "chaingun", "chaing", 0 },
{ S_RLFIRE, 800, 120, 0, 320, 10, 1024, 1, 160, 40, 0, "rocketlauncher", "rocket", 0 },
{ S_RIFLE, 1500, 100, 0, 0, 30, 2048, 1, 80, 0, 0, "rifle", "rifle", 0 },
{ S_FLAUNCH, 600, 90, 0, 200, 10, 1024, 1, 250, 45, 1500, "grenadelauncher", "gl", 0 },
{ S_PISTOL, 500, 35, 50, 0, 7, 1024, 1, 80, 0, 0, "pistol", "pistol", 0 },
{ S_FLAUNCH, 200, 20, 0, 200, 1, 1024, 1, 80, 40, 0, "fireball", NULL, PART_FIREBALL1 },
{ S_ICEBALL, 200, 40, 0, 120, 1, 1024, 1, 80, 40, 0, "iceball", NULL, PART_FIREBALL2 },
{ S_SLIMEBALL, 200, 30, 0, 640, 1, 1024, 1, 80, 40, 0, "slimeball", NULL, PART_FIREBALL3 },
{ S_PIGR1, 250, 50, 0, 0, 1, 12, 1, 80, 0, 0, "bite", NULL, 0 },
{ -1, 0, 120, 0, 0, 0, 0, 1, 80, 40, 0, "barrel", NULL, 0 }
This file contains all weapon information now, before, for the Nospread, you had to go somewhere else. Now change only what I change because other changes will not work online just singleplayer. (i put perenthesis=Nospread and brackets=Norecoil so you guys no where I made the changes so don't put them in!) and after this is done, your shotgun will be as accurate and will do more damage than the rifle.
static const struct guninfo { int sound, attackdelay, damage, spread, projspeed, kickamount, range, rays, hitpush, exprad, ttl; const char *name, *file; short part; } guns[NUMGUNS] =
{
{ S_PUNCH1, 250, 50, 0, 0, 0, 14, 1, 80, 0, 0, "fist", "fist", 0 },
{ S_SG, 1400, 10, (0), 0, [0], 1024, 20, 80, 0, 0, "shotgun", "shotg", 0 },
{ S_CG, 100, 30, (0), 0, [0], 1024, 1, 80, 0, 0, "chaingun", "chaing", 0 },
{ S_RLFIRE, 800, 120, 0, 320, [0], 1024, 1, 160, 40, 0, "rocketlauncher", "rocket", 0 },
{ S_RIFLE, 1500, 100, 0, 0, [0], 2048, 1, 80, 0, 0, "rifle", "rifle", 0 },
{ S_FLAUNCH, 600, 90, 0, 200, [0], 1024, 1, 250, 45, 1500, "grenadelauncher", "gl", 0 },
{ S_PISTOL, 500, 35, (0), 0, [0], 1024, 1, 80, 0, 0, "pistol", "pistol", 0 },
{ S_FLAUNCH, 200, 20, 0, 200, 1, 1024, 1, 80, 40, 0, "fireball", NULL, PART_FIREBALL1 },
{ S_ICEBALL, 200, 40, 0, 120, 1, 1024, 1, 80, 40, 0, "iceball", NULL, PART_FIREBALL2 },
{ S_SLIMEBALL, 200, 30, 0, 640, 1, 1024, 1, 80, 40, 0, "slimeball", NULL, PART_FIREBALL3 },
{ S_PIGR1, 250, 50, 0, 0, 1, 12, 1, 80, 0, 0, "bite", NULL, 0 },
{ -1, 0, 120, 0, 0, 0, 0, 1, 80, 40, 0, "barrel", NULL, 0 }
You can also change the projectile speed for the Rocket Launcher, just go to the line that says
{ S_RLFIRE, 800, 120, 0, 320, [0], 1024, 1, 160, 40, 0, "rocketlauncher", "rocket", 0 },
and change 320 to any # (lower=slower rocket, higher=faster rocket, from 0-1400)
The Jump hack is probably one of the easiest to do.
Go to Sourcecode/engine and look for physics.cpp and go down to line 458, you can also change the gravity on line 459.
extern const float JUMPVEL = 125.0f;
extern const float GRAVITY = 200.0f;
This is the original, but you can change JUMPVEL = 125.0f to any #, same with GRAVITY (the higher, the faster you fall).
And that's it. I don't know if you can make the triggerbot toggle-able so if your being accused of hacking you can just turn it off, if any of you know, PM me. Thanks!