From eb97c9821bf5bf9af11fd9a24f5dad280701cf06 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 10 Aug 2019 22:18:15 -0300 Subject: Rewrite a bit Transmigration Code to be cleaner to work --- npc/magic/transmigration.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/npc/magic/transmigration.txt b/npc/magic/transmigration.txt index 439333d77..ddc2dcdc8 100644 --- a/npc/magic/transmigration.txt +++ b/npc/magic/transmigration.txt @@ -29,27 +29,27 @@ OnCall: l("Mouboo Figurine"), MoubooFigurine; mes ""; + mesc l("Transmutating @@ will require:", getitemlink(@menuret)); + + // Requeriments listing switch (@menuret) { case CrazyRum: - mesc l("Transmutating @@ will require:", getitemlink(@menuret)); mesc l("* @@/@@ @@", countitem(Plushroom), 10, getitemlink(Plushroom)); mesc l("* @@/@@ @@", countitem(Milk), 1, getitemlink(Milk)); - next; - mesc l("Transmute?!"); - if (askyesno() == ASK_NO) - @menuret=0; break; case MoubooFigurine: - mesc l("Transmutating @@ will require:", getitemlink(@menuret)); mesc l("* @@/@@ @@", countitem(WoodenLog), 1, getitemlink(WoodenLog)); - next; - mesc l("Transmute?!"); - if (askyesno() == ASK_NO) - @menuret=0; break; default: Exception("ERROR, INVALID TRANSMIGRATION OPTION", RB_DEFAULT|RB_SPEECH); @menuret=0; break; } + // Confirmation + if (@menuret) { + next; + mesc l("Transmute?!"); + if (askyesno() == ASK_NO) + @menuret=0; + } } while (!@menuret); // Close the dialog -- cgit v1.2.3-60-g2f50