diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-01-09 15:44:17 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-01-09 15:44:17 -0300 |
commit | 6931d5155953519197400b36fc848f05639bd5b6 (patch) | |
tree | 0671c102afa631852571f97af2444cac6a0f2bd0 | |
parent | acf52621f8cf3a549ffb40a77ea91749acc799c7 (diff) | |
download | serverdata-6931d5155953519197400b36fc848f05639bd5b6.tar.gz serverdata-6931d5155953519197400b36fc848f05639bd5b6.tar.bz2 serverdata-6931d5155953519197400b36fc848f05639bd5b6.tar.xz serverdata-6931d5155953519197400b36fc848f05639bd5b6.zip |
Skill invoke - move from npc1 to skills.txt
-rw-r--r-- | npc/functions/global_event_handler.txt | 3 | ||||
-rw-r--r-- | npc/functions/skills.txt | 13 | ||||
-rw-r--r-- | npc/scripts.conf | 1 | ||||
-rw-r--r-- | npc/test/npc1.txt | 4 |
4 files changed, 17 insertions, 4 deletions
diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt index cbde96c7..70bf6bbb 100644 --- a/npc/functions/global_event_handler.txt +++ b/npc/functions/global_event_handler.txt @@ -48,6 +48,9 @@ OnNPCKillEvent: callfunc("EnoraKills"); end; +OnSkillInvoke: + callfunc("SkillInvoked"); + end; } diff --git a/npc/functions/skills.txt b/npc/functions/skills.txt new file mode 100644 index 00000000..568c97d9 --- /dev/null +++ b/npc/functions/skills.txt @@ -0,0 +1,13 @@ +// The Mana World scripts. +// Author: +// The Mana World Team +// Description: +// Controls script-based skills (which are rare); + +function script SkillInvoked { + // Record to database that you used the skill + skillInvoke[@skillId] = skillInvoke[@skillId] + 1; + + return; +} + diff --git a/npc/scripts.conf b/npc/scripts.conf index c2fe3c97..455addb5 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -51,6 +51,7 @@ // May rely on custom functions and thus must be handled by last "npc/functions/manhole.txt", +"npc/functions/skills.txt", // quest debug "npc/functions/quest-debug/functions.txt", diff --git a/npc/test/npc1.txt b/npc/test/npc1.txt index a75a0120..4754e4ed 100644 --- a/npc/test/npc1.txt +++ b/npc/test/npc1.txt @@ -704,10 +704,6 @@ OnWhisperGlobal: mes "cmd: " + @whispervar0$; close; -OnSkillInvoke: - skillInvoke[@skillId] = skillInvoke[@skillId] + 1; - end; - OnReadyCheck: consolemes(CONSOLEMES_DEBUG, "OnReadyCheck"); $@bgid1 = waitingroom2bg("testbg", 10, 10, "bgnpc1::OnLogout","bgnpc1:OnDie"); |