summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-13 12:45:06 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-13 12:45:06 -0300
commitf58b9f150388f1d1c829c2bfcff820f998f6b278 (patch)
tree4e7f6c54c276a2c4a8be9d22c8a2747d8bd13d02
parent70c4cda878f92670d49268be15f0545d1ea99897 (diff)
downloadserverdata-f58b9f150388f1d1c829c2bfcff820f998f6b278.tar.gz
serverdata-f58b9f150388f1d1c829c2bfcff820f998f6b278.tar.bz2
serverdata-f58b9f150388f1d1c829c2bfcff820f998f6b278.tar.xz
serverdata-f58b9f150388f1d1c829c2bfcff820f998f6b278.zip
Split files to be more ordely, add (or finish adding) the Abizit skill
-rw-r--r--db/pre-re/skill_db.conf27
-rw-r--r--db/pre-re/skill_tree.conf20
-rw-r--r--npc/001-2/tondar.txt3
-rw-r--r--npc/functions/main.txt96
-rw-r--r--npc/magic/config.txt53
-rw-r--r--npc/magic/final.txt2
-rw-r--r--npc/magic/level1-experience.txt55
-rw-r--r--npc/scripts.conf1
8 files changed, 156 insertions, 101 deletions
diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf
index 625e9e9d..7c201e3e 100644
--- a/db/pre-re/skill_db.conf
+++ b/db/pre-re/skill_db.conf
@@ -38367,6 +38367,9 @@ skill_db: (
SkillType: {
Place: true
}
+ SkillInfo: {
+ Quest: true
+ }
AttackType: "Misc"
DamageType: {
NoDamage: true
@@ -38404,6 +38407,9 @@ skill_db: (
SkillType: {
Friend: true
}
+ SkillInfo: {
+ Quest: true
+ }
AttackType: "Magic"
DamageType: {
NoDamage: true
@@ -38555,6 +38561,7 @@ skill_db: (
Passive: true
}
},
+///////////////////////////////////////////////////
// 20017~20020 reserved (expansion)
{
Id: 20020
@@ -38565,12 +38572,30 @@ skill_db: (
//Self: true
Friend: true // <- Can it aim an enemy??
}
+ SkillInfo: {
+ Quest: true
+ }
CoolDown: 1000
Requirements: {
SPCost: 3
}
},
-// TODO: Bind magic scripts
+{
+ Id: 20021
+ Name: "SKILL_ABIZIT"
+ Description: "Abizit"
+ MaxLevel: 1
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 1000
+ Requirements: {
+ SPCost: 1
+ }
+},
// Wand Abizit FlareDart Alizarin Cobalt Gamboge Mauve Lum MagicBlade Sulphur Kalmurk Parum ArrowHail Barrier(OK) EnchantLifestone FlyingBackpack(?) Joyplim Hide(?) LayOnHands Ingrav Knuclkes MakeArrow MakeIronPowder MakeShirt MakeTanktop MakeSTanktop Protect Rain Shear SFluffy SMouboo SPinkie SSnake SSPiky SWicked ToxicDart Necro
)
diff --git a/db/pre-re/skill_tree.conf b/db/pre-re/skill_tree.conf
index 17038c4a..adae55d6 100644
--- a/db/pre-re/skill_tree.conf
+++ b/db/pre-re/skill_tree.conf
@@ -27,12 +27,16 @@ Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so
Talpan: {
skills: {
+ // Critical Skills
NV_BASIC: 0
TMW2_FAKESKILL: 0
+
+ // Active Basic Skills
AM_CALLHOMUN: 0
AM_REST: 0
AM_RESURRECTHOMUN: 0
+ // Passive Basic Skills
ALL_INCCARRY: 0
MC_DISCOUNT: 0
MC_OVERCHARGE: 0
@@ -40,6 +44,7 @@ Talpan: {
//AC_SHOWER: 0
//MG_FIREWALL: 0
+ // Base Class
SKILL_MAGIC: 0
SKILL_MAGIC_LIFE: 0
SKILL_MAGIC_WAR: 0
@@ -48,6 +53,7 @@ Talpan: {
SKILL_MAGIC_ASTRAL: 0
SKILL_MAGIC_DARK: 0
+ // Focus Skills
SKILL_POOL: 0
SKILL_MALLARDS_EYE: 0
SKILL_BRAWLING: 0
@@ -56,8 +62,18 @@ Talpan: {
SKILL_ASTRAL_SOUL: 0
SKILL_RAGING: 0
- EVOL_AREA_PROVOKE: 0
- EVOL_PHYSICAL_SHIELD: 0
+ // Level 0
+
+ // Level 1
+ SKILL_ABIZIT: 1
+ EVOL_AREA_PROVOKE: 9
+
+ // Level 2
+ EVOL_PHYSICAL_SHIELD: 5
+
+ // Level 3
+ // Level 4
+ // Level 5
}
}
diff --git a/npc/001-2/tondar.txt b/npc/001-2/tondar.txt
index 44ea860d..8ffd2523 100644
--- a/npc/001-2/tondar.txt
+++ b/npc/001-2/tondar.txt
@@ -39,8 +39,9 @@ L_Askspell:
L_spell:
mes "[Tondar]";
- mes "\"Well, all right; this one can't do much harm. Press your hands together and say `" + get(.invocation$, "spell-experience") + "'.\"";
+ mes "\"Well, all right; this one can't do much harm. Press your hands together and say `" + b("abizit") + "'.\"";
mes "\"This will release a steady flow of magic within you. Focus and try to control it; it is a good meditative practice.\"";
+ learnskill SKILL_ABIZIT;
close;
L_Nopay:
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index bb1887d2..e274bd91 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -468,7 +468,57 @@ function script Exception {
}
return getarg(2, 0);
+}
+
+// mescordialog(text, color, {dialog=1})
+function script mescordialog {
+ if (getarg(2, true))
+ mesc getarg(0), getarg(1);
+ else
+ dispbottom col(getarg(0), getarg(1));
+ return;
+}
+// Delayed healing. Takes 3~5 seconds. Variates with Vit up to +100%.
+// The vit can have an additional 20% bonus as well.
+function script itheal {
+ .@bas=getarg(0);
+ .@vit=readbattleparam(getcharid(3), UDT_VIT);
+ .@vit=cap_value(.@vit-1, 0, 100);
+ if (getargcount() > 2)
+ .@tim=getarg(3);
+ else
+ .@tim=rand2(3,5);
+ .@min=.@bas*(100+.@vit)/100;
+ .@max=.@bas*(100+.@vit*120/100)/100;
+ // Now divide the HP values by the time
+ .@min=max(1, .@min/.@tim);
+ .@max=max(1, .@max/.@tim);
+ callfunc("SC_Bonus", .@tim, SC_S_LIFEPOTION, .@min, .@max);
+ if (getarg(1,0) > 0)
+ heal 0, getarg(1, 0);
+ return;
+}
+
+// sqldate({day variation, month variation})
+function script sqldate {
+ .@d=gettime(GETTIME_DAYOFMONTH)+getarg(0, 0);
+ .@m=gettime(GETTIME_MONTH)+getarg(1, 0);
+ .@y=gettime(GETTIME_YEAR);
+ // Overflow prevention
+ if (.@d <= 0) {
+ .@d=1;
+ }
+ while (.@m > 12) {
+ .@y+=1;
+ .@m-=12;
+ }
+ while (.@m < 1) {
+ .@y-=1;
+ .@m+=12;
+ }
+ .@strdate$=sprintf("%04d-%02d-%02d %02d:%02d:%02d", .@y, .@m, .@d, gettime(GETTIME_HOUR), gettime(GETTIME_MINUTE), gettime(GETTIME_SECOND));
+ return .@strdate$;
}
// Linking functions
@@ -628,50 +678,8 @@ function script updateskill {
}
function script learnskill {
- if (getskilllv(getarg(0)) < getarg(1))
- skill getarg(0), getarg(1), 0;
- return;
-}
-
-// Delayed healing. Takes 3~5 seconds. Variates with Vit up to +100%.
-// The vit can have an additional 20% bonus as well.
-function script itheal {
- .@bas=getarg(0);
- .@vit=readbattleparam(getcharid(3), UDT_VIT);
- .@vit=cap_value(.@vit-1, 0, 100);
- if (getargcount() > 2)
- .@tim=getarg(3);
- else
- .@tim=rand2(3,5);
- .@min=.@bas*(100+.@vit)/100;
- .@max=.@bas*(100+.@vit*120/100)/100;
- // Now divide the HP values by the time
- .@min=max(1, .@min/.@tim);
- .@max=max(1, .@max/.@tim);
- callfunc("SC_Bonus", .@tim, SC_S_LIFEPOTION, .@min, .@max);
- if (getarg(1,0) > 0)
- heal 0, getarg(1, 0);
+ if (getskilllv(getarg(0)) < getarg(1, 1))
+ skill getarg(0), getarg(1, 1), 0;
return;
}
-// sqldate({day variation, month variation})
-function script sqldate {
- .@d=gettime(GETTIME_DAYOFMONTH)+getarg(0, 0);
- .@m=gettime(GETTIME_MONTH)+getarg(1, 0);
- .@y=gettime(GETTIME_YEAR);
- // Overflow prevention
- if (.@d <= 0) {
- .@d=1;
- }
- while (.@m > 12) {
- .@y+=1;
- .@m-=12;
- }
- while (.@m < 1) {
- .@y-=1;
- .@m+=12;
- }
- .@strdate$=sprintf("%04d-%02d-%02d %02d:%02d:%02d", .@y, .@m, .@d, gettime(GETTIME_HOUR), gettime(GETTIME_MINUTE), gettime(GETTIME_SECOND));
- return .@strdate$;
-}
-
diff --git a/npc/magic/config.txt b/npc/magic/config.txt
index 57d42189..29d7d0d3 100644
--- a/npc/magic/config.txt
+++ b/npc/magic/config.txt
@@ -319,59 +319,6 @@ function script massprovoke {
}
-// mescordialog(text, color, {dialog=1})
-function script mescordialog {
- if (getarg(2, true))
- mesc getarg(0), getarg(1);
- else
- dispbottom col(getarg(0), getarg(1));
- return;
-}
-
-// ShowAbizit({dialog=1})
-function script ShowAbizit {
- .@dial=getarg(0, true);
- if (.@dial)
- mesn l("Current Magic Control");
-
- // FIXME
- switch (abizit()) {
- case 10:
- mescordialog l("Magic flows naturally from you, readily and with ease. You feel in perfect control of your magic."), 3, .@dial;
- break;
- case 9:
- mescordialog l("You feel in almost perfect control of your magic."), 2, .@dial;
- break;
- case 8:
- mescordialog l("You feel that you have very good control of your magic."), 2, .@dial;
- break;
- case 7:
- mescordialog l("You feel quite in control of your magic."), 4, .@dial;
- break;
- case 6:
- mescordialog l("You feel mostly in control of your magic."), 4, .@dial;
- break;
- case 5:
- mescordialog l("You feel somewhat in control of your magic."), 7, .@dial;
- break;
- case 4:
- mescordialog l("You feel you still have a few difficulties in controlling your magic."), 7, .@dial;
- break;
- case 3:
- mescordialog l("Trying to control your magic is still rather troublesome."), 6, .@dial;
- break;
- case 2:
- mescordialog l("You feel that you have only the bare minimum of control over your magic."), 6, .@dial;
- break;
- case 1:
- mescordialog l("You feel quite overwhelmed by your magic, but are beginning to see patterns."), 1, .@dial;
- break;
- case 0:
- mescordialog l("You feel completely overwhelmed by your magic."), 1, .@dial;
- break;
- }
- return;
-}
// getactivatedpoolskilllist(?)
function script getactivatedpoolskilllist {
diff --git a/npc/magic/final.txt b/npc/magic/final.txt
index 96cc7440..ea67f85d 100644
--- a/npc/magic/final.txt
+++ b/npc/magic/final.txt
@@ -32,6 +32,8 @@ function script HUB_SkillInvoke {
case TMW2_FAKESKILL:
charcommand("@refresh"); // Possibly broken on too up-to-date Herc
break;
+ case SKILL_ABIZIT:
+ SK_Abizit(); break;
case EVOL_AREA_PROVOKE:
if (@skillTargetX && @skillTargetY)
massprovoke(1+@skillLv, getmap(), @skillTargetX, @skillTargetY);
diff --git a/npc/magic/level1-experience.txt b/npc/magic/level1-experience.txt
new file mode 100644
index 00000000..7435fb71
--- /dev/null
+++ b/npc/magic/level1-experience.txt
@@ -0,0 +1,55 @@
+// The Mana World script
+// Author: Jesusalva <jesusalva@themanaworld.org>
+//
+// Magic Script: SKILL_ABIZIT (Level 1)
+// School: General 1
+
+// ShowAbizit({dialog=true})
+function script ShowAbizit {
+ .@dial=getarg(0, true);
+ if (.@dial)
+ mesn l("Current Magic Control");
+
+ switch (abizit()) {
+ case 10:
+ mescordialog l("Magic flows naturally from you, readily and with ease. You feel in perfect control of your magic."), 3, .@dial;
+ break;
+ case 9:
+ mescordialog l("You feel in almost perfect control of your magic."), 2, .@dial;
+ break;
+ case 8:
+ mescordialog l("You feel that you have very good control of your magic."), 2, .@dial;
+ break;
+ case 7:
+ mescordialog l("You feel quite in control of your magic."), 4, .@dial;
+ break;
+ case 6:
+ mescordialog l("You feel mostly in control of your magic."), 4, .@dial;
+ break;
+ case 5:
+ mescordialog l("You feel somewhat in control of your magic."), 7, .@dial;
+ break;
+ case 4:
+ mescordialog l("You feel you still have a few difficulties in controlling your magic."), 7, .@dial;
+ break;
+ case 3:
+ mescordialog l("Trying to control your magic is still rather troublesome."), 6, .@dial;
+ break;
+ case 2:
+ mescordialog l("You feel that you have only the bare minimum of control over your magic."), 6, .@dial;
+ break;
+ case 1:
+ mescordialog l("You feel quite overwhelmed by your magic, but are beginning to see patterns."), 1, .@dial;
+ break;
+ case 0:
+ mescordialog l("You feel completely overwhelmed by your magic."), 1, .@dial;
+ break;
+ }
+ return;
+}
+
+function script SK_Abizit {
+ ShowAbizit(false);
+ return;
+}
+
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 55a337b4..566421f5 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -65,6 +65,7 @@
//Magic
"npc/magic/config.txt",
+"npc/magic/level1-experience.txt",
"npc/magic/final.txt",
// Commands