diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-01-14 10:55:31 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-01-14 10:55:31 -0300 |
commit | 88907fba36dc6559ede5bd1c1d4977eefc0a5819 (patch) | |
tree | 99b7da5971471d0c1acf24a4a20cc34c1c0b2576 /npc | |
parent | 0c89664363cd75d758b1b590329265408de167ea (diff) | |
download | serverdata-88907fba36dc6559ede5bd1c1d4977eefc0a5819.tar.gz serverdata-88907fba36dc6559ede5bd1c1d4977eefc0a5819.tar.bz2 serverdata-88907fba36dc6559ede5bd1c1d4977eefc0a5819.tar.xz serverdata-88907fba36dc6559ede5bd1c1d4977eefc0a5819.zip |
Magic Olympics Tuition workaround
Diffstat (limited to 'npc')
-rw-r--r-- | npc/001-14/hocus.txt | 15 | ||||
-rw-r--r-- | npc/commands/titulate.txt | 69 | ||||
-rw-r--r-- | npc/functions/aurora.txt | 14 |
3 files changed, 88 insertions, 10 deletions
diff --git a/npc/001-14/hocus.txt b/npc/001-14/hocus.txt index e1d1e886b..078892283 100644 --- a/npc/001-14/hocus.txt +++ b/npc/001-14/hocus.txt @@ -54,18 +54,19 @@ function showScores { mesc l("Reminder: "), 1; mesc l("Scores are updated every 6 hours."), 1; next; - parseScores("Energy Balls Challenge", "$@moly01_n$", "$@moly01_v"); - parseScores("Boss Fight Challenge", "$@moly02_n$", "$@moly02_v", 0); - parseScores("Fluffy Hunt Challenge", "$@moly03_n$", "$@moly03_v"); + //parseScores("Energy Balls Challenge", "$@moly01_n$", "$@moly01_v"); + //parseScores("Boss Fight Challenge", "$@moly02_n$", "$@moly02_v", 0); + //parseScores("Fluffy Hunt Challenge", "$@moly03_n$", "$@moly03_v"); parseScores("Chanting Challenge", "$@moly04_n$", "$@moly04_v"); parseScores("Alchemy Master Challenge", "$@moly05_n$", "$@moly05_v"); - parseScores("Magic Power Challenge", "$@moly06_n$", "$@moly06_v"); + //parseScores("Magic Power Challenge", "$@moly06_n$", "$@moly06_v"); parseScores("Mana Exp Challenge", "$@moly07_n$", "$@moly07_v"); - parseScores("Obstacle Race Challenge", "$@moly08_n$", "$@moly08_v", t()); - parseScores("Hocus Commands Challenge", "$@moly09_n$", "$@moly09_v"); - parseScores("Survive! Challenge", "$@moly10_n$", "$@moly10_v", t()); + //parseScores("Obstacle Race Challenge", "$@moly08_n$", "$@moly08_v", t()); + //parseScores("Hocus Commands Challenge", "$@moly09_n$", "$@moly09_v"); + //parseScores("Survive! Challenge", "$@moly10_n$", "$@moly10_v", t()); parseScores("Friendship Challenge", "$@moly11_n$", "$@moly11_v"); parseScores("Intensive Mage Challenge", "$@moly12_n$", "$@moly12_v"); + mes ""; mesc l("Reminder: "), 1; mesc l("Scores close at Sunday 23:59 - No scores will be given for last minute rushes!"), 1; return; diff --git a/npc/commands/titulate.txt b/npc/commands/titulate.txt index e3ecc2ebd..c36796484 100644 --- a/npc/commands/titulate.txt +++ b/npc/commands/titulate.txt @@ -155,3 +155,72 @@ OnInit: bindatcmd "cassate", "@titulate::OnCassate", 60, 100, 1; } +function script AutoTitulate { + .@ori = gettimetick(2); // Will never duplicate + switch (ACADEMIC_RANK) { + case ACADEMIC_LAYMAN: + case ACADEMIC_STUDENT: + case ACADEMIC_TECHNIC: + // Instant promotion + ACADEMIC_RANK+=1; + .@upgrade=true; + break; + case ACADEMIC_BACHELOR: + case ACADEMIC_MASTER: + // Two-Man rule + if (array_find(ACADEMIC_VOUCH, .@ori)) { + end; + } + array_push(ACADEMIC_VOUCH, .@ori); + if (array_entries(ACADEMIC_VOUCH) >= 2) { + ACADEMIC_RANK+=1; + deletearray(ACADEMIC_VOUCH); + .@upgrade=true; + } + break; + case ACADEMIC_DOCTOR: + case ACADEMIC_PHD: + // Three-Man rule + if (array_find(ACADEMIC_VOUCH, .@ori)) { + end; + } + array_push(ACADEMIC_VOUCH, .@ori); + if (array_entries(ACADEMIC_VOUCH) >= 3) { + ACADEMIC_RANK+=1; + deletearray(ACADEMIC_VOUCH); + .@upgrade=true; + } + break; + // Invalid + case ACADEMIC_SAGE: + getexp 5000000, 150000; + mesc "+500,000 exp"; + mesc "+150,000 job"; + Exception("The Grand Master title can only be issued by the president of the Alliance High Council.", RB_ISFATAL|RB_SPEECH); + default: + Exception("Invalid titulation rank: "+ACADEMIC_RANK, RB_ISFATAL|RB_SPEECH|RB_PLEASEREPORT); + } + + // Message + if (.@upgrade) { + dispbottom l("You received the %s title from %s.", + academicrank(), "Hocus Pocus the Fidibus"); + } else { + dispbottom l("You were vouched to the %s title by %s. You still need %d more vouches to be promoted.", + academicrank(ACADEMIC_RANK+1), "Hocus Pocus the Fidibus", + (ACADEMIC_RANK >= ACADEMIC_DOCTOR ? 3 : 2) - array_entries(ACADEMIC_VOUCH)); + } + + // Inform everyone + .@r = ACADEMIC_RANK + 1; + kamibroadcast(sprintf("%s has vouched %s for the title of %s.", + "Hocus Pocus the Fidibus", strcharinfo(0), academicrank(.@r))); + // Log in a special log file as well + logmes(sprintf("%s has vouched %s for the title of %s.", + "Hocus Pocus the Fidibus", strcharinfo(0), academicrank(.@r))); + + // Continue + return; +} + + diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index af0592bcd..246821e4c 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -131,9 +131,9 @@ function script FYNewEvent { break; case 8: // FIXME: PLACEHOLDER => Magic Olympics - $EVENT$="Expo"; - callfunc("FYEConf_Expo"); - kamibroadcast("World Expo is now open!", "Aurora Events"); + $EVENT$="Olympics"; + callfunc("FYEConf_Olympics"); + kamibroadcast("Magic Olympics are now open!", "Aurora Events"); break; case 9: // FIXME: PLACEHOLDER @@ -752,10 +752,18 @@ function script FYRewardEvent { } // Send results copy to syslog consoleinfo("%s event finished:\n#01 - %s (%d)\n#02 - %s (%d)\n#03 - %s (%d)\n#04 - %s (%d)\n#05 - %s (%d)\n", $EVENT$, $@aurora_name$[0], $@aurora_value[0], $@aurora_name$[1], $@aurora_value[1], $@aurora_name$[2], $@aurora_value[2], $@aurora_name$[3], $@aurora_value[3], $@aurora_name$[4], $@aurora_value[4]); + // Magic Olympics has extra rewards + if ($EVENT$ == "Olympics") { + if ($@aurora_charid[0] > 0) + rodex_sendmail($@aurora_charid[0], "Hocus Pocus", "A Small Gift", "I wanted to send you cake but the cat ate it.", 0, BlackyCat, 1, ScholarshipTuition, 1); + if ($@aurora_charid[1] > 0) + rodex_sendmail($@aurora_charid[1], "Hocus Pocus", "A Small Gift", "Here is some noob cake for a bright mind.", 0, ApanaCake, 1, ScholarshipTuition, 1); + } // Destroy the quest DelQuestFromEveryPlayer(Q_AuroraEvent); deletearray $@aurora_name$; deletearray $@aurora_value; + deletearray $@aurora_charid; /* DelItemFromEveryPlayer(EventTreasure1); DelItemFromEveryPlayer(EventTreasure2); |