MUSH Question

by Unknown

Back to Mechanic's Corner.

Unknown2008-03-27 16:46:05
Right now I'm trying to configure the numpad in MUSH so that when I'm in locked into a command chair for a ship, I can use the numpad for ship movement, as well as normal movement for when I'm NOT in a command chair.

I'm thinking I put aliases in the keys and then have the aliases do something different based on a variable.

Is there anyway to do that? Edit: And if so, how do I write out the alias?
Unknown2008-03-27 18:58:47
Use the Accelerator function to create macros, or you may be able to simply override the directions (e.g., north, south, etc.), and execute your own aliases. Your aliases will need a variable to tell what mode you're in, so you can send the correct syntax for movements. How exactly you code it will depend on what script language you're using with your MUSHclient.
Unknown2008-03-27 23:42:51
do like I did for nexus
make the numberpad move, shift+ numberpad ship move, and so on
a bit odd, but it works, trust me
Gregori2008-03-28 02:01:35
What I did is just make an alias for each direction and look. Then another alias called pilot, that turns on or off pilot mode.


CODE
   match="^pilot$"
   enabled="y"
   expand_variables="y"
   group="Piloting"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  if @piloting Then
  setvariable "piloting", "0"
  call info ("Piloting off")
else
  setvariable "piloting", "1"
  call info ("Piloting ON")
end if

  



CODE
   match="^north$"
   enabled="y"
   expand_variables="y"
   group="KEYPAD"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  if @piloting Then
  world.send "pilot steer north"
else
  world.send "north"
end if

  


Then make sure all the direction keys use your direction aliases.