Advertisement
Lelouch17

Enchant Expert

Jan 15th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. //v1.4
  2. turbo_room,136,87,4 script Enchant Expert 100,{
  3. //Character Variables
  4. set .@geid, getequipid(9);
  5. set .@cout, countitem(.item);
  6. set .@gin$, getitemname(.item);
  7. set .@gerf, getequiprefinerycnt(9);
  8. set .@crd1, getequipcardid(9,0);
  9. set .@crd2, getequipcardid(9,1);
  10. set .@crd3, getequipcardid(9,2);
  11. set .@crd4, getequipcardid(9,3);
  12. set .@itm, 4700+((rand(5)*10)+rand(3));
  13.  
  14. mes .npc$;
  15. mes "I can endow your mid-range headgears with mystical powers, but It'll cost yah "+.pric+" "+((.pric-1)?.@gin$+"s":.@gin$)+"."; next;
  16. if(!.@cout) {
  17. mes .npc$;
  18. mes "Sorry come back when you have "+.@gin$+"(s).";
  19. close;
  20. }
  21. if(select("Yes:No")&2) {
  22. mes .npc$;
  23. mes "Alright, thanks anyways!";
  24. close;
  25. }
  26. if(.@cout<.pric) {
  27. mes .npc$;
  28. mes "I'm sorry you don't have enough "+.@gin$+"(s) to for me to endow your specticals, please come back later.";
  29. close;
  30. }
  31. if(rand(0,((100/.perc)-1))) {
  32. mes .npc$;
  33. mes "I'm sorry but I've failed you!";
  34. misceffect 155; emotion e_sob,0;
  35. delitem .item,.pric;
  36. close;
  37. }
  38.  
  39. mes .npc$;
  40. if(compare(.uit$,""+.@geid)) {
  41. delitem .item,.pric;
  42. delitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
  43. getitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@itm;
  44. misceffect .efet;
  45. mes "All done!";
  46. equip .@geid;
  47. close;
  48. }
  49. mes "I'm sorry but you need to equipped a slotted mid-range headgears before we can continue.";
  50. close;
  51.  
  52. //NPC Constants
  53. OnInit:
  54. //=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
  55. set .npc$, "[^0000FFEnchant Expert^000000]"; // NPC Name
  56. set .pric, 5; // Price
  57. set .efet, 154; // Effect Number
  58. set .item, 6242; // Item Number
  59. set .uit$, "18518,18603,18611,18609,18507,18519,2204,18591,18608,2202";// Item List
  60. set .perc, rand(50,80); // Percent
  61. /*18603(Black Devil Mask), Not included because it wasn't in my DB*/
  62. /*2286 Unslotted version of 18507*/
  63. /*2203 Unslotted version of 2204*/
  64. /*2201 Unslotted version of 2202*/
  65. //=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement