diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-10-23 21:44:22 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-10-23 21:44:22 -0300 |
commit | a7c45a192268da2601cef47a4cdba987ae2327ca (patch) | |
tree | c5fb5b97db109fe7106496dd96498c475881046b /npc/003-5 | |
download | serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2 serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip |
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'npc/003-5')
-rw-r--r-- | npc/003-5/_import.txt | 4 | ||||
-rw-r--r-- | npc/003-5/_warps.txt | 3 | ||||
-rw-r--r-- | npc/003-5/jeweler.txt | 218 |
3 files changed, 225 insertions, 0 deletions
diff --git a/npc/003-5/_import.txt b/npc/003-5/_import.txt new file mode 100644 index 0000000..018a083 --- /dev/null +++ b/npc/003-5/_import.txt @@ -0,0 +1,4 @@ +// Map 003-5: Tulimshar Jeweler +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/003-5/_warps.txt", +"npc/003-5/jeweler.txt", diff --git a/npc/003-5/_warps.txt b/npc/003-5/_warps.txt new file mode 100644 index 0000000..5e43457 --- /dev/null +++ b/npc/003-5/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 003-5: Tulimshar Jeweler warps +003-5,38,41,0 warp #003-5_38_41 0,0,003-1,96,145 diff --git a/npc/003-5/jeweler.txt b/npc/003-5/jeweler.txt new file mode 100644 index 0000000..a1b2b9d --- /dev/null +++ b/npc/003-5/jeweler.txt @@ -0,0 +1,218 @@ +// TMW2 Script +// Author: +// Jesusalva +// Description: +// Sells and crafts jewels +// +// Notes: +// Gold/Silver/Copper+Tin Ore (dropped by bifs) → Pieces or Ingot, depends on what you want to forge +// Jeweler only works with Gold/Silver/Bronze PIECES. The Ingots are for forges. +// Jeweler can also polish raw gemstones for a comission ($$$) +// Polished gemstones can be inserted on rings. +// The less precious the ring, heavier and less defense value. +// +// All three rings can be swapped by a Light Ring (you will lose any gemstone on them!). +// Still pending discussion. + +003-5,33,37,0 script Jeweler NPC_FEMALE_TONORI,{ + mesn l("Inya, the Jeweler"); + mesq l("Hello!"); + goto L_Menu; + +L_Menu: + mes ""; + mesn strcharinfo(0); + menu + l("I want to shop."), -, + l("I want to craft rings."), L_Craft, + l("I want to create polished gemstones."), L_Gemstone, + l("I want to remove all stuff applied to my ring!"), L_Clear, + l("Nothing, sorry."), L_Close; + + npcshopattach(.name$); + openshop; + closedialog; + close; + +L_Craft: + mes ""; + mesn l("Inya, the Jeweler"); + mesq l("Of course, I actually have two options:"); + mes l("- 5 @@, with 1200 GP, for a @@.", getitemlink(GoldPieces), getitemlink(GoldenRing)); + mes l("- 5 @@, with 1200 GP, for a @@.", getitemlink(SilverIngot), getitemlink(SilverRing)); // TODO + next; + menu + rif(countitem(GoldPieces) >= 5 && Zeny >= 1200, l("Yes, deal. Gimme the gold ring.")), -, + rif(countitem(SilverIngot) >= 5 && Zeny >= 1200, l("Yes, deal. Gimme the silver ring.")), -, + l("...I'll be back later."), L_Close; + + switch (@menu) { + case 1: + inventoryplace GoldenRing, 1; + delitem GoldPieces, 5; + Zeny=Zeny-1200; + getitem GoldenRing, 1; + getexp 100, 25; + break; + case 2: + inventoryplace SilverRing, 1; + delitem SilverIngot, 5; // TODO + Zeny=Zeny-1200; + getitem SilverRing, 1; + getexp 50, 15; + break; + } + mes ""; + mesn l("Inya, the Jeweler"); + mesq l("Here you go! Anything else?"); + next; + goto L_Menu; + +L_Gemstone: + mes ""; + mesn l("Inya, the Jeweler"); + mesq l("Polished gemstones can be dragged and insert on rings. They'll give special stats to rings, but these gems cannot be removed easily."); + mesq l("I charge a service fee of @@ GP, and two gemstones.", 300); + next; + if (Zeny < 300) { + mesn l("Inya, the Jeweler"); + mesq lg("You clearly don't have money, so let's not bother with that right now."); + next; + goto L_Menu; + } + if (!countitem(GoldenRing) && !countitem(SilverRing)) { + mesn l("Inya, the Jeweler"); + mesq l("You don't have a ring but I can polish the gemstones nonetheless."); + next; + } + select + l("Not today, sorry."), + rif(countitem(Diamond) >= 2 , l("Diamond (+2 vit)")), + rif(countitem(Ruby) >= 2 , l("Ruby (+2 str)")), + rif(countitem(Emerald) >= 2 , l("Emerald (+2 luck)")), + rif(countitem(Sapphire) >= 2, l("Sapphire (+2 int)")), + rif(countitem(Topaz) >= 2 , l("Topaz (+2 agi)")), + rif(countitem(Amethyst) >= 2, l("Amethyst (+2 dex)")); + + mes ""; + if (@menu == 1) + goto L_Menu; + + // As usual, I don't care with cheaters, so if you somehow cheat money or gemstones, YOU WILL LOSE ALL REAGENTS. No refunds. + inventoryplace PolishedDiamond-2+@menu, 1; + delitem Diamond-2+@menu, 2; + Zeny-=300; + getitem PolishedDiamond-2+@menu, 1; + getexp 800, 0; + goto L_Menu; + + +/* TODO Special rings +L_Pearl: + inventoryplace GoldenPearlRing; + delitem GoldenRing, 1; + Zeny=Zeny-1000; + delitem Pearl, 3; + getitem GoldenPearlRing, 1; + getexp 1000, 0; + goto L_Menu; + +L_BlackPearl: + inventoryplace GoldenBlackPearlRing; + delitem GoldenRing, 1; + Zeny=Zeny-1000; + delitem BlackPearl, 1; + getitem GoldenBlackPearlRing, 1; + getexp 1000, 0; + goto L_Menu; +*/ + +L_Clear: + mesn l("Inya, the Jeweler"); + mesq l("Oh... Of course! I'll even do this for free!"); + next; + mesn l("Inya, the Jeweler"); + 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_index = requestitemindex(); + if (.@item_index < 0) + goto L_Menu; + + // Check if we received an item + getinventorylist(); + .@item=@inventorylist_id[.@item_index]; + + if (is_staff()) + mesf "Item Index %d (%s) - ID %d", .@item_index, getitemlink(.@item), .@item; + + // Is it the one we're looking for? + if (.@item != GoldenRing && .@item != SilverRing) { + mesn; + mesq l("Well, that's not a ring."); + next; + goto L_Menu; + } + + // 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)) { + 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!"); + next; + } else { + mesn; + mesq l("I don't work with bound items."); + next; + } + + goto L_Menu; + +L_Close: + closedialog; + goodbye; + end; + +OnInit: + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyesT); + setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper); + setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers); + setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 3); + setunitdata(.@npcId, UDT_HAIRCOLOR, 8); + npcsit; + + .sex = G_FEMALE; + .distance = 5; + + sleep(SHOPWAIT); + tradertype(NST_MARKET); + sellitem WeddingRing, 5000, 50; + sellitem GoldenBlackPearlRing, 500000, 1; // I'm joking of course. Don't tell me you'll pay half MILLION for... this? + end; + +OnClock2214: + restoreshopitem WeddingRing, 5000, 50; + restoreshopitem GoldenBlackPearlRing, 500000, 1; + end; + +// Pay your taxes! +OnBuyItem: + debugmes("Purchase confirmed"); + PurchaseTaxes(); + end; + +OnSellItem: + debugmes("Sale confirmed"); + SaleTaxes(); + end; + +} |