camp chat

This commit is contained in:
ineed bots 2022-04-18 16:06:32 -06:00
parent 7a9e28f03d
commit 6ff815d10e
2 changed files with 75 additions and 4 deletions

View File

@ -208,6 +208,10 @@ start_chat_watch()
case "follow_threat": case "follow_threat":
self thread bot_chat_follow_threat_watch( a, b, c, d, e, f, g ); self thread bot_chat_follow_threat_watch( a, b, c, d, e, f, g );
break; break;
case "camp":
self thread bot_chat_camp_watch( a, b, c, d, e, f, g );
break;
} }
} }
} }
@ -1918,3 +1922,68 @@ bot_chat_follow_threat_watch( state, threat, c, d, e, f, g )
break; break;
} }
} }
/*
bot_chat_follow_threat_watch( a, b, c, d, e, f, g )
*/
bot_chat_camp_watch( state, wp, time, d, e, f, g )
{
self endon( "disconnect" );
switch ( state )
{
case "go":
switch ( randomint( 3 ) )
{
case 0:
self BotDoChat( 25, "going to camp for " + time + " seconds" );
break;
case 1:
self BotDoChat( 25, "time to go camp!" );
break;
case 2:
self BotDoChat( 25, "rofl im going to camp" );
break;
}
break;
case "start":
switch ( randomint( 3 ) )
{
case 0:
self BotDoChat( 25, "well im camping... this is fun!" );
break;
case 1:
self BotDoChat( 25, "lol im camping, hope i kill someone" );
break;
case 2:
self BotDoChat( 25, "im camping! i guess ill wait " + time + " before moving again" );
break;
}
break;
case "stop":
switch ( randomint( 3 ) )
{
case 0:
self BotDoChat( 25, "finished camping.." );
break;
case 1:
self BotDoChat( 25, "wow that was a load of camping!" );
break;
case 2:
self BotDoChat( 25, "well its been over " + time + " seconds, i guess ill stop camping" );
break;
}
break;
}
}

View File

@ -2106,7 +2106,9 @@ bot_think_camp_loop()
if ( !isDefined( campSpot ) ) if ( !isDefined( campSpot ) )
return; return;
self BotNotifyBotChat( "camp", "go", campSpot ); time = randomIntRange( 30, 90 );
self BotNotifyBotChat( "camp", "go", campSpot, time );
self SetScriptGoal( campSpot.origin, 16 ); self SetScriptGoal( campSpot.origin, 16 );
@ -2118,12 +2120,12 @@ bot_think_camp_loop()
if ( ret != "goal" ) if ( ret != "goal" )
return; return;
self BotNotifyBotChat( "camp", "start", campSpot ); self BotNotifyBotChat( "camp", "start", campSpot, time );
self thread killCampAfterTime( randomIntRange( 30, 90 ) ); self thread killCampAfterTime( time );
self CampAtSpot( campSpot.origin, campSpot.origin + AnglesToForward( campSpot.angles ) * 2048 ); self CampAtSpot( campSpot.origin, campSpot.origin + AnglesToForward( campSpot.angles ) * 2048 );
self BotNotifyBotChat( "camp", "stop", campSpot ); self BotNotifyBotChat( "camp", "stop", campSpot, time );
} }
/* /*