Advertisement
Guest User

Untitled

a guest
May 21st, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.86 KB | None | 0 0
  1. trinity_in,166,143,2 script Armor Craftsman 58,{
  2.  
  3. disable_items;
  4. deletearray @inventorylist_id[0], getarraysize(@inventorylist_id);
  5. getinventorylist;
  6. mes "[Armor Craftsman]";
  7. mes "I've been studying ways to improve armor to increase its real capacity.";
  8. next;
  9. mes "[Armor Craftsman]";
  10. mes "Enchant is an amazing ability blowing a mysterious power hidden in a space of armor.";
  11. next;
  12. mes "[Armor Craftsman]";
  13. mes "One minute, please, I will check your items.";
  14. for (set .@i,0; .@i <= @inventorylist_count; set .@i,.@i+1) {
  15. for (set .@j,0; .@j < getarraysize(.armaduras); set .@j,.@j+1) {
  16. if ((@inventorylist_id[.@i] > 0) && (.armaduras[.@j] > 0) && (@inventorylist_id[.@i] == .armaduras[.@j])) {
  17. if (countitem(@inventorylist_id[.@i]) >= 2) {
  18. next;
  19. mes "[Armor Craftsman]";
  20. mes "I notice that you more of a (a) "+getitemname(@inventorylist_id[.@i])+" in your inventory.";
  21. next;
  22. mes "[Armor Craftsman]";
  23. mes "For the spell to occur with total security, ie no risk of damaging your item ask you to carry only one of each armor type.";
  24. next;
  25. mes "[Armor Craftsman]";
  26. mes "Well, remove these armor parts of your inventory and get back here with me!";
  27. mes "I will await your return!";
  28. close;
  29. } else {
  30. if (@inventorylist_attribute[.@i]) {
  31. next;
  32. mes "[Armor Craftsman]";
  33. mes "I see that you have a broken armor ...";
  34. mes "To perform this procedure, you must bring me the items in perfect condition, ok?";
  35. close;
  36. } else {
  37. set .@k,.@k+1;
  38. set .@menu$, .@menu$+getitemname(@inventorylist_id[.@i])+(getiteminfo(@inventorylist_id[.@i],10) ? " [1]:":":");
  39. set .@armadlista[.@k],@inventorylist_id[.@i];
  40. set .@refine[.@k],@inventorylist_refine[.@i];
  41. set .@carta[.@k],@inventorylist_card1[.@i];
  42. set .@runa[.@k],@inventorylist_card4[.@i];
  43. set .@j,getarraysize(.armaduras);
  44. }
  45. }
  46. }
  47. }
  48. sleep2 1;
  49. }
  50. next;
  51. mes "[Armor Craftsman]";
  52. if (!.@k) {
  53. mes "Hmm? There is nothing to be enchanted!";
  54. mes "Please come with only ONE device to enchant.";
  55. close;
  56. } else {
  57. mes "Choose one of the armors listed below so we can progressir with this enchantment.";
  58. next;
  59. set .@armadesc,select(.@menu$+"Nothing.");
  60. mes "[Armor Craftsman]";
  61. if (.@armadesc > .@k) {
  62. mes "Please come back when you have some interest in enchant your armor.";
  63. close;
  64. } else {
  65. mes "I will now check if you have some rune to enchant your armor.";
  66. mes " ";
  67. mes "One minute, please.";
  68. set .@menu$,"";
  69. set .@j,0;
  70. for (set .@i,0; .@i < getarraysize(.runas); set .@i,.@i+1) {
  71. if (countitem(.runas[.@i])) {
  72. set .@j,.@j+1;
  73. set .@menu$, .@menu$+getitemname(.runas[.@i])+":";
  74. set .@runalista[.@j],.runas[.@i];
  75. }
  76. sleep2 1;
  77. }
  78. next;
  79. mes "[Armor Craftsman]";
  80. if (!.@j) {
  81. mes "You must bring me some rune power to do the spell.";
  82. close;
  83. } else {
  84. mes "What kind of enchantment you want to this armor?";
  85. next;
  86. set .@runaesc,select(.@menu$+"Nothing.");
  87. if (.@runaesc > .@j) {
  88. mes "[Armor Craftsman]";
  89. mes "Please come back when you have some interest in enchanting your armor.";
  90. close;
  91. } else {
  92. mes "[Armor Craftsman]";
  93. if (.@runa[.@armadesc])
  94. mes "(a) "+getitemname(.@armadlista[.@armadesc])+" already has a charming "+getitemname(.@runa[.@armadesc])+", if you enchant this item with "+getitemname(.@runalista[.@runaesc])+" that consume and ancient enchantment will be missed.";
  95. else
  96. mes "This spell will cost A "+getitemname(.@runalista[.@runaesc])+".";
  97. next;
  98. if(select("Hmm .. Let me think about it.: Go ahead.") == 1) {
  99. mes "[Armor Craftsman]";
  100. mes "Well, I can not blame him. My cost is not of the lower, but I need to pay for my studies and efforts, right?";
  101. mes "Have a nice day.";
  102. close;
  103. } else {
  104. mes "[Armor Craftsman]";
  105. mes "So, an adventurer willing to increase its power, huh?";
  106. mes "Well, let the enchantment";
  107. pcblockmove getcharid(3),1;
  108. close2;
  109. delitem .@runalista[.@runaesc],1;
  110. delitem .@armadlista[.@armadesc],1;
  111. specialeffect 873;
  112. specialeffect 865;
  113. sleep2 6000;
  114. specialeffect 44;
  115. sleep2 1000;
  116. getitem2 .@armadlista[.@armadesc],1,1,.@refine[.@armadesc],0,.@carta[.@armadesc],0,0,.@runalista[.@runaesc];
  117. pcblockmove getcharid(3),0;
  118. end;
  119. }
  120. }
  121. }
  122. }
  123. }
  124.  
  125. OnInit:
  126. setarray .armaduras[0],20178,20181,2307,13450,2309,2314,2316,2321,2325,2327,2328,2330,2332,2334,2335,2341,2344,2346,2348,2350,2337,2386,2394,2395,2396,2311,2318,2319,2320,2308,2310,2315,2317,2322,2324,2326,2331,2333,2336,2342,2345,2347,2349,2351,2364,2365,2391,2374,2375,2376,2377,2378,2379,2380,2381,2382,2387,2388,2389,2390;
  127. setarray .runas[0],26000,26027,26037,26038,26039;
  128. end;
  129. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement