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
➜ General
➜ List of Triggers
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Exodus
(14 posts) Bio
|
| Date
| Fri 19 Jul 2002 03:14 AM (UTC) |
| Message
| Hi there,
I'm tried to figure out a way of writing a script to trigger on a list of room names. The idea is to create a list of names on the script that will set a variable when it identifies each room as you move along.
For example,
Select Case (Room)
Case "A Dark hallway (n,s)"
RoomVar = "Dark halls"
Case "A lonely mountain path (n,s,e,w)"
RoomVar = "Mountain path"
Case "A fiery pit (u)"
RoomVar = "Fire pit"
end select
world.SetVariable "Roomname", "" & RoomVar & ""
when I see .. say "HP:* EP:* A Dark hallway (n,s)", where "HP:* EP:*" is my prompt.
It will set the variable "Roomname" to be "Dark halls"
Instead of having to separately setting a trigger for each room to change the variable accordingly, is there a way them from just one script? And to be able to continue adding rooms as I go along?
Sorry if this doesn't make sense,ii'll try to clarify it. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Fri 19 Jul 2002 08:05 AM (UTC) |
| Message
| What about matching on:
HP:* EP:* *
This way the room name is the third wildcard, and then the script makes the decision the way it does already. |
- 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.
11,696 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top