metas/af/motes.af
Erik d308c0c118
All checks were successful
/ test (push) Successful in 28s
change mana scarab recomp threshold to <100
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 23:21:44 +01:00

217 lines
8.9 KiB
Text

~~ {
~~ FOR AUTO-COMPLETION ASSISTANCE: testvar getvar setvar touchvar clearallvars clearvar getcharintprop getchardoubleprop getcharquadprop getcharboolprop getcharstringprop getisspellknown getcancastspell_hunt getcancastspell_buff getcharvital_base getcharvital_current getcharvital_buffedmax getcharskill_traininglevel getcharskill_base getcharskill_buffed getplayerlandcell getplayercoordinates coordinategetns coordinategetwe coordinategetz coordinatetostring coordinateparse coordinatedistancewithz coordinatedistanceflat wobjectgetphysicscoordinates wobjectgetname wobjectgetobjectclass wobjectgettemplatetype wobjectgetisdooropen wobjectfindnearestmonster wobjectfindnearestdoor wobjectfindnearestbyobjectclass wobjectfindininventorybytemplatetype wobjectfindininventorybyname wobjectfindininventorybynamerx wobjectgetselection wobjectgetplayer wobjectfindnearestbynameandobjectclass actiontryselect actiontryuseitem actiontryapplyitem actiontrygiveitem actiontryequipanywand actiontrycastbyid actiontrycastbyidontarget chatbox chatboxpaste statushud statushudcolored uigetcontrol uisetlabel isfalse istrue iif randint cstr strlen getobjectinternaltype cstrf stopwatchcreate stopwatchstart stopwatchstop stopwatchelapsedseconds cnumber floor ceiling round abs getworldname getitemcountininventorybyname getheading getitemcountininventorybynamerx getheadingto actiontrygiveprofile vitae getfellowshipstatus getfellowshipname getfellowshipisopen getfellowshipisleader getfellowshipleaderid getfellowshipcanrecruit getfellowid getfellowshipcount getfellowshiplocked getfellowname getfellowshipisfull sin cos tan sqrt asin acos atan atan2 sinh cosh tanh vtsetmetastate getregexmatch echo chr ord wobjectgetid wobjectgethealth wobjectfindbyid wobjectgetintprop wobjectfindnearestbytemplatetype wobjectgetopencontainer testquestflag getquestktprogress isrefreshingquests getquestktrequired getqueststatus getisday getgamehour getgamehourname getisnight getgameday getgameticks getminutesuntilday getgamemonth getgamemonthname getminutesuntilnight getgameyear uisetvisible uiviewvisible uiviewexists getgvar touchgvar getpvar touchpvar setgvar cleargvar setpvar clearpvar testgvar clearallgvars testpvar clearallpvars dictgetitem dictcreate dicthaskey dictadditem dictkeys dictremovekey dictvalues dictclear dictsize dictcopy listgetitem listpop listcreate listcontains listremove listadd listindexof listremoveat listinsert listlastindexof listclear listcopy listcount listreverse
~~
~~ File auto-generated by metaf, a program created by Eskarina of Morningthaw/Coldeve.
~~ Get metaf here: https://github.com/JJEII/metaf/
~~
~~ All recognized structural designators:
~~ STATE: DO:
~~ IF: NAV:
~~
~~ All recognized CONDITION (IF:) operation keywords:
~~ Never NavEmpty MobsInDist_Priority Not
~~ Always Death NeedToBuff PSecsInStateGE
~~ All VendorOpen NoMobsInDist SecsOnSpellGE
~~ Any VendorClosed BlockE BuPercentGE
~~ ChatMatch ItemCountLE CellE DistToRteGE
~~ MainSlotsLE ItemCountGE IntoPortal Expr
~~ SecsInStateGE MobsInDist_Name ExitPortal ChatCapture
~~
~~ All recognized ACTION (DO:) operation keywords:
~~ None EmbedNav ChatExpr SetOpt
~~ SetState CallState SetWatchdog CreateView
~~ Chat Return ClearWatchdog DestroyView
~~ DoAll DoExpr GetOpt DestroyAllViews
~~
~~ All recognized NAV types:
~~ circular follow
~~ linear once
~~
~~ All recognized NAV NODE types:
~~ flw vnd
~~ pnt ptl
~~ rcl tlk
~~ pau chk
~~ cht jmp
~~ prt (deprecated in VTank)
~~ }
STATE: {Default} ~~ {
IF: Not Expr {testvar[batchThreshold]}
DO: DoExpr {setvar[batchThreshold, 50]}
IF: Not Expr {testvar[maxHandInRetries]}
DO: DoExpr {setvar[maxHandInRetries, 120]}
IF: Not Expr {testvar[beachNav]}
DO: DoExpr {setvar[beachNav, `beach_fort`]}
IF: Not Expr {testvar[returnNav]}
DO: DoExpr {setvar[returnNav, `return`]}
IF: All
ChatCapture {(^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(?<who>[^\<]*)\>.+\<\\Tell\>) .*, \"diamond (?<num>[0-9]+)\"$} {}
Expr {cnumber[getvar[capturegroup_num]]>0}
DO: DoAll
ChatExpr {\/ub give +getvar[capturegroup_num]+` Diamond Scarab to `+getvar[capturegroup_who]}
Chat {/a [motes] Diamond request fulfilled.}
SetState {Default}
IF: All
ChatCapture {(^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(?<who>[^\<]*)\>.+\<\\Tell\>) .*, \"mana (?<num>[0-9]+)\"$} {}
Expr {cnumber[getvar[capturegroup_num]]>0}
DO: DoAll
ChatExpr {\/ub give +getvar[capturegroup_num]+` Mana Scarab to `+getvar[capturegroup_who]}
Chat {/a [motes] Mana Scarab request fulfilled.}
SetState {Default}
IF: ItemCountLE 99 {Mana Scarab}
DO: DoAll
Chat {/a [motes] Low on Mana Scarabs, heading to recomp.}
Chat {/vt nav load nav_gilly}
Chat {/vt opt set enablenav true}
SetState {recomp_mana}
IF: ItemCountGE 1 {Pyreal Nugget}
DO: DoAll
DoExpr {setvar[isProcessing, 1]}
DoExpr {setvar[handInRetries, 0]}
ChatExpr {\/vt nav load +getvar[beachNav]}
Chat {/vt opt set enablenav true}
Chat {/vt opt set enablebuffing true}
SetState {go_to_beach}
IF: All
ItemCountGE 50 {Pyreal Sliver}
ItemCountLE 0 {Pyreal Nugget}
DO: DoAll
DoExpr {setvar[isProcessing, 1]}
Chat {/a [motes] Starting batch: sliver -> nugget.}
SetState {nugget}
IF: All
ItemCountGE 50 {Pyreal Mote}
ItemCountLE 49 {Pyreal Sliver}
ItemCountLE 0 {Pyreal Nugget}
DO: DoAll
DoExpr {setvar[isProcessing, 1]}
Chat {/a [motes] Starting batch: mote -> sliver.}
SetState {sliver}
IF: Always
DO: DoAll
DoExpr {setvar[isProcessing, 0]}
DoExpr {clearvar[handInRetries]}
Chat {/vt opt set enablebuffing false}
Chat {/vt opt set enablenav false}
~~ }
STATE: {go_to_beach} ~~ {
IF: Death
DO: SetState {Default}
IF: NavEmpty
DO: DoAll
Chat {/a [motes] Arrived at beach turn-in.}
SetState {at_beach}
IF: SecsInStateGE 300
DO: DoAll
Chat {/a [motes] Timeout reaching beach. Resetting.}
SetState {Default}
IF: Always
DO: DoAll
Chat {/vt opt set enablenav true}
Chat {/vt opt set enablebuffing true}
~~ }
STATE: {at_beach} ~~ {
IF: Death
DO: SetState {Default}
IF: ItemCountGE 1 {Pyreal Nugget}
DO: SetState {hand_in_nugget}
IF: ItemCountLE 0 {Pyreal Nugget}
DO: DoAll
Chat {/a [motes] Beach turn-in complete. Returning.}
ChatExpr {\/vt nav load +getvar[returnNav]}
Chat {/vt opt set enablenav true}
SetState {go_return}
~~ }
STATE: {go_return} ~~ {
IF: Death
DO: SetState {Default}
IF: NavEmpty
DO: DoAll
Chat {/a [motes] Return nav complete. Idle.}
SetState {Default}
IF: SecsInStateGE 300
DO: DoAll
Chat {/a [motes] Timeout on return nav. Resetting.}
SetState {Default}
IF: Always
DO: Chat {/vt opt set enablenav true}
~~ }
STATE: {recomp_mana} ~~ {
IF: Death
DO: SetState {Default}
IF: NavEmpty
DO: DoAll
Chat {/ah}
SetState {Default}
IF: SecsInStateGE 300
DO: DoAll
Chat {/a [motes] Timeout reaching recomp mana. Resetting.}
SetState {Default}
IF: Always
DO: Chat {/vt opt set enablenav true}
~~ }
STATE: {hand_in_nugget} ~~ {
IF: Death
DO: SetState {Default}
IF: ItemCountLE 0 {Pyreal Nugget}
DO: DoAll
DoExpr {clearvar[handInRetries]}
SetState {at_beach}
IF: Expr {getvar[handInRetries]>=getvar[maxHandInRetries]}
DO: DoAll
Chat {/a [motes] Max hand-in retries reached. Returning.}
DoExpr {clearvar[handInRetries]}
ChatExpr {\/vt nav load +getvar[returnNav]}
SetState {go_return}
IF: All
ItemCountGE 1 {Pyreal Nugget}
SecsInStateGE 1
DO: DoAll
DoExpr {setvar[handInRetries, getvar[handInRetries]+1]}
Chat {/ub give Pyreal Nugget to Feruza ibn Salaq}
SetState {hand_in_nugget}
IF: Always
DO: SetWatchdog 1 90 {Default}
~~ }
STATE: {nugget} ~~ {
IF: Death
DO: SetState {Default}
IF: ItemCountGE 2 {Pyreal Sliver}
DO: SetState {make_nugget}
IF: ItemCountLE 1 {Pyreal Sliver}
DO: DoAll
Chat {/a [motes] Sliver -> nugget stage complete.}
SetState {Default}
IF: Always
DO: SetWatchdog 1 120 {Default}
~~ }
STATE: {make_nugget} ~~ {
IF: Death
DO: SetState {Default}
IF: Always
DO: DoAll
Chat {/ub use Pyreal Sliver on Pyreal Sliver}
SetState {nugget}
~~ }
STATE: {sliver} ~~ {
IF: Death
DO: SetState {Default}
IF: ItemCountGE 2 {Pyreal Mote}
DO: SetState {make_sliver}
IF: ItemCountLE 1 {Pyreal Mote}
DO: DoAll
Chat {/a [motes] Mote -> sliver stage complete.}
SetState {Default}
IF: Always
DO: SetWatchdog 1 120 {Default}
~~ }
STATE: {make_sliver} ~~ {
IF: Death
DO: SetState {Default}
IF: Always
DO: DoAll
Chat {/ub use Pyreal Mote on Pyreal Mote}
SetState {sliver}
~~ }