summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-02-21 05:03:38 -0300
committerJesusaves <cpntb1@ymail.com>2022-02-21 05:03:38 -0300
commit039a18fa891a78f17dd89e4f92874060cc996fe0 (patch)
tree07d52cbfe3fdf3d585f638702974266fbd1b71c2 /npc/functions
parent4df11ecb05284d21f9ea00f88257630f2ea0472e (diff)
downloadserverdata-039a18fa891a78f17dd89e4f92874060cc996fe0.tar.gz
serverdata-039a18fa891a78f17dd89e4f92874060cc996fe0.tar.bz2
serverdata-039a18fa891a78f17dd89e4f92874060cc996fe0.tar.xz
serverdata-039a18fa891a78f17dd89e4f92874060cc996fe0.zip
Fix some bad Olympics code
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/aurora.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index bcd50376a..d9dcd9580 100644
--- a/npc/functions/aurora.txt
+++ b/npc/functions/aurora.txt
@@ -130,7 +130,6 @@ function script FYNewEvent {
kamibroadcast("Kamelot Season is now open!", "Aurora Events");
break;
case 8:
- // FIXME: PLACEHOLDER => Magic Olympics
$EVENT$="Olympics";
callfunc("FYEConf_Olympics");
kamibroadcast("Magic Olympics are now open!", "Aurora Events");
@@ -738,7 +737,17 @@ function script FYRewardEvent {
if (FYEventUsesRanking()) {
debugmes("Rewards are due");
// This code absolutely can't fail:
- .@nb = query_sql("SELECT c.name, i.count2, c.char_id FROM `quest` AS i, `char` AS c WHERE i.quest_id="+Q_AuroraEvent+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 10", $@aurora_name$, $@aurora_value, $@aurora_charid);
+ if ($EVENT$ == "Olympics") {
+ callfunc("HocusScoreNew");
+ copyarray $@aurora_name$, $@moly_n$, 10;
+ copyarray $@aurora_value, $@moly_v, 10;
+ for (.@i=0; .@i < 10; .@i++) {
+ if ($@aurora_name$[.@i] == "") break;
+ $@aurora_charid[.@i] = gf_charnameid($@aurora_name$[.@i]);
+ }
+ } else {
+ .@nb = query_sql("SELECT c.name, i.count2, c.char_id FROM `quest` AS i, `char` AS c WHERE i.quest_id="+Q_AuroraEvent+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 10", $@aurora_name$, $@aurora_value, $@aurora_charid);
+ }
$MOST_HEROIC$=$@aurora_name$[0];
for (.@i=0;.@i < getarraysize($@aurora_charid);.@i++) {
switch (.@i+1) {