Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. prontera,152,187,3 script Shadow Blacksmith 1_M_SMITH,{
  2. disable_items;
  3. mes "[Shadow Blacksmith]";
  4. mes "I'm the Armsmith.";
  5. mes "I can refine all kinds of weapons, armor and equipment, so let me";
  6. mes "know what you want me to refine.";
  7. next;
  8.  
  9. setarray .@position$[1], "Costume Head Low", "Costume Head Mid", "Costume Head Top", "Costume Head Garment", "Shadow Armor", "Shadow Weapon", "Shadow Shield", "Shadow Shoes", "Shadow Accessory Right", "Shadow Accessory Left";
  10. .@menu$ = "";
  11. for(.@i = 1; .@i <= getarraysize(.@position$); ++.@i) {
  12. .@pos = .@i + 10;
  13. if(getequipisequiped(.@pos)) {
  14. .@menu$ += .@position$[.@i] + "-" + "[" + getequipname(.@pos) + "]";
  15. .@equipped = 1;
  16. }
  17. .@menu$ += ":";
  18. }
  19. if (.@equipped == 0) {
  20. mes "[Shadow Blacksmith]";
  21. mes "I don't think I can refine any items you have...";
  22. close;
  23. }
  24. .@part = select(.@menu$) + 10;
  25.  
  26. if(!getequipisequiped(.@part)) { //custom check
  27. mes "[Shadow Blacksmith]";
  28. mes "You're not wearing";
  29. mes "anything there that";
  30. mes "I can refine.";
  31. emotion e_an;
  32. close;
  33. }
  34. //Check if the item is refinable...
  35. if(!getequipisenableref(.@part)) {
  36. mes "[Shadow Blacksmith]";
  37. mes "I don't think I can";
  38. mes "refine this item at all...";
  39. close;
  40. }
  41. //Check to see if the items is already +10
  42. if(getequiprefinerycnt(.@part) >= 10) {
  43. mes "[Shadow Blacksmith]";
  44. mes "I can't refine this";
  45. mes "any more. This is as";
  46. mes "refined as it gets!";
  47. close;
  48. }
  49. .@refineitemid = getequipid(.@part); // save id of the item
  50. .@refinerycnt = getequiprefinerycnt(.@part); //save refinery count
  51. switch(getequipweaponlv(.@part)){
  52. case 0: //Refine Armor
  53. .@price = 2000;
  54. .@material = 985;
  55. .@safe = 4;
  56. break;
  57. case 1: //Refine Level 1 Weapon
  58. .@price = 50;
  59. .@material = 1010;
  60. .@safe = 7;
  61. break;
  62. case 2: //Refine Level 2 Weapon
  63. .@price = 200;
  64. .@material = 1011;
  65. .@safe = 6;
  66. break;
  67. case 3: //Refine Level 3 Weapon
  68. .@price = 5000;
  69. .@material = 984;
  70. .@safe = 5;
  71. break;
  72. case 4: //Refine Level 4 Weapon
  73. .@price = 20000;
  74. .@material = 984;
  75. .@safe = 4;
  76. break;
  77. case 5: //Refine other stuff?
  78. .@price = 2000;
  79. .@material = 985;
  80. .@safe = 4;
  81. break;
  82. }
  83.  
  84. mes "[Shadow Blacksmith]";
  85. mes "To refine this I need";
  86. mes "one ^003366"+getitemname(.@material)+"^000000 and";
  87. mes "a service fee of " + .@price + " Zeny.";
  88. mes "Do you really wish to continue?";
  89. next;
  90. if(select("Yes:No") == 2){
  91. mes "[Shadow Blacksmith]";
  92. mes "Yeah...";
  93. mes "There's no need to";
  94. mes "rush. Take your time.";
  95. close;
  96. }
  97. if(getequippercentrefinery(.@part) < 100) {
  98. mes "[Shadow Blacksmith]";
  99. mes "Oh no! If I continue to";
  100. mes "refine this, there's a risk it could";
  101. switch(.@material) {
  102. case 985:
  103. mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000.";
  104. break;
  105. default:
  106. mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,";
  107. mes "or any added special properties.";
  108. break;
  109. }
  110. next;
  111. mes "["+getarg(0)+"]";
  112. mes "I can't make it any clearer.";
  113. mes "Once a weapon is destroyed,";
  114. mes "there's no getting it back.";
  115. mes "You really have a chance to";
  116. mes "^FF0000lose this weapon^000000 forever.";
  117. mes "Do you still want to refine?";
  118. next;
  119. if(select("Yes:No") == 2){
  120. mes "[Shadow Blacksmith]";
  121. mes "I completely agree...";
  122. mes "I might be a great refiner, but sometimes even I make mistakes.";
  123. close;
  124. }
  125. }
  126. if((countitem(.@material) < 1) || (Zeny < .@price)) {
  127. mes "[Shadow Blacksmith]";
  128. mes "You don't seem to have";
  129. mes "enough Zeny or "+getitemname(.@material)+"...";
  130. mes "Go get some more. I'll be";
  131. mes "here all day if you need me.";
  132. close;
  133. }
  134. Zeny -= .@price;
  135. delitem .@material,1;
  136.  
  137. //custom checks
  138. if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?)
  139. mes "[Shadow Blacksmith]";
  140. mes "Look here... you don't have any Items on...";
  141. close;
  142. }
  143. if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item
  144. mes "[Shadow Blacksmith]";
  145. emotion e_an;
  146. mes "Wait a second...";
  147. mes "Do you think I'm stupid?!";
  148. mes "You switched the item while I wasn't looking! Get out of here!";
  149. close;
  150. }
  151.  
  152. if(getequippercentrefinery(.@part) <= rand(100)) {
  153. failedrefitem .@part;
  154. mes "[Shadow Blacksmith]";
  155. emotion (!rand(5))?e_cash:e_omg;
  156. .@lose = rand(1,3);
  157. if (.@lose == 1) {
  158. mes "OH! MY GOD!";
  159. mes "Damn it! Not again!";
  160. mes "I'm terribly sorry, but you know practice does make perfect.";
  161. mes "Um, right? Heh heh...";
  162. } else if(.@lose == 2) {
  163. mes "Nooooooo!";
  164. mes "It broke!";
  165. mes "I-I'm sorry!";
  166. } else {
  167. mes "Crap!";
  168. mes "It couldn't take";
  169. mes "much more tempering!";
  170. mes "Sorry about this...";
  171. }
  172. close;
  173. }
  174. mes "["+getarg(0)+"]";
  175. successrefitem .@part;
  176. emotion e_heh;
  177. .@win = rand(1,3);
  178. if (.@win == 1) {
  179. mes "Perfect!";
  180. mes "Heh heh!";
  181. mes "Once again,";
  182. mes "flawless work";
  183. mes "from the master~";
  184. } else if(.@win == 2) {
  185. mes "Success...!";
  186. mes "Yet again, my amazing";
  187. mes "talent truly dazzles";
  188. mes "and shines today.";
  189. } else {
  190. mes "Heh heh!";
  191. mes "I'm all done.";
  192. mes "No doubt, my work is";
  193. mes "to your satisfaction.";
  194. mes "Sheer, utter perfection~";
  195. }
  196. close;
  197. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement