暴力核心编程(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        
 

注册VIP

ZxID:8762790

等级: *
举报 只看该作者 122楼  发表于: 2009-09-11 0
看不懂啊
douyugy

ZxID:2294055

等级: 上等兵
举报 只看该作者 121楼  发表于: 2009-06-30 0
看的懂的都是牛人
1004200195

ZxID:7510451

等级: 新兵
举报 只看该作者 120楼  发表于: 2009-06-25 0
应该放到那
1004200195

ZxID:7510451

等级: 新兵
举报 只看该作者 119楼  发表于: 2009-06-25 0
        
1004200195

ZxID:7510451

等级: 新兵
举报 只看该作者 118楼  发表于: 2009-06-25 0
有点看不懂
l8935605

ZxID:3152766

等级: 少尉
举报 只看该作者 117楼  发表于: 2009-06-25 0
研究研究啊
417277639

ZxID:1675883

等级: 列兵
举报 只看该作者 116楼  发表于: 2009-04-03 0
谢谢 @不过看不懂@@@@
13168

ZxID:3921599

等级: 上等兵
举报 只看该作者 115楼  发表于: 2009-04-01 0
  
rmy198911

ZxID:1314446

等级: 上等兵
举报 只看该作者 114楼  发表于: 2009-03-21 0
什么意思?
52ihebe

ZxID:4563388

等级: 新兵
举报 只看该作者 113楼  发表于: 2009-02-25 0
看懂了用法!可是是用来做么的?
css156

ZxID:4380603

等级: 新兵
举报 只看该作者 112楼  发表于: 2009-02-20 0
想自己做一个暴力,但是看不懂
ivwitxjcf9

ZxID:3465939

等级: 准尉
举报 只看该作者 111楼  发表于: 2009-01-30 0
SDSDSDSD
ivwitxjcf9

ZxID:3465939

等级: 准尉
举报 只看该作者 110楼  发表于: 2009-01-30 0
ASDSADSAD
zp4zpengdh

ZxID:643094

等级: 中士
举报 只看该作者 109楼  发表于: 2009-01-27 0
教 下 、
aop1f

ZxID:1270913

等级: 列兵
举报 只看该作者 108楼  发表于: 2009-01-27 0
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶██████████顶顶顶顶  
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶████████████████顶顶顶顶  
顶顶顶顶顶顶顶顶顶顶████顶顶██████████顶顶顶顶顶顶顶顶顶  
顶顶顶顶顶顶████████顶顶██顶顶顶████顶顶顶顶顶顶顶顶顶顶  
顶█████████████顶顶顶顶顶顶顶███顶顶顶顶顶顶顶顶顶顶顶  
顶███████████顶顶顶顶顶顶顶顶█████████顶顶顶顶顶顶  
顶顶█████████顶顶顶顶顶顶顶顶████████████顶顶顶顶  
顶顶顶█顶顶顶████顶顶顶顶顶顶████顶顶顶顶顶█████顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶顶██顶顶顶█顶顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶███顶顶顶██顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶███顶顶顶██顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶███顶顶███顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶███顶顶███顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶███顶顶███顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶███顶顶███顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶██顶顶顶██顶顶顶顶███顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶██顶顶顶██顶顶顶顶███顶顶顶顶顶  
顶顶顶████████顶顶顶顶顶顶█顶顶██顶顶顶顶████顶顶顶顶顶  
顶顶顶顶███████顶顶顶顶顶顶顶顶顶██顶顶█顶顶顶██顶顶顶顶顶  
顶顶顶顶顶顶█████顶顶顶顶顶顶顶顶███顶顶████顶顶顶顶顶顶顶  
顶顶顶顶顶顶顶顶███顶顶顶顶顶顶顶████顶顶顶██████顶顶顶顶  
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶█████顶顶顶顶顶██████顶顶顶  
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶████顶顶顶顶顶顶顶顶█████顶顶顶  
顶顶顶顶顶顶顶顶顶顶顶顶顶█████顶顶顶顶顶顶顶顶顶顶████顶顶顶  
顶顶顶顶顶顶顶顶顶顶顶顶██顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶██顶顶顶顶
mkhunter

ZxID:2339866

等级: 列兵
举报 只看该作者 107楼  发表于: 2009-01-26 0
it's pretty hard = =
mebeyong

ZxID:3708379

等级: 新兵
举报 只看该作者 106楼  发表于: 2009-01-25 0
不懂
qq0805000

ZxID:2001916

等级: 列兵
举报 只看该作者 105楼  发表于: 2009-01-15 0
VC++,
19852500

ZxID:3374807

等级: 列兵
举报 只看该作者 104楼  发表于: 2009-01-09 0
gggggggggg
« 返回列表
发帖 回复