.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   The RealBot 'Source' (http://forums.bots-united.com/forumdisplay.php?f=52)
-   -   Problem with RealBot and CSBot: (http://forums.bots-united.com/showthread.php?t=2681)

dead bwoy 21-09-2004 22:36

Problem with RealBot and CSBot:
 
It seems that realbot still uses model detection to determine enemies...
This is a bad idea if realbot is to be compatible with czero. first off, there are 5 skins in czero. Support needs to be added for Spetsnaz and Militia models. As a temporary fix, for offline play only:
Alter your BotProfile.db to not allow any bots to choose the #5 skin.
For On-line play: no fix....
CZ TOD custom missions:
You CAN kick csbot and substitute realbot but if the mission pack uses 50+ custom skins, you'll have BIG problems!

Is there an easier way that could be used to detect enemies?

Whistler 22-09-2004 09:12

Re: Problem with RealBot and CSBot:
 
int UTIL_GetTeam(edict_t *pEntity)
{
union
{
short s;
char c[2];
} t;

char *p = g_engfuncs.pfnInfoKeyValue(g_engfuncs.pfnGetInfoKe yBuffer(pEntity), "model");
t.c[0] = p[0];
t.c[1] = p[1];

if (t.s == (('e' << 8 ) + 't') || // TError
t.s == (('e' << 8 ) + 'l') || // LEet
t.s == (('r' << 8 ) + 'a') || // ARctic
t.s == (('u' << 8 ) + 'g') || // GUerilla
t.s == (('i' << 8 ) + 'm')) // MIlitia
return TEAM_TERRORIST;

return TEAM_CT; // URban, GSg9, SAs, GIgn, VIp, SPetsnaz
}

^-- very 1337 one :D

also this may be the only way to detect teams if you don't have the source code to the MOD

edit: [ code ] tag doesn't work correctly in this forum ??????

dead bwoy 22-09-2004 10:25

Re: Problem with RealBot and CSBot:
 
Hopefully someone with some coding knowledge can apply this in a future release...

stefanhendriks 22-09-2004 16:22

Re: Problem with RealBot and CSBot:
 
then this should be in the 'source' forum... ;)

dead bwoy 22-09-2004 21:48

Re: Problem with RealBot and CSBot:
 
Quote:

...also this may be the only way to detect teams if you don't have the source code to the MOD...
I got to thinking about this some more and csbot, which originally was a hook.dll, detects teams by other means, no matter what the model names are that are being used. Maybe something to do with the spawn entities? I don't know, I don't code, I just know there's a better way to detect teams out there...

frashman 03-10-2004 13:13

Re: Problem with RealBot and CSBot:
 
don't understand the choherences ...

Whistler 03-10-2004 13:59

Re: Problem with RealBot and CSBot:
 
csbot is NOT a "hook dll". The warez version of "ZBot" is actually the cracked version of czero 1.0 mp.dll.
You can overwrite your original mp.dll with the warez "ZBot" and you'll find your CS will still work.

dead bwoy 05-10-2004 01:34

Re: Problem with RealBot and CSBot:
 
I thought Z-Bot was the leaked beta version of the CSBot... which was tested on cstrike not czero... I just assumed that it would have been a hook dll, I never got to beta test the bot...
The current CSBot is embedded in the czero mp.dll
I guess the beta bot was embedded in a beta mp.dll?

sPlOrYgOn 05-10-2004 07:30

Re: Problem with RealBot and CSBot:
 
Quote:

Originally Posted by Whistler
also this may be the only way to detect teams if you don't have the source code to the MOD

well I know it cannot be the only way to detect teams because of chickenmod and some other mod which changes the players models..
more than likely the team data is stored in the private data...
if only someone had time to figure out all the offsets to all the saved stuff in the CS player private data...

Whistler 05-10-2004 07:33

Re: Problem with RealBot and CSBot:
 
the offset is likely to change when CS is updated so that may be not a good idea

sPlOrYgOn 05-10-2004 07:40

Re: Problem with RealBot and CSBot:
 
another way would be to catch "TeamInfo" messages..
except they are unreliable because the time they are sent is when someone joins but when that someone barely joins he has no team and it won't send another TeamInfo message until the next time someone joins..
each time someone joins it gets sent for all the players to refresh their team or something..
this is statsme's implementation of catching these messages.. from v2.7 but also used in v2.8
PHP Code:

// team is changed then this msg is send
void Client_TeamInfo_CS(voidmValue)
{    
    if (
mPlayer) return;

    static 
int index;

    switch (
mState++) {
    case 
0:
        
index = *(int*)mValue;
        break;
    case 
1:
        const 
charteam = (char*)mValue;

        
int i;
        
        for(
0sm.team_num ; ++i)
            if ( !
strcmpi(sm.team_name[i],team) ) 
                break;

        
//accept only new teams, max. 4 teams
        
if ( == sm.team_num && )
            
strcpysm.team_name[sm.team_num++], team);

        
player_t*pPlayer GET_PLAYER_POINTER_Iindex );

        if ( !
pPlayer->ingame ) {//this is bot...
            
edict_tpEntity INDEXENT(index);
            
PlayerConnectpEntity STRING(pEntity->v.netname), "127.0.0.1:27005" );
            
PlayerPutInServerpPlayer );
        }

        
strcpy(pPlayer->team_namesm.team_name[i]); //save name of team
        
pPlayer->team_index i;
        
sm.team_players[0] = 0;
        
sm.team_players[1] = 0;
        
sm.team_players[2] = 0;
        
sm.team_players[3] = 0;
        for ( 
1<= gpGlobals->maxClients; ++)
        {
            
pPlayer GET_PLAYER_POINTER_I);
            
sm.team_players[pPlayer->team_index]++;
        }
    }




All times are GMT +2. The time now is 02:36.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.