diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-01-14 14:14:20 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-01-14 14:14:20 -0300 |
commit | 3c6609c0897f775af899d3c934ec294f4ec36e04 (patch) | |
tree | 5254cd8df3de7fe0ffe4a8f3445b735c07434e9d | |
parent | b14508ba430b6c82fefb43822f9a038492748a57 (diff) | |
download | serverdata-3c6609c0897f775af899d3c934ec294f4ec36e04.tar.gz serverdata-3c6609c0897f775af899d3c934ec294f4ec36e04.tar.bz2 serverdata-3c6609c0897f775af899d3c934ec294f4ec36e04.tar.xz serverdata-3c6609c0897f775af899d3c934ec294f4ec36e04.zip |
Sketch the Energy Balls Challenge.
It actually needs the balls to rely more on the MATK instead of PLANT
-rw-r--r-- | npc/001-14/ctrl.txt | 82 | ||||
-rw-r--r-- | npc/001-14/hocus.txt | 2 |
2 files changed, 82 insertions, 2 deletions
diff --git a/npc/001-14/ctrl.txt b/npc/001-14/ctrl.txt index dbccadf92..ab7c035e7 100644 --- a/npc/001-14/ctrl.txt +++ b/npc/001-14/ctrl.txt @@ -25,11 +25,91 @@ OnInit: // FIXME 001-14,111,42,0 script Hocus#MOLY0100 NPC_BLACKWIZARD,{ - npctalk l("Energy Ball Challenge"); + if (gettimetick(2) < @moly_tick) end; + mes ".:: " + l("Energy Ball Challenge") + ":: ."; + mes l("The goal is simple - I'll spawn an energy ball and you must kill it quickly. You'll be disqualified if you equip a non-magical weapon at any time."); + dnext; + mes l("You'll have 60 seconds to kill as many balls as you can!"); + mesc l("NOTE: Beside wands and staves, %s, %s, and the %s count as magic weapons.", getitemlink(Judgement), getitemlink(DarkPulsar), getitemlink(Lightbringer)); + mes ""; + mesc l("Your progress thus far: %s sparks", fnum(FYMOLY_ENBALL)), 3; + next; + mesc l("Begin campaign?"), 1; + if (askyesno() == ASK_NO) close; + @moly_tick = gettimetick(2) + 60; + @moly_score = 0; + .m$=getmap(); + @map$=getmap(); + .@m=areamonster(.m$, 108, 43, 118, 48, "Target", YellowSpark, 1, "Hocus#MOLY0100::OnClick"); + setunitdata(.@m, UDT_HP, 1); + setunitdata(.@m, UDT_MAXHP, 1); + setunitdata(.@m, UDT_LEVEL, 1); + setunitdata(.@m, UDT_SPEED, 60); + npctalk3 l("Countdown: 1 minute"); + addtimer 2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck"; + initnpctimer; + closeclientdialog; + close; + +OnTimer15000: + npctalk "45 seconds"; + end; + +OnTimer30000: + npctalk "30 seconds"; + end; + +OnTimer45000: + npctalk "15 seconds"; + end; + +OnTimer55000: + npctalk col("5 seconds", 1); + end; + +OnTimer60000: + killmonsterall(.m$); + maptimer2(.m$, 10, "Hocus#MOLY0100::OnEnd"); + npctalk col("Time out!", 1); + stopnpctimer; + end; + +OnClick: + if (gettimetick(2) > @moly_tick) end; + @moly_score+=1; + .@m=areamonster(@map$, 108, 43, 118, 48, "Target", YellowSpark, 1, "Hocus#MOLY0100::OnClick"); + setunitdata(.@m, UDT_HP, 1); + setunitdata(.@m, UDT_MAXHP, 1); + setunitdata(.@m, UDT_LEVEL, 1); + setunitdata(.@m, UDT_SPEED, 60); + end; + +OnCheck: + if (gettimetick(2) > @moly_tick) end; + .@wp = getequipid(EQI_HAND_R); + if (.@wp < 1) addtimer(2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck"); + if (.@wp != Judgement && + .@wp != DarkPulsar && + .@wp != Lightbringer && + getiteminfo(.@wp, ITEMINFO_SUBTYPE) != W_STAFF) { + @moly_score = -1; + @moly_tick = 0; + dispbottom col(l("You have been disqualified - illegal weapon: %s", getitemname(.@wp)), 1); + stopnpctimer; + end; + } + addtimer 2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck"; + end; + +OnEnd: + dispbottom l("End! Score this time: %d", @moly_score); + FYMOLY_ENBALL = max(FYMOLY_ENBALL, @moly_score); + @moly_score = 0; end; OnInit: .distance=7; + .m$="001-14"; end; } diff --git a/npc/001-14/hocus.txt b/npc/001-14/hocus.txt index 078892283..ae438c893 100644 --- a/npc/001-14/hocus.txt +++ b/npc/001-14/hocus.txt @@ -54,7 +54,7 @@ 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("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"); |