summaryrefslogtreecommitdiff
path: root/npc/other
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-31 15:55:25 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-31 15:55:25 +0000
commit63c083ffc7f186576d69158f6e1ff7f3c893d7b3 (patch)
treec0de7e1a76b3fb8d50411e39d27da37f608d7f9d /npc/other
parent5792a98ec3a549d28037c65465db8c64e009823d (diff)
downloadhercules-63c083ffc7f186576d69158f6e1ff7f3c893d7b3.tar.gz
hercules-63c083ffc7f186576d69158f6e1ff7f3c893d7b3.tar.bz2
hercules-63c083ffc7f186576d69158f6e1ff7f3c893d7b3.tar.xz
hercules-63c083ffc7f186576d69158f6e1ff7f3c893d7b3.zip
* Added Turbo Track point exchanger to arena.
* Slightly optimized the existing Arena point exchanger. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11626 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/other')
-rw-r--r--npc/other/arena/arena_point.txt181
-rw-r--r--npc/other/turbotrack/Turbo_Track.txt163
2 files changed, 221 insertions, 123 deletions
diff --git a/npc/other/arena/arena_point.txt b/npc/other/arena/arena_point.txt
new file mode 100644
index 000000000..7aeab9994
--- /dev/null
+++ b/npc/other/arena/arena_point.txt
@@ -0,0 +1,181 @@
+//===== eAthena Script =======================================
+//= Point Exchanger
+//===== By: ==================================================
+//= L0ne_W0lf
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= [Aegis Conversion]
+//= Point exchanger: Turbo track points -> Arena Points
+//===== Additional Comments: =================================
+//= 1.0 First version. [L0ne_W0lf]
+//============================================================
+
+prt_are_in,103,11,3 script Arena Point Manager 732,{
+ mes "[Arena Point Manager]";
+ mes "I hope you're having a good";
+ mes "time in the Arena. If you've";
+ mes "earned Turbo Track Points at";
+ mes "Al De Baran's Turbo Track, I can,";
+ mes "convert them into Arena Points.";
+ next;
+ switch(select("Point Check:Convert Points:^660000Conversion Info^000000")) {
+ case 1:
+ mes "[Arena Point Manager]";
+ mes "" + strcharinfo(0) + ",";
+ mes "you currently have";
+ mes "" + arena_point + " Arena Points";
+ mes "and " + tt_point + " Turbo Track Points.";
+ close;
+ case 2:
+ mes "[Arena Point Manager]";
+ mes "" + strcharinfo(0) + ",";
+ mes "you currently have";
+ mes "" + arena_point + " Arena Points";
+ mes "and " + tt_point + " Turbo Track Points.";
+ next;
+ mes "[Arena Point Manager]";
+ mes "Please choose from among";
+ mes "the Track Point to Arena Point";
+ mes "conversions. Keep in mind that";
+ mes "when you convert more than 10";
+ mes "Track Points at one time, you can only convert in ^4D4DFFmultiples of 10^000000.";
+ next;
+ switch(select("2 TP -> 1 AP:4 TP -> 2 AP:6 TP -> 3 AP:8 TP -> 4 AP:10 TP and more:Cancel")) {
+ case 1:
+ callsub S_ExchangePoints,28999,2,1;
+ case 2:
+ callsub S_ExchangePoints,28998,4,2;
+ case 3:
+ callsub S_ExchangePoints,28997,6,2;
+ case 4:
+ callsub S_ExchangePoints,28996,8,4;
+ case 5:
+ mes "[Arena Point Manager]";
+ mes "Please enter the number";
+ mes "of times you wish to convert";
+ mes "10 Turbo Track Points into";
+ mes "Arena Points. The largest";
+ mes "value you may enter is 20.";
+ mes "To cancel, enter ''^3355FF0^000000.''";
+ next;
+ input .@input;
+ if (.@input == 0) {
+ mes "[Arena Point Manager]";
+ mes "You have";
+ mes "canceled";
+ mes "this service.";
+ close;
+ }
+ else if (.@input > 20) {
+ mes "[Arena Point Manager]";
+ mes "Your request exceeds";
+ mes "the maximum limit. Please";
+ mes "enter a value no greater than 20.";
+ close;
+ }
+ else {
+ set .@want_point1,10 * .@input;
+ set .@want_point,5 * .@input;
+ set .@my_arena_all,arena_point + .@want_point;
+ set .@my_turbo_all,tt_point - .@want_point1;
+ if (.@my_arena_all > 28999) {
+ mes "[Arena Point Manager]";
+ mes "You will exceed the";
+ mes "maximum amount of";
+ mes "Arena Points if we proceed";
+ mes "with this conversion of your";
+ mes "Turbo Track Points. You cannot";
+ mes "have more than 29,000 Arena Points.";
+ next;
+ mes "[Arena Point Manager]";
+ mes "Please spend some of";
+ mes "your Arena Points before";
+ mes "using this service again.";
+ mes "Thank you for your patronage.";
+ close;
+ }
+ if (.@my_turbo_all < 0) {
+ mes "[Arena Point Manager]";
+ mes "I'm sorry, but";
+ mes "you don't have enough";
+ mes "Turbo Track Points to";
+ mes "perform this Arena";
+ mes "Point conversion.";
+ close;
+ }
+ else {
+ mes "[Arena Point Manager]";
+ mes "You have converted";
+ mes "10 Turbo Track Points";
+ mes "into 5 Arena Points " + .@input + " times.";
+ mes "A total of " + .@want_point1 + " Turbo Track Points were converted into";
+ mes "" + .@want_point +" Arena Points.";
+ set tt_point,tt_point - .@want_point1;
+ set arena_point,arena_point+.@want_point;
+ next;
+ mes "[Arena Point Manager]";
+ mes "" + strcharinfo(0) + ",";
+ mes "you now have";
+ mes "^4682B4" + arena_point + "^000000 Arena Points";
+ mes "and ^00688B" + tt_point + "^000000 Turbo Track Points.";
+ mes "Thank you for your patronage.";
+ close;
+ }
+ }
+ case 6:
+ mes "[Arena Point Manager]";
+ mes "You have";
+ mes "canceled";
+ mes "this service.";
+ close;
+ }
+ case 3:
+ // Again. no dialog for this option.
+ close;
+ }
+ close;
+
+S_ExchangePoints:
+ if (arena_point > getarg(0) ) {
+ mes "[Arena Point Manager]";
+ mes "You will exceed the";
+ mes "maximum amount of";
+ mes "Arena Points if we proceed";
+ mes "with this conversion of your";
+ mes "Turbo Track Points. You cannot";
+ mes "have more than 29,000 Arena Points.";
+ next;
+ mes "[Arena Point Manager]";
+ mes "Please spend some of";
+ mes "your Arena Points before";
+ mes "using this service again.";
+ mes "Thank you for your patronage.";
+ close;
+ }
+ if (tt_point >= getarg(1)) {
+ mes "[Arena Point Manager]";
+ mes "" + strcharinfo(0) + ",";
+ mes "you've converted "+getarg(1)+" Track";
+ mes "Points into "+getarg(2)+" Arena Point.";
+ set tt_point,tt_point-getarg(1);
+ set arena_point,arena_point+getarg(2);
+ next;
+ mes "[Arena Point Manager]";
+ mes "" + strcharinfo(0) + ",";
+ mes "you now have";
+ mes "^4682B4" + arena_point + "^000000 Arena Points";
+ mes "and ^00688B" + tt_point + "^000000 Turbo Track Points.";
+ mes "Thank you for your patronage.";
+ close;
+ }
+ else {
+ mes "[Arena Point Manager]";
+ mes "I'm sorry, but you don't have";
+ mes "enough Turbo Track Points.";
+ mes "You need at least 2 Turbo Track Points for this conversion service.";
+ close;
+ }
+}
diff --git a/npc/other/turbotrack/Turbo_Track.txt b/npc/other/turbotrack/Turbo_Track.txt
index 26ea8f910..90481a9b5 100644
--- a/npc/other/turbotrack/Turbo_Track.txt
+++ b/npc/other/turbotrack/Turbo_Track.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.1
+//= 1.3
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -14,6 +14,7 @@
//= 1.1 Fixed exp rewarding working backwards.[L0ne_W0lf]
//= Fixed a bug in the while loop in the guide.
//= 1.2 Fix to prevent point converter from hanging. [L0ne_W0lf]
+//= 1.3 Slight optimization to the point exchanger. [L0ne_W0lf]
//============================================================
turbo_room,130,92,3 script Kafra Staff#tt 115,{
@@ -838,7 +839,7 @@ turbo_room,93,117,5 script Point Exchange Helper 125,{
}
}
-turbo_room,106,117,3 script Point Manager 833,{
+turbo_room,106,117,3 script Point Manager#tt 833,{
mes "[Turbo Track Point Manager]";
mes "Good day.";
mes "Did you enjoy your";
@@ -869,129 +870,13 @@ turbo_room,106,117,3 script Point Manager 833,{
next;
switch(select("2 AP -> 1 TTP:4 AP -> 2 TTP:6 AP -> 3 TTP:8 AP -> 4 TTP:10 AP or more:Cancel")) {
case 1:
- if (tt_point > 28999 ) {
- mes "[Turbo Track Point Manager]";
- mes "Unfortunately, your Turbo Track Points will exceed the maximum limit if we proceed with point conversion. Please spend more";
- mes "of your Turbo Track Points before using this service. Thank you.";
- close;
- }
- if (arena_point > 1) {
- mes "[Turbo Track Point Manager]";
- mes "As requested,";
- mes "2 Arena Points";
- mes "have been converted";
- mes "into 1 Turbo Track Point.";
- set arena_point,arena_point-2;
- set tt_point,tt_point+1;
- next;
- mes "[Turbo Track Point Manager]";
- mes "" + strcharinfo(0) + ",";
- mes "you now have";
- mes "^00688B" + tt_point + "^000000 Turbo Track Points";
- mes "and ^4682B4" + arena_point + "^000000 Arena Points.";
- mes "Thank you for your patronage.";
- close;
- }
- else {
- mes "[Turbo Track Point Manager]";
- mes "I'm sorry, but you do not have enough Arena Points. You need";
- mes "at least 2 Arena Points in order";
- mes "to use this service.";
- close;
- }
+ callsub S_ExchangePoints,28999,2,1;
case 2:
- if (tt_point > 28998 ) {
- mes "[Turbo Track Point Manager]";
- mes "Unfortunately, your Turbo Track Points will exceed the maximum limit if we proceed with point conversion. Please spend more";
- mes "of your Turbo Track Points before using this service. Thank you.";
- close;
- }
- if (arena_point > 3) {
- mes "[Turbo Track Point Manager]";
- mes "As requested,";
- mes "4 Arena Points";
- mes "have been converted";
- mes "into 2 Turbo Track Points.";
- set arena_point,arena_point-4;
- set tt_point,tt_point+2;
- next;
- mes "[Turbo Track Point Manager]";
- mes "" + strcharinfo(0) + ",";
- mes "you now have";
- mes "^00688B" + tt_point + "^000000 Turbo Track Points";
- mes "and ^4682B4" + arena_point + "^000000 Arena Points.";
- mes "Thank you for your patronage.";
- close;
- }
- else {
- mes "[Turbo Track Point Manager]";
- mes "I'm sorry, but you do not have enough Arena Points. You need";
- mes "at least 4 Arena Points in order";
- mes "to use this service.";
- close;
- }
+ callsub S_ExchangePoints,28998,4,2;
case 3:
- if (tt_point > 28997 ) {
- mes "[Turbo Track Point Manager]";
- mes "Unfortunately, your Turbo Track Points will exceed the maximum limit if we proceed with point conversion. Please spend more";
- mes "of your Turbo Track Points before using this service. Thank you.";
- close;
- }
- if (arena_point > 5) {
- mes "[Turbo Track Point Manager]";
- mes "As requested,";
- mes "6 Arena Points";
- mes "have been converted";
- mes "into 3 Turbo Track Points.";
- set arena_point,arena_point-6;
- set tt_point,tt_point+3;
- next;
- mes "[Turbo Track Point Manager]";
- mes "" + strcharinfo(0) + ",";
- mes "you now have";
- mes "^00688B" + tt_point + "^000000 Turbo Track Points";
- mes "and ^4682B4" + arena_point + "^000000 Arena Points.";
- mes "Thank you for your patronage.";
- close;
- }
- else {
- mes "[Turbo Track Point Manager]";
- mes "I'm sorry, but you do not have enough Arena Points. You need";
- mes "at least 6 Arena Points in order";
- mes "to use this service.";
- close;
- }
+ callsub S_ExchangePoints,28997,6,2;
case 4:
- if (tt_point > 28996 ) {
- mes "[Turbo Track Point Manager]";
- mes "Unfortunately, your Turbo Track Points will exceed the maximum limit if we proceed with point conversion. Please spend more";
- mes "of your Turbo Track Points before using this service. Thank you.";
- close;
- }
- if (arena_point > 7) {
- mes "[Turbo Track Point Manager]";
- mes "As requested,";
- mes "8 Arena Points";
- mes "have been converted";
- mes "into 4 Turbo Track Points.";
- set arena_point,arena_point-8;
- set tt_point,tt_point+4;
- next;
- mes "[Turbo Track Point Manager]";
- mes "" + strcharinfo(0) + ",";
- mes "you now have";
- mes "^00688B" + tt_point + "^000000 Turbo Track Points";
- mes "and ^4682B4" + arena_point + "^000000 Arena Points.";
- mes "Thank you for your patronage.";
- close;
- }
- else {
- mes "[Turbo Track Point Manager]";
- mes "I'm sorry, but you do not have enough Arena Points. You need";
- mes "at least 8 Arena Points in order";
- mes "to use this service.";
- close;
- }
+ callsub S_ExchangePoints,28996,8,4;
case 5:
mes "[Turbo Track Point Manager]";
mes "Please enter the number of times you wish to convert 10 Arena Points into Turbo Track Points. The largest value you may enter";
@@ -1005,7 +890,7 @@ turbo_room,106,117,3 script Point Manager 833,{
mes "your request.";
close;
}
- else if (.@input > 20 || .@input < 0) {
+ else if (.@input > 20) {
mes "[Turbo Track Point Manager]";
mes "Your request exceeds";
mes "the maximum limit. Please";
@@ -1064,6 +949,38 @@ turbo_room,106,117,3 script Point Manager 833,{
// the dialog was never translated. XD
close;
}
+
+S_ExchangePoints:
+ if (tt_point > getarg(0)) {
+ mes "[Turbo Track Point Manager]";
+ mes "Unfortunately, your Turbo Track Points will exceed the maximum limit if we proceed with point conversion. Please spend more";
+ mes "of your Turbo Track Points before using this service. Thank you.";
+ close;
+ }
+ if (arena_point >= getarg(1)) {
+ mes "[Turbo Track Point Manager]";
+ mes "As requested,";
+ mes "2 Arena Points";
+ mes "have been converted";
+ mes "into 1 Turbo Track Point.";
+ set arena_point,arena_point-getarg(1);
+ set tt_point,tt_point+getarg(2);
+ next;
+ mes "[Turbo Track Point Manager]";
+ mes "" + strcharinfo(0) + ",";
+ mes "you now have";
+ mes "^00688B" + tt_point + "^000000 Turbo Track Points";
+ mes "and ^4682B4" + arena_point + "^000000 Arena Points.";
+ mes "Thank you for your patronage.";
+ close;
+ }
+ else {
+ mes "[Turbo Track Point Manager]";
+ mes "I'm sorry, but you do not have enough Arena Points. You need";
+ mes "at least 2 Arena Points in order";
+ mes "to use this service.";
+ close;
+ }
}
alde_gld,183,204,0 script en_turbo 45,1,1,{