暴力核心编程(1)--穿墙代码

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS作弊器交流讨论暴力核心编程(1)--穿墙代码
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
122个回复

暴力核心编程(1)--穿墙代码

楼层直达
softwind

ZxID:1112330

等级: 元老
举报 只看楼主 使用道具 楼主   发表于: 2007-03-28 0
— 本帖被 步惊天 从 『C.C.A | 猴岛暴力作弊战队事务区』 移动到本区(2007-09-02) —

从今天起,鄙人将陆续转贴CS暴力外挂的核心代码,但是看这些东西,首先要懂英文,其次要熟悉C++语言,再深度的还要对空间解析几何和SDK有所了解,我也在不断学习。很多人骂CCA的挂是垃圾,任何软件都有一个发展、成熟的过程,成天不学无术,只会拿别人的作品,在脚本上改来改去,打上自己的标签--“xxx专用”,实质上毫无技术含量,也没资格评点别人!因为你只是个编程技术文盲,有一天你能看懂这些核心的内容,你才能制作出高水平的Hook。

这段代码是OGC的标准autowall,它用来判断人物自身位置(me.ent->origin)与目标间是否可以穿透,不同的木仓支其穿透力是不同的,TraceThickness是穿透力计算的主函数,要完全看懂它是很困难的,但至少要了解它是核心代码,对编程感兴趣的可以相互探讨学习。只会骂人,满口脏话的,拜托先去幼儿园补习下文明礼貌!

* go to client.cpp and type at the top

#include "trace.cpp"
#include "trace.h"
#include "defs.h"

* ok now keep client.cpp open and search for "see attack"

* you should see somethin like

//see attack.h
int currentWeaponID=0;

* delete all of that as its going to be defined where the a-wall codin is..

* now go back up to the top of client.cpp and anywhere really u can paste
this..

// autowall

int penetrate;
int currentWeaponID=0;

bool CorrectGunX()
{
if(currentWeaponID==WEAPON_DEAGLE)
{
penetrate = WALL_PEN1;
return true;
}
else if(currentWeaponID==WEAPON_SCOUT)
{
penetrate = WALL_PEN2;
return true;
}
else if(currentWeaponID==WEAPON_AWP)
{
penetrate = WALL_PEN2;
return true;
}
else if(currentWeaponID==WEAPON_SIG)
{
penetrate = WALL_PEN1;
return true;
}
else if(currentWeaponID==WEAPON_COLT)
{
penetrate = WALL_PEN1;
return true;
}
else if(currentWeaponID==WEAPON_PARA)
{
penetrate = WALL_PEN1;
return true;
}
else if(currentWeaponID==WEAPON_AUG)
{
penetrate = WALL_PEN1;
return true;
}
else if(currentWeaponID==WEAPON_AK)
{
penetrate = WALL_PEN1;
return true;
}
else if(currentWeaponID==WEAPON_SG550)
{
penetrate = WALL_PEN1;
return true;
}
else if(currentWeaponID==WEAPON_G3SG1)
{
penetrate = WALL_PEN1;
return true;
}
else
{
penetrate = WALL_PEN0;
return true;
}
}

int GetCurPenetration(void)
{
if (CorrectGunX())
return penetrate;
return WALL_PEN0;
}

bool CanPenetrate(float *start, float *end)
{
int maxhits = 10, count = 0;
float damage = 120;
strace_t tr;
pmtrace_t beam_tr, beam_tr1, *tmptr;
float srcorigin[3];
float diff[3], length, viewvec[3], unityview[3], position[3];

viewvec[0] = end[0] - start[0];
viewvec[1] = end[1] - start[1];
viewvec[2] = end[2] - start[2];

length = VectorLength(viewvec);

unityview[0] = viewvec[0] / length;
unityview[1] = viewvec[1] / length;
unityview[2] = viewvec[2] / length;

srcorigin[0] = start[0];
srcorigin[1] = start[1];
srcorigin[2] = start[2];

while (damage > 10 && maxhits > 0)
{
maxhits--;

TraceThickness(srcorigin, end, 0, &tr);

if (tr.finished)
break;

if (srcorigin[0] != tr.endpos[0] || srcorigin[1] != tr.endpos[1] ||
srcorigin[2] != tr.endpos[2])
count++;

if (count >= 2 && !tr.finished)
{
damage = 0;

break;
}

position[0] = tr.endpos[0] + unityview[0] * 8.0;
position[1] = tr.endpos[1] + unityview[1] * 8.0;
position[2] = tr.endpos[2] + unityview[2] * 8.0;

tmptr = gEngfuncs.PM_TraceLine(position, end,
PM_TRACELINE_PHYSENTSONLY, 2, -1);

memcpy(&beam_tr, tmptr, sizeof(pmtrace_t));

if (!beam_tr.allsolid)
{
tmptr = gEngfuncs.PM_TraceLine(beam_tr.endpos, tr.endpos,
PM_TRACELINE_PHYSENTSONLY, 2, -1);

memcpy(&beam_tr1, tmptr, sizeof(pmtrace_t));

diff[0] = beam_tr1.endpos[0] - tr.endpos[0];
diff[1] = beam_tr1.endpos[1] - tr.endpos[1];
diff[2] = beam_tr1.endpos[2] - tr.endpos[2];

length = VectorLength(diff);

if (length < damage)
{
damage -= length;

srcorigin[0] = beam_tr1.endpos[0] + unityview[0];
srcorigin[1] = beam_tr1.endpos[1] + unityview[1];
srcorigin[2] = beam_tr1.endpos[2] + unityview[2];
}
}
else
damage = 0;
}

if (maxhits == 0 && damage)
{
tr.finished = false;

while (!tr.finished)
{
TraceThickness(srcorigin, end, 0, &tr);

if (tr.allsolid)
return false;

if (!tr.startsolid)
{
if (tr.finished)
return damage > 0.0;

return false;
}

srcorigin[0] = tr.endpos[0] + unityview[0];
srcorigin[1] = tr.endpos[1] + unityview[1];
srcorigin[2] = tr.endpos[2] + unityview[2];
}
}

return damage > 0.0;
}

