From 1589271da7faf4d1ffec84b8b8433a3fb81fe284 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 25 Feb 2020 11:33:46 -0300 Subject: Rewrite Lilanna's code --- npc/024-15/lilanna.txt | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'npc/024-15') diff --git a/npc/024-15/lilanna.txt b/npc/024-15/lilanna.txt index 641ce5ca4..2bf680bcd 100644 --- a/npc/024-15/lilanna.txt +++ b/npc/024-15/lilanna.txt @@ -101,27 +101,32 @@ function FixSelect { mesc l("Fixing Crystals have a price. You can only charge crystals to places you've already been."); mesc l("These are saved by walking in warp portals or touching Soul Menhirs."); mes l("You have: @@ Broken crystals", countitem(BrokenWarpCrystal)); + .@cbase=1500; // Candor Base + .@nbase=2500; // Normal Base + .@lbase=5000; // LoF Base + .@fbase=10000; // Faraway Base + .@kbase=20000; // King Base (incl. Fortress Is.) select l("Don't fix."), - rif(true, l("Candor - @@ GP", format_number(1500))), - rif(TELEPORTERS & TP_TULIM, l("Tulimshar - @@ GP", format_number(2500))), - rif(TELEPORTERS & TP_HURNS, l("Hurnscald - @@ GP", format_number(2500))), - rif(TELEPORTERS & TP_NIVAL, l("Nivalis - @@ GP", format_number(2500))), - rif(TELEPORTERS & TP_FROST|TP_HALIN, l("Land Of Fire - @@ GP", format_number(5000))), - rif(TELEPORTERS & TP_HALIN, l("Halinarzo - @@ GP", format_number(10000))), - rif(TELEPORTERS & TP_FROST, l("Frostia - @@ GP", format_number(10000))), - rif(TELEPORTERS & TP_LILIT, l("Lilit - @@ GP (not exchangeable)", format_number(20000))); + rif(true, l("Candor - @@ GP", format_number(.@cbase))), + rif(TELEPORTERS & TP_TULIM, l("Tulimshar - @@ GP", format_number(.@nbase))), + rif(TELEPORTERS & TP_HURNS, l("Hurnscald - @@ GP", format_number(.@nbase))), + rif(TELEPORTERS & TP_NIVAL, l("Nivalis - @@ GP", format_number(.@nbase))), + rif(TELEPORTERS & TP_FROST|TP_HALIN, l("Land Of Fire - @@ GP", format_number(.@lbase))), + rif(TELEPORTERS & TP_HALIN, l("Halinarzo - @@ GP", format_number(.@fbase))), + rif(TELEPORTERS & TP_FROST, l("Frostia - @@ GP", format_number(.@fbase))), + rif(TELEPORTERS & TP_LILIT, l("Lilit - @@ GP (not exchangeable)", format_number(.@kbase))); mes ""; switch (@menu) { case 1: return; - case 2: FixCrystal(CandorWarpCrystal, 1500); break; - case 3: FixCrystal(TulimWarpCrystal, 2500); break; - case 4: FixCrystal(HurnsWarpCrystal, 2500); break; - case 5: FixCrystal(NivalWarpCrystal, 2500); break; - case 6: FixCrystal(LoFWarpCrystal, 5000); break; - case 7: FixCrystal(HalinWarpCrystal, 10000); break; - case 8: FixCrystal(FrostiaWarpCrystal, 10000); break; - case 9: FixCrystal(LilitWarpCrystal, 20000); break; + case 2: FixCrystal(CandorWarpCrystal, .@cbase); break; + case 3: FixCrystal(TulimWarpCrystal, .@nbase); break; + case 4: FixCrystal(HurnsWarpCrystal, .@nbase); break; + case 5: FixCrystal(NivalWarpCrystal, .@nbase); break; + case 6: FixCrystal(LoFWarpCrystal, .@lbase); break; + case 7: FixCrystal(HalinWarpCrystal, .@fbase); break; + case 8: FixCrystal(FrostiaWarpCrystal, .@fbase); break; + case 9: FixCrystal(LilitWarpCrystal, .@kbase); break; } } while (countitem(BrokenWarpCrystal)); return; -- cgit v1.2.3-60-g2f50