👍 Sauerbraten Hacks (Source Code)

Posts 1–15 of 22 · Page 1 of 2
👍 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!
It will not let me make changes to the file fps.cpp
Am I just stupid, or is it something else?
It will not let me make changes to the file fps.cpp
what platform are you using?

---------- Post added at 05:07 PM ---------- Previous post was at 05:07 PM ----------

what platform are you on?
I am on a Mac and Windows. Two different computers.
@Adversary if your on the mac, dont change anything yet. just build it to see if it will run, and then quit and make the changes. it wouldnt let me make the changes either cus it would say there was an error.[COLOR="Silver"]

@Adversary you are not stupid, the sourcecode can be sometimes though, it says there is an error. what platform are you on and what C++ program are you using?

---------- Post added at 12:57 PM ---------- Previous post was at 12:50 PM ----------

@clicathinek what platform you using and what program, I use xcode.
State that first part differently?
Mac and C++ program I'm using?
what are you using a Mac or PC?
and if its a mac you should use XCode
Okay, I have a Mac, what do I do with the XCode?

---------- Post added at 05:46 PM ---------- Previous post was at 05:40 PM ----------

Okay, I have a Mac, what do I do with the XCode?
thats what you use to look and change the games sourcecode
Okay, how might I do that?
you would have to download it, and if you dont have mac ver. 10.8, then you have to get a different version of xcode
Okay, so, the game came with xcode, is that what I use? or is it something different?
Could you walk me through a step by step like you did with the original post?
the game comes with a file named "xcode" but you need a program from the app store named xcode which is free but only works on mac ver. 10.8 but you can get thee older version of xcode like i did. If you cant get xcode because of the version, you can pm me your skype and ill send you the xcode version correct for your mac ver.
Alright, I can do that. I have mac version 10.6.8 by the way.
Posts 1–15 of 22 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Talk with us