summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-12 02:39:18 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-12 02:39:18 -0300
commitc920d8f84b211633826cb1a2770eabda9bed0934 (patch)
tree09a09c8abe0ad3e72bea82502f6c0eb28067818e /npc
parent2c21685abb8c12e3540b10126bab44d9ffde340d (diff)
downloadserverdata-c920d8f84b211633826cb1a2770eabda9bed0934.tar.gz
serverdata-c920d8f84b211633826cb1a2770eabda9bed0934.tar.bz2
serverdata-c920d8f84b211633826cb1a2770eabda9bed0934.tar.xz
serverdata-c920d8f84b211633826cb1a2770eabda9bed0934.zip
Smash the gem!
Diffstat (limited to 'npc')
-rw-r--r--npc/003-5/jeweler.txt24
1 files changed, 16 insertions, 8 deletions
diff --git a/npc/003-5/jeweler.txt b/npc/003-5/jeweler.txt
index 3b362b60e..15eb9dc08 100644
--- a/npc/003-5/jeweler.txt
+++ b/npc/003-5/jeweler.txt
@@ -126,13 +126,17 @@ L_Clear:
mesq l("Oh... Of course! I'll even do this for free!");
next;
mesn l("Inya, the Jeweler");
- mesq l("But be warned, if you have multiple rings, I can pick the wrong one...");
- mesq l("...so if you have multiple rings, better put the others on the storage!");
+ mesq l("Just be really, REALLY sure you want to do it. I mean, the gemstone will break.");
+ mesq l("It's not warranted you'll be able to get the powder back, either.");
next;
mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
- .@item = requestitem();
+ .@item_index = requestitemindex();
// Check if we received an item
+ getinventorylist;
+ .@item=@inventorylist_id[.@item_index];
+
+ // Is it the one we're looking for?
if (.@item != GoldenRing && .@item != SilverRing) {
mesn;
mesq l("Well, that's not a ring.");
@@ -140,13 +144,17 @@ L_Clear:
goto L_Menu;
}
- // The easiest way to get rid is not the best one.
- // failedremovecardsindex() is the right approach
+ // Retrieve the gemstone ID. Must be on slot 1 (aka. 0)!
+ .@gem=getcardbyindex .@item_index, 0;
+ // Skip bound rings. It would be stupid '-'
if (!checkbound(.@item)) {
- delitem .@item, 1;
- getitem .@item, 1;
+ failedremovecardsindex .@item_index, 1;
+ // No inventoryplace check here
+ // DiamondPowder = 858. PolishedDiamond = 5031
+ if (.@gem > 5000)
+ getitem .@gem-4173, 1;
mesn;
- mesq l("Well... Here you go! Uh... Warn me if the gem is still there %%a");
+ mesq l("Well... Here you go!");
next;
} else {
mesn;