Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Scripting 101 needed for Script-Illiterate

Scripting 101 needed for Script-Illiterate

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  3  

Posted by Adriana   (8 posts)  Bio
Date Tue 27 Apr 2004 (UTC)
Message
I know this sounds rather primitive since everyone here basically knows how to script and all BUT I'm really really REALLY interested in learning how to script triggers and aliases (or plugins?) for MUSHclient. Specifically for Iron Realms games (Aetolia, Achaea, Imperian). However, I have no idea how to start learning. And I'm talking about the absolute basics. Not intermediate knowledge or anything. I'm completely uncomprehending of how to set up a variable for MUSHclient. If anyone can help, I'd be ever so incredibly grateful!!! Just email me.


P.S. I've read as many help files as I've been able to find and I still don't fully understand how to do things as simple as an alias. I can do it via the game that I play but trying to get aliases by mushclient to work for the game just never happens. It doesn't register it. And it hates my targets.

Instant gratification isn't fast enough!
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 27 Apr 2004 12:14 AM (UTC)
Message
It would help to give examples, you can copy the alias giving you problems by selecting it in the alias list and clicking the "copy" button. Then paste it here in the forum.

Also, tell us what you type, and what you expect to happen.

A simple alias I like to start with is a "kill" alias to save typing.

eg.


Match: k *
Send: kill %1


For a bit more fun you can make a trigger detect a mob attacking you.

eg.


Match: The * grazes you.
Send: %1
Send to: variable
Variable: target


This would set up a "targetting" trigger.

You could then use the target in another alias:

eg.


Match: k
Send: kick @target
Expand variables: checked


Actually so far this hasn't needed any scripting. However that should get you started. If you want more help give a specific example of what you are trying to do.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Adriana   (8 posts)  Bio
Date Reply #2 on Tue 27 Apr 2004 03:23 AM (UTC)

Amended on Tue 27 Apr 2004 03:28 AM (UTC) by Adriana

Message
I can understand what you're showing me but I don't even know how to set that up....or where to set it up rather.

The alias that I'm having problems with is exactly that, actually. Do I need to download anything extra for MUSHclient to acknowledge what I'm writing? I have absolutely NO knowledge of javascript, jscript, vbscript, perlwhatever, or anything else of that type. I'm script-illiterate.

*sighs* But anyway, yea that's a basic alias I would love to have but haven't been able to make work.

Oh yea and for instance, my main character on Imperian is Vega. She's a Saboteur that uses a whip to garrote people and things to death. So her command for attacking something or someone is: garrote <target>

ST TAR &TAR allows me to set a target

SETALIAS RR GARROTE &TAR allows me have an alias that will garrote whatever I set the target to be and then instead of typing out garrote so-and-so, I can just ST TAR <target> and then type rr so that I can garrote said target.


Instant gratification isn't fast enough!
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #3 on Tue 27 Apr 2004 03:27 AM (UTC)
Message
Er, which one? I did two aliases there and a trigger.

I assume you are asking about the "target" one.

First, the trigger. Copy the following lines:




<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   match="The * grazes you."
   send_to="9"
   sequence="100"
   variable="target"
  >
  <send>%1</send>
  </trigger>
</triggers>



Go into MUSHclient's triggers configuration list and click the "paste" button. That will put the trigger there, then you can edit it and look at how it works. Then copy this:



<aliases>
  <alias
   match="k"
   enabled="y"
   expand_variables="y"
   sequence="100"
  >
  <send>kick @target</send>
  </alias>
</aliases>



Go into MUSHclient's aliases configuration list and click the "paste" button. Then check out how the alias works. You can model yours on those.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Adriana   (8 posts)  Bio
Date Reply #4 on Tue 27 Apr 2004 03:33 AM (UTC)
Message
I edited my previous post, by the way. I forgot to add a couple of things before posting.

ANYWAY, thank you for showing me what to enter and where. Now I'm kinda curious as to what it all means. What do all of those send /send things mean? Why does it look like HTML? What does sequence mean? Am I being too annoying? Cos seriously, I don't want to be a pain. I just wanna learn how to do these things (meaning understanding them well enough that I can eventually teach myself how to script other things).

I took computer programming and logic but it just showed me basic structure. It didn't teach me an actual script language. And the books I've bought on javascript are no help at all because they all deal with webpages and I don't want to learn it for webpages.

