Advertisement
Guest User

Synthesis NPC

a guest
Aug 2nd, 2011
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 15.01 KB | None | 0 0
  1. //===== eAthena Script =======================================
  2. //= Eternity RO Synthesis NPC
  3. //===== By: ==================================================
  4. //= Karei
  5. //===== Current Version: =====================================
  6. //= 1.0 - Wrote
  7. //= 3.0 - Rewrote for Eternity v3 [karei]
  8. //===== Compatible With: =====================================
  9. //= EterntiyRO v3
  10. //===== Description: =========================================
  11. //= Lets players trade a donation hat, regular hat, and card
  12. //= for a statted donation hat.
  13. //============================================================
  14. prt_in,46,97,1  script  Synthesizer#ero 712,{
  15.     mes "[Master Synthesizer]";
  16.     mes "This is the land of Eternal Cold eh! Beware the penguins! Be AFRAID of the BEAVERS! AHHHH!!!";
  17.     next;
  18.     switch(select("Can you synthesize my hat?:Who are you?")){
  19.         case 1:
  20.             mes "[Master Synthesizer]";
  21.             mes "Synthesize? What are you gibbering aboot? Whaa, you mean like put a hat and maybe a card into another hat eh?";
  22.             next;
  23.             mes "[Master Synthesizer]";
  24.             mes "Maybe I can! Maybe I can't! Either way, it's none of your business!";
  25.             next;
  26.             mes "[Master Synthesizer]";
  27.             mes "Oh... you wanted me to do it for you huh? Well, you'll have to do something for me first... Let's see...";
  28.             next;
  29.             mes "[Master Synthesizer]";
  30.             mes "It's going to be terribly difficult, just to warn ya. I want you to go south and.... ... ... ZzzzZZZzz";
  31.             next;
  32.             switch(select("Wake him up!:Leave quietly")){
  33.                 case 1:
  34.                     mes "[Master Synthesizer]";
  35.                     mes "Ooh! What! Yes! Ok, first, are you slotting in a card, or just a headgear? Synthesis can only be performed ONCE.";
  36.                     next;
  37.                     mes "If you want a card in as well, you'll have to first put it into the headgear going into the special one. Refine rates are kept.";
  38.                     next;
  39.                     mes "You MUST BE WEARING the hat you want synthesized INTO the special donation headgear! Make sure there is only one of that item!";
  40.                     next;
  41.                     switch(select("Hat and a Card:Just a Headgear")){ // Are these breaks needed?
  42.                         case 1:
  43.                             set @synthcard,1; // synthcard is set to 1, which means both a hat and card are being synthesized.
  44.                             break;
  45.                         case 2:
  46.                             set @synthcard,2; // synthcard is set to 2, which means just a hat is being synthesized.
  47.                             break;
  48.                     }
  49.                     mes "Oooh! What! Yes! Ok, what do you want to synthesize?";
  50.                         next;
  51.                         switch(select("Jasper Crest:Dark Randgris:Neko Mimi:Tiraya Bonnet:Kawaii Ribbon")){
  52.                             case 1:
  53.                                 callsub S_Top, "Jasper Crest", @synthcard, 5396;
  54.                             case 2:
  55.                                 callsub S_Top, "Dark Randgris Helm", @synthcard, 5373;
  56.                             case 3:
  57.                                 callsub S_Top, "Neko Mimi", @synthcard, 30512;
  58.                             case 4:
  59.                                 callsub S_Top, "Tiraya Bonnet", @synthcard, 5395;
  60.                             case 5:
  61.                                 callsub S_Top, "Kawaii Ribbon", @synthcard, 30509;
  62.                         }
  63.                     close;
  64.                 case 2:
  65.                     mes "zzZzzZZZ";
  66.                     close;
  67.             }
  68.         case 2:
  69.             mes "I am the... I am the... ZzzZZZZZZzz";
  70.             close;
  71.     }
  72.    
  73. //For Top Head slot only synthesis 
  74. S_Top:
  75.     mes "[Master Synthesizer]";
  76.     mes "LISTEN CLOSELY!";
  77.     next;
  78.     mes "[Master Synthesizer]";
  79.     if(getarg(1) == 1){ mes "Just to confirm you want to synthesize a " + getarg(0) + " with a slotted headgear and a card, right?";} // Card + Hat
  80.     else{ mes "Just to confirm, you want to synthesize a " + getarg(0) + " with just a hat, and no card, right?";} // Just Hat
  81.     next;
  82.     switch(select("That's wrong!:That's correct!")){
  83.         case 1:
  84.             mes "[Master Synthesizer]";
  85.             mes "I'm sorry to hear that! Maybe next... wait what?";
  86.             close;
  87.         case 2:
  88.             if(getarg(1) == 1){ // Synthesizing with a hat and a card
  89.                 mes "[Master Synthesizer]";
  90.                 mes "Please note, in order to put a CARD into this headgear, it must FIRST be slotted into the non-donation headgear!";
  91.                 next;
  92.                 mes "[Master Synthesizer]";
  93.                 mes "Now then, which of the workable headgears do you wish to put in?";
  94.                 next;
  95.                 switch(select("Hat[1]:Bucket Hat[1]:Marionette Doll[1]")){ // Are these breaks needed?
  96.                     case 1:
  97.                         set @synththree,2221;
  98.                         set .@synthhat$, "Hat[1]";
  99.                         break;
  100.                     case 2:
  101.                         set @synththree,5120;
  102.                         set .@synthhat$, "Bucket Hat[1]";
  103.                         break;
  104.                     case 3:
  105.                         set @synththree,5141;
  106.                         set .@synthhat$, "Marionette Doll[1]";
  107.                         break;
  108.                 }
  109.                 if(getequipid(EQI_HEAD_TOP)==@synththree){
  110.                     mes "[Master Synthesizer]";
  111.                     mes "So, you want to synthesize a your " + .@synthhat$ + " into your " + getarg(0) + " with the card ID " + getequipcardid(EQI_HEAD_TOP,0) + " right?";
  112.                     switch(select("Actually no!:Yes, of course")){
  113.                         case 1:
  114.                             mes "[Master Synthesizer]";
  115.                             mes "Oh... that's unfortunate.";
  116.                             close;
  117.                         case 2:
  118.                             if(countitem(@synththree) == 1 && countitem(getarg(2)) >= 1){
  119.                                 mes "[Master Synthesizer]";
  120.                                 mes "By the power of the North! ... ... ";
  121.                                 set @refine,getequiprefinerycnt(EQI_HEAD_TOP); // Sets the refine rate of the headgear
  122.                                 set @synthone,getequipcardid(EQI_HEAD_TOP,0); // Sets @synthone as the card
  123.                                 failedrefitem EQI_HEAD_TOP; // Deletes the equipped headgear
  124.                                 delitem getarg(2),1;
  125.                                 mes "Whoops... I broke it...";
  126.                                 next;
  127.                                 mes "[Master Synthesizer]";
  128.                                 mes "Hahahaha! Joking! Come again.";
  129.                                 getitem2 getarg(2),1,1,@refine,0,@synthone,0,@synththree,0;
  130.                                 close;
  131.                             }
  132.                             else{
  133.                                 mes "[Master Synthesizer]";
  134.                                 mes "You're missing something, or have more than one of something. If you need a special headgear, please donate to keep EternityRO alive.";
  135.                                 close;
  136.                             }
  137.                     }
  138.                 }
  139.                 else{ // If the player is not wearing the correct headgear
  140.                     mes "[Master Synthesizer]";
  141.                     mes "You must first equip the headgear that you're trying to synthesize INTO your special hat!";
  142.                     close;
  143.                 }
  144.             }
  145.             else{ // Synthesizing with just a hat
  146.                 mes "[Master Synthesizer]";
  147.                 mes "Please note, if you have more than one special headgear or one you do NOT want to synthesize, I might break it instead. So, store it first please!";
  148.                 next;
  149.                 mes "[Master Synthesizer]";
  150.                 mes "Now then, which of the workable headgears do you wish to put in?";
  151.                 next;
  152.                 switch(select("Beret:Feather Beret:Apple of Archer:Frigg's Circlet:Magni's Cap:Morrigane's Helm")){ // Are these breaks needed?
  153.                     case 1:
  154.                         set @synththree,5172;
  155.                         set .@synthhat$, "Beret";
  156.                         break;
  157.                     case 2:
  158.                         set @synththree,5170;
  159.                         set .@synthhat$, "Feather Beret";
  160.                         break;
  161.                     case 3:
  162.                         set @synththree,2285;
  163.                         set .@synthhat$, "Apple of Archer";
  164.                         break;
  165.                     case 4:
  166.                         set @synththree,5124;
  167.                         set .@synthhat$, "Frigg's Circlet";
  168.                         break;
  169.                     case 5:
  170.                         set @synththree,5122;
  171.                         set .@synthhat$, "Magni's Cap";
  172.                         break;     
  173.                     case 6:
  174.                         set @synththree,5127;
  175.                         set .@synthhat$, "Morrigane's Helm";
  176.                         break;                         
  177.                 }
  178.                 if(getequipid(EQI_HEAD_TOP)==@synththree){
  179.                     mes "[Master Synthesizer]";
  180.                     mes "So you want to synthesize your " + .@synthhat$ + " into your " + getarg(0) + ", right?";
  181.                     next;
  182.                     switch(select("Actually no!:Yes, of course")){
  183.                         case 1:
  184.                             mes "[Master Synthesizer]";
  185.                             mes "I'm sorry to hear that.";
  186.                             close;
  187.                         case 2:
  188.                             if(countitem(@synththree) == 1 && countitem(getarg(2)) >= 1){
  189.                                 mes "[Master Synthesizer]";
  190.                                 mes "By the power of the North! ... ... ";
  191.                                 set @refine,getequiprefinerycnt(EQI_HEAD_TOP); // Sets the refine rate of the headgear
  192.                                 failedrefitem EQI_HEAD_TOP; // Deletes the equipped headgear
  193.                                 delitem getarg(2),1;
  194.                                 mes "Whoops... I broke it...";
  195.                                 next;
  196.                                 mes "[Master Synthesizer]";
  197.                                 mes "Hahahaha! Joking! Come again.";
  198.                                 getitem2 getarg(2),1,1,@refine,0,0,0,@synththree,0;
  199.                                 close;
  200.                             }
  201.                             else{
  202.                                 mes "[Master Synthesizer]";
  203.                                 mes "You're missing something, or have more than one of something. If you need a special headgear, please donate to keep EternityRO alive.";
  204.                                 close;
  205.                             }
  206.                     }
  207.                 }
  208.                 else{ // If the player is not wearing the correct headgear
  209.                     mes "[Master Synthesizer]";
  210.                     mes "You must first equip the headgear that you're trying to synthesize INTO your special hat!";
  211.                     close;
  212.                 }              
  213.             }
  214.     }
  215.    
  216. // Mid slot only synthesis
  217. S_Mid:
  218.     mes "[Master Synthesizer]";
  219.     mes "Sorry... scouters are currently unavailable. We're fixing some sprite issues, and will be here soon.";
  220.     close;
  221.  
  222. // Both Top and Mid combined synthesis
  223. S_TopMid:
  224.     mes "[Master Synthesizer]";
  225.     mes "LISTEN CLOSELY!";
  226.     next;
  227.     mes "[Master Synthesizer]";
  228.     if(getarg(1) == 1){ mes "Just to confirm you want to synthesize a " + getarg(0) + " with a slotted headgear, mid-headgear and a card, right?";} // Card + Hat
  229.     else{ mes "Just to confirm, you want to synthesize a " + getarg(0) + " with just a hat, and no card, and a mid-headgear right?";} // Just Hat
  230.     next;
  231.     switch(select("That's wrong!:That's correct!")){
  232.         case 1:
  233.             mes "[Master Synthesizer]";
  234.             mes "I'm sorry to hear that! Maybe next... wait what?";
  235.             close;
  236.         case 2:
  237.             mes "[Master Synthesizer]";
  238.             mes "First, which mid-slot headgear would you like to add to the new hat? I'm sorry, but we can't do carded mid items.";
  239.             next;
  240.             switch(select("Masquerade:Binoculars:Welding Mask")){
  241.                 case 1:
  242.                     set @synthtwo,2291;
  243.                     set .@synthmid$, "Masquerade";
  244.                     break;
  245.                 case 2:
  246.                     set @synthtwo,2296;
  247.                     set .@synthmid$, "Binoculars";
  248.                     break;
  249.                 case 3:
  250.                     set @synthtwo,2292;
  251.                     set .@synthmid$, "Welding Mask";
  252.                     break;
  253.             }
  254.             if(getarg(1) == 1){ // Synthesizing with a hat and a card
  255.                 mes "[Master Synthesizer]";
  256.                 mes "Please note, in order to put a CARD into this headgear, it must FIRST be slotted into the non-donation headgear!";
  257.                 next;
  258.                 mes "[Master Synthesizer]";
  259.                 mes "Now then, which of the workable headgears do you wish to put in?";
  260.                 next;
  261.                 switch(select("Hat[1]:Bucket Hat[1]:Marionette Doll[1]")){ // Are these breaks needed?
  262.                     case 1:
  263.                         set @synththree,2221;
  264.                         set .@synthhat$, "Hat[1]";
  265.                         break;
  266.                     case 2:
  267.                         set @synththree,5120;
  268.                         set .@synthhat$, "Bucket Hat[1]";
  269.                         break;
  270.                     case 3:
  271.                         set @synththree,5141;
  272.                         set .@synthhat$, "Marionette Doll[1]";
  273.                         break;
  274.                 }
  275.                 if(getequipid(EQI_HEAD_TOP)==@synththree){
  276.                     mes "[Master Synthesizer]";
  277.                     mes "So, you want to synthesize a your " + .@synthhat$ + " and " + .@synthmid$ + " into your " + getarg(0) + " with the card ID " + getequipcardid(EQI_HEAD_TOP,0) + " right?";
  278.                     next;
  279.                     switch(select("Actually no!:Yes, of course")){
  280.                         case 1:
  281.                             mes "[Master Synthesizer]";
  282.                             mes "Oh... that's unfortunate.";
  283.                             close;
  284.                         case 2:
  285.                             if(countitem(@synththree) == 1 && countitem(@synthtwo) == 1 && countitem(getarg(2)) >= 1){
  286.                                 mes "[Master Synthesizer]";
  287.                                 mes "By the power of the North! ... ... ";
  288.                                 set @refine,getequiprefinerycnt(EQI_HEAD_TOP); // Sets the refine rate of the headgear
  289.                                 set @synthone,getequipcardid(EQI_HEAD_TOP,0); // Sets @synthone as the card
  290.                                 failedrefitem EQI_HEAD_TOP; // Deletes the equipped headgear
  291.                                 delitem getarg(2),1; // Deletes donation headgear
  292.                                 delitem @synthtwo,1; // Deletes mid headgear
  293.                                 mes "Whoops... I broke it...";
  294.                                 next;
  295.                                 mes "[Master Synthesizer]";
  296.                                 mes "Hahahaha! Joking! Come again.";
  297.                                 getitem2 getarg(2),1,1,@refine,0,@synthone,@synthtwo,@synththree,0;
  298.                                 close;
  299.                             }
  300.                             else{
  301.                                 mes "[Master Synthesizer]";
  302.                                 mes "You're missing something, or have more than one of something. If you need a special headgear, please donate to keep EternityRO alive.";
  303.                                 close;
  304.                             }
  305.                     }
  306.                 }
  307.                 else{ // If the player is not wearing the correct headgear
  308.                     mes "[Master Synthesizer]";
  309.                     mes "You must first equip the headgear that you're trying to synthesize INTO your special hat!";
  310.                     close;
  311.                 }
  312.             }
  313.             else{ // Synthesizing with just a hat
  314.             mes "[Master Synthesizer]";
  315.             mes "First, which mid-slot headgear would you like to add to the new hat? I'm sorry, but we can't do carded mid items.";
  316.             next;
  317.             switch(select("Masquerade:Binoculars:Welding Mask")){
  318.                 case 1:
  319.                     set @synthtwo,2291;
  320.                     set .@synthmid$, "Masquerade";
  321.                     break;
  322.                 case 2:
  323.                     set @synthtwo,2296;
  324.                     set .@synthmid$, "Binoculars";
  325.                     break;
  326.                 case 3:
  327.                     set @synthtwo,2292;
  328.                     set .@synthmid$, "Welding Mask";
  329.                     break;
  330.             }
  331.                 mes "[Master Synthesizer]";
  332.                 mes "Please note, in order to put a CARD into this headgear, it must FIRST be slotted into the non-donation headgear!";
  333.                 next;
  334.                 mes "[Master Synthesizer]";
  335.                 mes "Now then, which of the workable headgears do you wish to put in?";
  336.                 next;
  337.                 switch(select("Beret:Feather Beret:Apple of Archer:Frigg's Circlet:Magni's Cap:Morrigane's Helm")){ // Are these breaks needed?
  338.                     case 1:
  339.                         set @synththree,5172;
  340.                         set .@synthhat$, "Beret";
  341.                         break;
  342.                     case 2:
  343.                         set @synththree,5170;
  344.                         set .@synthhat$, "Feather Beret";
  345.                         break;
  346.                     case 3:
  347.                         set @synththree,2285;
  348.                         set .@synthhat$, "Apple of Archer";
  349.                         break;
  350.                     case 4:
  351.                         set @synththree,5124;
  352.                         set .@synthhat$, "Frigg's Circlet";
  353.                         break;
  354.                     case 5:
  355.                         set @synththree,5122;
  356.                         set .@synthhat$, "Magni's Cap";
  357.                         break; 
  358.                     case 6:
  359.                         set @synththree,5127;
  360.                         set .@synthhat$, "Morrigane's Helm";
  361.                         break;                         
  362.                 }
  363.                 if(getequipid(EQI_HEAD_TOP)==@synththree){
  364.                     mes "[Master Synthesizer]";
  365.                     mes "So you want to synthesize your " + .@synthhat$ + " and " + .@synthmid$ + " into your " + getarg(0) + ", right?";
  366.                     switch(select("Actually no!:Yes, of course")){
  367.                         case 1:
  368.                             mes "[Master Synthesizer]";
  369.                             mes "I'm sorry to hear that.";
  370.                             close;
  371.                         case 2:
  372.                             if(countitem(@synththree) == 1 && countitem(@synthtwo) == 1 && countitem(getarg(2)) >= 1){
  373.                                 mes "[Master Synthesizer]";
  374.                                 mes "By the power of the North! ... ... ";
  375.                                 set @refine,getequiprefinerycnt(EQI_HEAD_TOP); // Sets the refine rate of the headgear
  376.                                 failedrefitem EQI_HEAD_TOP; // Deletes the equipped headgear
  377.                                 delitem getarg(2),1; // Deletes donation headgear
  378.                                 delitem @synthtwo,1; // Deletes mid headgear
  379.                                 mes "Whoops... I broke it...";
  380.                                 next;
  381.                                 mes "[Master Synthesizer]";
  382.                                 mes "Hahahaha! Joking! Come again.";
  383.                                 getitem2 getarg(2),1,1,@refine,0,0,@synthtwo,@synththree,0;
  384.                                 close;
  385.                             }
  386.                             else{
  387.                                 mes "[Master Synthesizer]";
  388.                                 mes "You're missing something, or have more than one of something. If you need a special headgear, please donate to keep EternityRO alive.";
  389.                                 close;
  390.                             }
  391.                     }
  392.                 }
  393.                 else{ // If the player is not wearing the correct headgear
  394.                     mes "[Master Synthesizer]";
  395.                     mes "You must first equip the headgear that you're trying to synthesize INTO your special hat!";
  396.                     close;
  397.                 }              
  398.             }
  399.     }  
  400.    
  401. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement