From 05bb24f58741c18d661f2c6c4b06268bb9143be1 Mon Sep 17 00:00:00 2001 From: ineed bots Date: Mon, 18 Apr 2022 16:10:27 -0600 Subject: [PATCH] follow chat --- userraw/maps/mp/bots/_bot_chat.gsc | 49 +++++++++++++++++++++++++++- userraw/maps/mp/bots/_bot_script.gsc | 8 +++-- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/userraw/maps/mp/bots/_bot_chat.gsc b/userraw/maps/mp/bots/_bot_chat.gsc index 5a32687..80eaa0a 100644 --- a/userraw/maps/mp/bots/_bot_chat.gsc +++ b/userraw/maps/mp/bots/_bot_chat.gsc @@ -212,6 +212,10 @@ start_chat_watch() case "camp": self thread bot_chat_camp_watch( a, b, c, d, e, f, g ); break; + + case "follow": + self thread bot_chat_follow_watch( a, b, c, d, e, f, g ); + break; } } } @@ -1924,7 +1928,7 @@ bot_chat_follow_threat_watch( state, threat, c, d, e, f, g ) } /* - bot_chat_follow_threat_watch( a, b, c, d, e, f, g ) + bot_chat_camp_watch( a, b, c, d, e, f, g ) */ bot_chat_camp_watch( state, wp, time, d, e, f, g ) { @@ -1987,3 +1991,46 @@ bot_chat_camp_watch( state, wp, time, d, e, f, g ) break; } } + +/* + bot_chat_follow_watch( a, b, c, d, e, f, g ) +*/ +bot_chat_follow_watch( state, player, time, d, e, f, g ) +{ + self endon( "disconnect" ); + + switch ( state ) + { + case "start": + switch ( randomint( 3 ) ) + { + case 0: + self BotDoChat( 25, "well im going to follow " + player.name + " for " + time + " seconds" ); + break; + + case 1: + self BotDoChat( 25, "Lets go together " + player.name + " <3 :)" ); + break; + + case 2: + self BotDoChat( 25, "lets be butt buddies " + player.name + " and ill follow you!" ); + break; + } + + break; + + case "stop": + switch ( randomint( 2 ) ) + { + case 0: + self BotDoChat( 25, "well that was fun following " + player.name + " for " + time + " seconds" ); + break; + + case 1: + self BotDoChat( 25, "im done following that guy" ); + break; + } + + break; + } +} diff --git a/userraw/maps/mp/bots/_bot_script.gsc b/userraw/maps/mp/bots/_bot_script.gsc index ba02adc..55b5bd0 100644 --- a/userraw/maps/mp/bots/_bot_script.gsc +++ b/userraw/maps/mp/bots/_bot_script.gsc @@ -2251,12 +2251,14 @@ bot_think_follow_loop() if ( !isDefined( toFollow ) ) return; - self BotNotifyBotChat( "follow", "start", toFollow ); + time = randomIntRange( 10, 20 ); - self thread killFollowAfterTime( randomIntRange( 10, 20 ) ); + self BotNotifyBotChat( "follow", "start", toFollow, time ); + + self thread killFollowAfterTime( time ); self followPlayer( toFollow ); - self BotNotifyBotChat( "follow", "stop", toFollow ); + self BotNotifyBotChat( "follow", "stop", toFollow, time ); } /*