246 lines
7.7 KiB
Text
246 lines
7.7 KiB
Text
~~
|
|
~~ viridian_rise.af
|
|
~~ Lean hunting loop for Viridian Rise, based on neftet.af with all economy/service
|
|
~~ states (Bella augment service, lum/seer cap, A'nekshay tokens, stipend, turn-in
|
|
~~ circuit, flower picking) stripped out except a simplified group recomp. All navs
|
|
~~ are external (recorded/saved in-game, loaded by name) -- nothing embedded here.
|
|
~~
|
|
~~ ============================================================
|
|
~~ Variables expected to be set externally (VTank Variables tab) before running:
|
|
~~ isLeader - 1 for leader, 0 for follower
|
|
~~ followTarget - leader character name (follower only)
|
|
~~ attackRange - attackdistance value, e.g. 0.0208333
|
|
~~ ============================================================
|
|
~~ External navs (recorded in-game, loaded by name):
|
|
~~ vr_circuit - main Viridian Rise hunting loop (leader) -- recorded, af/vr_circuit.af
|
|
~~ vr_run - retreat route to a safe rally point -- recorded, af/vr_run.af
|
|
~~ vr_getin - rally point through the portal back into the hunting area -- recorded, af/vr_getin.af
|
|
~~ vr_death_recall - cast "Viridian Rise Recall" then land somewhere safe -- STILL NEEDS RECORDING
|
|
~~ ah_recomp - shared hub restock run, same one neftet.af uses -- already committed, af/ah_recomp.af
|
|
~~ CONFIGURATION: Prismatic Taper threshold in Hunt matches neftet's recomp trigger -- adjust if needed
|
|
~~ ============================================================
|
|
|
|
STATE: {Default}
|
|
IF: Always
|
|
DO: DoAll
|
|
DoExpr {touchvar[deathCount]}
|
|
DoExpr {touchvar[deathClock]}
|
|
IF: All
|
|
Expr {getvar[isLeader]}
|
|
DO: DoAll
|
|
Chat {/vt opt set enablecombat true}
|
|
Chat {/vt opt set enablelooting true}
|
|
Chat {/vt opt set enablebuffing true}
|
|
Chat {/vt opt set enablenav true}
|
|
Chat {/vt opt set navpriorityboost false}
|
|
ChatExpr {\/vt opt set attackdistance +getvar[attackRange]}
|
|
Chat {/ub fellow create Viridian Rise Hunt}
|
|
SetState {vr_runback}
|
|
IF: All
|
|
Expr {getvar[isLeader]==0}
|
|
DO: DoAll
|
|
Chat {/vt opt set enablecombat true}
|
|
Chat {/vt opt set enablelooting true}
|
|
Chat {/vt opt set enablebuffing true}
|
|
Chat {/vt opt set enablenav true}
|
|
Chat {/vt opt set navpriorityboost true}
|
|
ChatExpr {\/vt opt set attackdistance +getvar[attackRange]}
|
|
SetState {vr_runback}
|
|
|
|
STATE: {Hunt}
|
|
IF: Death
|
|
DO: DoAll
|
|
DoExpr {clearvar[deathCount]}
|
|
DoExpr {clearvar[deathClock]}
|
|
SetState {death}
|
|
IF: Always
|
|
DO: DoAll
|
|
Chat {/vt opt set IdlePeaceMode false}
|
|
Chat {/vt opt set enablebuffing true}
|
|
Chat {/vt opt set enablelooting true}
|
|
Chat {/vt opt set enablecombat true}
|
|
IF: All
|
|
Expr {getvar[isLeader]}
|
|
DO: DoAll
|
|
Chat {/vt opt set navpriorityboost false}
|
|
Chat {/vt nav load vr_circuit}
|
|
Chat {/fellowship #followviridianrise}
|
|
IF: All
|
|
Expr {getvar[isLeader]}
|
|
ChatMatch {cloud of dangerous gas!}
|
|
DO: CallState {vr_gas_dodge} {Hunt}
|
|
IF: All
|
|
Expr {getvar[isLeader]}
|
|
ChatMatch {cloud of poisonous gas!}
|
|
DO: CallState {vr_gas_dodge} {Hunt}
|
|
IF: All
|
|
Expr {getvar[isLeader]}
|
|
ChatMatch {the acidic mist!}
|
|
DO: CallState {vr_gas_dodge} {Hunt}
|
|
IF: All
|
|
ChatMatch {^.* +getvar[followTarget] has died!$}
|
|
Expr {getvar[isLeader]==0}
|
|
DO: DoAll
|
|
ChatExpr {\/f +getvar[followTarget] dead...he dead.}
|
|
SetState {run_away}
|
|
IF: ChatMatch {^.*has died!$}
|
|
DO: DoAll
|
|
Chat {/f I SAW DEATH!}
|
|
DoExpr {setvar[deathCount, getvar[deathCount]+1]}
|
|
IF: All
|
|
Expr {getvar[deathCount]==1}
|
|
Not Expr {getvar[deathClock]}
|
|
DO: DoAll
|
|
Chat {/f deathClock started}
|
|
DoExpr {setvar[deathClock,stopwatchcreate[]]}
|
|
DoExpr {stopwatchstart[getvar[deathClock]]}
|
|
IF: Expr {getvar[deathCount]>1}
|
|
DO: SetState {run_away}
|
|
IF: All
|
|
Expr {getvar[deathClock]}
|
|
Expr {stopwatchelapsedseconds[getvar[deathClock]]>60}
|
|
DO: DoAll
|
|
Chat {/f deathClock stopped}
|
|
DoExpr {clearvar[deathCount]}
|
|
DoExpr {clearvar[deathClock]}
|
|
IF: All
|
|
ItemCountLE 100 {Prismatic Taper}
|
|
NoMobsInDist 5
|
|
DO: DoAll
|
|
Chat {/fellowship #recompviridianrise}
|
|
SetState {recomp}
|
|
IF: ChatMatch {^\[Fellowship\].*(say|says), \"#recompviridianrise\"$}
|
|
DO: SetState {recomp}
|
|
IF: All
|
|
Expr {getvar[isLeader]==0}
|
|
Expr {wobjectfindnearestbynameandobjectclass[24, getvar[followTarget]]!=0}
|
|
DO: ChatExpr {\/ub follow +getvar[followTarget]}
|
|
IF: All
|
|
ChatMatch {^\[Fellowship\].*(say|says), \"#followviridianrise\"$}
|
|
Expr {getvar[isLeader]==0}
|
|
Expr {wobjectfindnearestbynameandobjectclass[24, getvar[followTarget]]!=0}
|
|
DO: ChatExpr {\/ub follow +getvar[followTarget]}
|
|
IF: All
|
|
Expr {getvar[isLeader]==0}
|
|
Expr {getfellowshipstatus[]==0}
|
|
Expr {wobjectfindnearestbynameandobjectclass[24, getvar[followTarget]]!=0}
|
|
SecsInStateGE 5
|
|
DO: DoAll
|
|
ChatExpr {\/t +getvar[followTarget]+`\, #recruitviridianrise`}
|
|
SetState {Hunt}
|
|
IF: All
|
|
Expr {getvar[isLeader]}
|
|
ChatCapture {(^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(?<who>[^\<]*)\>.+\<\\Tell\>) .*, \"#recruitviridianrise\"$} {}
|
|
DO: DoAll
|
|
ChatExpr {\/ub fellow recruit +getvar[capturegroup_who]}
|
|
SetState {Hunt}
|
|
IF: All
|
|
Expr {getvar[isLeader]}
|
|
DistToRteGE 100
|
|
DO: SetState {stuck}
|
|
IF: Always
|
|
DO: SetWatchdog 10 600 {stuck}
|
|
IF: All
|
|
Expr {getvar[isLeader]==0}
|
|
ChatCapture {(?<who>\w[\w ]*\w) has left your Fellowship} {}
|
|
Expr {getvar[capturegroup_who]==getvar[followTarget]}
|
|
DO: DoAll
|
|
Chat {/ub fellow quit}
|
|
SetState {Default}
|
|
|
|
STATE: {run_away}
|
|
IF: Always
|
|
DO: DoAll
|
|
Chat {/vt opt set enablelooting false}
|
|
Chat {/vt opt set enablecombat false}
|
|
Chat {/vt opt set navpriorityboost true}
|
|
DoExpr {clearvar[deathCount]}
|
|
DoExpr {clearvar[deathClock]}
|
|
SetState {vr_runback}
|
|
|
|
STATE: {vr_gas_dodge}
|
|
IF: Always
|
|
DO: Chat {/vt opt set navpriorityboost true}
|
|
IF: SecsInStateGE 5
|
|
DO: DoAll
|
|
Chat {/vt opt set navpriorityboost false}
|
|
Return
|
|
|
|
STATE: {vr_runback}
|
|
IF: Death
|
|
DO: SetState {death}
|
|
IF: All
|
|
Expr {testvar[vrRunbackNavLoaded]}
|
|
NavEmpty
|
|
DO: DoAll
|
|
DoExpr {clearvar[vrRunbackNavLoaded]}
|
|
SetState {vr_portal}
|
|
IF: Always
|
|
DO: DoAll
|
|
DoExpr {setvar[vrRunbackNavLoaded, 1]}
|
|
Chat {/vt opt set enablecombat false}
|
|
Chat {/vt nav load vr_run}
|
|
Chat {/vt opt set enablenav true}
|
|
IF: Always
|
|
DO: SetWatchdog 10 120 {stuck}
|
|
|
|
STATE: {vr_portal}
|
|
IF: Death
|
|
DO: SetState {death}
|
|
IF: ExitPortal
|
|
DO: SetState {Hunt}
|
|
IF: SecsInStateGE 20
|
|
DO: SetState {vr_portal}
|
|
IF: Always
|
|
DO: DoAll
|
|
Chat {/vt opt set enablenav true}
|
|
Chat {/vt nav load vr_getin}
|
|
|
|
STATE: {recomp}
|
|
IF: Death
|
|
DO: SetState {death}
|
|
IF: All
|
|
Expr {testvar[vrRecompNavLoaded]}
|
|
NavEmpty
|
|
DO: DoAll
|
|
DoExpr {clearvar[vrRecompNavLoaded]}
|
|
SetState {stuck}
|
|
IF: Always
|
|
DO: DoAll
|
|
DoExpr {setvar[diamondMissing, 100 - getitemcountininventorybyname[`Diamond Scarab`]]}
|
|
DoExpr {ifthen[$diamondMissing < 0, `setvar[diamondMissing, 0]`]}
|
|
DoExpr {setvar[manaMissing, 100 - getitemcountininventorybyname[`Mana Scarab`]]}
|
|
DoExpr {ifthen[$manaMissing < 0, `setvar[manaMissing, 0]`]}
|
|
DoExpr {setvar[vrRecompNavLoaded, 1]}
|
|
Chat {/vt opt set enablecombat false}
|
|
Chat {/vt opt set enablebuffing false}
|
|
Chat {/vt nav load ah_recomp}
|
|
Chat {/vt opt set enablenav true}
|
|
IF: Always
|
|
DO: SetWatchdog 3 300 {Default}
|
|
|
|
STATE: {death}
|
|
IF: ExitPortal
|
|
DO: DoAll
|
|
Chat {/vt opt set enablebuffing false}
|
|
Chat {/vt opt set enablenav true}
|
|
Chat {/vt opt set enablelooting false}
|
|
Chat {/vt opt set enablecombat false}
|
|
IF: All
|
|
Expr {testvar[vrDeathNavLoaded]}
|
|
NavEmpty
|
|
DO: DoAll
|
|
DoExpr {clearvar[vrDeathNavLoaded]}
|
|
SetState {vr_runback}
|
|
IF: Always
|
|
DO: DoAll
|
|
DoExpr {setvar[vrDeathNavLoaded, 1]}
|
|
Chat {/vt nav load vr_death_recall}
|
|
IF: Always
|
|
DO: SetWatchdog 5 60 {stuck}
|
|
|
|
STATE: {stuck}
|
|
IF: Always
|
|
DO: DoAll
|
|
Chat {/ub face}
|
|
SetState {Default}
|