root/npc/other/arena/arena_point.txt @ 1

Revision 1, 5.6 kB (checked in by jinshiro, 17 years ago)
RevLine 
[1]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
16prt_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.";
23        next;
24        switch(select("Point Check:Convert Points:^660000Conversion Info^000000")) {
25        case 1:
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.";
31                close;
32        case 2:
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.";
38                next;
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.";
45                next;
46                switch(select("2 TP -> 1 AP:4 TP -> 2 AP:6 TP -> 3 AP:8 TP -> 4 AP:10 TP and more:Cancel")) {
47                case 1:
48                        callsub S_ExchangePoints,28999,2,1;
49                case 2:
50                        callsub S_ExchangePoints,28998,4,2;
51                case 3:
52                        callsub S_ExchangePoints,28997,6,2;
53                case 4:
54                        callsub S_ExchangePoints,28996,8,4;
55                case 5:
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.''";
63                        next;
64                        input .@input;
65                        if (.@input == 0) {
66                                mes "[Arena Point Manager]";
67                                mes "You have";
68                                mes "canceled";
69                                mes "this service.";
70                                close;
71                        }
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.";
77                                close;
78                        }
79                        else {
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.";
92                                        next;
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.";
98                                        close;
99                                }
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.";
107                                        close;
108                                }
109                                else {
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;
118                                        next;
119                                        mes "[Arena Point Manager]";
120                                        mes "" + strcharinfo(0) + ",";
121                                        mes "you now have";
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.";
125                                        close;
126                                }
127                        }
128                case 6:
129                        mes "[Arena Point Manager]";
130                        mes "You have";
131                        mes "canceled";
132                        mes "this service.";
133                        close;
134                }
135        case 3:
136                // Again. no dialog for this option.
137                close;
138        }
139        close;
140
141S_ExchangePoints:
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.";
150                next;
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.";
156                close;
157        }
158        if (tt_point >= getarg(1)) {
159                mes "[Arena Point Manager]";
160                mes "" + strcharinfo(0) + ",";
161                mes "you've converted "+getarg(1)+" Track";
162                mes "Points into "+getarg(2)+" Arena Point.";
163                set tt_point,tt_point-getarg(1);
164                set arena_point,arena_point+getarg(2);
165                next;
166                mes "[Arena Point Manager]";
167                mes "" + strcharinfo(0) + ",";
168                mes "you now have";
169                mes "^4682B4" + arena_point + "^000000 Arena Points";
170                mes "and ^00688B" + tt_point + "^000000 Turbo Track Points.";
171                mes "Thank you for your patronage.";
172                close;
173        }
174        else {
175                mes "[Arena Point Manager]";
176                mes "I'm sorry, but you don't have";
177                mes "enough Turbo Track Points.";
178                mes "You need at least 2 Turbo Track Points for this conversion service.";
179                close;
180        }
181}
Note: See TracBrowser for help on using the browser.