diff options
-rw-r--r-- | db/re/mob_db.conf | 6 | ||||
-rw-r--r-- | npc/018-5-boss/_import.txt | 1 | ||||
-rw-r--r-- | npc/018-5-boss/command.txt | 59 | ||||
-rw-r--r-- | npc/018-5/town.txt | 38 |
4 files changed, 96 insertions, 8 deletions
diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index db90c61b7..b9d8b9f09 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -7863,8 +7863,8 @@ mob_db: ( Agi: 78 Vit: 93 Int: 40 - Dex: 88 - Luk: 56 + Dex: 98 + Luk: 76 } ViewRange: 18 ChaseRange: 12 @@ -7878,7 +7878,7 @@ mob_db: ( ChangeChase: true CastSensorChase: true } - MoveSpeed: 350 + MoveSpeed: 150 AttackDelay: 2000 AttackMotion: 672 DamageMotion: 270 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; + +} diff --git a/npc/018-5/town.txt b/npc/018-5/town.txt index 1c3ffa8fd..8a9d07369 100644 --- a/npc/018-5/town.txt +++ b/npc/018-5/town.txt @@ -6,7 +6,6 @@ // .@q = LilitQuest_Access // 0 - Access not granted -// q2 - Number of attempts // 1 - Access granted // 2 - Tree Minigame complete. @@ -49,9 +48,13 @@ L_AccessDenied: if (@menu == 1) { mesn ("???"); mesc l("DIE, FILTHY @@!", strtoupper(get_race())); + movecam rand(-20,20), rand(-20,20); + sleep2(60); + restorecam; percentheal -30, -30; next; } else { + closeclientdialog; warp "018-5-1", 77, 53; end; } @@ -79,7 +82,7 @@ L_AccessDenied: mesq l("I am the Yetifly, guardian of butter and fairies."); next; mesn l("Yetifly the Mighty"); - mesq l("AND YOU ARE NOT WELCOME HERE!!"), 1; + mesc l("AND YOU ARE NOT WELCOME HERE!!"), 1; movecam rand(-20,20), rand(-20,20); sleep2(60); movecam rand(-20,20), rand(-20,20); @@ -100,7 +103,7 @@ L_AccessDenied: mesc l("How will you respond?!"), 1; select l("Bring it on!"), - l("Nah I am a chicken :b"); + l("Nah, I am a chicken."); mes ""; if (@menu == 2) { closeclientdialog; @@ -117,14 +120,39 @@ L_AccessDenied: next; mesn l("Yetifly the Mighty"); mesq l("So, you just need to survive for one minute, and I'll consider you are good enough."); + mesc l("Word of the wise: You can freely challenge the Yetifly later.", 2); if (getskilllv(NV_TRICKDEAD)) mesc l("WARNING: Fake Death skill is disabled on the fight."), 1; next; mesc l("Click \"Next\" to begin the fight."), 1; next; closeclientdialog; - //addtimer(1000, "ready? + 1s GO! spawn and keep flowing timers every 10s to check if map is OK + finish."); + // Create instance. - warp "018-5-boss", 0, 0; + .@ID=getcharid(0); + @MAP_NAME$="lilt@"+str(.@ID); // Max 4 chars for map name + .@INSTID = instance_create("lilt@a"+(.@ID), getcharid(3), IOT_CHAR); + .@instanceMapName$ = instance_attachmap("018-5-boss", .@INSTID, 0, @MAP_NAME$); + + // Instance already exists, or something went wrong + if (.@instanceMapName$ == "") { + mesn l("Yetifly the Mighty"); + mesc l("*put his glasses on*"); + next; + mesn l("Yetifly the Mighty"); + mesq l("Whaaaaaat, you are that noob from earlier! Vanish! Be gone! Don't bore me!"); + next; + warp "018-5-1", 77, 53; + closeclientdialog; + close; + } + + // Everything went right, create the instance, it expires after 2 minutes + instance_set_timeout(120, 120, .@INSTID); + instance_init(.@INSTID); + + YETIFLY_INSTANCE=.@INSTID; + addtimer(1000, "#YetiFlyChallengeCtrl::OnWarn1"); + warp @MAP_NAME$, 31, 41; end; } |