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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Jscript ➜ Its been a while but...

Its been a while but...

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


Posted by Aryzure   (3 posts)  Bio
Date Sat 26 Jul 2003 05:14 PM (UTC)
Message
I was wondering how you can make it so that when you type in a certain thing, like "kill boy" it would become your target so you can use a variable for all the monsters. Like...I type kill boy, and i have an alias set for fireball. The alias would be FB and it'd say fireball @kill or something...then, whoever i had targeted gets fireballed. I dont quite remember how to do this, so can anyone help me?
Top

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 26 Jul 2003 10:54 PM (UTC)
Message
This should do it. The first alias, "kill *" sends the kill command, and also remembers the target. The second one, "FB" uses the saved target.


<aliases>

  <alias
   match="kill *"
   enabled="y"
   send_to="12"
   omit_from_output="y"
   sequence="100"
  >
  <send>Send "kill %1"
SetVariable "target", "%1"</send>
  </alias>

  <alias
   match="FB"
   enabled="y"
   echo_alias="y"
   expand_variables="y"
   sequence="100"
  >
  <send>fireball @target</send>
  </alias>

</aliases>

- Nick Gammon

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

Posted by Aryzure   (3 posts)  Bio
Date Reply #2 on Sun 27 Jul 2003 01:26 AM (UTC)
Message
Alright, thanks a ton man! Sorry, but I forgot to ask how to make a variable. I use to a long time ago but I got a short memory span and forgot how to.
Top

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 27 Jul 2003 01:58 AM (UTC)
Message
It's in the alias above:


SetVariable "name", "contents"

You can also do it in the world configuration screen - Variables tab.

- 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.


15,440 views.

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.