Automapper helper

Posted by Nick Gammon on Tue 20 Aug 2002 01:01 AM — 3 posts, 20,992 views.

Australia Forum Administrator #0
Version 3.26 of MUSHclient supports automapper (and speedwalk) comments, these let you put room names (or anything you like) into a speedwalk string.

MUSHclient will do that for you automatically on an MXP MUD, because room names are specially identified, however for normal MUDs you need a way of doing it manually.

Fortunately in SMAUG room names are in bold white-on-black, so the small plugin below uses that to detect room names, and add them to the automapper for you - if it is active.

To use, copy the text below the line, paste into notepad, and save as "SMAUG_automapper_helper.xml".

Alternatively, you can download it from:


http://www.mushclient.com/plugins/SMAUG_automapper_helper.xml





<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>
<!-- Saved on Tuesday, August 20, 2002, 10:53 AM -->
<!-- MuClient version 3.26 -->

<!-- Plugin "SMAUG_automapper_helper" generated by Plugin Wizard -->

<!-- 

To modify for other MUDs you would need to change the
trigger, as appropriate, to match how a room name appears
(eg. different colours, maybe not necessarily bold).

-->

<muclient>
<plugin
   name="SMAUG_automapper_helper"
   author="Nick Gammon"
   id="1f35c7a694942758589d3cd8"
   language="VBscript"
   purpose="Adds room names to the auto mapper"
   date_written="2002-08-20 10:49:57"
   requires="3.26"
   version="1.0"
   >
<description trim="y">
<![CDATA[
This plugin (attempts to) detect room names as you walk
around in SMAUG, and if found, and the automapper is active,
adds them to the automapper as a comment.

Usage
-----

Just have the plugin installed and it will detect room names.
It looks for bold, white-on-black text, that does *not* start with the word "Exits:".

automapper:help <-- this help screen
]]>
</description>

</plugin>


<!--  Triggers  -->

<triggers>
  <trigger
   back_colour="8"
   bold="y"
   enabled="y"
   match="^(?!Exits: )(.*)$"
   match_back_colour="y"
   match_bold="y"
   match_inverse="y"
   match_italic="y"
   match_text_colour="y"
   regexp="y"
   script="OnRoomName"
   send_to="2"
   sequence="100"
   text_colour="15"
  >
  </trigger>
</triggers>

<!--  Script  -->


<script>
<![CDATA[
sub OnRoomName (strName, strLine, aryWildcards) 
'
'  if automapper active, add room name as comment
'
  if world.getinfo (112) then
     world.addmappercomment (aryWildcards (1))
  end if

end sub

]]>
</script>


<!--  Plugin help  -->

<aliases>
  <alias
   script="OnHelp"
   match="automapper:help"
   enabled="y"
  >
  </alias>
</aliases>

<script>
<![CDATA[
Sub OnHelp (sName, sLine, wildcards)
  World.Note World.GetPluginInfo (World.GetPluginID, 3)
End Sub
]]>
</script> 

</muclient>
Amended on Tue 20 Aug 2002 01:02 AM by Nick Gammon
#1
Still not clear on how this works. Will it let you type a name of a place and take you to it?
Australia Forum Administrator #2
No, it is intended to help make a speedwalk from one place to another. For example, if you are at the Town Square, turn the automapper on, and then walk to the Mage Shop, you can then save that route as a speedwalk. Later, back at the Town Square, you then use the speedwalk to quickly get there. You can also make a reverse speedwalk to go back again.

I don't see how it could know the names of places and automatically take you there without some sort of database of names, and some way of knowing how to get there.