Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 337

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 339

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 341

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 343
How to add spams to a bot

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Member
    Join Date
    Nov 2006
    Posts
    61

    How to add spams to a bot

    He IM CalibeR of the [deF]clan

    I want to know how u can add spams to a bot.

    I use Dev-C++.


    i dont want to do all the tuts. :-\

    its with "void", (void) or something like that.

    How to open the bot in c++ and where and how and what to add?


    can somebody give me Help? ???

    Add me to ur msn, if u think u can help me out

    MSN:el_joriaz@hotmail.com

    /Caliber out

  2. #2
    Veteran Member
    Join Date
    Apr 2006
    Posts
    628

    Re: How to add spams to a bot

    Well firstly you need the source files (file.cpp/file.h).

    After that, look @ some tuts and the way things are processed within these source files (look @ nexus for instance) and then apply it to what you want to do.

  3. #3
    Veteran Member
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    748

    Re: How to add spams to a bot

    Hook CG_EntityEvent, grab killer clientnum and presto
    Code:
    <chaplja|> i'm taking over nixcoders
    <Smileman`> cool

  4. #4
    Site Admin xHalt's Avatar
    Join Date
    May 2006
    Location
    Belgium
    Posts
    8,202

    Re: How to add spams to a bot

    Quote Originally Posted by Couch
    Hook CG_EntityEvent, grab killer clientnum and presto
    You make it all sound so easy... 8)

  5. #5
    Veteran Member
    Join Date
    Apr 2006
    Posts
    628

    Re: How to add spams to a bot

    Taken from Inspire

    We want to hook the function CG_EntityEvent for Killspam, Killsounds, and other things.

    First, we have to find the address to hook:

    1. Open up the ET SDK and go to "cg_event.c"

    2. Search for the string - "Unknown event %i"

    3. Once you&#39;ve found it, if you scroll down, about 3 calls later
    we&#39;ve found CG_EntityEvent.

    4. Open up OllyDbg, then load cgame_mp_x86.dll

    5. Now, Right-Click and search for all referenced text strings.

    6. Once the strings window opens up, search for the "Unknown event %i" string we found

    7. Once you&#39;ve found it, press Enter.

    You should now see something like this:
    Code:
    3002E4EE |> 53       PUSH EBX
    3002E4EF |. 68 B83B0830  PUSH cgame_mp.30083BB8          ;  ASCII "Unknown event: %i" // this is the string we found in the sdk
    3002E4F4 |. E8 E7BC0000  CALL cgame_mp.3003A1E0
    3002E4F9 |. 83C4 08    ADD ESP,8
    3002E4FC |. EB 04     JMP SHORT cgame_mp.3002E502
    3002E4FE |> DDD8      FSTP ST
    3002E500 |. DDD8      FSTP ST
    3002E502 |> E8 5C220400  CALL cgame_mp.30070763          ; Default case of switch 3002E4A2
    3002E507 |. 8B0D 74D42130 MOV ECX,DWORD PTR DS:[3021D474]
    3002E50D |. 83E0 03    AND EAX,3
    3002E510 |. 3BC8      CMP ECX,EAX
    3002E512 |. 5F       POP EDI
    3002E513 |. 5D       POP EBP
    3002E514 |. 74 04     JE SHORT cgame_mp.3002E51A
    3002E516 |. 8BC8      MOV ECX,EAX
    3002E518 |. EB 01     JMP SHORT cgame_mp.3002E51B
    3002E51A |> 41       INC ECX
    3002E51B |> 83F9 03    CMP ECX,3
    3002E51E |. 890D 74D42130 MOV DWORD PTR DS:[3021D474],ECX
    3002E524 |. 7E 0A     JLE SHORT cgame_mp.3002E530
    3002E526 |. C705 74D42130 >MOV DWORD PTR DS:[3021D474],0
    3002E530 |> 8B0D 70D42130 MOV ECX,DWORD PTR DS:[3021D470]
    3002E536 |. 3BC8      CMP ECX,EAX
    3002E538 |. 74 04     JE SHORT cgame_mp.3002E53E
    3002E53A |. 8BC8      MOV ECX,EAX
    3002E53C |. EB 01     JMP SHORT cgame_mp.3002E53F
    3002E53E |> 41       INC ECX
    3002E53F |> 83F9 03    CMP ECX,3
    3002E542 |. 890D 70D42130 MOV DWORD PTR DS:[3021D470],ECX
    3002E548 |. 7E 0A     JLE SHORT cgame_mp.3002E554
    3002E54A |. C705 70D42130 >MOV DWORD PTR DS:[3021D470],0
    3002E554 |> 5E       POP ESI
    3002E555 |. 5B       POP EBX
    3002E556 |. 81C4 94000000 ADD ESP,94
    3002E55C \. C3       RETN
    3002E55D   8D49 00    LEA ECX,DWORD PTR DS:[ECX]
    3002E560  . F4C40230    DD cgame_mp.3002C4F4           ; Switch table used at 3002C4ED
    
    // REMOVED THIS PART FOR SPACE PURPOSES
    
    3002E76F   CC       INT3
    3002E770  $ 8B0D 44585233 MOV ECX,DWORD PTR DS:[33525844]
    3002E776  . 8B51 08    MOV EDX,DWORD PTR DS:[ECX+8]
    3002E779  . 53       PUSH EBX
    3002E77A  . 56       PUSH ESI
    3002E77B  . 8B7424 0C   MOV ESI,DWORD PTR SS:[ESP+C]
    3002E77F  . 8B86 10010000 MOV EAX,DWORD PTR DS:[ESI+110]
    3002E785  . 50       PUSH EAX
    3002E786  . 6A 00     PUSH 0
    3002E788  . 8D9E 10070000 LEA EBX,DWORD PTR DS:[ESI+710]
    3002E78E  . 53       PUSH EBX
    3002E78F  . 52       PUSH EDX
    3002E790  . 8D46 0C    LEA EAX,DWORD PTR DS:[ESI+C]
    3002E793  . 50       PUSH EAX
    3002E794  . E8 F76DFDFF  CALL cgame_mp.30005590 <--- BG_EvaluateTrajectory - 1st call
    3002E799  . 56       PUSH ESI
    3002E79A  . E8 716CFFFF  CALL cgame_mp.30025410 <--- CG_SetEntitySoundPosition - 2nd call
    3002E79F  . 8B46 04    MOV EAX,DWORD PTR DS:[ESI+4]
    3002E7A2  . 83C4 18    ADD ESP,18
    3002E7A5  . 83F8 3D    CMP EAX,3D
    3002E7A8  . 7E 2E     JLE SHORT cgame_mp.3002E7D8
    3002E7AA  . 8B8E 50020000 MOV ECX,DWORD PTR DS:[ESI+250]
    3002E7B0  . 85C9      TEST ECX,ECX
    3002E7B2  . 0F85 B5000000 JNZ cgame_mp.3002E86D
    3002E7B8  . 83C0 C3    ADD EAX,-3D
    3002E7BB  . 53       PUSH EBX
    3002E7BC  . 56       PUSH ESI
    3002E7BD  . C786 50020000 >MOV DWORD PTR DS:[ESI+250],1
    3002E7C7  . 8986 B8000000 MOV DWORD PTR DS:[ESI+B8],EAX
    3002E7CD  . E8 6EDCFFFF  CALL cgame_mp.3002C440 <--- CG_EntityEvent: 3rd call - here&#39;s what we&#39;re looking for!
    3002E7D2  . 83C4 08    ADD ESP,8
    3002E7D5  . 5E       POP ESI
    Sweet... Our CG_EntityEvent address is 0x3002C440

    Now we want to start hooking...
    Code:
    // Remember, we have to call the original later
    void( _cdecl *orig_CG_EntityEvent )( centity_t* cent, vec3_t position );
    
    void CG_Event_Hook( centity_t* cent, vec3_t position )
    {  
      entityState_t *es;
      int cgEntEvent;
    
      // defnitions
      es = &cent->currentState;
      event = es->event & ~EV_EVENT_BITS;
    
      // Removed every piece of code we don&#39;t need for our hook
    
      // event in which death takes place
      if( cgEntEvent == EV_OBITUARY )
      {
        // we call the killspam we&#39;re going to make in here
        cKillSpam( es );
        // same goes for the killsounds
        cKillSounds( es );
      }
    
      // call the original
      orig_CG_EntityEvent(cent, position);
    }
    Now for the killspam...
    Code:
    void cKillSpam( entityState_t *est )
    {
      // define myself and the the enemy
      int cTarget = est->otherEntityNum;
      int cAttacker = est->otherEntityNum2;
    
      // the name of the target / enemy
      char* cTargetName = cgs->clientinfo[cTarget].name;
    
      // check if you&#39;re alive
      if( cg->snap->ps.stats[STAT_HEALTH] > 0 )
      {
        // check if you aren&#39;t committing suicide
        if( cAttacker == cg->snap->ps.clientNum && cTarget != cg->snap->ps.clientNum )
        {
          char kSpam[64];
    
          // say it!
          sprintf( kSpam, "say ^7%s ^1Got Owned!\n", cTargetName );
          pSendCommand( kSpam );
        }
      }
    }
    Cool, how about some killsounds?!

    Code:
    // we setup this integer to count your spree
    int sKillSpree = 0;
    // we setup this bool so the sound doesn&#39;t play over and over
    bool pSoundStatus = false;
    
    void sDoubleKill( void *playSound )
    {
      PlaySound( "sounds/spree/doublekill", NULL, SND_NODEFAULT );
    }
    
    void cKillSounds( entityState_t *est )
    {
      // defined myself and the target / enemy
      int cTarget = est->otherEntityNum, cAttacker = est->otherEntityNum2;
      pSoundStatus = false;
    
      // If it&#39;s warmup, or awaiting players, don&#39;t count anything
      if( cgs->gamestate != GS_PLAYING || cg->snap->ps.stats[STAT_HEALTH] < 0 )
      {
        return;
      }
    
      // If you&#39;re not committing suicide
      if( cAttacker == cg->snap->ps.clientNum && cTarget != cg->snap->ps.clientNum )
      {
        // add one to the spree
        sKillSpree++;
        pSoundStatus = true;
      }
      // If you were killed
      else if( cAttacker != cg->snap->ps.clientNum && cTarget == cg->snap->ps.clientNum )
      {
        // return you&#39;re spree count to 0
        sKillSpree = 0;
        pSoundStatus = false;
      }
      // if you have 2 kills without a death
      if( sKillSpree == 2 )
      {
        // play the sound, we don&#39;t directly use
        // PlaySound( ... ), because it freezes the game
        _beginthread( sDoubleKill, 0, NULL );
      }
      // continue adding sprees as you wish
    }
    Now that we&#39;ve finsished doing our functions, we have to hook it in LoadLibrary

    It&#39;s going to look like this:
    Code:
    DetourFunction( ( LPBYTE )0x3002C440, CG_EntityEvent_Hook );
    __asm mov [ orig_CG_EntityEvent ], eax;
    Have fun!


  6. #6
    Veteran Member
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    748

    Re: How to add spams to a bot

    Quote Originally Posted by Firecracker
    Quote Originally Posted by Couch
    Hook CG_EntityEvent, grab killer clientnum and presto
    You make it all sound so easy... 8)
    Because it is . I had an old version of it in old priv. copy of etCL a few years ago
    Code:
    <chaplja|> i'm taking over nixcoders
    <Smileman`> cool

  7. #7
    Member UndercoverEnemy's Avatar
    Join Date
    Jan 2007
    Posts
    69

    Re: How to add spams to a bot

    Nice ...Thanks You Have Helped Me On Making My First Bot ;D

  8. #8
    VIP fANAT1C's Avatar
    Join Date
    Sep 2006
    Posts
    1,559

    Re: How to add spams to a bot

    I understand everything untill "Now we want to start hooking..." where do you have to put the text?
    To see what I mean, click here.
    Can anyone help me, I would be very thankfull.
    Even if it won&#39;t work I appreciate your helping so I can do it by myself in the future!

    Regrets, Psycho_007!




    Google is your friend
    Before asking any (stupid) questions use the search-option first
    Stupid question = stupid answer
    I do NOT respond to private messages when you ask for hacks.

  9. #9
    Senior Member
    Join Date
    May 2006
    Posts
    225

    Re: How to add spams to a bot

    you will need a C/C++ compiler, just look on google.
    this will not work if you just copy and pasted the code, as you need your loadlibrary hook.
    try lookin at the tutorial section, i think theres a hooking tutorial there

  10. #10
    VIP fANAT1C's Avatar
    Join Date
    Sep 2006
    Posts
    1,559

    Re: How to add spams to a bot

    Quote Originally Posted by BonZ
    you will need a C/C++ compiler, just look on google.
    this will not work if you just copy and pasted the code, as you need your loadlibrary hook.
    try lookin at the tutorial section, i think theres a hooking tutorial there
    Okies, thanks. Does hooking this work with Dev C++ since I don&#39;t got the money to buy an advanced compiler.




    Google is your friend
    Before asking any (stupid) questions use the search-option first
    Stupid question = stupid answer
    I do NOT respond to private messages when you ask for hacks.

Page 1 of 2 12 LastLast

Similar Threads

  1. FREE ET SPAMS!! (details inside)
    By Cory in forum Vecs & Scripts
    Replies: 18
    Last Post: February 16th, 2010, 03:36
  2. how i cancel the spams
    By hai60 in forum WhiteLight
    Replies: 9
    Last Post: February 27th, 2009, 13:47
  3. My ascii-spams.
    By fANAT1C in forum Creative Corner
    Replies: 14
    Last Post: June 30th, 2008, 22:38
  4. Error it spams my console (with a screenshot)
    By [Sniper] in forum Enemy Territory Cheats
    Replies: 4
    Last Post: September 29th, 2007, 03:35
  5. Put your Bot spams inhere!
    By [G]-[St*R] in forum Vecs & Scripts
    Replies: 5
    Last Post: September 21st, 2007, 01:30

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •