Status: srun is currenly in early, or beta release. I use it, it works, and it rarely crashes. But it's a bit quirky. Use it at your risk. Limitations are described.
Aardwolf's runto command is excellent. It's one of the reasons that I started playing Aard -- why cut and paste from a website, when it should be supported on the mud?
But there are limitations. First, it only works from one place (even if you can change that place with runprefix). Second, there are often shorter routes available with the use of clan portals. Third, you can't add new locations to places within the areas. srun solves all these problems.
srun read_speedwalkyou should get the response
Srun: Read 234 speedwalks -- other stuff -- Srun: Current Location ID: 1 Area name: nil Room title: Unknown Location Given Name: nil Coords: 0, 0, Unknown There are 0 outgoing routes There are 0 incoming routes There are 0 portals ending here Srun: CompleteSrun has read the speedwalks and tried to guess where you are; as you can see, it doesn't know (unless you are at recall, in which case it should say). Now, we want to run somewhere. Just use the standard mud command:
runto campsIf you are at recall, then runto will work (nearly) as normal. Otherwise, you will get this:
Srun: Location is not known to srun: camps Srun: Repeat command to retry from recallUnfortunately, srun can't work out what the short cuts that Aardwolf uses; it just doesn't know where "camps" is. Don't worry, over time it will learn these. For now follow the advice and do
runto campsagain. You can use the command history (up-arrow) to do this quickly. Now, srun nows what to do; it runs the commands
recall runto campsAt the end of the speedwalk, the following will be printed out.
Srun: Ending mud runto command New details discovered ID: 8 Area name: Tournament Camps Room title: A small bridge over the river Given Name: nil Coords: 31, 25, 0 There are 0 outgoing routes There are 1 incoming routes There are 0 portals ending here Added: camps as shortcut for: Tournament Camps Srun: mud runto completeAs a result of the run, srun has recorded the details of the location of "Tournament Camps" and also that "camps" is a shortcut for it. Let's run to verume with:
runto verume runto verumeAs before, you will have to type this twice, because srun doesn't know where verume is. Now, lets run back to camps (runto camps). This time, srun knows where we are going to; it sends the following commands.
Srunning to: Tournament Camps recall run 2s9e5swAnd that's it, the basic usage.
srun add_location peto srun add_direction recall peto 2wnYou will get this output.
Srun: Adding Location ID: 236 Area name: nil Room title: nil Given Name: peto Coords: Unknown, Unknown, Unknown There are 0 outgoing routes There are 0 incoming routes There are 0 portals ending here Srun: Adding direction sw 2wn ID: 0 Area name: recall Room title: The Grand City of Aylor (G) Given Name: nil Coords: 30, 20, 0 There are 89 outgoing routes There are 0 incoming routes There are 1 portals ending hereNow type runto peto. srun will execute a set of commands and you will get this info back. As before, srun has grabbed information about the location from the mud.
Peto's Cornucopia O' Corn (G) [Exits: east south west] Peto, the Bard Hall Cook, ladles out some more goodies. New details discovered ID: 236 Area name: nil Room title: Peto's Cornucopia O' Corn (G) Given Name: peto Coords: 30, 20, 0 There are 0 outgoing routes There are 1 incoming routes There are 0 portals ending hereWhat does srun do with all the information that it takes from the mud? Well, let's move back to recall by hand. Do run s2e. We are now at recall but srun doesn't know this; so type srun guess. Now, srun prints
Srun: Current Location ID: 0 Area name: recall Room title: The Grand City of Aylor (G) Given Name: nil Coords: 30, 20, 0 There are 89 outgoing routes There are 0 incoming routes There are 1 portals ending here Srun: Completebecause it's worked out where you are. Now, let's runto peto again. Let's run back to recall with runto recall. This works well, but it uses "recall" which is an expensive way to get around. Surely, it would make more sense to use a garbage can? Well, srun can do this also; to do this, we need to create a single alias which does this: if you don't know how to do this read this. This is slightly complicated but this is because people want to do many different things to use a portal (I drop my second, get portal from bag, hold portal, enter portal, second my usual weapon, put the portal back into the bag, with my single alias). Let's assume that you now have a alias called enter_garbage which uses the garbage can. Now, you can type srun add_portal enter_garbage recall which adds a portal ending at recall. You know get this...
Srun: Adding portal portal added ID: 0 Area name: recall Room title: The Grand City of Aylor (G) Given Name: nil Coords: 30, 20, 0 There are 89 outgoing routes There are 0 incoming routes There are 2 portals ending hereNow if you type
runto peto runto recallYou will see that instead of recall, we use the garbage can. Finally, we might want to add a new route to a location that the mud already knows about. So, let's try this:
runto wobblyYou should end up at Wobbly Woes and get the expected "New details discovered" message from srun. Well this is fine, but it's a long way around. Let's try this:
runto recall srun add_direction recall wobbly 6sued srun showpath wobblyYou should get back from the final command:
Srun: showpath Path is: recall -> The World of the Watchmen Dir: run 6su Dis: 7 The World of the Watchmen -> The Wobbly Woes of Woobleville Dir: run ed Dis: 2 Complete Route: run 6sued Srun: showpath completeSrun now knows about the new route. Type runto wobbly and you will actually run there. You'll notice that it's also worked out that run 6sued overlaps with the speedwalk to Watchmen (run 6su), so actually calculates the route as two steps. So if you try
runto watchmen runto watchmen runto wobblyYou will see that running from watchmen to wobbly does not pass through recall. Congratulations, you're now an advanced user.
-- we will define two new locations locations = { "aardh", "peto", } -- we add a shortcut for a location which ccomes from the mud. All the srun -- commands work on shortcuts, which srun ddoesn't know yet. runto_names = { "wobbly The Wobbly Woes of Woobleville", } -- We add two portals. You should have addeed the two alias yourself. portals = { "enter_garbage recall", "enter_amulet aardh", } -- add some new directions -- aardh to recaall, recall to peto, recall to wobbly directions = { "aardh recall d", "recall peto 2wn", "recall wobbly 6sued", } -- add a new alias to reload the config addxml.alias{ enabled = 'y', match = "srun_conf", script = "srun_conf", group = "aardwolf", } -- add a trigger. addxml.trigger{ enabled = 'y', match = '{srunconf}', script = "srun_conf_trigger", group = 'aardwolf' } function srun_conf( name, line, wildcards ) -- clear the srun conf, and read speedwalks. Execute( "srun clearall" ) Execute( "srun read_speedwalk" ) -- load configuration after speedwalks have been read Execute( "echo {srunconf}" ) end function srun_conf_trigger( name, line, wildcards, styles ) print( "Configuring Srun" ) for i,v in ipairs( locations ) do print( "Adding loc:", v ) Execute( "srun add_location " .. v ) end for i, v in ipairs( runto_names ) do print( "Adding runto:", v ) print( "srun add_runto " .. v ) Execute( "srun add_runto " .. v ) end for i,v in ipairs( portals ) do print( "Adding portal:", v ) Execute( "srun add_portal " .. v ) end for i,v in ipairs( directions ) do print( "Adding direction:", v ) Execute( "srun add_direction " .. v ) end Execute( "srun guess" ) end