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 /npc/001-14/ctrl.txt | |
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
Diffstat (limited to 'npc/001-14/ctrl.txt')
-rw-r--r-- | npc/001-14/ctrl.txt | 82 |
1 files changed, 81 insertions, 1 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; } |