[1] | 1 | //===== eAthena Script ======================================= |
---|
| 2 | //= Alchemist Shop |
---|
| 3 | //===== By: ================================================== |
---|
| 4 | //= eAthena Team |
---|
| 5 | //===== Current Version: ===================================== |
---|
| 6 | //= 1.5 |
---|
| 7 | //===== Compatible With: ===================================== |
---|
| 8 | //= eAthena SVN |
---|
| 9 | //===== Description: ========================================= |
---|
| 10 | //= Selling Alchemist Materials and Manuals |
---|
| 11 | //===== Additional Comments: ================================= |
---|
| 12 | //= 1.1 fixed Medicine Bowl issue, thanx 2 MasterOfMuppets |
---|
| 13 | //= 1.2 Reddozen's fixes of typos. added optional Elemental |
---|
| 14 | //= Potion Guide. [Lupus] |
---|
| 15 | //= 1.3 Deleted Elemental Potions Guide due to original quest [Lupus] |
---|
| 16 | //= 1.4 Alchemists can now purchase 2000 Medicine Bowls at once. [SinSloth] |
---|
| 17 | //= 1.5 Updated to Aegis 10.3 Standards. [L0ne_W0lf] |
---|
| 18 | //============================================================ |
---|
| 19 | |
---|
| 20 | alde_alche,24,188,3 script Guild Dealer 740,{ |
---|
| 21 | if (checkweight(1201,1) == 0) { |
---|
| 22 | mes "- Wait a minute! -"; |
---|
| 23 | mes "- Currently you are carrying -"; |
---|
| 24 | mes "- too many items with you. -"; |
---|
| 25 | mes "- Please come back again -"; |
---|
| 26 | mes "- after you store some items into kafra storage. -"; |
---|
| 27 | close; |
---|
| 28 | } |
---|
| 29 | mes "[Gever Al Sharp]"; |
---|
| 30 | mes "Welcome to the"; |
---|
| 31 | mes "Alchemist Union."; |
---|
| 32 | mes "How can I assist you today?"; |
---|
| 33 | next; |
---|
| 34 | switch(select("Purchase materials.:Purchase a production manual.:Quit.")) { |
---|
| 35 | case 1: |
---|
| 36 | mes "[Gever Al Sharp]"; |
---|
| 37 | mes "What would you like?"; |
---|
| 38 | next; |
---|
| 39 | if (select("Medicine Bowl - 8 Zeny:Cancel.") == 1) { |
---|
| 40 | mes "[Gever Al Sharp]"; |
---|
| 41 | mes "How many do you want?"; |
---|
| 42 | mes "Enter '0' if you want to quit."; |
---|
| 43 | next; |
---|
| 44 | while(1) { |
---|
| 45 | input .@input,0,2001; |
---|
| 46 | if (.@input == 0) { |
---|
| 47 | mes "[Gever Al Sharp]"; |
---|
| 48 | mes "The deal was cancelled."; |
---|
| 49 | mes "Come again next time."; |
---|
| 50 | close; |
---|
| 51 | } |
---|
| 52 | else if (.@input < 1 || .@input > 2000) { |
---|
| 53 | mes "[Gever Al Sharp]"; |
---|
| 54 | mes "The number must"; |
---|
| 55 | mes "be less than 2000."; |
---|
| 56 | next; |
---|
| 57 | } |
---|
| 58 | else { |
---|
| 59 | break; |
---|
| 60 | } |
---|
| 61 | } |
---|
| 62 | set .@sell,.@input * 8; |
---|
| 63 | set .@item_weight,.@input * 10; |
---|
| 64 | if (Zeny < .@sell) { |
---|
| 65 | mes "[Gever Al Sharp]"; |
---|
| 66 | mes "You don't"; |
---|
| 67 | mes "have enough zeny."; |
---|
| 68 | mes "Check how much zeny"; |
---|
| 69 | mes "you have first."; |
---|
| 70 | close; |
---|
| 71 | } |
---|
| 72 | if ((MaxWeight - Weight) < .@item_weight) { |
---|
| 73 | mes "[Gever Al Sharp]"; |
---|
| 74 | mes "It doesn't seem like"; |
---|
| 75 | mes "you can carry everything."; |
---|
| 76 | mes "Please check the space"; |
---|
| 77 | mes "in your inventory."; |
---|
| 78 | close; |
---|
| 79 | } |
---|
| 80 | set zeny,zeny-.@sell; |
---|
| 81 | getitem 7134,.@input; //Medicine_Bowl |
---|
| 82 | mes "[Gever Al Sharp]"; |
---|
| 83 | mes "Thank you."; |
---|
| 84 | mes "Come again."; |
---|
| 85 | close; |
---|
| 86 | } |
---|
| 87 | mes "[Gever Al Sharp]"; |
---|
| 88 | mes "Well then,"; |
---|
| 89 | mes "come again when"; |
---|
| 90 | mes "you need to purchase"; |
---|
| 91 | mes "materials related to"; |
---|
| 92 | mes "Alchemy, alright?"; |
---|
| 93 | close; |
---|
| 94 | case 2: |
---|
| 95 | mes "[Gever Al Sharp]"; |
---|
| 96 | mes "What do you need?"; |
---|
| 97 | mes "Manuals are generally 100,000 zeny. But there are a couple of special manuals that will cost more."; |
---|
| 98 | next; |
---|
| 99 | switch(select("Potion Creation Guide:Alcohol Creation Guide:Bottle Grenade Creation Guide:Acid Bottle Creation Guide:Plant Bottle Creation Guide:Marine Sphere Bottle Creation Guide:Glistening Coat Creation Guide:Condensed Potion Creation Guide:Cancel Deal.")) { |
---|
| 100 | case 1: |
---|
| 101 | callsub S_SellManual,7144,100000; //Normal_Potion_Book |
---|
| 102 | break; |
---|
| 103 | case 2: |
---|
| 104 | callsub S_SellManual,7127,100000; //Alcol_Create_Book |
---|
| 105 | break; |
---|
| 106 | case 3: |
---|
| 107 | callsub S_SellManual,7128,100000; //FireBottle_Create_Book |
---|
| 108 | break; |
---|
| 109 | case 4: |
---|
| 110 | callsub S_SellManual,7129,100000; //Acid_Create_Book |
---|
| 111 | break; |
---|
| 112 | case 5: |
---|
| 113 | callsub S_SellManual,7130,100000; //Plant_Create_Book |
---|
| 114 | break; |
---|
| 115 | case 6: |
---|
| 116 | callsub S_SellManual,7131,100000; //Mine_Create_Book |
---|
| 117 | break; |
---|
| 118 | case 7: |
---|
| 119 | callsub S_SellManual,7132,100000; //Coating_Create_Book |
---|
| 120 | break; |
---|
| 121 | case 8: |
---|
| 122 | callsub S_SellManual,7133,240000; //Slim_Potion_Create_Book |
---|
| 123 | break; |
---|
| 124 | case 9: |
---|
| 125 | mes "[Gever Al Sharp]"; |
---|
| 126 | mes "Well then..."; |
---|
| 127 | mes "Come back if you"; |
---|
| 128 | mes "ever need to buy"; |
---|
| 129 | mes "a production manual."; |
---|
| 130 | close; |
---|
| 131 | } |
---|
| 132 | case 3: |
---|
| 133 | mes "[Gever Al Sharp]"; |
---|
| 134 | mes "Alright then,"; |
---|
| 135 | mes "have a good day."; |
---|
| 136 | close; |
---|
| 137 | } |
---|
| 138 | |
---|
| 139 | S_SellManual: |
---|
| 140 | if (Zeny < getarg(1)) { |
---|
| 141 | mes "[Gever Al Sharp]"; |
---|
| 142 | mes "You don't"; |
---|
| 143 | mes "have enough zeny."; |
---|
| 144 | mes "Check how much zeny"; |
---|
| 145 | mes "you have first."; |
---|
| 146 | close; |
---|
| 147 | } |
---|
| 148 | mes "[Gever Al Sharp]"; |
---|
| 149 | mes ""+getitemname(getarg(0))+"?"; |
---|
| 150 | mes "That'll be "+getarg(1)+" zeny."; |
---|
| 151 | next; |
---|
| 152 | switch(select("Purchase.:Quit.")) { |
---|
| 153 | set zeny,zeny-getarg(1); |
---|
| 154 | getitem getarg(0),1; |
---|
| 155 | mes "[Gever Al Sharp]"; |
---|
| 156 | mes "Thank you for"; |
---|
| 157 | mes "your patronage."; |
---|
| 158 | close; |
---|
| 159 | } |
---|
| 160 | mes "[Gever Al Sharp]"; |
---|
| 161 | mes "Come again"; |
---|
| 162 | mes "next time."; |
---|
| 163 | close; |
---|
| 164 | } |
---|