[1] | 1 | //===== eAthena Script ======================================= |
---|
| 2 | //= Advanced Refiner |
---|
| 3 | //===== By: ================================================== |
---|
| 4 | //= L0ne_W0lf |
---|
| 5 | //===== Current Version: ===================================== |
---|
| 6 | //= 1.0 |
---|
| 7 | //===== Compatible With: ===================================== |
---|
| 8 | //= Eathena SVN |
---|
| 9 | //===== Description: ========================================= |
---|
| 10 | //= [Aegis Conversion] |
---|
| 11 | //= Refiner that uses Enriched ores to increase upgrade success. |
---|
| 12 | //= After a conversation with Doddler, it's been established that |
---|
| 13 | //= the advanced refiner works similar the the "Bubble Gum" item. |
---|
| 14 | //= The success percentage is not "increased" however, if it fails |
---|
| 15 | //= You get a second try. This tries twice at the same time, |
---|
| 16 | //= effectively giving you a re-roll on your attempt. |
---|
| 17 | //= - Dialog is only partly official to iRO. |
---|
| 18 | //= - Uses the iRO position for this NPC. |
---|
| 19 | //===== Additional Comments: ================================= |
---|
| 20 | //= 1.0 First Version. [L0ne_W0lf] |
---|
| 21 | //= 1.1 Fixed a weird carriage return. o_o [L0ne_W0lf] |
---|
| 22 | //============================================================ |
---|
| 23 | |
---|
| 24 | payon,174,138,0 script Suhnbi#cash 85,{ |
---|
| 25 | mes "[Suhnbi]"; |
---|
| 26 | mes "I am the Armsith"; |
---|
| 27 | mes "I can refine all kinds of weapons,"; |
---|
| 28 | mes "armor and equipment, so let me"; |
---|
| 29 | mes "know what you want to refine."; |
---|
| 30 | next; |
---|
| 31 | set .@strRetPart1$,getequipname(1); |
---|
| 32 | set .@strRetPart2$,getequipname(2); |
---|
| 33 | set .@strRetPart3$,getequipname(3); |
---|
| 34 | set .@strRetPart4$,getequipname(4); |
---|
| 35 | set .@strRetPart5$,getequipname(5); |
---|
| 36 | set .@strRetPart6$,getequipname(6); |
---|
| 37 | set .@strRetPart7$,getequipname(7); |
---|
| 38 | set .@strRetPart8$,getequipname(8); |
---|
| 39 | set .@strRetPart9$,getequipname(9); |
---|
| 40 | set .@strRetPart10$,getequipname(10); |
---|
| 41 | |
---|
| 42 | set .@menu$,.@strRetPart1$+":"+.@strRetPart2$+":"+.@strRetPart3$+":"+.@strRetPart4$+":"+.@strRetPart5$+":"+.@strRetPart6$+":"+.@strRetPart7$+":"+.@strRetPart8$+":"+.@strRetPart9$+":"+.@strRetPart10$; |
---|
| 43 | |
---|
| 44 | switch(select(.@menu$)) { |
---|
| 45 | case 1: |
---|
| 46 | set .@part,1; |
---|
| 47 | if (getequipisequiped(1) == 0) { |
---|
| 48 | mes "[Suhnbi]"; |
---|
| 49 | mes "Do you want me to refine your skull?"; |
---|
| 50 | close; |
---|
| 51 | } |
---|
| 52 | break; |
---|
| 53 | case 2: |
---|
| 54 | set .@part,2; |
---|
| 55 | if (getequipisequiped(2) == 0) { |
---|
| 56 | mes "[Suhnbi]"; |
---|
| 57 | mes "I'll refine your torso with my own passionate body!"; |
---|
| 58 | close; |
---|
| 59 | } |
---|
| 60 | break; |
---|
| 61 | case 3: |
---|
| 62 | set .@part,3; |
---|
| 63 | if (getequipisequiped(3) == 0) { |
---|
| 64 | mes "[Suhnbi]"; |
---|
| 65 | mes "Sorry, there ain't any technology yet to put rockets on your left hand..."; |
---|
| 66 | close; |
---|
| 67 | } |
---|
| 68 | break; |
---|
| 69 | case 4: |
---|
| 70 | set .@part,4; |
---|
| 71 | if (getequipisequiped(4) == 0) { |
---|
| 72 | mes "[Suhnbi]"; |
---|
| 73 | mes "Sorry, there ain't any technology yet to put rockets on your right hand..."; |
---|
| 74 | close; |
---|
| 75 | } |
---|
| 76 | break; |
---|
| 77 | case 5: |
---|
| 78 | set .@part,5; |
---|
| 79 | if (getequipisequiped(5) == 0) { |
---|
| 80 | mes "[Suhnbi]"; |
---|
| 81 | mes "You're not even wearing a garment? Are you?"; |
---|
| 82 | close; |
---|
| 83 | } |
---|
| 84 | break; |
---|
| 85 | case 6: |
---|
| 86 | set .@part,6; |
---|
| 87 | if (getequipisequiped(6) == 0) { |
---|
| 88 | mes "[Suhnbi]"; |
---|
| 89 | mes "What do I look like, a makeover artist? I can't refine your bare feet!"; |
---|
| 90 | close; |
---|
| 91 | } |
---|
| 92 | break; |
---|
| 93 | case 7: |
---|
| 94 | set .@part,7; |
---|
| 95 | if (getequipisequiped(7) == 0) { |
---|
| 96 | mes "[Suhnbi]"; |
---|
| 97 | mes "Um... You're not wearing an Accessory."; |
---|
| 98 | close; |
---|
| 99 | } |
---|
| 100 | break; |
---|
| 101 | case 8: |
---|
| 102 | set .@part,8; |
---|
| 103 | if (getequipisequiped(8) == 0) { |
---|
| 104 | mes "[Suhnbi]"; |
---|
| 105 | mes "Accessory? You're not wearing one of those."; |
---|
| 106 | close; |
---|
| 107 | } |
---|
| 108 | break; |
---|
| 109 | case 9: |
---|
| 110 | set .@part,9; |
---|
| 111 | if (getequipisequiped(9) == 0) { |
---|
| 112 | mes "[Suhnbi]"; |
---|
| 113 | mes "I refine equipment. I don't give hair cuts."; |
---|
| 114 | close; |
---|
| 115 | } |
---|
| 116 | break; |
---|
| 117 | case 10: |
---|
| 118 | set .@part,10; |
---|
| 119 | if (getequipisequiped(10) == 0) { |
---|
| 120 | mes "[Suhnbi]"; |
---|
| 121 | mes "What am I, your personal hairstylist?. Go to the salon if you want work done on your precious hair."; |
---|
| 122 | close2; |
---|
| 123 | } |
---|
| 124 | break; |
---|
| 125 | } |
---|
| 126 | |
---|
| 127 | if (getequipisenableref(.@part) == 0) { |
---|
| 128 | mes "[Suhnbi]"; |
---|
| 129 | mes "I don't think I can refine this item at all."; |
---|
| 130 | close; |
---|
| 131 | } |
---|
| 132 | if (getequipisidentify(.@part) == 0) { |
---|
| 133 | mes "[Suhnbi]"; |
---|
| 134 | mes "This is has not been identified. So, it can't be refined..."; |
---|
| 135 | close; |
---|
| 136 | } |
---|
| 137 | if (getequiprefinerycnt(.@part) >= 10) { |
---|
| 138 | mes "[Suhnbi]"; |
---|
| 139 | mes "This item cannot be refined because it has already reached its maximum level..."; |
---|
| 140 | close; |
---|
| 141 | } |
---|
| 142 | // Make sure you have the neccessary items and Zeny to refine your items |
---|
| 143 | // Determines chance of failure and verifies that you want to continue. |
---|
| 144 | switch(getequipweaponlv(.@part)) { |
---|
| 145 | case 1: callsub S_RefineValidate,1,7620,50,.@part; break; |
---|
| 146 | case 2: callsub S_RefineValidate,2,7620,200,.@part; break; |
---|
| 147 | case 3: callsub S_RefineValidate,3,7620,5000,.@part; break; |
---|
| 148 | case 4: callsub S_RefineValidate,4,7620,20000,.@part; break; |
---|
| 149 | default: callsub S_RefineValidate,0,7619,2000,.@part; break; |
---|
| 150 | } |
---|
| 151 | |
---|
| 152 | if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) { |
---|
| 153 | mes "[Suhnbi]"; |
---|
| 154 | mes "Clink! Clank! Clunk!"; |
---|
| 155 | SuccessRefItem .@part; |
---|
| 156 | next; |
---|
| 157 | Emotion e_no1; |
---|
| 158 | mes "[Suhnbi]"; |
---|
| 159 | mes "Here you are! It's done."; |
---|
| 160 | mes "It's been a while since I've made such a fine weapon. You must be happy because it has become stronger!"; |
---|
| 161 | close; |
---|
| 162 | } |
---|
| 163 | else { |
---|
| 164 | mes "[Suhnbi]"; |
---|
| 165 | mes "Clink! Clank! Clunk!"; |
---|
| 166 | FailedRefItem .@part; |
---|
| 167 | next; |
---|
| 168 | if (rand(5) == 1) |
---|
| 169 | Emotion e_cash; |
---|
| 170 | else |
---|
| 171 | Emotion e_omg; |
---|
| 172 | mes "[Suhnbi]"; |
---|
| 173 | mes "Cough!!!!"; |
---|
| 174 | next; |
---|
| 175 | mes "[Suhnbi]"; |
---|
| 176 | mes "Cough...Cough.."; |
---|
| 177 | mes "What a shame..."; |
---|
| 178 | mes "Your equipment broke during hte refining process. I had told you earlier this might happen!"; |
---|
| 179 | close; |
---|
| 180 | } |
---|
| 181 | |
---|
| 182 | S_RefineValidate: |
---|
| 183 | mes "[Suhnbi]"; |
---|
| 184 | if (getarg(0)) |
---|
| 185 | mes "A level "+getarg(0)+" weapon..."; |
---|
| 186 | mes "To refine this I need one ^ff9999"+getitemname(getarg(1))+"^000000 and a service fee of "+getarg(2)+" Zeny."; |
---|
| 187 | mes "Do you wish to continue?"; |
---|
| 188 | next; |
---|
| 189 | if (select("Yes:No") == 1) { |
---|
| 190 | if (getequippercentrefinery(getarg(3)) < 100) { |
---|
| 191 | mes "[Suhnbi]"; |
---|
| 192 | mes "Wow!!"; |
---|
| 193 | mes "This weapon, probably"; |
---|
| 194 | mes "looks like it's been refined..."; |
---|
| 195 | mes "many times..."; |
---|
| 196 | mes "It may break if"; |
---|
| 197 | mes "you refine it again."; |
---|
| 198 | next; |
---|
| 199 | mes "And if it breaks,"; |
---|
| 200 | mes "you can't use it anymore!"; |
---|
| 201 | mes "All the cards in it and the"; |
---|
| 202 | mes "properties"; |
---|
| 203 | mes "^ff0000will be lost^000000!!"; |
---|
| 204 | mes "^ff0000 besides, the equipment will break!^000000"; |
---|
| 205 | mes " "; |
---|
| 206 | mes "Are you sure you still want to continue?"; |
---|
| 207 | next; |
---|
| 208 | if (select("Yes:No") == 2) { |
---|
| 209 | mes "[Suhnbi]"; |
---|
| 210 | mes "I completely agree..."; |
---|
| 211 | mes "I might be a great refiner, but something even I make mistakes."; |
---|
| 212 | close; |
---|
| 213 | } |
---|
| 214 | } |
---|
| 215 | if (countitem(getarg(1)) > 0 && Zeny > getarg(2)) { |
---|
| 216 | delitem getarg(1),1; |
---|
| 217 | set zeny,zeny-getarg(2); |
---|
| 218 | return; |
---|
| 219 | } |
---|
| 220 | else { |
---|
| 221 | mes "[Suhnbi]"; |
---|
| 222 | mes "You don't seem to have enough Zeny or "+getitemname(getarg(1))+"..."; |
---|
| 223 | mes "Go get some more. I'll be here ll day if you need me."; |
---|
| 224 | close; |
---|
| 225 | } |
---|
| 226 | } |
---|
| 227 | else { |
---|
| 228 | mes "[Suhnbi]"; |
---|
| 229 | mes "Yeah... There's no need to rush."; |
---|
| 230 | mes "Take your time."; |
---|
| 231 | close; |
---|
| 232 | } |
---|
| 233 | } |
---|