Raised This Month: $12 Target: $400
 3% 

[REQ] Add amount of hp to boss when player is killed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spooky Iluha
Junior Member
Join Date: Sep 2017
Old 10-02-2017 , 11:59   [REQ] Add amount of hp to boss when player is killed
Reply With Quote #1

This ability plugin would be great for one on my bosses. Can you please create one?

If there is an ability plugin like that, I would really appreciate to get a link.
Spooky Iluha is offline
p0008874
Senior Member
Join Date: Jul 2014
Old 10-07-2017 , 01:11   Re: [REQ] Add amount of hp to boss when player is killed
Reply With Quote #2

Like painis cupcake from other vsh server?
idk.
__________________
p0008874 is offline
Spooky Iluha
Junior Member
Join Date: Sep 2017
Old 10-08-2017 , 00:30   Re: [REQ] Add amount of hp to boss when player is killed
Reply With Quote #3

idk, if he has the ability to regenerate hp by killing players, then yes
Spooky Iluha is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 10-21-2017 , 19:23   Re: [REQ] Add amount of hp to boss when player is killed
Reply With Quote #4

Should be a pretty simple plugin: hook OnPlayerDeath and if the player was killed by the boss call FF2_SetBossHealth(boss, FF2_GetBossHealth(boss) + health_of_killed_player).
__________________
~Wliu

Last edited by Wliu; 10-21-2017 at 19:23.
Wliu is offline
Spooky Iluha
Junior Member
Join Date: Sep 2017
Old 10-23-2017 , 06:49   Re: [REQ] Add amount of hp to boss when player is killed
Reply With Quote #5

I wrote simplified ability plugin based of brutal sniper's one, but in-game it doesn't working at all, again... Any idea why?

(rage_addhp.ff2)

public OnPluginStart2()
{
HookEvent("player_death", event_player_death);
}

public Action:FF2_OnAbility2(index,const String:plugin_name[],const String:ability_name[],action)
{
return Plugin_Continue;
}

public Action:event_player_death(Handle:event, const String:name[], bool:dontBroadcast)
{
if (GetEventInt(event, "death_flags") & TF_DEATHFLAG_DEADRINGER)
return Plugin_Continue;
new attacker=GetClientOfUserId(GetEventInt(event, "attacker"));
new client=GetClientOfUserId(GetEventInt(event, "userid"));
new a_index=FF2_GetBossIndex(attacker);
new v_index=FF2_GetBossIndex(client);
if (a_index != -1)
{
if (FF2_HasAbility(a_index,this_plugin_name,"rag e_addhp_to_boss"))
{
FF2_SetBossHealth(attacker, FF2_GetBossHealth(attacker) + 200);
}
}
return Plugin_Continue;
}

(boss' config)

"ability8"
{
"name" "rage_addhp_to_boss"
"plugin_name" "rage_addhp"
}

Last edited by Spooky Iluha; 10-23-2017 at 09:35.
Spooky Iluha is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 10-24-2017 , 14:49   Re: [REQ] Add amount of hp to boss when player is killed
Reply With Quote #6

FF2_GetBossHealth requires a boss index (a_index), not a client index.
__________________
~Wliu
Wliu is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode