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
➜ Lua
➜ Lua for beginners
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Tisorin
(15 posts) Bio
|
Date
| Mon 21 Jan 2013 12:55 PM (UTC) |
Message
| Greetings,
I'm struggling to create a very easy script which saves a variable and then uses that variable in a trigger.
Example:
Ghir points you the (animal).
Kill (that animal)
I know it is a noob question, but I didn't managed to make it work. | Top |
|
Posted by
| Fadedparadox
USA (91 posts) Bio
|
Date
| Reply #1 on Mon 21 Jan 2013 10:49 PM (UTC) |
Message
| The simple answer. (be sure both trigger and alias are set to send to script)
If a trigger matches: Ghir points you the (animal). and puts the animal in %1, all you really need to do to set the variable is:
target = "%1"
And to use it in an alias, send:
Send ("kill " .. target) | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #2 on Tue 22 Jan 2013 12:10 AM (UTC) |
Message
| |
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.
14,060 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top