Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

advanced triggerbot #23

Closed
GoogleCodeExporter opened this issue Apr 1, 2015 · 15 comments
Closed

advanced triggerbot #23

GoogleCodeExporter opened this issue Apr 1, 2015 · 15 comments

Comments

@GoogleCodeExporter
Copy link

I'm the one from before who helped out with the triggerbot.  I've not
tested it, but I think the code below may help with making an advanced
triggerbot.  Of course the 128.0f could eventually be replaced with more
precise units for the class being used.

in cg_draw.c 
in function static void CG_ScanForCrosshairEntity( void )
just replace
VectorMA( start, 131072, cg.refdef.viewaxis[ 0 ], end )
with
if( cg.snap->ps.persistant[ PERS_TEAM ] = PTE_ALIENS);
 {;
 VectorMA( start, 128.0f, cg.refdef.viewaxis[ 0 ], end )};
else;
 {;
 VectorMA( start, 131072, cg.refdef.viewaxis[ 0 ], end )}; 

There maybe errors in this, but I think it is worth a shot.  (from what I
understand vectorMA makes the vector that checks for elements in front of
the cross hair.  The second number given in the fuction call is the
distance that it checks.)  Obviously the way I'm doing it now will
introduce a bug with the cross hair names not being displayed as aliens.

So why do I help with the triggerbot, but not the aimbot?  Really it is
because I don't like aimbots and I have never really had trouble aligning
my cross hair with the target.  For me the real problem is with the alien
class and timing.

Original issue reported on code.google.com by iouy2...@lycos.com on 31 May 2009 at 9:11

@GoogleCodeExporter
Copy link
Author

Easy fix for your *bug*. somewhere around here I was working on a more separated
triggerbot system ( thats what I do I modularize :p ) which would fix any of 
those
issues. 

We could do one better by pulling the attack distances for each class in place 
of
'128.0f' 

this would allow for maximum attack distance on a wider range of modified 
servers. (
x server comes to mind )

Original comment by MoarTree...@gmail.com on 31 May 2009 at 6:14

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Looks like it works, I haven't had a chance to test on aliens though ( :/ ) will
perform that this evening, but it still works as a human which leads me to feel 
that
it works.


After a working test tonight I will merge it with some alternative trigger 
switching
I worked on in the past.

Next svn version should contain enhanced triggerbot, blowfishes Alternate Kill
Message code. ( kinda neat? ), and my cleaned up radar code.



Original comment by MoarTree...@gmail.com on 9 Jun 2009 at 7:49

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Well, I tested it with a new cvar (thz_range), and it definitely works as
expected(don't use the if else that I originally had, it caused the screen to 
flash).
 I know you don't want more cvars, so I might just use this one for myself for now
(using binds really makes cvars completely painless though).  Anywho I thought 
that I
would confirm that this does seem to be the direction to go with the advanced
triggerbot and say keep up the progress. :)

Original comment by iouy2...@lycos.com on 10 Jun 2009 at 2:28

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

More cvars, for me you and anyone who is serious about the hax, would be fine, 
ppl
like the finer grain of control.

But for the majority of the botters, they dont read and so they end up writing 
issues
about shit not turning off when they are using the wrong cvars >.<

maybe, I should just branch a 'thzForSeriousNotNoob' and 'thzForYouNoob'

Original comment by MoarTree...@gmail.com on 10 Jun 2009 at 2:15

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

This is the code I used to retrieve the real values for each class's primary 
attack
distance.

static int CG_AttackDistance( void )
{
    switch(cg.snap->ps.stats[ STAT_PCLASS ])
    {
    case PCL_ALIEN_BUILDER0_UPG:
        return LEVEL0_BITE_RANGE;

    case PCL_ALIEN_LEVEL1:
    case PCL_ALIEN_LEVEL1_UPG:
        return LEVEL1_CLAW_RANGE;

    case PCL_ALIEN_LEVEL2:
    case PCL_ALIEN_LEVEL2_UPG:
        return LEVEL2_CLAW_RANGE;

    case PCL_ALIEN_LEVEL3:
    case PCL_ALIEN_LEVEL3_UPG:
        return LEVEL3_CLAW_RANGE;

    case PCL_ALIEN_LEVEL4:
        return LEVEL4_CLAW_RANGE;

    case PCL_HUMAN:
        return 131072;

    default:
        return 0;
    }
}


