From 6ff815d10ebfcf2d4013d73e1dba66601ee13525 Mon Sep 17 00:00:00 2001 From: ineed bots Date: Mon, 18 Apr 2022 16:06:32 -0600 Subject: [PATCH] camp chat --- userraw/maps/mp/bots/_bot_chat.gsc | 69 ++++++++++++++++++++++++++++ userraw/maps/mp/bots/_bot_script.gsc | 10 ++-- 2 files changed, 75 insertions(+), 4 deletions(-) diff --git a/userraw/maps/mp/bots/_bot_chat.gsc b/userraw/maps/mp/bots/_bot_chat.gsc index 81f78ee..5a32687 100644 --- a/userraw/maps/mp/bots/_bot_chat.gsc +++ b/userraw/maps/mp/bots/_bot_chat.gsc @@ -208,6 +208,10 @@ start_chat_watch() case "follow_threat": self thread bot_chat_follow_threat_watch( a, b, c, d, e, f, g ); 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; } } + +/* + 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; + } +} diff --git a/userraw/maps/mp/bots/_bot_script.gsc b/userraw/maps/mp/bots/_bot_script.gsc index 02414c1..ba02adc 100644 --- a/userraw/maps/mp/bots/_bot_script.gsc +++ b/userraw/maps/mp/bots/_bot_script.gsc @@ -2106,7 +2106,9 @@ bot_think_camp_loop() if ( !isDefined( campSpot ) ) return; - self BotNotifyBotChat( "camp", "go", campSpot ); + time = randomIntRange( 30, 90 ); + + self BotNotifyBotChat( "camp", "go", campSpot, time ); self SetScriptGoal( campSpot.origin, 16 ); @@ -2118,12 +2120,12 @@ bot_think_camp_loop() if ( ret != "goal" ) 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 BotNotifyBotChat( "camp", "stop", campSpot ); + self BotNotifyBotChat( "camp", "stop", campSpot, time ); } /*