From 6f6822663727f51ed6832df8ce8b27adcbaf93c4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 20 Oct 2019 22:16:06 -0300 Subject: Begin rewriting script-based magic system --- npc/functions/hub.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'npc/functions/hub.txt') diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index cd7997848..eefe8d9d0 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -171,7 +171,23 @@ function script HUB_Logout { // HUB_SkillInvoke ( ) function script HUB_SkillInvoke { + // If you can't do this: You can't do this + if (getskilllv(@skillId) < @skillLv) + end; + + // Record to database skillInvoke[@skillId] = skillInvoke[@skillId] + 1; + + // Script-based skills + switch (@skillId) { + case TMW2_FAKESKILL: + atcommand("@refresh"); + break; + } + + // Debug + if ($@GM_OVERRIDE || debug) + debugmes "Cast skill %d on level %d", @skillId, @skillLv; return; } -- cgit v1.2.3-60-g2f50