mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
ok
This commit is contained in:
parent
f624cb65cf
commit
7c06bc9979
@ -212,6 +212,52 @@ botThrowGrenade(grenName)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pressAds(time)
|
||||||
|
{
|
||||||
|
self endon("death");
|
||||||
|
self endon("disconnect");
|
||||||
|
self notify("bot_ads");
|
||||||
|
self endon("bot_ads");
|
||||||
|
|
||||||
|
if(!isDefined(time))
|
||||||
|
time = 0.1;
|
||||||
|
|
||||||
|
self ads(true);
|
||||||
|
|
||||||
|
if(time)
|
||||||
|
wait time;
|
||||||
|
|
||||||
|
self ads(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
ads(what)
|
||||||
|
{
|
||||||
|
self.bot.ads_pressed = what;
|
||||||
|
}
|
||||||
|
|
||||||
|
pressFire(time)
|
||||||
|
{
|
||||||
|
self endon("death");
|
||||||
|
self endon("disconnect");
|
||||||
|
self notify("bot_fire");
|
||||||
|
self endon("bot_fire");
|
||||||
|
|
||||||
|
if(!isDefined(time))
|
||||||
|
time = 0.1;
|
||||||
|
|
||||||
|
self fire(true);
|
||||||
|
|
||||||
|
if(time)
|
||||||
|
wait time;
|
||||||
|
|
||||||
|
self fire(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
fire(what)
|
||||||
|
{
|
||||||
|
self.bot.fire_pressed = what;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Bot will jump.
|
Bot will jump.
|
||||||
*/
|
*/
|
||||||
@ -250,7 +296,7 @@ jump()
|
|||||||
*/
|
*/
|
||||||
stand()
|
stand()
|
||||||
{
|
{
|
||||||
self botSetStance("stand");
|
self.bot.stance = "stand";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -258,7 +304,7 @@ stand()
|
|||||||
*/
|
*/
|
||||||
crouch()
|
crouch()
|
||||||
{
|
{
|
||||||
self botSetStance("crouch");
|
self.bot.stance = "crouch";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -271,7 +317,7 @@ prone()
|
|||||||
if (curWeap == "riotshield_mp")
|
if (curWeap == "riotshield_mp")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
self botSetStance("prone");
|
self.bot.stance = "prone";
|
||||||
}
|
}
|
||||||
|
|
||||||
botMoveTo(to)
|
botMoveTo(to)
|
||||||
|
@ -21,42 +21,78 @@ botAdsAmount()
|
|||||||
return (1 / (self.bot.ads_highest - self.bot.ads_lowest)) * self.bot.ads_tightness + (1 + (self.bot.ads_highest / (self.bot.ads_lowest - self.bot.ads_highest)));
|
return (1 / (self.bot.ads_highest - self.bot.ads_lowest)) * self.bot.ads_tightness + (1 + (self.bot.ads_highest / (self.bot.ads_lowest - self.bot.ads_highest)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ads(what)
|
// aim loop needs work
|
||||||
|
BotPressADS(time)
|
||||||
{
|
{
|
||||||
self.bot.ads_pressed = what;
|
self maps\mp\bots\_bot_internal::pressAds(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
pressFire(time)
|
BotPressAttack(time)
|
||||||
{
|
{
|
||||||
self endon("death");
|
self maps\mp\bots\_bot_internal::pressFire(time);
|
||||||
self endon("disconnect");
|
|
||||||
self notify("bot_fire");
|
|
||||||
self endon("bot_fire");
|
|
||||||
|
|
||||||
if(!isDefined(time))
|
|
||||||
time = 0.1;
|
|
||||||
|
|
||||||
self fire(true);
|
|
||||||
|
|
||||||
if(time)
|
|
||||||
wait time;
|
|
||||||
|
|
||||||
self fire(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
botThrowGrenade(gname)
|
throwBotGrenade(gname)
|
||||||
{
|
{
|
||||||
return maps\mp\bots\_bot_internal::botThrowGrenade(gname);
|
return self maps\mp\bots\_bot_internal::botThrowGrenade(gname);
|
||||||
}
|
}
|
||||||
|
|
||||||
fire(what)
|
BotGetTargetRandom()
|
||||||
{
|
{
|
||||||
self.bot.fire_pressed = what;
|
if (!isDefined(self.bot.target))
|
||||||
|
return undefined;
|
||||||
|
|
||||||
|
return self.bot.target.rand;
|
||||||
}
|
}
|
||||||
|
|
||||||
botSetStance(stance)
|
/*
|
||||||
|
Returns the bot's random assigned number.
|
||||||
|
*/
|
||||||
|
BotGetRandom()
|
||||||
{
|
{
|
||||||
self.bot.stance = stance;
|
return self.bot.rand;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Returns if the bot is pressing frag button.
|
||||||
|
*/
|
||||||
|
IsBotFragging()
|
||||||
|
{
|
||||||
|
return self.bot.isfragging;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Returns if the bot is sprinting.
|
||||||
|
*/
|
||||||
|
IsBotSprinting()
|
||||||
|
{
|
||||||
|
return self.bot.running;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Returns if the bot is reloading.
|
||||||
|
*/
|
||||||
|
IsBotReloading()
|
||||||
|
{
|
||||||
|
return self.bot.isreloading;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Freezes the bot's controls.
|
||||||
|
*/
|
||||||
|
BotFreezeControls(what)
|
||||||
|
{
|
||||||
|
self.bot.isfrozen = what;
|
||||||
|
if(what)
|
||||||
|
self notify("kill_goal");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Returns if the bot is script frozen.
|
||||||
|
*/
|
||||||
|
BotIsFrozen()
|
||||||
|
{
|
||||||
|
return self.bot.isfrozen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user