diff --git a/common/ruletypes.h b/common/ruletypes.h index 65239a07c..ec8c60513 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -871,6 +871,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 a03e6f931..9d54f0b3d 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 67e49d815..648251a7b 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4341,6 +4341,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; } @@ -14760,6 +14761,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 d0dab4c27..204312754 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) {