coin_exchange.txt 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. //===== rAthena Script =======================================
  2. //= Coin Merchants
  3. //===== By: ==================================================
  4. //= rAthena Dev Team
  5. //===== Current Version: =====================================
  6. //= 1.2
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= [Official Conversion]
  11. //= Coin redemption NPCs.
  12. //===== Additional Comments: =================================
  13. //= 1.0 First version
  14. //= 1.1 Fixed checkweight. [Gepard]
  15. //= 1.2 Optimized and merged into one file. [Euphy]
  16. //============================================================
  17. // Manuk & Splendide
  18. //============================================================
  19. - script ::merchant_13_2 -1,{
  20. set .@n$, "["+strnpcinfo(1)+"]";
  21. mes .@n$;
  22. if (isequipped(2782) && ep13_2_rhea == 100) {
  23. if (!checkweight(1201,1)) {
  24. mes "It looks like you're carrying too many things.";
  25. mes "Why not put some of your items in storage and come back?";
  26. close;
  27. }
  28. mes "Hello.";
  29. mes "What are you looking for?";
  30. next;
  31. if (strnpcinfo(1) == "Merchant of Manuk") {
  32. setarray .@Items[2],12342,12343,12348;
  33. set .@Book,11019; //Manuk_Selling_Item
  34. set .@Coin,6080; //Manuk_Coin
  35. set .@i, select("View item description:Manuk's Opportunity:Manuk's Courage:Manuk's Faith:Cancel");
  36. }
  37. else {
  38. setarray .@Items[2],12344,12345,12349;
  39. set .@Book,11018; //Splendide_Selling_Item
  40. set .@Coin,6081; //Splendide_Coin
  41. set .@i, select("View item description:Buy Pinguicula's Fruit Jam:Buy Luciola's Honey Jam:Buy Cornus' Tears:Do nothing");
  42. }
  43. mes .@n$;
  44. if (.@i == 1) {
  45. mes "Here are the item descriptions.";
  46. close2;
  47. readbook .@Book,1;
  48. end;
  49. }
  50. else if (.@i < 5) {
  51. mes "I can sell you 3 "+getitemname(.@Items[.@i])+" for ^3131FF1 coin^000000.";
  52. next;
  53. switch(select("Purchase:Do not purchase")) {
  54. case 1:
  55. if (countitem(.@Coin)) {
  56. mes .@n$;
  57. mes "Thank you for coming.";
  58. delitem .@Coin,1;
  59. getitem .@Items[.@i],3;
  60. close;
  61. }
  62. else {
  63. mes .@n$;
  64. mes "You don't have enough coins.";
  65. close;
  66. }
  67. case 2:
  68. mes .@n$;
  69. break;
  70. }
  71. }
  72. mes "Come again if you change your mind.";
  73. close;
  74. }
  75. else {
  76. if (strnpcinfo(1) == "Merchant of Manuk") {
  77. mes "Rtt od d";
  78. mes "Qwo hd is d irr";
  79. }
  80. else {
  81. mes "BurWehAla";
  82. mes "tasnarAndu Ie Ru";
  83. }
  84. close;
  85. }
  86. }
  87. man_in01,286,16,1 duplicate(merchant_13_2) Merchant of Manuk 454
  88. spl_in01,110,326,5 duplicate(merchant_13_2) Merchant of Splendide 439