Aliases and comments and splitting text between output/to world

Posted by Silencher on Tue 05 Mar 2013 06:46 PM — 4 posts, 20,338 views.

#0
Version: 4.84

I just had a general question about triggers/aliases.

1. How would I add a 'comment' to an alias, preferably one that doesn't go to output/the mud. For example.
--
alias name: quaff
body:
//comment: This alias gets a potion from your backpack and
drinks it. (this would be seen only when editting
the alias)

get potion from backpack
drink potion

--
Obviously I wouldn't actually use a comment like that for something so trivial. But if this could be left within the alias itself for when I go back to edit it and/or if I could have a message added to output (me) not the world.. So using the above example:
--
alias name: quaff
body:
//comment: This alias gets a potion from your backpack and
drinks it. (this would be seen only when editting
the alias)

(sent to world:)
get potion from backpack
drink potion

//output, not sent to world.: Hey, Silencher. Remember to check your supply of potions so you don't run out!
--
Amended on Tue 05 Mar 2013 06:47 PM by Silencher
USA Global Moderator #1
send to script instead of to world and then use Send("stuff to send to the world here") to send stuff to the world. Everything else will be code and can be commented or Note()ed as necessary.
Amended on Wed 06 Mar 2013 03:26 AM by Fiendish
Australia Forum Administrator #2
Like this:


<aliases>
  <alias
   match="quaff"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

-- This alias gets a potion from your backpack and drinks it. 

Send ("get potion from backpack")
Send ("drink potion")

Note ("Watch your potions don't run out!")

</send>
  </alias>
</aliases>


Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.

Amended on Wed 06 Mar 2013 04:59 AM by Nick Gammon
#3
Holy crap that's awesome. Nick, you're a god dude. Thanks very much. This is going to be way helpful in a lot of ways. I really appreciate it.