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