I'm such a problem.


Instant gratification isn't fast enough!
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #5 on Tue 27 Apr 2004 03:33 AM (UTC)
Message
If you are not sure what I mean by the 'paste' button, check out Weapon help.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #6 on Tue 27 Apr 2004 03:35 AM (UTC)
Message
It looks like HTML, yes. It is actually XML which is similar in concept.

The reason for that is it is a simple way of letting forum users copy and paste triggers/aliases etc. via straight text (eg. this forum) or in emails to each other.

When you paste this stuff into MUSHclient it parses the XML fields and fills in the appropriate entries in the trigger/alias etc.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Adriana   (8 posts)  Bio
Date Reply #7 on Tue 27 Apr 2004 03:38 AM (UTC)
Message
.....you lost me now.

Instant gratification isn't fast enough!
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #8 on Tue 27 Apr 2004 03:38 AM (UTC)

Amended on Tue 27 Apr 2004 03:55 AM (UTC) by Nick Gammon

Message
Your TAR alias could be this:


<aliases>
  <alias
   match="TAR *"
   enabled="y"
   variable="target"
   send_to="12"
   sequence="100"
  >
  <send>SetVariable "target", "%1"
ColourNote "white", "blue", "Target now %1"</send>
  </alias>
</aliases>


Then you could type: TAR nick

That would set "target" to "nick"

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Adriana   (8 posts)  Bio
Date Reply #9 on Tue 27 Apr 2004 03:47 AM (UTC)
Message
and where exactly do I put that?


Instant gratification isn't fast enough!
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #10 on Tue 27 Apr 2004 03:52 AM (UTC)
Message
Sorry, this isnt nessisarily related to this problem. But the thread name is just so good..

Nick, I know weve discussed making something for newbies in the past, as a collaborative thing, etc. I know most of us are willing to help, we just need some sort of organization to get started and stuff.

Have you thought about a wiki? Or at least, A wiki while its being developed. Or some derivative thereof (maybe only certain people can edit).

I know I was thinking about writing something for people to learn scripting... just yesterday. But its a daunting task for one person to do. Or even to get started with, theres so many ways to go about doing it.

I guess I just wanted to throw that out there, as I think a wiki would be a good way to do it. Id host it myself, but my hosting company has a lot of red tape when it comes to perl modules. I think itd be easier for you to implement, but I wouldnt mind setting it up if youre reluctant for whatever reasons.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Adriana   (8 posts)  Bio
Date Reply #11 on Tue 27 Apr 2004 03:56 AM (UTC)
Message
Yes, the thread name is rather witty, isn't it? *grins*

Instant gratification isn't fast enough!
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #12 on Tue 27 Apr 2004 03:57 AM (UTC)
Message
where exactly do you put... that..

The alias, copy it from <aliases> to </aliases> (so its on your clipboard) then go to the alias menu, and click paste.

If youre talking about the TAR thing, you just type that in. As if you were sending a command to the mu*.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #13 on Tue 27 Apr 2004 04:07 AM (UTC)
Message
I haven't used a wiki, but a quick browse seems to indicate it is a collection of web pages that people can add to and edit.

In what way is that different to the existing forum?

If you like I can make a new section (eg. hints for beginners) that you can contribute to in the usual way.

The current system has a lot of the things in it that I think are helpful for a database like this:


  • Forum codes for bold, italic, fixed-pitch examples, bulleted points etc.

  • Some control - you have to join to post, you can't amend other people's posts

  • Searching

  • Entries are dated



About the only thing that seems to be really missing is cross-referencing, and that could be added. eg. you might put in the thread number of a related thread to link things together a bit more.




Having said that, I like the idea of some sort of introductory pages. This entire forum is supposed to be a large knowledge-base however it is getting to the stage where it is sometimes hard to separate out minor problems that people have with posts of major tutorial significance.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #14 on Tue 27 Apr 2004 04:09 AM (UTC)

Amended on Tue 27 Apr 2004 04:10 AM (UTC) by Nick Gammon

Message
Did you read this post? It has a graphic, even.

Unfortunately the person who started that thread got the idea into their head to delete their question once I posted the answer, so the answer is out of context a bit, however it still shows how to use the pasting idea.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


100,583 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.