From 593c6850386c9e3bcdb211d23775ce9ec74cd962 Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Sat, 26 Sep 2026 22:48:02 +0200 Subject: [PATCH] feat: take a break --- af/viridian_rise.af | 28 +++++++ af/vr_take_a_break.af | 37 +++++++++ met/viridian_rise.met | 179 +++++++++++++++++++++++++++++++++++++++- nav/vr_take_a_break.nav | 56 +++++++++++++ 4 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 af/vr_take_a_break.af create mode 100644 nav/vr_take_a_break.nav diff --git a/af/viridian_rise.af b/af/viridian_rise.af index 3ccf951..43a0b63 100644 --- a/af/viridian_rise.af +++ b/af/viridian_rise.af @@ -201,6 +201,19 @@ STATE: {Hunt} DO: DoAll Chat {/ub fellow quit} SetState {Default} + IF: All + ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, \"#giveusabreak\"$} {} + DO: DoAll + ChatExpr {\/a +getvar[capturegroup_who] asked us to take a break} + Chat {/f #giveusabreak} + SetState {take_a_break} + IF: All + ChatMatch {^\[Fellowship\].*(say|says), \"#giveusabreak\"$} + DO: SetState {take_a_break} + IF: All + Expr {getvar[isLeader]} + ChatMatch {cloud of poisonous gas!} + DO: CallState {vr_gas_dodge} {Hunt} IF: Always DO: SetWatchdog 10 600 {stuck} @@ -382,6 +395,21 @@ STATE: {death} DO: SetState {Default} IF: Always DO: SetWatchdog 5 60 {stuck} + +STATE: {take_a_break} + IF: Always + DO: DoAll + Chat {/a Taking a break} + Chat {/vt opt set enablecombat false} + Chat {/vt opt set enablebuffing false} + Chat {/vt nav load vr_take_a_break} + Chat {/vt opt set enablenav true} + IF: NavEmpty + DO: SetState {break_time} + +STATE: {break_time} + IF: SecsInStateGE 3600 + DO: SetState {Default} STATE: {stuck} IF: Always diff --git a/af/vr_take_a_break.af b/af/vr_take_a_break.af new file mode 100644 index 0000000..b596468 --- /dev/null +++ b/af/vr_take_a_break.af @@ -0,0 +1,37 @@ +~~ { +~~ 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 in a NAV-ONLY file: +~~ NAV: +~~ +~~ 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) +~~ + +~~ +~~ REMEMBER THAT NAV-ONLY FILES MUST CONTAIN EXACTLY ONE NAV! +~~ } + +NAV: nav0 once ~~ { + cht 59.4640282313029 -28.5165045420329 0.0500208298365275 {/ub face 180} + cht 59.4640282313029 -28.5165045420329 0.0500208298365275 {/ub setmotion forward 1} + pau 59.4640282313029 -28.5165045420329 0.0500208298365275 2000 + cht 59.4640282313029 -28.5165045420329 0.0500208298365275 {/ub setmotion forward 0} + rcl 59.4640282313029 -28.5165045420329 0.0500208298365275 {Lifestone Recall} + pau 59.4640282313029 -28.5165045420329 0.0500208298365275 14000 + cht 59.4640282313029 -28.5165045420329 0.0500208298365275 {/ah} + pau 59.4640282313029 -28.5165045420329 0.0500208298365275 25000 + pnt 59.4563824971517 -28.4541240692139 0.0500208298365275 \ No newline at end of file diff --git a/met/viridian_rise.met b/met/viridian_rise.met index b32528a..41a05d2 100644 --- a/met/viridian_rise.met +++ b/met/viridian_rise.met @@ -11,7 +11,7 @@ n n n n -82 +88 i 1 i @@ -1812,6 +1812,128 @@ Default s Hunt i +2 +i +3 +TABLE +2 +K +V +n +n +1 +i +28 +TABLE +2 +k +v +n +n +2 +s +p +s +(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, \"#giveusabreak\"$ +s +c +s + +TABLE +2 +K +V +n +n +3 +i +8 +TABLE +2 +k +v +n +n +1 +s +e +s +\/a +getvar[capturegroup_who] asked us to take a break +i +2 +s +/f #giveusabreak +i +1 +s +take_a_break +s +Hunt +i +2 +i +1 +TABLE +2 +K +V +n +n +1 +i +4 +s +^\[Fellowship\].*(say|says), \"#giveusabreak\"$ +s +take_a_break +s +Hunt +i +2 +i +5 +TABLE +2 +K +V +n +n +2 +i +26 +TABLE +2 +k +v +n +n +1 +s +e +s +getvar[isLeader] +i +4 +s +cloud of poisonous gas! +TABLE +2 +k +v +n +n +2 +s +st +s +vr_gas_dodge +s +ret +s +Hunt +s +Hunt +i 1 i 9 @@ -3072,6 +3194,61 @@ K V n n +5 +i +2 +s +/a Taking a break +i +2 +s +/vt opt set enablecombat false +i +2 +s +/vt opt set enablebuffing false +i +2 +s +/vt nav load vr_take_a_break +i +2 +s +/vt opt set enablenav true +s +take_a_break +i +7 +i +1 +i +0 +s +break_time +s +take_a_break +i +6 +i +1 +i +3600 +s +Default +s +break_time +i +1 +i +3 +i +0 +TABLE +2 +K +V +n +n 1 i 1 diff --git a/nav/vr_take_a_break.nav b/nav/vr_take_a_break.nav new file mode 100644 index 0000000..5c1fc15 --- /dev/null +++ b/nav/vr_take_a_break.nav @@ -0,0 +1,56 @@ +uTank2 NAV 1.2 +4 +9 +4 +59.4640282313029 +-28.5165045420329 +0.0500208298365275 +0 +/ub face 180 +4 +59.4640282313029 +-28.5165045420329 +0.0500208298365275 +0 +/ub setmotion forward 1 +3 +59.4640282313029 +-28.5165045420329 +0.0500208298365275 +0 +2000 +4 +59.4640282313029 +-28.5165045420329 +0.0500208298365275 +0 +/ub setmotion forward 0 +2 +59.4640282313029 +-28.5165045420329 +0.0500208298365275 +0 +1635 +3 +59.4640282313029 +-28.5165045420329 +0.0500208298365275 +0 +14000 +4 +59.4640282313029 +-28.5165045420329 +0.0500208298365275 +0 +/ah +3 +59.4640282313029 +-28.5165045420329 +0.0500208298365275 +0 +25000 +0 +59.4563824971517 +-28.4541240692139 +0.0500208298365275 +0