SHARE
TWEET

Untitled

a guest Aug 12th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This NPC makes gem powders
  2.  
  3. 018-2.gat,85,23,0   script  Miner   109,{
  4.     if (Inspector == 10) goto L_NohMask;
  5.  
  6.     mes "[Miner]";
  7.     mes "\"Hello, how can I help you?\"";
  8.  
  9.     menu
  10.         "I am looking for someone able to make gem powder.", L_GemPowder,
  11.         "I was just having a look, have a nice day.", L_abort;
  12.  
  13. L_NohMask:
  14.     mes "[Miner]";
  15.     mes "\"Hello, how can I help you?\"";
  16.  
  17.     menu
  18.         "I am looking for someone able to make gem powder.", L_GemPowder,
  19.         "I was just having a look. Bye.", L_abort,
  20.         "The inspector sent me here to investigate.";
  21.     set Inspector, 11;
  22.     mes "\"Yeah, we did hear a commotion. We thought we heard someone go down to the basement, but we checked the whole place over and didn't see anything out of the ordinary.\"";
  23.     close;
  24.  
  25. L_GemPowder:
  26.     mes "[Miner]";
  27.     mes "\"My father teached me how to make that sort of powder. Grab your pickaxe firmly in your hands and strike hard the gem. You'll get some powder quite quickly.
  28.     mes "\"Do you want me to make some for you?\"";
  29.  
  30.     menu
  31.         "Yes, I would really like you to help me.", L_GemPowderStart,
  32.         "In fact I don't want anything, have a nice day.", L_abort;
  33.  
  34. L_GemPowderStart:
  35.     mes "[Miner]";
  36.     mes "\"Oh, of course I can help you make some gem powder but I would need a gem to start with. Find me a gem and I will make you some powder. Come back when you'll have a gem.\"";
  37.  
  38.     menu
  39.         "Here take a look at my stuff.", L_Look,
  40.         "I will be back with what you've asked.", L_abort,
  41.         "In fact I don't want any gem powder, I prefer gemstones. Bye.", L_abort;
  42.  
  43. L_Look:
  44.     if ((countitem("Diamond") < 1) && (countitem("Ruby") < 1) && (countitem("Emerald") < 1) && (countitem("Sapphire") < 1) && (countitem("Topaz") < 1) && (countitem("Amethyst") < 1)) goto L_gem_powder_no_gem;
  45.     mes "[Miner]";
  46.     mes "\"I see you have some interesting things here. Which gem would you like me to crush into powder?\"";
  47.  
  48.     menu
  49.         "Diamond", L_Diamond,
  50.         "Ruby", L_Ruby,
  51.         "Emerald", L_Emerald,
  52.         "Sapphire", L_Sapphire,
  53.         "Topaz", L_Topaz,
  54.         "Amethyst", L_Amethyst,
  55.         "In fact I'll keep my stuff for now.", L_abort;
  56.  
  57. L_Check_Gems:
  58.         mes "[Miner]";
  59.         mes "\"Sure thing, pardner. What kinda gem powder d'you want?\"";
  60.         next;
  61.         setarray @menuitems$, "", "", "", "", "", "";
  62.         set @c, 0;
  63.  
  64. L_Check_Emerald:
  65.         if (countitem("GemRawGreen") < 1) goto L_Check_Sapphire;
  66.         set @menuitems$[@c], "Emerald Powder.";
  67.         set @menuid[@c], 0;
  68.         set @c, @c + 1;
  69.  
  70. L_Check_Sapphire:
  71.         if (countitem("GemRawBlue") < 1) goto L_Check_Amethyst;
  72.         set @menuitems$[@c], "Sapphire Powder.";
  73.         set @menuid[@c], 1;
  74.         set @c, @c + 1;
  75.  
  76. L_Check_Amethyst:
  77.         if (countitem("GemRawPurple") < 3) goto L_Check_Ruby;
  78.         set @menuitems$[@c], "Amethyst Powder.";
  79.         set @menuid[@c], 2;
  80.         set @c, @c + 1;
  81.  
  82. L_Check_Ruby:
  83.         if (countitem("GemRawRed") < 2) goto L_Check_Topaz;
  84.         set @menuitems$[@c], "Ruby Powder.";
  85.         set @menuid[@c], 3;
  86.         set @c, @c + 1;
  87.  
  88. L_Check_Topaz:
  89.         if (countitem("GemRawYellow") < 1) goto L_Check_Diamond;
  90.         set @menuitems$[@c], "Topaz Powder.";
  91.         set @menuid[@c], 4;
  92.         set @c, @c + 1;
  93.  
  94. L_Check_Diamond:
  95.         if (countitem("GemRawWhite") < 1) goto L_Choose_Gem;
  96.         set @menuitems$[@c], "Diamond Powder.";
  97.         set @menuid[@c], 5;
  98.         set @c, @c + 1;
  99.  
  100. L_Choose_Gem:
  101.         set @menuitems$[@c], "Actually, I think I need the help of someone more skilled...";
  102.         set @menuid[@c], 6;
  103.         set @c, @c + 1;
  104.         menu
  105.                 @menuitems$[0], -,
  106.                 @menuitems$[1], -,
  107.                 @menuitems$[2], -,
  108.                 @menuitems$[3], -,
  109.                 @menuitems$[4], -,
  110.                 @menuitems$[5], -,
  111.                 @menuitems$[6], -;
  112.         @menuitems$[7], -;
  113.         set @menu, @menu -1;
  114.         if (@menu >= @c) close;
  115.         if (@menuid[@menu] == 0) goto L_Powder_Emerald;
  116.         if (@menuid[@menu] == 1) goto L_Powder_Sapphire;
  117.         if (@menuid[@menu] == 2) goto L_Powder_Amethyst;
  118.         if (@menuid[@menu] == 3) goto L_Powder_Ruby;
  119.         if (@menuid[@menu] == 4) goto L_Powder_Topaz;
  120.         if (@menuid[@menu] == 5) goto L_Powder_Diamond;
  121.     mes "[Miner]";
  122.     mes "\"Suit yerself.\"";
  123.     close;
  124.  
  125. L_Diamond:
  126.     getinventorylist;
  127.     if (countitem("GemRawWhite") < 1) goto L_gem_powder_no_gem;
  128.     if (@inventorylist_count == 100 && countitem("GemRawWhite") > 1) goto L_TooMany;
  129.     delitem "GemRawWhite", 1;
  130.     getitem "RingGemWhite", 1;
  131.     goto L_ok;
  132.  
  133. L_Ruby:
  134.     getinventorylist;
  135.     if (countitem("GemRawRed") < 1) goto L_gem_powder_no_gem;
  136.     if (@inventorylist_count == 100 && countitem("GemRawRed") > 1) goto L_TooMany;
  137.     delitem "GemRawRed", 1;
  138.     getitem "RingGemRed", 1;
  139.     goto L_ok;
  140.  
  141. L_Emerald:
  142.     getinventorylist;
  143.     if (countitem("GemRawGreen") < 1) goto L_gem_powder_no_gem;
  144.     if (@inventorylist_count == 100 && countitem("GemRawGreen") > 1) goto L_TooMany;
  145.     delitem "GemRawGreen", 1;
  146.     getitem "RingGemGreen", 1;
  147.     goto L_ok;
  148.  
  149. L_Sapphire:
  150.     getinventorylist;
  151.     if (countitem("GemRawBlue") < 1) goto L_gem_powder_no_gem;
  152.     if (@inventorylist_count == 100 && countitem("GemRawBlue") > 1) goto L_TooMany;
  153.     delitem "GemRawBlue", 1;
  154.     getitem "RingGemBlue", 1;
  155.     goto L_ok;
  156.  
  157. L_Topaz:
  158.     getinventorylist;
  159.     if (countitem("GemRawYellow") < 1) goto L_gem_powder_no_gem;
  160.     if (@inventorylist_count == 100 && countitem("GemRawYellow") > 1) goto L_TooMany;
  161.     delitem "GemRawYellow", 1;
  162.     getitem "RingGemYellow", 1;
  163.     goto L_ok;
  164.  
  165. L_Amethyst:
  166.     getinventorylist;
  167.     if (countitem("RingGemPurple") < 1) goto L_gem_powder_no_gem;
  168.     if (@inventorylist_count == 100 && countitem("RingGemPurple") > 1) goto L_TooMany;
  169.     delitem "RingGemPurple", 1;
  170.     getitem "RingGemPurple", 1;
  171.     goto L_ok;
  172.  
  173. L_ok:
  174.     mes "[Miner]";
  175.     mes "\"Here are your powders. Use them well. I kept a few as a payment.\"";
  176.     mes "\"Would you like me to make more powders?\"";
  177.  
  178.     menu
  179.         "Yes please.", L_Look,
  180.         "No thank you, I got what I wanted.", L_abort;
  181.  
  182. L_gem_powder_no_gem:
  183.     mes "[Miner]";
  184.     mes "\"I am sorry, I need at least a gem to make some powders and it seems you don't have any. Come back when you'll have one.\"";
  185.     close;
  186.  
  187. L_TooMany:
  188.     mes "[Miner]";
  189.     mes "\"You are carrying too much stuff right now. Come back when you'll be less charged.\"";
  190.     close;
  191.  
  192. L_abort:
  193.     close;
  194. }
RAW Paste Data
Top