diff options
Diffstat (limited to 'npc/001-14/ctrl.txt')
-rw-r--r-- | npc/001-14/ctrl.txt | 77 |
1 files changed, 76 insertions, 1 deletions
diff --git a/npc/001-14/ctrl.txt b/npc/001-14/ctrl.txt index 8c316977b..4b340b962 100644 --- a/npc/001-14/ctrl.txt +++ b/npc/001-14/ctrl.txt @@ -27,6 +27,7 @@ OnInit: ///////////////////////////////////////////////////////////////////////////////// 001-14,111,42,0 script Hocus#MOLY0100 NPC_BLACKWIZARD,{ if (gettimetick(2) < @moly_tick) end; + if (@moly_chall) 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; @@ -108,6 +109,7 @@ OnCheck: getiteminfo(.@wp, ITEMINFO_SUBTYPE) != W_STAFF) { @moly_score = -1; @moly_tick = 0; + @moly_chall = 0; dispbottom col(l("You have been disqualified - illegal weapon: %s", getitemname(.@wp)), 1); stopnpctimer; killmonsterall(getmap()); @@ -198,6 +200,7 @@ OnInit: ///////////////////////////////////////////////////////////////////////////////// 001-14,88,139,0 script Hocus#MOLY0600 NPC_BLACKWIZARD,{ + if (@moly_chall) end; mes ".:: " + l("Magic Raw Power Challenge") + ":: ."; mes l("Description: For starters, I'll blow away all your summons and summon an ent. You must do the most damage to it within 10 seconds."); mes l("Using potions and support magic is fine. It has high defense, so magic attacks work better."); @@ -244,6 +247,7 @@ OnCheck: getiteminfo(.@wp, ITEMINFO_SUBTYPE) != W_STAFF)) { @moly_score = -1; @moly_tick = 0; + @moly_chall = 0; dispbottom col(l("You have been disqualified - illegal weapon: %s", getitemname(.@wp)), 1); stopnpctimer; killmonsterall(getmap()); @@ -316,6 +320,7 @@ OnInit: ///////////////////////////////////////////////////////////////////////////////// 001-14,37,84,0 script Hocus#MOLY0900 NPC_BLACKWIZARD,{ + if (@moly_chall) end; mes ".:: " + l("Hocus Said So Challenge") + ":: ."; mes l("Description: There'll be differently colored sparks and you must kill ONLY those of the color I say so! Failure to do so will cause immediate disqualification!"); mesc l("PS. No equipment restriction"); @@ -442,6 +447,7 @@ OnClM: if (@cl != MagentaSpark) { @moly_score = -1; @moly_tick = 0; + @moly_chall = 0; dispbottom col(l("You have been disqualified - target was: %s", strmobinfo(1, @cl)), 1); killmonsterall(getmap()); // FIXME: Stop npc timer @@ -473,7 +479,76 @@ OnInit: ///////////////////////////////////////////////////////////////////////////////// // FIXME 001-14,41,46,0 script Hocus#MOLY1000 NPC_BLACKWIZARD,{ - npctalk l("Survival Challenge"); + if (@moly_chall) end; + mes ".:: " + l("Survival Challenge") + ":: ."; + mes l("Description: Survive for the longest you can without leaving the designed region."); + mes l("Using potions and support magic is fine, as well as summons; but using a non-magical weapon will disqualify you."); + 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 survived.", FuzzyTime(gettimetick(2) + FYMOLY_SURVIV)), 3; + next; + mesc l("Begin campaign?"), 1; + if (askyesno() == ASK_NO) close; + killmonsterall(getmap()); + @moly_score = 0; + @moly_chall = 10; + @map$ = getmap(); + addtimer 500, instance_npcname("Hocus#MOLY1000")+"::OnCheck"; + closeclientdialog; + close; + +OnCheck: + if (@moly_chall != 10) end; + @moly_score += 1; + // Game Over + if (ispcdead() || + !isin(@map$, 37, 47, 49, 58)) { // NOT a typo - starting square is OK + // Game Over! + killmonsterall(getmap()); + @moly_score = @moly_score / 2; + dispbottom l("End! Score this time: %s", FuzzyTime(gettimetick(2)+@moly_score)); + FYMOLY_SURVIV = max(FYMOLY_SURVIV, @moly_score); + @moly_score = 0; + @moly_chall = 0; + end; + } + /* Spawn */ + if (!(@moly_score % 2)) { + .@m=areamonster(getmap(), 37, 47, 49, 57, strmobinfo(1, EntAbomination), EntAbomination, 1); + setunitdata(.@m, UDT_MAXHP, 50 + @moly_score * 5); + setunitdata(.@m, UDT_HP, 50 + @moly_score * 5); + setunitdata(.@m, UDT_LEVEL, 1 + (@moly_score / 2)); + setunitdata(.@m, UDT_SPEED, max(50, 900-(@moly_score * 10))); + setunitdata(.@m, UDT_MODE, MD_CANMOVE|MD_CANATTACK|MD_AGGRESSIVE|MD_ANGRY); + setunitdata(.@m, UDT_DEF, min(32760, 20+@moly_score)); + setunitdata(.@m, UDT_MDEF, min(32760, @moly_score)); + setunitdata(.@m, UDT_LUK, min(32760, @moly_score * 7)); + setunitdata(.@m, UDT_HIT, 32760); + setunitdata(.@m, UDT_FLEE, 0); + setunitdata(.@m, UDT_ATKMIN, @moly_score); + setunitdata(.@m, UDT_ATKMAX, @moly_score+20); + setunitdata(.@m, UDT_ADELAY, max(672, 1872-(@moly_score * 4))); + } + /* Weapon Check */ + .@wp = getequipid(EQI_HAND_R); + // Disarmed + if (.@wp < 1) { + addtimer 500, instance_npcname("Hocus#MOLY1000")+"::OnCheck"; + end; + } + // Illegal weapon + if (.@wp != Judgement && + .@wp != DarkPulsar && + .@wp != Lightbringer && + getiteminfo(.@wp, ITEMINFO_SUBTYPE) != W_STAFF) { + @moly_score = -1; + @moly_tick = 0; + @moly_chall = 0; + dispbottom col(l("You have been disqualified - illegal weapon: %s", getitemname(.@wp)), 1); + killmonsterall(getmap()); + end; + } + addtimer 500, instance_npcname("Hocus#MOLY1000")+"::OnCheck"; end; OnInit: |