help! How do I enter pre-written poetry in game?

Posted by Lorraine on Wed 09 Feb 2011 12:51 PM — 4 posts, 21,016 views.

#0
There is a poetry contest in New Worlds Ateraan I want to enter, but I don't know what to do. I can't have all the words run together as in say: - Would it be an alias? Would it be a macro? I need step by step instructions as I am a 'puter dummy I want it to read in-game like a poem.
Like this:
The Short Brigade came marching, marching, marching!
The Short Brigade came marching,
Marching into war!

Next line starts here. I need the space between stanzas. I want it to look like a poem in the game screen. Please tell me what dialog box I need to put this in. Once I have it in there please give me directions on how to use it in the game. I haven't yet even made an alias so be real specific please!

First I do..........next I do.....and then I do.......
Thanks so much
Australia Forum Administrator #1
I presume you are writing the poem, not the computer, right? That would be hard to generate one. ;)

The simple thing is to just make an alias, and put each line in like this, with "say" (or emote or chat, or whatever) in front of it, like this:


<aliases>
  <alias
   match="stanza"
   enabled="y"
   sequence="100"
  >
  <send>

say The Short Brigade came marching, marching, marching!
say The Short Brigade came marching,
say Marching into war!
say .
say The marching goes all quiet, quiet, quiet!
say The Brigade goes quiet.
say Quiet as she goes!
say .
say There is an ominous light, the light that glows!
say The glow is evil.
say The Brigade goes low.
say .
say ... and so on ...

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


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


Then just type "stanza" (which is your alias) to rattle off the lot. Once you have pasted this into the client following the instructions above, just edit it in the Aliases section of the world configuration in the GUI, to change it to whatever you want.

A slightly more complicated method keeps the poem separate, and then goes through it in a script to say each line. That way you can write the poem without having to put "say" in front of everything. Like this:


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

poem = [[
The Short Brigade came marching, marching, marching!
The Short Brigade came marching,
Marching into war!
.
The marching goes all quiet, quiet, quiet!
The Brigade goes quiet.
Quiet as she goes!
.
There is an ominous light, the light that glows!
The glow is evil.
The Brigade goes low.
.
... and so on ...
]]

 
require "getlines"

for line in getlines (poem) do
  Send ("say " .. line)
end -- for loop
</send>
  </alias>
</aliases>


The most sophisticated version builds in a pause between each line (you can change the amount) and a 5-second pause between stanzas:


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

poem = [[
The Short Brigade came marching, marching, marching!
The Short Brigade came marching,
Marching into war!

The marching goes all quiet, quiet, quiet!
The Brigade goes quiet.
Quiet as she goes!

There is an ominous light, the light that glows!
The glow is evil.
The Brigade goes low.

... and so on ...
]]

 
require "getlines"
require "wait"

wait.make ( function ()


  for line in getlines (poem) do
    if line == "" then
       wait.time (5)  -- wait 5 seconds between stanzas
    else
      Send ("say " .. line)
      wait.time (1)  -- wait a second between lines
    end -- if
  end -- for loop


end )  -- function

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

#2
Nick: Thanks for the help I have successfully copied all three versions to "my documents". I will copy them to my mushclient and try them all. Before I do:

Question: Does each version have to have its own trigger?

After I try them all I can delete all but the one I like best?

Can a trigger be changed after the alias has been created?

Advise me please?
Australia Forum Administrator #3
You are confusing me with your use of terminology here. Each one I showed is stand-alone. They are aliases.

An alias reacts to something you type. A trigger reacts to something from the MUD. In all three examples I showed nothing happens until you type "stanza" and then it does its stuff. You only want of the three or you might get all three trying to do something, or the wrong one would do it.

What I imagine will happen is that, during the poetry competition, someone will say "Lorraine, let's hear your poem" at which point you just type "stanza" and out it comes.

If you are supposed to "chat" it then change the word "say" to "chat" or whatever it is.

Quote:

After I try them all I can delete all but the one I like best?


Of course. Try them one by one, I suggest. Make sure you read this post - don't try to overthink it:

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


Quote:

Can a trigger be changed after the alias has been created?


Yes. Once pasted into the program, just look at it in the GUI interface. Click the Edit button on the alias list to make changes.