diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-03-16 22:57:15 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-03-16 22:57:15 -0300 |
commit | 7e60f3630fd8ee129a7ce32a6ab3fa4dd9c7c63a (patch) | |
tree | d856bee8cf67815b29543bea99c95ee87af7d69e /npc/018-5-boss | |
parent | fa0fa33298300d7c7cb61dac3a3d8ac518390ac0 (diff) | |
download | serverdata-7e60f3630fd8ee129a7ce32a6ab3fa4dd9c7c63a.tar.gz serverdata-7e60f3630fd8ee129a7ce32a6ab3fa4dd9c7c63a.tar.bz2 serverdata-7e60f3630fd8ee129a7ce32a6ab3fa4dd9c7c63a.tar.xz serverdata-7e60f3630fd8ee129a7ce32a6ab3fa4dd9c7c63a.zip |
Challenge the Yetifly and earn access to Lilit. Or die trying.
This... didn't turned out hard at all (I abused @speed, after all)
Diffstat (limited to 'npc/018-5-boss')
-rw-r--r-- | npc/018-5-boss/_import.txt | 1 | ||||
-rw-r--r-- | npc/018-5-boss/command.txt | 59 |
2 files changed, 60 insertions, 0 deletions
diff --git a/npc/018-5-boss/_import.txt b/npc/018-5-boss/_import.txt index 6f320c752..93f9220e3 100644 --- a/npc/018-5-boss/_import.txt +++ b/npc/018-5-boss/_import.txt @@ -1,3 +1,4 @@ // Map 018-5-boss: Mountain Cave // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/018-5-boss/command.txt", "npc/018-5-boss/mapflag.txt", diff --git a/npc/018-5-boss/command.txt b/npc/018-5-boss/command.txt new file mode 100644 index 000000000..dccc62d1e --- /dev/null +++ b/npc/018-5-boss/command.txt @@ -0,0 +1,59 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Description: +// Controls the Yetifly Challenge to earn the right to access Lilit + +// .@q = LilitQuest_Access +// 0 - Access not granted +// q2 - Number of attempts +// 1 - Access granted +// 2 - Tree Minigame complete. + +// It is always cast with an instance in mind +018-5-boss,0,0,0 script #YetiFlyChallengeCtrl NPC_HIDDEN,{ + end; + +OnCleanUp: + YETIFLY_INSTANCE=0; + end; + +OnWarn1: + instance_announce(YETIFLY_INSTANCE, "On your marks!", 0); + addtimer(2000, "#YetiFlyChallengeCtrl::OnWarn2"); + end; + +OnWarn2: + instance_announce(YETIFLY_INSTANCE, "READY?!", 0); + addtimer(2000, "#YetiFlyChallengeCtrl::OnBegin"); + end; + +OnBegin: + instance_announce(YETIFLY_INSTANCE, "START!", 0); + @YETIFLY_CYCLE=0; + // No event is bound: Slaying the Yetifly is not planned and thus, without effect. + // It'll vanish along the instance + monster "lilt@"+getcharid(0), 33, 24, l("Yetifly the Mighty"), Yetifly, 1; + addtimer(10000, "#YetiFlyChallengeCtrl::OnCycle"); + end; + +OnCycle: + if (!(getmap() ~= "lilt*" ) || ispcdead()) + end; + @YETIFLY_CYCLE+=1; + + // Is it over? Were you victorious? + if (@YETIFLY_CYCLE >= 6) { + setq LilitQuest_Access, 1; + warp "018-5", 97, 70; + mesn l("Yetifly the Mighty"); + mesq l("Not bad... You can now enter Lilit. If you think you can defeat me, climb the tree and meet me at the top!"); + close; + } + + // Resume execution + instance_announce(YETIFLY_INSTANCE, l("survive @@ seconds more!", (6-@YETIFLY_CYCLE)*10), 0); + addtimer(10000, "#YetiFlyChallengeCtrl::OnCycle"); + end; + +} |