From 94fa343212d99cd6614270e37695ac6837eea605 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 1 Mar 2021 15:24:42 -0300 Subject: Replace Tanker Homunculus Healing Skill. It is now capable to self-heal! --- npc/functions/hub.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'npc/functions') diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 6f8378660..3d8ab20fb 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -235,10 +235,26 @@ function script HUB_SkillInvoke { // Something is... wrong if (!@skillId) { Exception("ILLEGAL SKILL PASSED TO HUB. It has been compromised, Jim.", RB_DEBUGMES|RB_IRCBROADCAST); - debugmes "Caster: %s", strcharinfo(0); + debugmes "Legal Caster: %s", strcharinfo(0); + debugmes "Effective Caster: %d", @skillCaster; return; } + // Homunculus Cycle + /* *********************************************************************** */ + //debugmes "Skill caster %d", @skillCaster; + if (@skillCaster != getcharid(3)) { + switch (@skillId) { + case TMW2_HOMUN_HEAL: + .@heal=gethominfo(6)*rand2(7, 10); + heal .@heal, 0; + harm(@skillCaster, -.@heal, HARM_MISC); + break; + } + return; + } + /* *********************************************************************** */ + // TODO: Detect what was script-cast and what was player-case. Then, readd RB_IRCBROADCAST // If you can't do this: You can't do this if (getskilllv(@skillId) < @skillLv && @skillId != BS_GREED) @@ -251,6 +267,7 @@ function script HUB_SkillInvoke { skillInvoke[@skillId] = skillInvoke[@skillId] + 1; // Script-based skills + /* *********************************************************************** */ switch (@skillId) { case TMW2_FAKESKILL: atcommand("@refresh"); -- cgit v1.2.3-70-g09d2