mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-19 17:32:54 +00:00
pretige if and when
This commit is contained in:
parent
24306246e7
commit
37e0fced03
@ -62,6 +62,8 @@ init()
|
|||||||
setDvar("bots_loadout_allow_op", true);
|
setDvar("bots_loadout_allow_op", true);
|
||||||
if(getDvar("bots_loadout_rank") == "")// what rank the bots should be around, -1 is around the players, 0 is all random
|
if(getDvar("bots_loadout_rank") == "")// what rank the bots should be around, -1 is around the players, 0 is all random
|
||||||
setDvar("bots_loadout_rank", -1);
|
setDvar("bots_loadout_rank", -1);
|
||||||
|
if(getDvar("bots_loadout_prestige") == "")// what pretige the bots will be, -1 is the players, -2 is random
|
||||||
|
setDvar("bots_loadout_prestige", -1);
|
||||||
|
|
||||||
if(getDvar("bots_play_move") == "")//bots move
|
if(getDvar("bots_play_move") == "")//bots move
|
||||||
setDvar("bots_play_move", true);
|
setDvar("bots_play_move", true);
|
||||||
|
@ -12,6 +12,8 @@ added()
|
|||||||
|
|
||||||
rankxp = self bot_get_rank();
|
rankxp = self bot_get_rank();
|
||||||
self setStat( int(tableLookup( "mp/playerStatsTable.csv", 1, "rankxp", 0 )), rankxp );
|
self setStat( int(tableLookup( "mp/playerStatsTable.csv", 1, "rankxp", 0 )), rankxp );
|
||||||
|
|
||||||
|
self setStat( int(tableLookup( "mp/playerStatsTable.csv", 1, "plevel", 0 )), self bot_get_prestige() );
|
||||||
|
|
||||||
self set_diff();
|
self set_diff();
|
||||||
|
|
||||||
@ -758,6 +760,42 @@ get_random_weapon(groups, rank)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Gets the prestige
|
||||||
|
*/
|
||||||
|
bot_get_prestige()
|
||||||
|
{
|
||||||
|
p_dvar = getDvarInt("bots_loadout_prestige");
|
||||||
|
p = 0;
|
||||||
|
|
||||||
|
if (p_dvar == -1)
|
||||||
|
{
|
||||||
|
for (i = 0; i < level.players.size; i++)
|
||||||
|
{
|
||||||
|
player = level.players[i];
|
||||||
|
|
||||||
|
if (!isDefined(player.team))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (player is_bot())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
p = player getStat( int(tableLookup( "mp/playerStatsTable.csv", 1, "plevel", 0 )) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (p_dvar == -2)
|
||||||
|
{
|
||||||
|
p = randomInt(12);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p = p_dvar;
|
||||||
|
}
|
||||||
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Gets an exp amount for the bot that is nearish the host's xp.
|
Gets an exp amount for the bot that is nearish the host's xp.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user