1+ local where = matches [2 ]:lower ()
2+ local gallop
3+ if command :ends (" gallop" ) then
4+ gallop = " gallop"
5+ where = where :sub (1 , - 8 )
6+ elseif command :ends (" sprint" ) then
7+ gallop = " sprint"
8+ where = where :sub (1 , - 8 )
9+ elseif command :ends (" dash" ) then
10+ gallop = " dash"
11+ where = where :sub (1 , - 6 )
12+ elseif command :ends (" runaway" ) then
13+ gallop = " runaway"
14+ where = where :sub (1 , - 9 )
15+ elseif command :ends (" glide" ) then
16+ gallop = " glide"
17+ where = where :sub (1 , - 7 )
18+ end
19+ if mmp .debug then
20+ mmp .gotoPerf = mmp .gotoPerf or createStopWatch ()
21+ startStopWatch (mmp .gotoPerf )
22+ end
23+ -- goto room ID
24+ if tonumber (where ) then
25+ mmp .gotoRoom (where , gallop )
26+ else
27+ -- goto area or feature
28+ local split = where :split (" " )
29+ if split [1 ] == " feature" then
30+ table.remove (split , 1 )
31+ mmp .gotoFeature (table.concat (split , " " ), gallop )
32+ else
33+ if tonumber (split [# split ]) then
34+ mmp .gotoArea (where :sub (1 , -# (split [# split ]) - 2 ), tonumber (split [# split ]), gallop )
35+ else
36+ mmp .gotoArea (where , nil , gallop )
37+ end
38+ end
39+ end
40+ if mmp .debug then
41+ mmp .echo (" goto alias took " .. stopStopWatch (mmp .gotoPerf ) .. " s to run." )
42+ end
0 commit comments