diff --git a/af/ah_recall.af b/af/ah_recall.af new file mode 100644 index 0000000..aa488b3 --- /dev/null +++ b/af/ah_recall.af @@ -0,0 +1,32 @@ +~~ { +~~ 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 ~~ { + pau 56.7788082122803 33.6335268974304 0.175020837783813 5000 + cht 56.7788082122803 33.6335268974304 0.175020837783813 {/ah} + pau 56.7788082122803 33.6335268974304 0.175020837783813 20000 +~~ } diff --git a/af/lockandkey.af b/af/lockandkey.af index 6f4639d..1367b90 100644 --- a/af/lockandkey.af +++ b/af/lockandkey.af @@ -33,7 +33,7 @@ STATE: {Default} IF: Not Expr {testvar[disableBellaServices]} DO: DoExpr {setvar[disableBellaServices, 0]} IF: Not Expr {testvar[serviceCheckInterval]} - DO: DoExpr {setvar[serviceCheckInterval, 43200]} + DO: DoExpr {setvar[serviceCheckInterval, 900]} IF: Not Expr {testvar[serviceClock]} DO: DoAll DoExpr {setvar[serviceClock,stopwatchcreate[]]} @@ -53,7 +53,11 @@ STATE: {idle} IF: Death DO: SetState {death} IF: Always - DO: Chat {/vt opt set enablebuffing false} + DO: DoAll + Chat {/vt opt set enablebuffing false} + DoExpr {setcombatstate[`peace`]} + DoExpr {clearvar[queuePrimary]} + DoExpr {clearvar[queueSecondary]} ~~ Listen for tells containing "primary" IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*primary.*"$} {} DO: SetState {summon_primary} @@ -76,7 +80,9 @@ STATE: {summon_primary} DO: DoAll Chat {/vt opt set enablecombat false} Chat {/ub face 180} + DoExpr {setcombatstate[`magic`]} DoExpr {actiontryequipanywand[]} + DoExpr {clearvar[queuePrimary]} IF: SecsInStateGE 4 DO: DoExpr {actiontrycastbyid[157]} ~~ Fizzle: retry cast @@ -84,8 +90,13 @@ STATE: {summon_primary} DO: DoAll DoExpr {actiontrycastbyid[157]} SetState {summon_primary} + ~~ Queue incoming tells while casting + IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*primary.*"$} {} + DO: DoExpr {setvar[queuePrimary, 1]} + IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*secondary.*"$} {} + DO: DoExpr {setvar[queueSecondary, 1]} IF: SecsInStateGE 17 - DO: SetState {idle} + DO: SetState {summon_done} STATE: {summon_secondary} ~~ Face 90, equip wand, cast Summon Secondary Portal I (2648), retry on fizzle @@ -95,7 +106,9 @@ STATE: {summon_secondary} DO: DoAll Chat {/vt opt set enablecombat false} Chat {/ub face 90} + DoExpr {setcombatstate[`magic`]} DoExpr {actiontryequipanywand[]} + DoExpr {clearvar[queueSecondary]} IF: SecsInStateGE 4 DO: DoExpr {actiontrycastbyid[2648]} ~~ Fizzle: retry cast @@ -103,7 +116,21 @@ STATE: {summon_secondary} DO: DoAll DoExpr {actiontrycastbyid[2648]} SetState {summon_secondary} + ~~ Queue incoming tells while casting + IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*primary.*"$} {} + DO: DoExpr {setvar[queuePrimary, 1]} + IF: ChatCapture {(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*secondary.*"$} {} + DO: DoExpr {setvar[queueSecondary, 1]} IF: SecsInStateGE 17 + DO: SetState {summon_done} + +STATE: {summon_done} +~~ Check queue: process next summon request or return to idle + IF: Expr {testvar[queuePrimary]} + DO: SetState {summon_primary} + IF: Expr {testvar[queueSecondary]} + DO: SetState {summon_secondary} + IF: Always DO: SetState {idle} STATE: {service_quest_refresh} diff --git a/met/lockandkey.met b/met/lockandkey.met index 77c32df..d2babb9 100644 --- a/met/lockandkey.met +++ b/met/lockandkey.met @@ -11,7 +11,7 @@ n n n n -88 +95 i 21 i @@ -305,7 +305,7 @@ n s e s -setvar[serviceCheckInterval, 43200] +setvar[serviceCheckInterval, 900] s Default i @@ -419,11 +419,59 @@ idle i 1 i -2 +3 i 0 +TABLE +2 +K +V +n +n +4 +i +2 s /vt opt set enablebuffing false +i +7 +TABLE +2 +k +v +n +n +1 +s +e +s +setcombatstate[`peace`] +i +7 +TABLE +2 +k +v +n +n +1 +s +e +s +clearvar[queuePrimary] +i +7 +TABLE +2 +k +v +n +n +1 +s +e +s +clearvar[queueSecondary] s idle i @@ -545,7 +593,7 @@ K V n n -3 +5 i 2 s @@ -566,7 +614,33 @@ n s e s +setcombatstate[`magic`] +i +7 +TABLE +2 +k +v +n +n +1 +s +e +s actiontryequipanywand[] +i +7 +TABLE +2 +k +v +n +n +1 +s +e +s +clearvar[queuePrimary] s summon_primary i @@ -621,13 +695,77 @@ summon_primary s summon_primary i +28 +i +7 +TABLE +2 +k +v +n +n +2 +s +p +s +(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*primary.*"$ +s +c +s + +TABLE +2 +k +v +n +n +1 +s +e +s +setvar[queuePrimary, 1] +s +summon_primary +i +28 +i +7 +TABLE +2 +k +v +n +n +2 +s +p +s +(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*secondary.*"$ +s +c +s + +TABLE +2 +k +v +n +n +1 +s +e +s +setvar[queueSecondary, 1] +s +summon_primary +i 6 i 1 i 17 s -idle +summon_done s summon_primary i @@ -652,7 +790,7 @@ K V n n -3 +5 i 2 s @@ -673,7 +811,33 @@ n s e s +setcombatstate[`magic`] +i +7 +TABLE +2 +k +v +n +n +1 +s +e +s actiontryequipanywand[] +i +7 +TABLE +2 +k +v +n +n +1 +s +e +s +clearvar[queueSecondary] s summon_secondary i @@ -728,16 +892,128 @@ summon_secondary s summon_secondary i +28 +i +7 +TABLE +2 +k +v +n +n +2 +s +p +s +(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*primary.*"$ +s +c +s + +TABLE +2 +k +v +n +n +1 +s +e +s +setvar[queuePrimary, 1] +s +summon_secondary +i +28 +i +7 +TABLE +2 +k +v +n +n +2 +s +p +s +(^(\[[A-z]+?\] |)You|.*\[^\<]*)\>.+\<\\Tell\>) .*, ".*secondary.*"$ +s +c +s + +TABLE +2 +k +v +n +n +1 +s +e +s +setvar[queueSecondary, 1] +s +summon_secondary +i 6 i 1 i 17 s -idle +summon_done s summon_secondary i +26 +i +1 +TABLE +2 +k +v +n +n +1 +s +e +s +testvar[queuePrimary] +s +summon_primary +s +summon_done +i +26 +i +1 +TABLE +2 +k +v +n +n +1 +s +e +s +testvar[queueSecondary] +s +summon_secondary +s +summon_done +i +1 +i +1 +i +0 +s +idle +s +summon_done +i 8 i 1 diff --git a/nav/ah_recall.nav b/nav/ah_recall.nav new file mode 100644 index 0000000..1bef76c --- /dev/null +++ b/nav/ah_recall.nav @@ -0,0 +1,21 @@ +uTank2 NAV 1.2 +4 +3 +3 +56.7788082122803 +33.6335268974304 +0.175020837783813 +0 +5000 +4 +56.7788082122803 +33.6335268974304 +0.175020837783813 +0 +/ah +3 +56.7788082122803 +33.6335268974304 +0.175020837783813 +0 +20000