metas/Nalicanas Test/nalicana_test.af

293 lines
8.8 KiB
Text

~~
~~ Nalicana's Test Quest Meta
~~ Talk to Nalicana → Gurog Ice Cave → Kill Battle Lord Gregor
~~ → Loot Mnemosyne → Return to Nalicana
~~
~~ NAV FILES REQUIRED (record in-game):
~~ nav_nalicana.nav - Start location → Nalicana at Asheron's Castle
~~ nal_to_cave.nav - Nalicana → Gurog Ice Cave → first room → locked door
~~ nal_to_tomb_portal.nav - Past door → Frozen Tomb portal
~~ nal_dungeon_run.nav - Frozen Tomb → maze (hug right) → Gregor's room
~~
~~ ============================================================
~~ STATE: Default - Init and go talk to Nalicana
~~ ============================================================
STATE: {Default}
IF: Death
DO: SetState {death}
IF: Always
DO: DoAll
Chat {/ub opt set VTank.PatchExpressionEngine true}
SetOpt {enablecombat} {false}
SetOpt {enablenav} {true}
SetOpt {enablelooting} {false}
SetOpt {enablebuffing} {true}
SetOpt {attackdistance} {0.0125}
Chat {/vt nav load nav_nalicana}
SetState {talk_nalicana}
~~ ============================================================
~~ STATE: talk_nalicana - Navigate to Nalicana, talk to get quest
~~ ============================================================
STATE: {talk_nalicana}
IF: Death
DO: SetState {death}
IF: All
Expr {testvar[navLoaded]}
NavEmpty
DO: DoAll
ClearWatchdog
Chat {/ub use Nalicana}
SetState {wait_nalicana_dialog}
IF: Always
DO: DoAll
DoExpr {touchvar[navLoaded]}
SetWatchdog 10.0 300.0 {stuck}
~~ ============================================================
~~ STATE: wait_nalicana_dialog - Wait for Nalicana's quest dialog
~~ ============================================================
STATE: {wait_nalicana_dialog}
IF: Death
DO: SetState {death}
~~ Got the quest dialog
IF: ChatMatch {Gurog have emerged}
DO: DoAll
DoExpr {echo[`Got quest from Nalicana!`,1]}
SetState {nav_to_cave}
~~ On cooldown
IF: ChatMatch {You have solved this quest too recently}
DO: DoAll
DoExpr {echo[`Quest on cooldown!`,1]}
SetState {done}
~~ Timeout - maybe already have quest, try going anyway
IF: SecsInStateGE 10
DO: SetState {nav_to_cave}
~~ ============================================================
~~ STATE: nav_to_cave - Travel to cave, kill gurogs, arrive at door
~~ ============================================================
STATE: {nav_to_cave}
IF: Death
DO: SetState {death}
IF: All
Expr {testvar[navLoaded2]}
NavEmpty
DO: DoAll
ClearWatchdog
SetOpt {enablecombat} {true}
SetOpt {enablelooting} {true}
SetState {wait_key}
IF: Always
DO: DoAll
DoExpr {touchvar[navLoaded2]}
Chat {/vt nav load nal_to_cave}
SetWatchdog 10.0 600.0 {stuck}
~~ ============================================================
~~ STATE: wait_key - At the door, wait for key from gurogs
~~ ============================================================
STATE: {wait_key}
IF: Death
DO: SetState {death}
IF: ItemCountGE 1 {Entryway Key}
DO: DoAll
DoExpr {echo[`Got Entryway Key!`,1]}
Chat {/ub use Entryway Key on Door}
SetState {wait_door}
~~ Keep fighting, wait for key
IF: SecsInStateGE 120
DO: DoAll
DoExpr {echo[`Key taking too long...`,1]}
SetState {wait_key}
~~ ============================================================
~~ STATE: wait_door - Wait for door unlock message
~~ ============================================================
STATE: {wait_door}
IF: Death
DO: SetState {death}
~~ Door unlocked
IF: ChatMatch {Door has been unlocked}
DO: DoAll
DoExpr {echo[`Door opened!`,1]}
SetOpt {enablecombat} {false}
SetOpt {enablelooting} {false}
SetState {nav_to_tomb_portal}
~~ Retry key use
IF: SecsInStateGE 5
DO: DoAll
Chat {/ub use Entryway Key on Door}
SetState {wait_door}
~~ ============================================================
~~ STATE: nav_to_tomb_portal - Navigate to Frozen Tomb portal
~~ Combat OFF during this nav
~~ ============================================================
STATE: {nav_to_tomb_portal}
IF: Death
DO: SetState {death}
IF: All
Expr {testvar[navLoaded3]}
NavEmpty
DO: DoAll
ClearWatchdog
SetState {enter_frozen_tomb}
IF: Always
DO: DoAll
DoExpr {touchvar[navLoaded3]}
Chat {/vt nav load nal_to_tomb_portal}
SetWatchdog 10.0 300.0 {stuck}
~~ ============================================================
~~ STATE: enter_frozen_tomb - Wait for portal transition
~~ ============================================================
STATE: {enter_frozen_tomb}
IF: Death
DO: SetState {death}
IF: ExitPortal
DO: DoAll
DoExpr {echo[`Inside Frozen Tomb!`,1]}
SetOpt {enablecombat} {true}
SetState {dungeon_run}
~~ If we walked right into it, may already be inside
IF: SecsInStateGE 10
DO: DoAll
SetOpt {enablecombat} {true}
SetState {dungeon_run}
~~ ============================================================
~~ STATE: dungeon_run - Navigate through Frozen Tomb to Gregor
~~ ============================================================
STATE: {dungeon_run}
IF: Death
DO: SetState {death}
IF: All
Expr {testvar[navLoaded4]}
NavEmpty
DO: DoAll
ClearWatchdog
SetOpt {enablelooting} {true}
SetState {kill_gregor}
IF: Always
DO: DoAll
DoExpr {touchvar[navLoaded4]}
Chat {/vt nav load nal_dungeon_run}
SetOpt {enablelooting} {false}
SetWatchdog 10.0 600.0 {stuck}
~~ ============================================================
~~ STATE: kill_gregor - Kill Battle Lord Gregor
~~ ============================================================
STATE: {kill_gregor}
IF: Death
DO: SetState {death}
~~ Gregor's death speech - he's dead, stop fighting
IF: ChatMatch {Killing me will not change anything}
DO: DoAll
DoExpr {echo[`Battle Lord Gregor defeated!`,1]}
SetOpt {enablecombat} {false}
SetState {wait_loot}
~~ Got the mnemosyne already
IF: ItemCountGE 1 {Battle Lord Gregor's Mnemosyne}
DO: DoAll
DoExpr {echo[`Got the Mnemosyne!`,1]}
SetOpt {enablecombat} {false}
SetOpt {enablelooting} {false}
SetState {return_nalicana}
IF: SecsInStateGE 600
DO: DoAll
DoExpr {echo[`Gregor fight timeout!`,1]}
SetState {stuck}
~~ ============================================================
~~ STATE: wait_loot - Wait for VTank to pick up mnemosyne
~~ ============================================================
STATE: {wait_loot}
IF: Death
DO: SetState {death}
IF: ItemCountGE 1 {Battle Lord Gregor's Mnemosyne}
DO: DoAll
DoExpr {echo[`Got the Mnemosyne! Returning to Nalicana.`,1]}
SetOpt {enablelooting} {false}
SetState {return_nalicana}
~~ Timeout waiting for loot
IF: SecsInStateGE 30
DO: DoAll
DoExpr {echo[`Mnemosyne not looted, check loot profile!`,1]}
SetOpt {enablelooting} {false}
SetState {return_nalicana}
~~ ============================================================
~~ STATE: return_nalicana - Nav back to Nalicana using nav_nalicana
~~ ============================================================
STATE: {return_nalicana}
IF: Death
DO: SetState {death}
IF: All
Expr {testvar[navLoaded5]}
NavEmpty
DO: DoAll
ClearWatchdog
SetState {turn_in}
IF: Always
DO: DoAll
DoExpr {touchvar[navLoaded5]}
Chat {/vt nav load nav_nalicana}
SetWatchdog 10.0 600.0 {stuck}
~~ ============================================================
~~ STATE: turn_in - Give mnemosyne to Nalicana
~~ ============================================================
STATE: {turn_in}
IF: Death
DO: SetState {death}
IF: Always
DO: DoAll
Chat {/ub givep Battle Lord Gregor's Mnemosyne to Nalicana}
Chat {/ub prepclick yes 3}
SetState {wait_turn_in}
~~ ============================================================
~~ STATE: wait_turn_in - Wait for turn-in dialog
~~ ============================================================
STATE: {wait_turn_in}
IF: Death
DO: SetState {death}
IF: ChatMatch {Lord Asheron should be able to learn much}
DO: DoAll
DoExpr {echo[`Nalicana's Test COMPLETE!`,1]}
SetState {done}
~~ Retry turn-in
IF: SecsInStateGE 10
DO: SetState {turn_in}
~~ ============================================================
~~ STATE: done - Quest complete
~~ ============================================================
STATE: {done}
IF: Always
DO: DoAll
DoExpr {echo[`Nalicana's Test quest finished.`,1]}
Chat {/mp}
~~ ============================================================
~~ STATE: stuck - Navigation stuck recovery
~~ ============================================================
STATE: {stuck}
IF: Death
DO: SetState {death}
IF: Always
DO: DoAll
Chat {/ub face}
DoExpr {echo[`Stuck! Check nav...`,1]}
~~ ============================================================
~~ STATE: death - Death recovery, recall and restart
~~ ============================================================
STATE: {death}
IF: ExitPortal
DO: DoAll
DoExpr {echo[`Died! Restarting...`,1]}
SetState {Default}