summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-08 23:28:47 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-08 23:28:47 -0300
commita4f5cbf04ffd11b5cedcaea4756e9aa1dbc00011 (patch)
tree77f72446571012d79194dd8a3089596eaf3e899a
parent33980dff1e2bb1e5c55dd58a088850ea61359c5c (diff)
downloadserverdata-a4f5cbf04ffd11b5cedcaea4756e9aa1dbc00011.tar.gz
serverdata-a4f5cbf04ffd11b5cedcaea4756e9aa1dbc00011.tar.bz2
serverdata-a4f5cbf04ffd11b5cedcaea4756e9aa1dbc00011.tar.xz
serverdata-a4f5cbf04ffd11b5cedcaea4756e9aa1dbc00011.zip
Record UDT Challenge ranking (for science)
-rw-r--r--npc/003-13/arnea.txt8
-rw-r--r--npc/functions/scoreboards.txt17
2 files changed, 25 insertions, 0 deletions
diff --git a/npc/003-13/arnea.txt b/npc/003-13/arnea.txt
index 084e8b22c..2107bda43 100644
--- a/npc/003-13/arnea.txt
+++ b/npc/003-13/arnea.txt
@@ -40,6 +40,7 @@ L_Manage:
select
l("warp back"),
rif(!'UDTf, l("begin UDT Challenge")),
+ l("UDT Challenge Ranking"),
l("cancel");
switch (@menu)
@@ -72,6 +73,11 @@ L_Manage:
closeclientdialog;
break;
case 3:
+ mesc l("All leaderboards are refreshed hourly."), 1;
+ mesc l("Your current score: @@", UDTRANK), 3;
+ HallOfUDT();
+ break;
+ case 4:
break;
}
close;
@@ -113,6 +119,8 @@ OnGladius:
setunitdata(.@mg, UDT_CRIT, (.@blv/2)+.@luk+('UDTf*2));
'UDTf+=1;
npctalk ("UDT Challenge, wave " + 'UDTf + "!");
+ if ('UDTf > UDTRANK)
+ UDTRANK='UDTf;
end;
OnInit:
diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt
index 3e6b476ab..c6735d1b6 100644
--- a/npc/functions/scoreboards.txt
+++ b/npc/functions/scoreboards.txt
@@ -39,6 +39,7 @@ OnInit:
.@nb = query_sql("select char_name, command from `atcommandlog` ORDER BY atcommand_id DESC LIMIT 15", $@hogm_name$, $@hogm_value$);
.@nb = query_sql("select name, guild_lv from `guild` WHERE `guild_id`!=1 ORDER BY guild_lv DESC LIMIT 5", $@hoguild_name$, $@hoguild_value);
.@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='CRAZYPOINTS' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@cfefe_name$, $@cfefe_value);
+ .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='UDTRANK' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@udt_name$, $@udt_value);
debugmes "Scoreboards reloaded";
end;
}
@@ -196,6 +197,22 @@ function script HallOfCandor {
return;
}
+function script HallOfUDT {
+ mes "";
+ mes l("##BHall Of UDT Challenge: TOP 10##b");
+ mes("1."+$@udt_name$[0]+" ("+$@udt_value[0]+")");
+ mes("2."+$@udt_name$[1]+" ("+$@udt_value[1]+")");
+ mes("3."+$@udt_name$[2]+" ("+$@udt_value[2]+")");
+ mes("4."+$@udt_name$[3]+" ("+$@udt_value[3]+")");
+ mes("5."+$@udt_name$[4]+" ("+$@udt_value[4]+")");
+ mes("6."+$@udt_name$[5]+" ("+$@udt_value[5]+")");
+ mes("7."+$@udt_name$[6]+" ("+$@udt_value[6]+")");
+ mes("8."+$@udt_name$[7]+" ("+$@udt_value[7]+")");
+ mes("9."+$@udt_name$[8]+" ("+$@udt_value[8]+")");
+ mes("10."+$@udt_name$[9]+" ("+$@udt_value[9]+")");
+ return;
+}
+