bool pathFree(float *start, float *end)
{
bool pathtest;
strace_t tr;

if (cvar.autowall && GetCurPenetration())
{
pathtest = CanPenetrate(start, end);
}
else
{
TraceThickness(start, end, 0, &tr);

if (tr.finished)
pathtest = true;
else
pathtest = false;
}

return pathtest;
}


* ok now open up "trace.h" and add these definitions newhere again

#define WALL_PEN0 0
#define WALL_PEN1 1
#define WALL_PEN2 2

* open up both cvar.cpp and cvar.h now register the cvar "autowall"

* go to ur "common" folder and open up com_model.h

* search for "MinMaxS" and then u should see a "short" next to it..

* change the "short" to a "float" and theres 2 so do it to them both

* now open up your aimbot.cpp and search for "pathfree"

* delete all of that pathfree info as its already in client.cpp

P.S u can just take the autowall pathfree coding and replace it with the one
in aimbot.cpp but
u'd have to do the #includes in autowall too..

* ok now compile if u get NE WARNINGS where the Canpenetrate coding is then
change the "bool CanPenetrate" to "static bool CanPenetrate"

To any hack but Joolz 1.11
 
 
Back to top        
 

莎仕芘亞

ZxID:1171401

等级: 元老
猴岛国防部部长

举报 只看该作者 沙发   发表于: 2007-03-28 0

师傅的帖~顶下~~收下研究

andylin8812

ZxID:1183853

等级: 新兵
举报 只看该作者 板凳   发表于: 2007-03-29 0

不错是不错 看就是看不懂....

GVD244481175

ZxID:1186843

等级: 新兵
举报 只看该作者 地板   发表于: 2007-04-08 0

[em17]还行啦/就是看不懂!!!!!

mosquito_h

ZxID:1187018

等级: 新兵
举报 只看该作者 4楼  发表于: 2007-04-08 0
顶顶哇`
火柴_h

ZxID:1173979

等级: 新兵
举报 只看该作者 5楼  发表于: 2007-04-15 0
我觉得CCA外挂还可以 要是速度超过飓风就好了 
joli

ZxID:1196448

等级: 新兵
举报 只看该作者 6楼  发表于: 2007-05-28 0
看不懂呀。。。。。。
wangjiang321

ZxID:1164025

等级: 列兵
举报 只看该作者 7楼  发表于: 2007-05-29 0

我顶老大我会不段学习的

zxczxc_h

ZxID:1062874

等级: 新兵
一枪就爆你的头
举报 只看该作者 8楼  发表于: 2007-06-10 0

哎~~~~~~~~

我是菜鸟 啊

`

qw7891342

ZxID:1209728

等级: 中尉
CS.~1.2.4
举报 只看该作者 9楼  发表于: 2007-06-15 0

```看不明白~??

半场休息

ZxID:1177187

等级: 上士
举报 只看该作者 10楼  发表于: 2007-06-16 0

顶`````

guanzhuowei

ZxID:1211932

等级: 新兵
举报 只看该作者 11楼  发表于: 2007-06-24 0
核心马!有什么用啊?
nsgwnxi237

ZxID:1256897

等级: 下士
举报 只看该作者 12楼  发表于: 2007-09-01 0
看不懂啊
babybaoer

ZxID:1139100

等级: 新兵
举报 只看该作者 13楼  发表于: 2007-09-03 0
看不明白...
a348807092

ZxID:1258092

等级: 新兵
举报 只看该作者 14楼  发表于: 2007-09-03 0
晕 不懂  
guocheerup

ZxID:1265864

等级: 新兵
举报 只看该作者 15楼  发表于: 2007-09-15 0
顶一下啦1!!!
yygg_h

ZxID:1067469

等级: 新兵
举报 只看该作者 16楼  发表于: 2007-09-15 0
一点都不懂~
xisu250

ZxID:1266834

等级: 列兵
举报 只看该作者 17楼  发表于: 2007-09-16 0
根本看不懂的说,。
597173779

ZxID:1256839

等级: 下士
举报 只看该作者 18楼  发表于: 2007-09-19 0
顶起!!
我喜欢你们

ZxID:1271486

等级: 列兵
gja.l m.'w/\
举报 只看该作者 19楼  发表于: 2007-09-27 0
看都看不懂
« 返回列表
发帖 回复