diff --git a/common/ruletypes.h b/common/ruletypes.h index 872da6ca7..9251a197f 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -877,6 +877,7 @@ RULE_INT(Bots, DefaultFollowDistance, 20, "Default 20. Distance a bot will follo RULE_INT(Bots, MaxFollowDistance, 300, "Default 300. Max distance a bot can be set to follow behind.") RULE_INT(Bots, MaxDistanceRanged, 300, "Default 300. Max distance a bot can be set to ranged.") RULE_BOOL(Bots, AllowAIMez, true, "If enabled bots will automatically mez/AE mez eligible targets.") +RULE_INT(Bots, CampTimer, 25, "Number of seconds after /camp has begun before bots camp out.") RULE_CATEGORY_END() RULE_CATEGORY(Chat) diff --git a/zone/client.cpp b/zone/client.cpp index dd22e2a23..bb1f11a86 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -148,6 +148,7 @@ Client::Client(EQStreamInterface *ieqs) : Mob( ), hpupdate_timer(2000), camp_timer(29000), + bot_camp_timer((RuleI(Bots, CampTimer) * 1000)), process_timer(100), consume_food_timer(CONSUMPTION_TIMER), zoneinpacket_timer(1000), @@ -252,6 +253,7 @@ Client::Client(EQStreamInterface *ieqs) : Mob( fishing_timer.Disable(); dead_timer.Disable(); camp_timer.Disable(); + bot_camp_timer.Disable(); autosave_timer.Disable(); GetMercTimer()->Disable(); instalog = false; diff --git a/zone/client.h b/zone/client.h index 71310dd84..77cf9a574 100644 --- a/zone/client.h +++ b/zone/client.h @@ -2036,6 +2036,7 @@ private: PTimerList p_timers; //persistent timers Timer hpupdate_timer; Timer camp_timer; + Timer bot_camp_timer; Timer process_timer; Timer consume_food_timer; Timer zoneinpacket_timer; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 06c7e7c60..72ebaa72c 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4285,6 +4285,7 @@ void Client::Handle_OP_Camp(const EQApplicationPacket *app) return; } camp_timer.Start(29000, true); + bot_camp_timer.Start((RuleI(Bots, CampTimer) * 1000), true); return; } @@ -14680,6 +14681,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app) SetFeigned(false); BindWound(this, false, true); camp_timer.Disable(); + bot_camp_timer.Disable(); } else if (sa->parameter == Animation::Sitting) { SetAppearance(eaSitting); diff --git a/zone/client_process.cpp b/zone/client_process.cpp index c2e20fe5b..a1fb7080a 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -193,6 +193,10 @@ bool Client::Process() { return false; //delete client } + if (bot_camp_timer.Check()) { + Bot::BotOrderCampAll(this); + } + if (camp_timer.Check()) { Raid *myraid = entity_list.GetRaidByClient(this); if (myraid) {