summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-14 22:24:20 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-14 22:24:20 -0300
commit9ce79291a280d0ebc93a076810a7e848fb0d397b (patch)
tree1aec1f3606f6f5aee535a03b8555728a31cb017f
parent9ed3fc1f95fe28741686280b1ae7da3b9f9ca403 (diff)
downloadserverdata-9ce79291a280d0ebc93a076810a7e848fb0d397b.tar.gz
serverdata-9ce79291a280d0ebc93a076810a7e848fb0d397b.tar.bz2
serverdata-9ce79291a280d0ebc93a076810a7e848fb0d397b.tar.xz
serverdata-9ce79291a280d0ebc93a076810a7e848fb0d397b.zip
Add Kaflosh. Maybe. Hopefully. This one requires some serious testing
-rw-r--r--db/constants.conf2
-rw-r--r--db/pre-re/skill_db.conf19
-rw-r--r--db/pre-re/skill_tree.conf1
-rw-r--r--npc/functions/weather.txt46
-rw-r--r--npc/magic/final.txt2
-rw-r--r--npc/magic/level2-rain.txt50
-rw-r--r--npc/scripts.conf1
7 files changed, 97 insertions, 24 deletions
diff --git a/db/constants.conf b/db/constants.conf
index c9e500ee..c75b162d 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -4098,7 +4098,7 @@ more than one separator can be used in a row (so 12_3___456 is illegal).
comment__: "map climate"
CLIMATE_NONE: 0
CLIMATE_DESERT: 1
- CLIMATE_WOODLAND: 2
+ CLIMATE_MODERATE: 2
CLIMATE_ICELAND: 3
CLIMATE_SPECIAL: 4
diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf
index 7fef1398..e007305a 100644
--- a/db/pre-re/skill_db.conf
+++ b/db/pre-re/skill_db.conf
@@ -38936,6 +38936,25 @@ skill_db: (
}
}
},
+{
+ Id: 20037
+ Name: "SKILL_KAFLOSH"
+ Description: "Kaflosh"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 8000
+ Requirements: {
+ SPCost: 47
+ Items: {
+ BottleOfWater: 0
+ }
+ }
+},
// MakeSulphur Parum EnchantLifestone MakeArrow MakeIronPowder MakeShirt MakeTanktop MakeSTanktop
// Kalmurk Rain MagicBlade ToxicDart Ingrav Knuclkes ArrowHail Joyplim Barrier(OK?) FlyingBackpack(?) Hide(?) Protect Shear Detsanc
)
diff --git a/db/pre-re/skill_tree.conf b/db/pre-re/skill_tree.conf
index d7e4bd33..67f6dc41 100644
--- a/db/pre-re/skill_tree.conf
+++ b/db/pre-re/skill_tree.conf
@@ -85,6 +85,7 @@ Talpan: {
SKILL_KALRENK: 9
SKILL_HALHISS: 9
SKILL_HELORP: 9
+ SKILL_KAFLOSH: 9
// Level 3
// Level 4
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt
index 1d384a04..5de86a5b 100644
--- a/npc/functions/weather.txt
+++ b/npc/functions/weather.txt
@@ -38,27 +38,27 @@ OnInit:
htput(.wcore, "043-1", CLIMATE_DESERT);
// Woodlands
- htput(.wcore, "007-1", CLIMATE_WOODLAND);
- htput(.wcore, "008-1", CLIMATE_WOODLAND);
- htput(.wcore, "009-1", CLIMATE_WOODLAND);
- htput(.wcore, "010-1", CLIMATE_WOODLAND);
- htput(.wcore, "011-1", CLIMATE_WOODLAND);
- htput(.wcore, "012-1", CLIMATE_WOODLAND);
- htput(.wcore, "013-1", CLIMATE_WOODLAND);
- htput(.wcore, "014-1", CLIMATE_WOODLAND);
- htput(.wcore, "015-1", CLIMATE_WOODLAND);
- htput(.wcore, "016-1", CLIMATE_WOODLAND);
- htput(.wcore, "017-1", CLIMATE_WOODLAND);
- htput(.wcore, "018-1", CLIMATE_WOODLAND);
- htput(.wcore, "025-1", CLIMATE_WOODLAND);
- htput(.wcore, "026-1", CLIMATE_WOODLAND);
- htput(.wcore, "027-1", CLIMATE_WOODLAND);
- htput(.wcore, "028-1", CLIMATE_WOODLAND);
- htput(.wcore, "029-1", CLIMATE_WOODLAND);
- htput(.wcore, "051-1", CLIMATE_WOODLAND); // ?
- htput(.wcore, "052-1", CLIMATE_WOODLAND);
- htput(.wcore, "055-1", CLIMATE_WOODLAND);
- htput(.wcore, "057-1", CLIMATE_WOODLAND);
+ htput(.wcore, "007-1", CLIMATE_MODERATE);
+ htput(.wcore, "008-1", CLIMATE_MODERATE);
+ htput(.wcore, "009-1", CLIMATE_MODERATE);
+ htput(.wcore, "010-1", CLIMATE_MODERATE);
+ htput(.wcore, "011-1", CLIMATE_MODERATE);
+ htput(.wcore, "012-1", CLIMATE_MODERATE);
+ htput(.wcore, "013-1", CLIMATE_MODERATE);
+ htput(.wcore, "014-1", CLIMATE_MODERATE);
+ htput(.wcore, "015-1", CLIMATE_MODERATE);
+ htput(.wcore, "016-1", CLIMATE_MODERATE);
+ htput(.wcore, "017-1", CLIMATE_MODERATE);
+ htput(.wcore, "018-1", CLIMATE_MODERATE);
+ htput(.wcore, "025-1", CLIMATE_MODERATE);
+ htput(.wcore, "026-1", CLIMATE_MODERATE);
+ htput(.wcore, "027-1", CLIMATE_MODERATE);
+ htput(.wcore, "028-1", CLIMATE_MODERATE);
+ htput(.wcore, "029-1", CLIMATE_MODERATE);
+ htput(.wcore, "051-1", CLIMATE_MODERATE); // ?
+ htput(.wcore, "052-1", CLIMATE_MODERATE);
+ htput(.wcore, "055-1", CLIMATE_MODERATE);
+ htput(.wcore, "057-1", CLIMATE_MODERATE);
// Icelands
htput(.wcore, "019-1", CLIMATE_ICELAND);
@@ -163,8 +163,8 @@ OnInit:
}
///////////////////////////////////////////////////////////////////
- // Every 5 seconds, we clean up any ongoing weather effects
-OnTimer5000:
+ // Every 2.5 seconds, we clean up any ongoing weather effects
+OnTimer2500:
// No weather effect
if (!htsize(.wtime)) {
initnpctimer;
diff --git a/npc/magic/final.txt b/npc/magic/final.txt
index e7d92da3..f5fe6750 100644
--- a/npc/magic/final.txt
+++ b/npc/magic/final.txt
@@ -62,6 +62,8 @@ function script HUB_SkillInvoke {
case SKILL_HALHISS:
case SKILL_HELORP:
SK_SummonLv2(); break;
+ case SKILL_KAFLOSH:
+ SK_Kaflosh(); break;
// Level 3
// Level 4
// Level 5
diff --git a/npc/magic/level2-rain.txt b/npc/magic/level2-rain.txt
new file mode 100644
index 00000000..c2b9a29a
--- /dev/null
+++ b/npc/magic/level2-rain.txt
@@ -0,0 +1,50 @@
+// The Mana World script
+// Author: Jesusalva <jesusalva@themanaworld.org>
+//
+// Magic Script: SKILL_KAFLOSH (Level 1)
+// School: Nature 2
+
+function script SK_Kaflosh {
+ .@m$=getmap();
+ .@cl="#WeatherCore"::climate(.@m$);
+
+ // Bad Climate
+ if (.@cl == CLIMATE_NONE) {
+ dispbottom l("It was impossible to conjure rain clouds on this map.");
+ return;
+ }
+
+ // Techinically not needed
+ .@rain="#WeatherCore"::weather(MASK_RAIN);
+ if (.@rain) {
+ dispbottom l("It is already raining!");
+ return;
+ }
+
+ // From now on, you'll have the cost paid and the MEXP deposited
+ delitem BottleOfWater, 1;
+ GetManaExp(@skillId, 2);
+
+ // Adjusted MATK will determine rain duration (15 ATK = 1s)
+ .@PW=80+(20*@skillLv);
+ .@dmg=AdjustSpellpower(.@PW);
+ .@time=.@dmg/15;
+ .@time+=getskilllv(SKILL_MAGIC_NATURE)-2; // +1 second per nature magic lv
+
+ // Adverse climate (eg. desert and icelands) will cut this to 1/3
+ if (.@cl != CLIMATE_MODERATE)
+ .@time=.@time/3;
+
+ // Rain must last at least 5 seconds or the clouds won't even gather
+ if (.@time < 5) {
+ dispbottom l("You do not have suffice magic power to make rain.");
+ return;
+ }
+
+ // Invoke the rain clouds; Everything else should work out of the box
+ // The builtin checks are not necessary in this case =D
+ // But would be for a sandstorm or snowstorm.
+ "#WeatherCore"::weather_override(MASK_RAIN, .@time, .@m$, true);
+ return;
+}
+
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 0852925c..95ff9137 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -75,6 +75,7 @@
"npc/magic/level1-grow-plants.txt",
"npc/magic/level1-lesser-heal.txt",
"npc/magic/level2-lay-on-hands.txt",
+"npc/magic/level2-rain.txt",
"npc/magic/level2-summon-monsters.txt",
"npc/magic/final.txt",