arena_point.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. //===== eAthena Script =======================================
  2. //= Point Exchanger
  3. //===== By: ==================================================
  4. //= L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= eAthena SVN
  9. //===== Description: =========================================
  10. //= [Aegis Conversion]
  11. //= Point exchanger: Turbo track points -> Arena Points
  12. //===== Additional Comments: =================================
  13. //= 1.0 First version. [L0ne_W0lf]
  14. //============================================================
  15. prt_are_in,103,11,3 script Arena Point Manager 732,{
  16. mes "[Arena Point Manager]";
  17. mes "I hope you're having a good";
  18. mes "time in the Arena. If you've";
  19. mes "earned Turbo Track Points at";
  20. mes "Al De Baran's Turbo Track, I can,";
  21. mes "convert them into Arena Points.";
  22. next;
  23. switch(select("Point Check:Convert Points:^660000Conversion Info^000000")) {
  24. case 1:
  25. mes "[Arena Point Manager]";
  26. mes "" + strcharinfo(0) + ",";
  27. mes "you currently have";
  28. mes "" + arena_point + " Arena Points";
  29. mes "and " + tt_point + " Turbo Track Points.";
  30. close;
  31. case 2:
  32. mes "[Arena Point Manager]";
  33. mes "" + strcharinfo(0) + ",";
  34. mes "you currently have";
  35. mes "" + arena_point + " Arena Points";
  36. mes "and " + tt_point + " Turbo Track Points.";
  37. next;
  38. mes "[Arena Point Manager]";
  39. mes "Please choose from among";
  40. mes "the Track Point to Arena Point";
  41. mes "conversions. Keep in mind that";
  42. mes "when you convert more than 10";
  43. mes "Track Points at one time, you can only convert in ^4D4DFFmultiples of 10^000000.";
  44. next;
  45. switch(select("2 TP -> 1 AP:4 TP -> 2 AP:6 TP -> 3 AP:8 TP -> 4 AP:10 TP and more:Cancel")) {
  46. case 1:
  47. callsub S_ExchangePoints,28999,2,1;
  48. case 2:
  49. callsub S_ExchangePoints,28998,4,2;
  50. case 3:
  51. callsub S_ExchangePoints,28997,6,2;
  52. case 4:
  53. callsub S_ExchangePoints,28996,8,4;
  54. case 5:
  55. mes "[Arena Point Manager]";
  56. mes "Please enter the number";
  57. mes "of times you wish to convert";
  58. mes "10 Turbo Track Points into";
  59. mes "Arena Points. The largest";
  60. mes "value you may enter is 20.";
  61. mes "To cancel, enter ''^3355FF0^000000.''";
  62. next;
  63. input .@input;
  64. if (.@input == 0) {
  65. mes "[Arena Point Manager]";
  66. mes "You have";
  67. mes "canceled";
  68. mes "this service.";
  69. close;
  70. }
  71. else if (.@input > 20) {
  72. mes "[Arena Point Manager]";
  73. mes "Your request exceeds";
  74. mes "the maximum limit. Please";
  75. mes "enter a value no greater than 20.";
  76. close;
  77. }
  78. else {
  79. set .@want_point1,10 * .@input;
  80. set .@want_point,5 * .@input;
  81. set .@my_arena_all,arena_point + .@want_point;
  82. set .@my_turbo_all,tt_point - .@want_point1;
  83. if (.@my_arena_all > 28999) {
  84. mes "[Arena Point Manager]";
  85. mes "You will exceed the";
  86. mes "maximum amount of";
  87. mes "Arena Points if we proceed";
  88. mes "with this conversion of your";
  89. mes "Turbo Track Points. You cannot";
  90. mes "have more than 29,000 Arena Points.";
  91. next;
  92. mes "[Arena Point Manager]";
  93. mes "Please spend some of";
  94. mes "your Arena Points before";
  95. mes "using this service again.";
  96. mes "Thank you for your patronage.";
  97. close;
  98. }
  99. if (.@my_turbo_all < 0) {
  100. mes "[Arena Point Manager]";
  101. mes "I'm sorry, but";
  102. mes "you don't have enough";
  103. mes "Turbo Track Points to";
  104. mes "perform this Arena";
  105. mes "Point conversion.";
  106. close;
  107. }
  108. else {
  109. mes "[Arena Point Manager]";
  110. mes "You have converted";
  111. mes "10 Turbo Track Points";
  112. mes "into 5 Arena Points " + .@input + " times.";
  113. mes "A total of " + .@want_point1 + " Turbo Track Points were converted into";
  114. mes "" + .@want_point +" Arena Points.";
  115. set tt_point,tt_point - .@want_point1;
  116. set arena_point,arena_point+.@want_point;
  117. next;
  118. mes "[Arena Point Manager]";
  119. mes "" + strcharinfo(0) + ",";
  120. mes "you now have";
  121. mes "^4682B4" + arena_point + "^000000 Arena Points";
  122. mes "and ^00688B" + tt_point + "^000000 Turbo Track Points.";
  123. mes "Thank you for your patronage.";
  124. close;
  125. }
  126. }
  127. case 6:
  128. mes "[Arena Point Manager]";
  129. mes "You have";
  130. mes "canceled";
  131. mes "this service.";
  132. close;
  133. }
  134. case 3:
  135. // Again. no dialog for this option.
  136. close;
  137. }
  138. close;
  139. S_ExchangePoints:
  140. if (arena_point > getarg(0) ) {
  141. mes "[Arena Point Manager]";
  142. mes "You will exceed the";
  143. mes "maximum amount of";
  144. mes "Arena Points if we proceed";
  145. mes "with this conversion of your";
  146. mes "Turbo Track Points. You cannot";
  147. mes "have more than 29,000 Arena Points.";
  148. next;
  149. mes "[Arena Point Manager]";
  150. mes "Please spend some of";
  151. mes "your Arena Points before";
  152. mes "using this service again.";
  153. mes "Thank you for your patronage.";
  154. close;
  155. }
  156. if (tt_point >= getarg(1)) {
  157. mes "[Arena Point Manager]";
  158. mes "" + strcharinfo(0) + ",";
  159. mes "you've converted "+getarg(1)+" Track";
  160. mes "Points into "+getarg(2)+" Arena Point.";
  161. set tt_point,tt_point-getarg(1);
  162. set arena_point,arena_point+getarg(2);
  163. next;
  164. mes "[Arena Point Manager]";
  165. mes "" + strcharinfo(0) + ",";
  166. mes "you now have";
  167. mes "^4682B4" + arena_point + "^000000 Arena Points";
  168. mes "and ^00688B" + tt_point + "^000000 Turbo Track Points.";
  169. mes "Thank you for your patronage.";
  170. close;
  171. }
  172. else {
  173. mes "[Arena Point Manager]";
  174. mes "I'm sorry, but you don't have";
  175. mes "enough Turbo Track Points.";
  176. mes "You need at least 2 Turbo Track Points for this conversion service.";
  177. close;
  178. }
  179. }