summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-10-20 22:16:06 -0300
committerJesusaves <cpntb1@ymail.com>2019-10-20 22:16:06 -0300
commit6f6822663727f51ed6832df8ce8b27adcbaf93c4 (patch)
tree8ab552ec322ce8034acf7877588985a126bbef7f
parent10225ad351574621a1f48d346bdd16b3ee74b5f3 (diff)
downloadserverdata-6f6822663727f51ed6832df8ce8b27adcbaf93c4.tar.gz
serverdata-6f6822663727f51ed6832df8ce8b27adcbaf93c4.tar.bz2
serverdata-6f6822663727f51ed6832df8ce8b27adcbaf93c4.tar.xz
serverdata-6f6822663727f51ed6832df8ce8b27adcbaf93c4.zip
Begin rewriting script-based magic system
-rw-r--r--db/re/skill_db.conf1
-rw-r--r--npc/functions/hub.txt16
2 files changed, 17 insertions, 0 deletions
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index 39739be42..194da21d7 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -38666,6 +38666,7 @@ skill_db: (
Name: "TMW2_FAKESKILL"
Description: "Fake Skill Resync"
MaxLevel: 1
+ CoolDown: 1500
SkillType: {
Self: true
}
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;
}