From c01ee518f81d117b92ac69f634c50e42f69eafe4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 7 Aug 2019 19:48:52 -0300 Subject: Replace makepot with Transmigration/Transmutation general spell (TODO/WIP) --- npc/003-0-1/audsbel.txt | 6 ++-- npc/items/books.txt | 4 +-- npc/magic/mkpot.txt | 70 -------------------------------------------- npc/magic/transmigration.txt | 62 +++++++++++++++++++++++++++++++++++++++ npc/scripts.conf | 2 +- 5 files changed, 68 insertions(+), 76 deletions(-) delete mode 100644 npc/magic/mkpot.txt create mode 100644 npc/magic/transmigration.txt (limited to 'npc') diff --git a/npc/003-0-1/audsbel.txt b/npc/003-0-1/audsbel.txt index 8964202ad..b5ad4e4a0 100644 --- a/npc/003-0-1/audsbel.txt +++ b/npc/003-0-1/audsbel.txt @@ -250,13 +250,13 @@ L_Magic: mesn; mesq l("Hmm, I think I can teach you a basic Mana Skill now. This one is more advanced, though."); next; - skill(TMW2_MKPOT,1,0); + skill(TMW2_TRANSMIGRATION,1,0); setq General_Auldsbel, 5; mesn; - mesq l("This is the @@ skill. It transmutes @@ @@ and a single @@ in @@.", "##B@sk-mkpot##b", 10, getitemlink(Plushroom), getitemlink(Milk), getitemlink(HastePotion)); + mesq l("This is the @@ skill. It transmutes stuff into other stuff. I'll teach you some more recipes as class drag on.", "##B@sk-trans##b"); next; mesn; - mesq l("It may fail, and you might end up with something entirely unexpected!"); + mesq l("It may fail, and you might end up with something entirely unexpected, or nothing at all!"); next; mesn; mesq l("Unlike Parum, you can use the skill points you get every time your job level rises. That will lower the mana cost and increase success chances."); diff --git a/npc/items/books.txt b/npc/items/books.txt index bafb5be07..918a87ccd 100644 --- a/npc/items/books.txt +++ b/npc/items/books.txt @@ -207,8 +207,8 @@ OnInit: mesc l("Summon Maggot - @sk-kalmurk"); if (getskilllv(TMW2_PARUM)) mesc l("Wood Manipulation - @sk-parum"); - if (getskilllv(TMW2_MKPOT)) - mesc l("Make Potion - @sk-mkpot"); + if (getskilllv(TMW2_TRANSMIGRATION)) + mesc l("Transmutation - @sk-trans"); if (getskilllv(TMW2_DEMURE)) mesc l("Divine Rage - @sk-demure"); if (getskilllv(TMW2_DRAGOKIN)) diff --git a/npc/magic/mkpot.txt b/npc/magic/mkpot.txt deleted file mode 100644 index 576de7ebc..000000000 --- a/npc/magic/mkpot.txt +++ /dev/null @@ -1,70 +0,0 @@ -// TMW2 script -// Author: Jesusalva -// -// Magic Script: TMW2_MKPOT -// -// Attempts to make a haste potion from Mouboo Milk and Plushroom. -// May make sewer water on failure. -// TODO: Using too much transmutation magic may have dire consequences! Like, uh, transmutating your head! -// Nah, it is probably just propaganda... I hope. ¬.¬ - -- script sk#mkpot 32767,{ - end; - -/* -OnFriendlyDeath: - emote 4; - end; -*/ - -OnCall: - // Other requeriments - if (countitem(Plushroom) < 10 || !countitem(Milk)) { - dispbottom l("You need @@ @@ and @@ to cast this skill.", 10, getitemlink(Plushroom), getitemlink(Milk)); - end; - } - - // Check cooldown - if (@mkpot_at > gettimetick(2)) { - dispbottom l("Skill is in cooldown for @@.", FuzzyTime(@mkpot_at)); - end; - } - - // Check requisites - if (!MagicCheck(TMW2_MKPOT, 185, -5)) - end; - - // Consume items - delitem Plushroom, 10; - delitem Milk, 1; - - // Create the stuff based on MAGIC_EXP - // The closer to zero, best; - // Each 3 mexp reduces chance to get a fail - // Each skill level reduces chances to get a fail - .@r=rand(141,181)-(MAGIC_EXP/3)-getskilllv(TMW2_MKPOT); - if (.@r < 21) { - // Get up to 6 Haste Potions depending on your skill. - getitem HastePotion, abizit()+1; - } else if (.@r < 82) { - getitem any(BottleOfTonoriWater, BottleOfWoodlandWater, BottleOfDivineWater, Milk, CelestiaTea, PileOfAsh), 1; - } else if (.@r < 122) { - getitem any(BottleOfSewerWater, Milk, CelestiaTea, PileOfAsh), 1; - } else if (.@r < 162) { - getitem any(BottleOfSewerWater, BottleOfSewerWater, PileOfAsh), 1; - } else { - dispbottom l("Your items vanishes into thin air. What?!"); - } - - // set cooldown - @mkpot_at=gettimetick(2); - @mkpot_at=@mkpot_at+6; - - // Get a few mana experience points (this is NOT used by Mana Stone) - GetManaExp(TMW2_MKPOT, rand(4,11)); - end; - -OnInit: - bindatcmd "sk-mkpot", "sk#mkpot::OnCall", 0, 100, 0; - end; -} diff --git a/npc/magic/transmigration.txt b/npc/magic/transmigration.txt new file mode 100644 index 000000000..4e45d8510 --- /dev/null +++ b/npc/magic/transmigration.txt @@ -0,0 +1,62 @@ +// TMW2 script +// Author: Jesusalva +// +// Magic Script: TMW2_TRANSMIGRATION +// +// Attempts to make stuff from other stuff +// This is actually referred as transmutation in human-readable forms, and +// transmigration in scripts. + +- script sk#mkpot 32767,{ + end; +OnCall: + // Other requeriments + if (countitem(Plushroom) < 10 || !countitem(Milk)) { + dispbottom l("You need @@ @@ and @@ to cast this skill.", 10, getitemlink(Plushroom), getitemlink(Milk)); + end; + } + + // Check cooldown + if (@mkpot_at > gettimetick(2)) { + dispbottom l("Skill is in cooldown for @@.", FuzzyTime(@mkpot_at)); + end; + } + + // Check requisites + if (!MagicCheck(TMW2_TRANSMIGRATION, 185, -5)) + end; + + // Consume items + delitem Plushroom, 10; + delitem Milk, 1; + + // Create the stuff based on MAGIC_EXP + // The closer to zero, best; + // Each 3 mexp reduces chance to get a fail + // Each skill level reduces chances to get a fail + .@r=rand(141,181)-(MAGIC_EXP/3)-getskilllv(TMW2_TRANSMIGRATION); + if (.@r < 21) { + // Get up to 6 Haste Potions depending on your skill. + getitem HastePotion, abizit()+1; + } else if (.@r < 82) { + getitem any(BottleOfTonoriWater, BottleOfWoodlandWater, BottleOfDivineWater, Milk, CelestiaTea, PileOfAsh), 1; + } else if (.@r < 122) { + getitem any(BottleOfSewerWater, Milk, CelestiaTea, PileOfAsh), 1; + } else if (.@r < 162) { + getitem any(BottleOfSewerWater, BottleOfSewerWater, PileOfAsh), 1; + } else { + dispbottom l("Your items vanishes into thin air. What?!"); + } + + // set cooldown + @mkpot_at=gettimetick(2); + @mkpot_at=@mkpot_at+6; + + // Get a few mana experience points (this is NOT used by Mana Stone) + GetManaExp(TMW2_TRANSMIGRATION, rand2(4,11)); + end; + +OnInit: + bindatcmd "sk-trans", "sk#mkpot::OnCall", 0, 100, 0; + end; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index a4ab72b4a..ab3194008 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -120,7 +120,7 @@ "npc/magic/kalspike.txt", "npc/magic/kalwulf.txt", "npc/magic/limerizer.txt", -"npc/magic/mkpot.txt", +"npc/magic/transmigration.txt", "npc/magic/parum.txt", "npc/magic/plantkingdom.txt", "npc/magic/stoneheart.txt", -- cgit v1.2.3-70-g09d2