From 0e00b3b9fb154b2a1c4f9cc3efc22abdc4d66eda Mon Sep 17 00:00:00 2001 From: higps <59850204+higps@users.noreply.github.com> Date: Fri, 23 Feb 2024 18:16:12 +0100 Subject: [PATCH] diamondback, crossbow cop ability, --- ability_free_healer_medic_drcrossbowcop_ability.sp | 12 ++++++++++-- berobot_dmg_handler.sp | 2 +- cfg/robots/free_engineer_barricade.cfg | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ability_free_healer_medic_drcrossbowcop_ability.sp b/ability_free_healer_medic_drcrossbowcop_ability.sp index 0ec72f15..5f378a7a 100644 --- a/ability_free_healer_medic_drcrossbowcop_ability.sp +++ b/ability_free_healer_medic_drcrossbowcop_ability.sp @@ -8,7 +8,7 @@ #define PLUGIN_VERSION "1.0" #define ROBOT_NAME "Dr. Crossbow Cop" - +bool g_isSetup = true; public Plugin:myinfo = { name = "[TF2] Dr. Crossbow Cop Ability", @@ -23,6 +23,7 @@ public OnPluginStart() HookEvent("player_spawn", Event_PlayerSpawn); HookEvent("post_inventory_application", Event_PlayerSpawn); HookEvent("crossbow_heal", Event_Crossbow_Heal, EventHookMode_Post); + HookEvent("teamplay_setup_finished", Event_teamplay_setup_finished, EventHookMode_Post); } @@ -38,7 +39,7 @@ public Action Event_PlayerSpawn(Handle event, const char[] name, bool dontBroadc int client = GetClientOfUserId(GetEventInt(event, "userid")); if (IsRobot(client, ROBOT_NAME)) { - g_healcount = 0; + g_healcount = !g_isSetup ? 0 : g_Heal_Bolts_Hits_Needed; } return Plugin_Continue; @@ -139,6 +140,13 @@ public bool IsKritzed(int client){ } } + +public Action Event_teamplay_setup_finished(Event event, const char[] name, bool dontBroadcast) +{ + g_isSetup = false; + return Plugin_Continue; +} + public Action Event_Crossbow_Heal(Event event, const char[] name, bool dontBroadcast) { int healer = GetClientOfUserId(GetEventInt(event, "healer")); diff --git a/berobot_dmg_handler.sp b/berobot_dmg_handler.sp index 2c1e5043..ce6e07e6 100644 --- a/berobot_dmg_handler.sp +++ b/berobot_dmg_handler.sp @@ -1914,7 +1914,7 @@ public Action Event_post_inventory_application(Event event, const char[] name, b if(isLibertyLauncher(Weapon1)) { stat1 = 1.3; - Format(chat_display, sizeof(chat_display), "%s{orange}\nLiberty Launcher: -%0.0f%%%% {teamcolor}faster move speed",chat_display, MoreIsMore(stat1)); + Format(chat_display, sizeof(chat_display), "%s\n{Teamcolor}Mantreads from Liberty Launcher: {orange}+%0.0f%%%% faster move speed",chat_display, MoreIsMore(stat1)); TF2Attrib_SetByName(SoldierShoes, "move speed bonus", stat1); } } diff --git a/cfg/robots/free_engineer_barricade.cfg b/cfg/robots/free_engineer_barricade.cfg index c30ecc30..a502ecd5 100644 --- a/cfg/robots/free_engineer_barricade.cfg +++ b/cfg/robots/free_engineer_barricade.cfg @@ -53,6 +53,7 @@ "quality" "6" "level" "1" "slot" "0" + "warpaint_id" "417" "attributes" { "fire rate bonus" "0.8"