the LEVEL(?)_CLAW_RANGE values are from tremulous.h, default value is zero for
classes that it doesn't make sense for ( granger, dretch ) and humans get the
previous value.

if the distance returned is zero we return from the triggerbot.

/*
=================
CG_KillEntity
=================
*/
static void CG_KillEntity( void )
{
  trace_t   trace;
  vec3_t    start, end;
  pTeam_t   team;
  int       distance = CG_AttackDistance();

  if( !thz_triggerbot.integer ) return;
  if( !distance ) return;

  VectorCopy( cg.refdef.vieworg, start );
  VectorMA( start, distance, cg.refdef.viewaxis[ 0 ], end );

  CG_Trace( &trace, start, vec3_origin, vec3_origin, end,
    cg.snap->ps.clientNum, CONTENTS_SOLID|CONTENTS_BODY );

  if( trace.entityNum >= MAX_CLIENTS ) return;

  team = cgs.clientinfo[ trace.entityNum ].team;

  if( cg.snap->ps.persistant[ PERS_TEAM ] != TEAM_SPECTATOR ) {
    if( team != cg.snap->ps.stats[ STAT_PTEAM ] ) {
      if( !(cg.snap->ps.pm_flags & PMF_FOLLOW) ) {
        trap_SendConsoleCommand("+attack;");
        trap_SendConsoleCommand("-attack;");
        cg.snap->ps.stats[STAT_PTEAM] = team;
      }
      return;
    }
  }
}




Original comment by MoarTree...@gmail.com on 10 Jun 2009 at 3:30

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

It looks alright to me, but from my testing it may be more accurate add the 
following
values to those obtained from the tremulous.h for each class.
basi/adv basi: 10
mara/adv mara: 11
goon/adv goon: 15
rant: 20

I've been testing it online, and this cheat seems to be very hard for admins to
detect (gives an edge to those who would otherwise be caught), which is 
ultimately
the goal (well, obviously along with winning the game...).   

I've also been specing a bit with the wallhack on and have noticed admins' cross
hairs following other players though walls and several recognizable 
triggerbots. 
Being that THZ has the only functioning triggerbot I know about for this game, I
would say it is doing pretty well.

Original comment by iouy2...@lycos.com on 17 Jun 2009 at 8:37

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

mine pulls the actual range values from the connected server, this allows for 
the
flexibility needed for highly modified servers.

Original comment by MoarTree...@gmail.com on 3 Oct 2009 at 8:41

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Original comment by MoarTree...@gmail.com on 4 Oct 2009 at 1:04

  • Added labels: Component-Triggerbot, OpSys-All, Priority-High, QVM-CGAME, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

@GoogleCodeExporter
Copy link
Author

Original comment by MoarTree...@gmail.com on 4 Oct 2009 at 1:14

  • Added labels: Target-4.3
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Original comment by MoarTree...@gmail.com on 4 Oct 2009 at 1:20

  • Added labels: Component-TriggerBot
  • Removed labels: Component-Triggerbot

@GoogleCodeExporter
Copy link
Author

Its been added to the source tree now. Needs to be tested

Original comment by MoarTree...@gmail.com on 4 Oct 2009 at 1:34

  • Changed state: Pending
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Last label I promise

Original comment by MoarTree...@gmail.com on 4 Oct 2009 at 1:44

  • Added labels: Severity-High
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Tested a bit, seems to work, gonna go ahead and close this

Original comment by MoarTree...@gmail.com on 5 Oct 2009 at 10:16

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant