summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-15 15:23:24 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-15 15:23:24 -0300
commita720df5cdc94819d7a6d47df013b900f8286d2eb (patch)
tree398fcc26d158ea4eeea841432a631767d3a9d3da
parent67543201d8646c059b3928d14c2591c02168237a (diff)
downloadserverdata-a720df5cdc94819d7a6d47df013b900f8286d2eb.tar.gz
serverdata-a720df5cdc94819d7a6d47df013b900f8286d2eb.tar.bz2
serverdata-a720df5cdc94819d7a6d47df013b900f8286d2eb.tar.xz
serverdata-a720df5cdc94819d7a6d47df013b900f8286d2eb.zip
Transmutation Magic, Initial Version
-rw-r--r--db/pre-re/skill_db.conf158
-rw-r--r--db/pre-re/skill_tree.conf8
-rw-r--r--npc/magic/config.txt21
-rw-r--r--npc/magic/final.txt52
-rw-r--r--npc/magic/level1-transmutations.txt95
-rw-r--r--npc/scripts.conf1
6 files changed, 313 insertions, 22 deletions
diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf
index 1ef5c931..54a9a278 100644
--- a/db/pre-re/skill_db.conf
+++ b/db/pre-re/skill_db.conf
@@ -39174,7 +39174,163 @@ skill_db: (
}
}
},
-// MakeSulphur Parum EnchantLifestone MakeArrow MakeIronPowder MakeShirt MakeTanktop MakeSTanktop
+{
+ Id: 20047
+ Name: "SKILL_PARUM"
+ Description: "Parum"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 4000
+ Requirements: {
+ SPCost: 5
+ Items: {
+ RawLog: 0
+ }
+ }
+},
+{
+ Id: 20048
+ Name: "SKILL_KULARZUFRILL"
+ Description: "Kularzufrill"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 4000
+ Requirements: {
+ SPCost: 8
+ Items: {
+ RawLog: 0
+ }
+ }
+},
+{
+ Id: 20049
+ Name: "SKILL_ZUKMINBIRF"
+ Description: "Zukminbirf"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 5000
+ Requirements: {
+ SPCost: 8
+ Items: {
+ IronOre: 0
+ }
+ }
+},
+{
+ Id: 20050
+ Name: "SKILL_PATMUPLOO"
+ Description: "Patmuploo"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 5000
+ Requirements: {
+ SPCost: 25
+ Items: {
+ CottonCloth: 0
+ }
+ }
+},
+{
+ Id: 20051
+ Name: "SKILL_PATVILOREE"
+ Description: "Patviloree"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 5000
+ Requirements: {
+ SPCost: 25
+ Items: {
+ CottonCloth: 0
+ }
+ }
+},
+{
+ Id: 20052
+ Name: "SKILL_PATLOREE"
+ Description: "Patloree"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 5000
+ Requirements: {
+ SPCost: 25
+ Items: {
+ CottonCloth: 0
+ }
+ }
+},
+{
+ Id: 20053
+ Name: "SKILL_GOLE"
+ Description: "Gole"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 4000
+ Requirements: {
+ SPCost: 4
+ Items: {
+ PileOfAsh: 0
+ }
+ }
+},
+{
+ Id: 20054
+ Name: "SKILL_MANPAHIL"
+ Description: "Manpahil"
+ MaxLevel: 9
+ SkillType: {
+ Self: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ CoolDown: 4000
+ Requirements: {
+ SPCost: 15
+ Items: {
+ BugLeg: 0
+ MaggotSlime: 0
+ MauveHerb: 0
+ AlizarinHerb: 0
+ CobaltHerb: 0
+ GambogeHerb: 0
+ }
+ }
+},
// FlyingBackpack(?) Shear
)
diff --git a/db/pre-re/skill_tree.conf b/db/pre-re/skill_tree.conf
index d2812063..822f5e32 100644
--- a/db/pre-re/skill_tree.conf
+++ b/db/pre-re/skill_tree.conf
@@ -76,6 +76,8 @@ Talpan: {
SKILL_MODRILAX: 9
SKILL_LUM: 9
SKILL_CHIZA: 9
+ SKILL_PARUM: 9
+ SKILL_GOLE: 9
// Level 2
SKILL_INMA: 9
@@ -91,6 +93,12 @@ Talpan: {
SKILL_INGRAV: 9
SKILL_UPMARMU: 9
SKILL_PHLEX: 9
+ SKILL_KULARZUFRILL: 9
+ SKILL_ZUKMINBIRF: 9
+ SKILL_PATMUPLOO: 9
+ SKILL_PATVILOREE: 9
+ SKILL_PATLOREE: 9
+ SKILL_MANPAHIL: 9
// Level 3
// Level 4
diff --git a/npc/magic/config.txt b/npc/magic/config.txt
index a179982c..2a6a9559 100644
--- a/npc/magic/config.txt
+++ b/npc/magic/config.txt
@@ -401,6 +401,27 @@ function script mcharge {
return;
}
+// transcheck( {item 1, amount 1}, {item 2, amount 2}... )
+// returns true upon success
+function script transcheck {
+ if (getargcount() < 2 || getargcount() % 2 != 0)
+ return Exception("Faulty transcheck invoked - error");
+
+ // Count items
+ for (.@i=0;.@i < getargcount(); .@i++) {
+ if (countitem(getarg(.@i)) < getarg(.@i+1))
+ return false;
+ .@i++;
+ }
+
+ // Delete Items
+ for (.@i=0;.@i < getargcount(); .@i++) {
+ delitem getarg(.@i), getarg(.@i+1);
+ .@i++;
+ }
+ return true;
+}
+
- script Magic Load NPC_HIDDEN,{
OnInit:
end;
diff --git a/npc/magic/final.txt b/npc/magic/final.txt
index a4de3bc8..58039248 100644
--- a/npc/magic/final.txt
+++ b/npc/magic/final.txt
@@ -34,48 +34,58 @@ function script HUB_SkillInvoke {
break;
// Level 0
case SKILL_CONFRINGO:
- SK_Confringo(); break;
+ SK_Confringo(); break;
// Level 1
case SKILL_ABIZIT:
- SK_Abizit(); break;
+ SK_Abizit(); break;
case SKILL_MONSTERINFO:
- SK_Miteyo(); break;
+ SK_Miteyo(); break;
case EVOL_AREA_PROVOKE:
SK_Itenplz(); break;
case SKILL_FLAR:
- SK_Flar(); break;
+ SK_Flar(); break;
case SKILL_MODRIPHOO:
case SKILL_MODRISUMP:
case SKILL_MODRIYIKAM:
case SKILL_MODRILAX:
- SK_GrowPlants(); break; // FIXME: Unreleased/cannot be learned
+ SK_GrowPlants(); break; // FIXME: Unreleased/cannot be learned
case SKILL_LUM:
- SK_Lum(); break;
+ SK_Lum(); break;
case SKILL_CHIZA:
- SK_Chiza(); break;
+ SK_Chiza(); break;
+ case SKILL_PARUM:
+ case SKILL_GOLE:
+ SK_Transmute(); break;
// Level 2
case SKILL_INMA:
- SK_Inma(); break;
+ SK_Inma(); break;
case SKILL_KALAKARENK:
case SKILL_KALBOO:
case SKILL_KALGINA:
case SKILL_KALRENK:
- SK_SummonLv2(); break;
+ SK_SummonLv2(); break;
case SKILL_HALHISS:
case SKILL_HELORP:
- SK_SummonLv2(); break;
+ SK_SummonLv2(); break;
case SKILL_KAFLOSH:
- SK_Kaflosh(); break;
+ SK_Kaflosh(); break;
case SKILL_BETSANC:
- SK_Betsanc(); break;
+ SK_Betsanc(); break;
case SKILL_ASORM:
- SK_Asorm(); break;
+ SK_Asorm(); break;
case SKILL_INGRAV:
- SK_Ingrav(); break;
+ SK_Ingrav(); break;
case SKILL_UPMARMU:
- SK_Uparmu(); break;
+ SK_Uparmu(); break;
case SKILL_PHLEX:
- SK_Phlex(); break;
+ SK_Phlex(); break;
+ case SKILL_KULARZUFRILL:
+ case SKILL_ZUKMINBIRF:
+ case SKILL_PATMUPLOO:
+ case SKILL_PATVILOREE:
+ case SKILL_PATLOREE:
+ case SKILL_MANPAHIL:
+ SK_Transmute(); break;
// Level 3
// Level 4
// Level 5
@@ -143,16 +153,16 @@ function script HUB_SkillInvoke {
.@mobId=Moggun;
if (rand2(6,12) < abizit()+1)
{
- .@mobId=Yeti;
+ .@mobId=Yeti;
}
SK_summon(.@mobId, 4, any(3,4));
break;
case TMW2_STONEHEART:
.@mobId=Terranite;
if (rand2(9,12) < abizit()+1 &&
- BaseLevel > 80)
+ BaseLevel > 80)
{
- .@mobId=TerraniteProtector;
+ .@mobId=TerraniteProtector;
}
SK_summon(.@mobId, 4, any(4,5));
break;
@@ -167,7 +177,7 @@ function script HUB_SkillInvoke {
// Debug
if ($@GM_OVERRIDE)
debugmes "Cast skill %d on level %d - Target %d",
- @skillId, @skillLv, @skillTarget;
+ @skillId, @skillLv, @skillTarget;
// Cleanup (double-safe)
@skillTarget = 0;
@@ -227,7 +237,7 @@ function script HUB_PCBonus {
if (getequipid(EQI_HAND_R) < 1) {
bonus bAtk, 10*getskilllv(SKILL_BRAWLING);
} else if (getiteminfo(
- getequipid(EQI_HAND_R), ITEMINFO_SUBTYPE) == W_FIST) {
+ getequipid(EQI_HAND_R), ITEMINFO_SUBTYPE) == W_FIST) {
bonus bAtk, 10*getskilllv(SKILL_BRAWLING);
}
}
diff --git a/npc/magic/level1-transmutations.txt b/npc/magic/level1-transmutations.txt
new file mode 100644
index 00000000..88e916fc
--- /dev/null
+++ b/npc/magic/level1-transmutations.txt
@@ -0,0 +1,95 @@
+// The Mana World script
+// Author: Jesusalva <jesusalva@themanaworld.org>
+//
+// Magic Script: MULTIPLE (Level 1)
+// School: Transmutation *
+
+function script SK_Transmute {
+ // Setup
+ switch (@skillId) {
+ case SKILL_PARUM:
+ .@prize = MoubooFigurine; .@pc = 1;
+ .@mexp = 1; .@fx = FX_MAGIC_WOOD_CAST;
+ setarray .@component, RawLog;
+ setarray .@co_amount, 1;
+ setarray .@failure, Iten, WarpedLog, WarpedLog;
+ break;
+ case SKILL_KULARZUFRILL:
+ .@prize = Arrow; .@pc = AdjustSpellpower(40+@skillLv*2);
+ .@mexp = 2; .@fx = FX_MAGIC_ARROW_CAST;
+ setarray .@component, RawLog;
+ setarray .@co_amount, 1;
+ setarray .@failure, WarpedLog, WarpedLog;
+ break;
+ case SKILL_ZUKMINBIRF:
+ .@prize = IronPowder; .@pc = 1+AdjustSpellpower(@skillLv*5);
+ .@mexp = 2; .@fx = FX_MAGIC_IRON_CAST;
+ setarray .@component, IronOre;
+ setarray .@co_amount, 1;
+ setarray .@failure, Iten, IronOre, IronOre;
+ break;
+ case SKILL_PATMUPLOO:
+ .@prize = CottonShirt; .@pc = 1;
+ .@mexp = 2; .@fx = FX_MAGIC_SHIRT_CAST;
+ setarray .@component, CottonCloth;
+ setarray .@co_amount, 5;
+ setarray .@failure, CottonCloth, CottonCloth;
+ break;
+ case SKILL_PATVILOREE:
+ .@prize = ShortTankTop; .@pc = 1;
+ .@mexp = 2; .@fx = FX_MAGIC_SHIRT_CAST;
+ setarray .@component, CottonCloth;
+ setarray .@co_amount, 3;
+ setarray .@failure, CottonCloth, CottonCloth;
+ break;
+ case SKILL_PATLOREE:
+ .@prize = TankTop; .@pc = 1;
+ .@mexp = 2; .@fx = FX_MAGIC_SHIRT_CAST;
+ setarray .@component, CottonCloth;
+ setarray .@co_amount, 4;
+ setarray .@failure, CottonCloth, CottonCloth;
+ break;
+ case SKILL_GOLE:
+ .@prize = SulphurPowder; .@pc = 1+AdjustSpellpower(@skillLv*20);
+ .@mexp = 1; .@fx = FX_MAGIC_SULPHUR_CAST;
+ setarray .@component, PileOfAsh;
+ setarray .@co_amount, 1;
+ setarray .@failure, PileOfAsh, PileOfAsh;
+ break;
+ case SKILL_MANPAHIL:
+ .@prize = Lifestone; .@pc = 10;
+ .@mexp = 2; .@fx = FX_MAGIC_STONE_CAST;
+ setarray .@component, BugLeg, MaggotSlime, MauveHerb, AlizarinHerb, CobaltHerb, GambogeHerb;
+ setarray .@co_amount, 1, 1, 1, 1, 1, 1;
+ setarray .@failure, Lifestone, Lifestone;
+ break;
+ default: return;
+ }
+ // Check for items
+ for (.@i=0; .@i < getarraysize(.@component); .@i++) {
+ if (countitem(.@component[.@i]) < .@co_amount[.@i]) {
+ dispbottom l("You do not have enough %s (min %d)",
+ getitemname(.@component[.@i]), .@co_amount[.@i]);
+ return;
+ }
+ }
+ // Delete reagents
+ inventoryplace Iten, 1, .@prize, .@pc;
+ for (.@i=0; .@i < getarraysize(.@component); .@i++) {
+ delitem(.@component[.@i], .@co_amount[.@i]);
+ }
+ // Effect and EXP
+ specialeffect(.@fx, AREA, getcharid(3));
+ GetManaExp(@skillId, .@mexp);
+ // The chances of success are based on magic exp, abizit and skill level
+ .@rand100 = abizit()*10 + cap_value(MAGIC_EXP/100, 0, 50) + (@skillLv*5);
+ if (.@rand100 > rand2(100)) {
+ getitem .@prize, .@pc;
+ } else {
+ dispbottom l("Your magic takes a mind of its own!");
+ getitem any_of(.@failure), 1;
+ }
+ return;
+}
+
+
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 1c17a4a5..c975d301 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -77,6 +77,7 @@
"npc/magic/level1-lesser-heal.txt",
"npc/magic/level1-magic-blade.txt",
"npc/magic/level1-summon-maggots.txt",
+"npc/magic/level1-transmutations.txt",
"npc/magic/level2-arrow-hail.txt",
"npc/magic/level2-happy-curse.txt",
"npc/magic/level2-lay-on-hands.txt",