sub ProcName(name, output, wildcards)
name - is the name of the calling trigger/alias
output - contents of the trigger/alias's send box
wildcards - an array of wildcards, same as %-substitutions in Zmud or Mushclient's triggers/aliases: wildcards(0) = %0, wildcards(1) = %1, etc.
Timers are different since they only pass 1 argument - their name:
To call Mushclient from the script, you use callbacks. These are defined in a special object 'World', which is automatically made visible to the scripting engine, so to do an echo you use:
Another common way of using scripts is to put them directly inside triggers/aliases, just type the script in the Send box and select "Scripting" for the Send to option. Nothing needs to be put in the "Script" box in this case. This way you can do pretty much anything that could be done in the script file, it is especially useful for doing simple tasks, like enabling/disabling triggers/aliases/timers/etc, calling a procedure in the script file without having to make it accept the standard number of arguments, etc.
Confusion about the format of triggers/aliases/timers posted here is resolved quite simply - find some trigger with confusing formatting on these forums, copy it (from-to and including the <triggers></triggers> tags), then go to your Mushclient world window, open the Triggers dialogue and hit the Paste button in the lower right corner. The trigger will be added to the list. You can now open it for editing and see what all that syntax means. The same works in the reverse order - make a trigger in the Trigger edit dialogue, click Add, click Copy in the Triggers dialogue, now go to the forums, browse to this thread, and paste the contents of your clipboard into the text form. You will see the XML source of the trigger.
The reason why your example alias isn't working might be that you haven't changed the Send to option. If it's set to "World" then whatever you typed in the Send box will go directly to the mud as-is, and will be misunderstood there. Select "Scripting" and it should work just fine. You can try posting your alias here, using the method above, that way I can give a more specific diagnosis.